|
|
@@ -4,6 +4,7 @@
|
|
|
<resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Customer">
|
|
|
<id column="cu_id" jdbcType="INTEGER" property="id" />
|
|
|
<result column="cu_code" jdbcType="VARCHAR" property="cu_code" />
|
|
|
+ <result column="cu_shortname" jdbcType="VARCHAR" property="cu_shortname" />
|
|
|
<result column="cu_name" jdbcType="VARCHAR" property="cu_name" />
|
|
|
<result column="cu_uu" jdbcType="VARCHAR" property="cu_uu" />
|
|
|
<result column="cu_type" jdbcType="VARCHAR" property="cu_type" />
|
|
|
@@ -32,7 +33,7 @@
|
|
|
<result column="cu_remark" jdbcType="VARCHAR" property="cu_remark" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
- cu_id, cu_code, cu_name, cu_uu, cu_type, cu_begindate, cu_beginaramount, cu_beginprerecamount,
|
|
|
+ cu_id, cu_code,cu_shortname, cu_name, cu_uu, cu_type, cu_begindate, cu_beginaramount, cu_beginprerecamount,
|
|
|
cu_promisedays, cu_taxrate, cu_sellerid, cu_sellercode, cu_sellername, cu_credit,
|
|
|
cu_status, cu_statuscode, companyid,
|
|
|
updaterid, updatetime, cu_text1, cu_text2, cu_text3, cu_text4, cu_text5, cu_leftamount,
|
|
|
@@ -58,6 +59,9 @@
|
|
|
<if test="cu_code != null">
|
|
|
cu_code,
|
|
|
</if>
|
|
|
+ <if test="cu_shortname != null">
|
|
|
+ cu_shortname,
|
|
|
+ </if>
|
|
|
<if test="cu_name != null">
|
|
|
cu_name,
|
|
|
</if>
|
|
|
@@ -151,6 +155,9 @@
|
|
|
<if test="cu_code != null">
|
|
|
#{cu_code,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="cu_shortname !=null">
|
|
|
+ #{cu_shortname,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
<if test="cu_name != null">
|
|
|
#{cu_name,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -246,6 +253,9 @@
|
|
|
<if test="cu_code != null">
|
|
|
cu_code = #{cu_code,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="cu_shortname !=null">
|
|
|
+ cu_shortname = #{cu_shortname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="cu_name != null">
|
|
|
cu_name = #{cu_name,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -327,37 +337,6 @@
|
|
|
</set>
|
|
|
where cu_id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
- <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Customer">
|
|
|
- update customer
|
|
|
- set cu_code = #{cu_code,jdbcType=VARCHAR},
|
|
|
- cu_name = #{cu_name,jdbcType=VARCHAR},
|
|
|
- cu_uu = #{cu_uu,jdbcType=VARCHAR},
|
|
|
- cu_type = #{cu_type,jdbcType=VARCHAR},
|
|
|
- cu_begindate = #{cu_begindate,jdbcType=TIMESTAMP},
|
|
|
- cu_beginaramount = #{cu_beginaramount,jdbcType=DOUBLE},
|
|
|
- cu_beginprerecamount = #{cu_beginprerecamount,jdbcType=DOUBLE},
|
|
|
- cu_promisedays = #{cu_promisedays,jdbcType=DOUBLE},
|
|
|
- cu_taxrate = #{cu_taxrate,jdbcType=DOUBLE},
|
|
|
- cu_sellerid = #{cu_sellerid,jdbcType=INTEGER},
|
|
|
- cu_sellercode = #{cu_sellercode,jdbcType=VARCHAR},
|
|
|
- cu_sellername = #{cu_sellername,jdbcType=VARCHAR},
|
|
|
- cu_credit = #{cu_credit,jdbcType=DOUBLE},
|
|
|
- cu_status = #{cu_status,jdbcType=VARCHAR},
|
|
|
- cu_statuscode = #{cu_statuscode,jdbcType=VARCHAR},
|
|
|
- companyid = #{companyid,jdbcType=INTEGER},
|
|
|
- updaterid = #{updaterid,jdbcType=INTEGER},
|
|
|
- updatetime = #{updatetime,jdbcType=TIMESTAMP},
|
|
|
- cu_text1 = #{cu_text1,jdbcType=VARCHAR},
|
|
|
- cu_text2 = #{cu_text2,jdbcType=VARCHAR},
|
|
|
- cu_text3 = #{cu_text3,jdbcType=VARCHAR},
|
|
|
- cu_text4 = #{cu_text4,jdbcType=VARCHAR},
|
|
|
- cu_text5 = #{cu_text5,jdbcType=VARCHAR},
|
|
|
- cu_leftamount = #{cu_leftamount,jdbcType=DOUBLE},
|
|
|
- cu_recamount = #{cu_recamount,jdbcType=DOUBLE},
|
|
|
- cu_preamount = #{cu_preamount,jdbcType=DOUBLE},
|
|
|
- cu_remark = #{cu_remark,jdbcType=VARCHAR}
|
|
|
- where cu_id = #{id,jdbcType=INTEGER}
|
|
|
- </update>
|
|
|
|
|
|
<select id="validateCodeWhenInsert" resultType="int">
|
|
|
select count(1) from customer where cu_code = #{code} and companyId =#{companyId}
|