去掉重复sql
This commit is contained in:
parent
c8a7c14cf7
commit
251b75b44a
|
|
@ -191,38 +191,6 @@
|
||||||
)
|
)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 查询用户详细信息 -->
|
|
||||||
<select id="queryCustInfo" resultType="com.bonus.core.customer.vo.CustInfoVo">
|
|
||||||
select ci.cust_limit_id,
|
|
||||||
<if test="info.serialNum != null and info.serialNum != ''">
|
|
||||||
ac.serial_num,
|
|
||||||
ac.card_status,
|
|
||||||
</if>
|
|
||||||
ci.alipay_contract_num,
|
|
||||||
<include refid="detailInfo"/>
|
|
||||||
from cust_info ci
|
|
||||||
left join cust_diet_like cd on ci.cust_id = cd.cust_id and cd.if_del = 2
|
|
||||||
left join acc_info ai on ci.cust_id = ai.cust_id
|
|
||||||
<if test="info.serialNum != null and info.serialNum != ''">
|
|
||||||
left join acc_card ac on ci.cust_id = ac.cust_id and ac.card_status in(1,4)
|
|
||||||
</if>
|
|
||||||
|
|
||||||
LEFT JOIN cust_place place ON ci.place_id = place.place_id
|
|
||||||
where 1 = 1
|
|
||||||
<if test="info.custId != null">
|
|
||||||
and ci.cust_id = #{info.custId}
|
|
||||||
</if>
|
|
||||||
<if test="info.custLimitId != null">
|
|
||||||
and ci.cust_limit_id = #{info.custLimitId}
|
|
||||||
</if>
|
|
||||||
<if test="info.serialNum != null and info.serialNum != ''">
|
|
||||||
and ac.serial_num = #{info.serialNum}
|
|
||||||
</if>
|
|
||||||
<if test="info.custState != null">
|
|
||||||
and ci.cust_state = #{info.custState}
|
|
||||||
</if>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="getCustPayVO" resultType="com.bonus.core.customer.vo.CustPayVO">
|
<select id="getCustPayVO" resultType="com.bonus.core.customer.vo.CustPayVO">
|
||||||
SELECT a.cust_id,
|
SELECT a.cust_id,
|
||||||
a.psn_type,
|
a.psn_type,
|
||||||
|
|
|
||||||
Reference in New Issue