|
@@ -8,21 +8,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<select id="getCardManagementPage" resultType="com.iotechn.unimall.data.domain.CardManagementInfo">
|
|
|
SELECT
|
|
|
cmi.id as id,
|
|
|
+ cmi.common_id as receiveId,
|
|
|
cmi.name AS name,
|
|
|
cmi.post AS post,
|
|
|
cmi.company_name as companyName,
|
|
|
phi.scope_of_business AS scopeOfBusiness,
|
|
|
cui.look_page AS lookPage,
|
|
|
- case when (cmi.common_id={commonId}) then 1
|
|
|
+ case when (cmi.common_id=#{commonId}) then 1
|
|
|
when IFNULL((SELECT count(chi.id)
|
|
|
FROM card_holder_info chi
|
|
|
WHERE chi.delete_flag = '0'
|
|
|
- AND chi.common_id ={commonId}
|
|
|
+ AND chi.common_id =#{commonId}
|
|
|
AND chi.card_id =cmi.id ),0) >0 then 1
|
|
|
when IFNULL((SELECT count(cei.id)
|
|
|
FROM card_exchange_info cei
|
|
|
WHERE cei.delete_flag = '0'
|
|
|
- AND cei.send_id ={commonId}
|
|
|
+ AND cei.send_id =#{commonId}
|
|
|
AND (cei.status=1 or cei.status=0 or cei.status=7)
|
|
|
AND cei.receive_card_id =cmi.id ),0) >0 then 1 else 0 end as notDisplay,
|
|
|
cci.gmt_update AS gmtUpdate,
|
|
@@ -32,9 +33,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
LEFT JOIN card_management_info cmi on cmi.id=cci.card_id and cmi.delete_flag=0
|
|
|
LEFT JOIN personal_homepage_info phi on phi.common_id=cmi.common_id and phi.delete_flag=0
|
|
|
LEFT JOIN common_user_info cui on cui.id=cmi.common_id and cui.delete_flag=0
|
|
|
- LEFT JOIN card_holder_info ch on ch.common_id={commonId} and ch.card_id=cmi.id and ch.delete_flag=0
|
|
|
+ LEFT JOIN card_holder_info ch on ch.common_id=#{commonId} and ch.card_id=cmi.id and ch.delete_flag=0
|
|
|
WHERE
|
|
|
- cci.circle_id = {id}
|
|
|
+ cci.circle_id = #{id}
|
|
|
and cci.delete_flag=0
|
|
|
<if test="status != null">
|
|
|
<if test="status == 1">
|
|
@@ -58,9 +59,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
LEFT JOIN card_management_info cmi on cmi.id=cci.card_id and cmi.delete_flag=0
|
|
|
LEFT JOIN personal_homepage_info phi on phi.common_id=cmi.common_id and phi.delete_flag=0
|
|
|
LEFT JOIN common_user_info cui on cui.id=cmi.common_id and cui.delete_flag=0
|
|
|
- LEFT JOIN card_holder_info ch on ch.common_id={commonId} and ch.card_id=cmi.id and ch.delete_flag=0
|
|
|
+ LEFT JOIN card_holder_info ch on ch.common_id=#{commonId} and ch.card_id=cmi.id and ch.delete_flag=0
|
|
|
WHERE
|
|
|
- cci.circle_id = {id}
|
|
|
+ cci.circle_id = #{id}
|
|
|
and cci.delete_flag=0
|
|
|
<if test="status != null">
|
|
|
<if test="status == 1">
|