|
@@ -370,12 +370,12 @@
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="validNameAndCodeWhenInsert" parameterType="com.usoftchina.saas.document.entities.Customer" resultType="int">
|
|
<select id="validNameAndCodeWhenInsert" parameterType="com.usoftchina.saas.document.entities.Customer" resultType="int">
|
|
|
- select count(1) from customer where cu_code = #{cu_code,jdbcType=VARCHAR} or cu_name = #{cu_name,jdbcType=VARCHAR}
|
|
|
|
|
|
|
+ select count(1) from customer where (cu_code = #{cu_code,jdbcType=VARCHAR} or cu_name = #{cu_name,jdbcType=VARCHAR}) and companyId =#{companyId}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="validNameAndCodeWhenUpdate" parameterType="com.usoftchina.saas.document.entities.Customer" resultType="int">
|
|
<select id="validNameAndCodeWhenUpdate" parameterType="com.usoftchina.saas.document.entities.Customer" resultType="int">
|
|
|
select count(1) from customer where (cu_code = #{cu_code,jdbcType=VARCHAR} or cu_name = #{cu_name,jdbcType=VARCHAR})
|
|
select count(1) from customer where (cu_code = #{cu_code,jdbcType=VARCHAR} or cu_name = #{cu_name,jdbcType=VARCHAR})
|
|
|
- and cu_id != #{id}
|
|
|
|
|
|
|
+ and cu_id != #{id} and companyId =#{companyId}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|