wanghui 8 years ago
parent
commit
038c7a48d5
1 changed files with 40 additions and 3 deletions
  1. 40 3
      src/main/java/com/goafanti/common/mapper/CustomerMapper.xml

+ 40 - 3
src/main/java/com/goafanti/common/mapper/CustomerMapper.xml

@@ -481,9 +481,6 @@
    	<if test="adminName != null">
    	 	and e.name = #{adminName,jdbcType=VARCHAR}
    	</if>
-   	<if test="page_sql!=null">
-		${page_sql}
-	</if>
   </select>
   
   <select id="selectCustomerById" parameterType="java.lang.String" resultType="com.goafanti.customer.bo.CustomerOut">
@@ -507,4 +504,44 @@
     left join admin d on a.aid=d.id
     where a.id = #{id,jdbcType=VARCHAR} and b.primary_flg=0
   </select> 
+  
+  <update id="updCustomerByPrimaryKey" parameterType="com.goafanti.common.model.Customer">
+    update customer
+    <set>
+      <if test="aid != null">
+        aid = #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="paid != null">
+        paid = #{paid,jdbcType=VARCHAR},
+      </if>
+      <if test="shareType != null">
+        share_type = #{shareType,jdbcType=INTEGER},
+      </if>
+      <if test="customerType != null">
+        customer_type = #{customerType,jdbcType=INTEGER},
+      </if>
+      <if test="customerStatus != null">
+        customer_status = #{customerStatus,jdbcType=INTEGER},
+      </if>
+      <if test="companyIntention != null">
+        company_intention = #{companyIntention,jdbcType=CHAR},
+      </if>
+      <if test="followSituation != null">
+        follow_situation = #{followSituation,jdbcType=INTEGER},
+      </if>
+      <if test="tag != null">
+        tag = #{tag,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="followId != null">
+        follow_id = #{followId,jdbcType=VARCHAR},
+      </if>
+      <if test="effective != null">
+        effective = #{effective,jdbcType=INTEGER},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
 </mapper>