From e6883f7be0a81d6423b8c9e9ed8290bfe5852eea Mon Sep 17 00:00:00 2001
From: wuxw7 <wuxw7@asiainfo.com>
Date: 星期六, 29 四月 2017 19:52:49 +0800
Subject: [PATCH] 完成客户信息撤销,作废接口

---
 config/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/config/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml b/config/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml
index d85193f..c8c10c1 100644
--- a/config/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml
+++ b/config/src/main/resources/mapper/user/UserServiceDaoImplMapper.xml
@@ -74,9 +74,13 @@
     </insert>
     <!-- 鍒犻櫎瀹炰緥瀹㈡埛淇℃伅 cust -->
     <update id="deleteDataToCustAttr" parameterType="com.java110.entity.user.CustAttr">
-        <![CDATA[
-           delete * from cust_attr ct where ct.custId = #{custId} and ct.attrCd = #{attrCd}
-        ]]>
+           delete * from cust_attr ct where 1=1
+           <if test="custId != null and custId != ''">
+               and ct.custId = #{custId}
+           </if>
+            <if test="attrCd != null and attrCd != ''">
+                and ct.attrCd = #{attrCd}
+            </if>
     </update>
     <!--鏍规嵁瀹㈡埛ID 鏌ヨ瀹㈡埛淇℃伅锛屽叾涓寘鎷� cust 鍜宑ustAttr 鏁版嵁-->
     <select id="queryDataToCust" parameterType="com.java110.entity.user.Cust" resultMap="custMap">
@@ -91,7 +95,7 @@
 
     <!-- 鏌ヨ瀹㈡埛杩囩▼鏁版嵁 -->
     <select id="queryBoCust" parameterType="com.java110.entity.user.BoCust" resultType="com.java110.entity.user.BoCust">
-        select bc.custId,bc.name,bc.email,bc.cellphone,bc.realName,bc.sex,bc.password,bc.lanId,bc.custAdress,bc.custType,bc.openId
+        select bc.boId,bc.custId,bc.name,bc.email,bc.cellphone,bc.realName,bc.sex,bc.password,bc.lanId,bc.custAdress,bc.custType,bc.openId,bc.create_dt
         from bo_cust bc where 1=1
         <if test="boId != null and boId != ''">
             and bc.boId = #{boId}
@@ -100,16 +104,22 @@
             and bc.custId = #{custId}
         </if>
         and bc.state in ('ADD','DEL')
+        <if test="create_dt != null and create_dt != ''">
+            order by bc.create_dt desc
+        </if>
     </select>
     <!-- 鏌ヨ瀹㈡埛灞炴�ц繃绋嬭〃-->
     <select id="queryBoCustAttr" parameterType="com.java110.entity.user.BoCustAttr" resultType="com.java110.entity.user.BoCustAttr">
-        select * from bo_cust_attr bca where 1=1
+        select bca.boId,bca.custId,bca.attrCd,bca.value,bca.state,bca.create_dt from bo_cust_attr bca where 1=1
         <if test="boId !=null and boId != ''">
             and bca.boId = #{boId}
         </if>
         <if test="custId != null and custId != ''">
             and bca.custId = #{custId}
         </if>
+        <if test="create_dt != null and create_dt != ''">
+            order by bc.create_dt desc
+        </if>
     </select>
 
 </mapper>

--
Gitblit v1.8.0