Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -494,7 +494,7 @@
|
||||
</if>
|
||||
</select>
|
||||
<select id="getLines" resultType="com.cool.store.dto.openPreparation.PlanLineDTO">
|
||||
select xli.id as lineId, xli.mobile as mobile, xli.username as username, eu.name as name
|
||||
select xli.id as lineId, xli.mobile as mobile, xli.username as username,xli.investment_manager as investmentManagerId ,eu.name as name
|
||||
from xfsg_line_info xli
|
||||
join enterprise_user_${enterpriseId} eu on xli.investment_manager = eu.user_id
|
||||
where deleted = 0 and join_status = 1 and line_status = 1
|
||||
|
||||
@@ -46,32 +46,33 @@
|
||||
</select>
|
||||
<select id="getOpenPlanShopListByCondition"
|
||||
resultType="com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO">
|
||||
select si.id as shopId, si.region_id AS regionId,si.line_id as lineId, si.shop_name as shopName,
|
||||
si.store_num as storeNum, si.shop_manager_user_id as shopManagerUserId,li.investment_manager AS investmentManagerId,
|
||||
li.username as partnerName, li.mobile as mobile ,
|
||||
op.submission_time AS submissionTime , op.result_type AS resultType
|
||||
from xfsg_opening_operation_plan op
|
||||
join xfsg_shop_info si on si.id = op.shop_id
|
||||
join xfsg_line_info li on si.line_id = li.id
|
||||
where 1=1
|
||||
<if test="request.shopName != null and request.shopName != '' ">
|
||||
AND si.shop_name like concat('%', #{request.shopName}, '%')
|
||||
</if>
|
||||
<if test="request.resultType != null and request.resultType != ''">
|
||||
AND op.result_type = #{request.resultType}
|
||||
</if>
|
||||
<if test="request.planStartDate != null and request.planStartDate != ''">
|
||||
and op.create_time >= #{request.planStartDate}
|
||||
</if>
|
||||
<if test="request.planEndDate != null and request.planEndDate != ''">
|
||||
AND op.create_time <= #{request.planEndDate}
|
||||
</if>
|
||||
<if test="request.regionIds != null and request.regionIds.size() > 0">
|
||||
and si.region_id in
|
||||
<foreach collection="request.regionIds" item="regionId" index="index" open="(" separator="," close=")">
|
||||
#{regionId}
|
||||
</foreach>
|
||||
</if>
|
||||
select si.id as shopId, si.region_id AS regionId,si.line_id as lineId, si.shop_name as shopName,
|
||||
si.store_num as storeNum, si.shop_manager_user_id as shopManagerUserId,op.submission_time AS submissionTime ,
|
||||
op.result_type AS resultType
|
||||
from xfsg_opening_operation_plan op
|
||||
join xfsg_shop_info si on si.id = op.shop_id
|
||||
where 1=1
|
||||
<if test="request.shopName != null and request.shopName != '' ">
|
||||
AND si.shop_name like concat('%', #{request.shopName}, '%')
|
||||
</if>
|
||||
<if test="request.resultType != null and request.resultType != ''">
|
||||
AND op.result_type = #{request.resultType}
|
||||
</if>
|
||||
<if test="request.planStartDate == null and request.planEndDate == null">
|
||||
and op.create_time >= DATE_SUB(CURDATE(), INTERVAL 3 MONTH)
|
||||
</if>
|
||||
<if test="request.planStartDate != null">
|
||||
and op.create_time >= #{request.planStartDate}
|
||||
</if>
|
||||
<if test="request.planEndDate != null">
|
||||
AND op.create_time <= #{request.planEndDate}
|
||||
</if>
|
||||
<if test="request.regionIds != null and request.regionIds.size() > 0">
|
||||
and si.region_id in
|
||||
<foreach collection="request.regionIds" item="regionId" index="index" open="(" separator="," close=")">
|
||||
#{regionId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user