|
|
|
@ -31,10 +31,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectBaseSupplierVo">
|
|
|
|
|
select supplier_id, supplier_code, zh_desc, en_desc, supplier_type, account_number, licence_number, business_scope, province, city, area, address, postcode, contact, contact_phone, contact_position, contact_email, active_flag, user_defined1, user_defined2, user_defined3, create_by, create_time, update_by, update_time, remark from base_supplier
|
|
|
|
|
select supplier_id, supplier_code, zh_desc, en_desc, supplier_type, account_number, licence_number, business_scope, province, city, area, address, postcode, contact, contact_phone, contact_position, contact_email, active_flag, user_defined1, user_defined2, user_defined3, create_by, create_time, update_by, update_time, remark ,del_flag from base_supplier
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseSupplierList" parameterType="BaseSupplier" resultMap="BaseSupplierResult">
|
|
|
|
@ -60,12 +61,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="userDefined1 != null and userDefined1 != ''"> and user_defined1 = #{userDefined1}</if>
|
|
|
|
|
<if test="userDefined2 != null and userDefined2 != ''"> and user_defined2 = #{userDefined2}</if>
|
|
|
|
|
<if test="userDefined3 != null and userDefined3 != ''"> and user_defined3 = #{userDefined3}</if>
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseSupplierBySupplierId" parameterType="String" resultMap="BaseSupplierResult">
|
|
|
|
|
<include refid="selectBaseSupplierVo"/>
|
|
|
|
|
where supplier_id = #{supplierId}
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertBaseSupplier" parameterType="BaseSupplier">
|
|
|
|
@ -160,27 +163,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
where supplier_id = #{supplierId}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteBaseSupplierBySupplierId" parameterType="String">
|
|
|
|
|
delete from base_supplier where supplier_id = #{supplierId}
|
|
|
|
|
</delete>
|
|
|
|
|
<update id="deleteBaseSupplierBySupplierId" parameterType="String">
|
|
|
|
|
update base_supplier
|
|
|
|
|
set del_flag = '1'
|
|
|
|
|
where supplier_id = #{supplierId}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteBaseSupplierBySupplierIds" parameterType="String">
|
|
|
|
|
delete from base_supplier where supplier_id in
|
|
|
|
|
<update id="deleteBaseSupplierBySupplierIds" parameterType="String">
|
|
|
|
|
update base_supplier
|
|
|
|
|
set del_flag = '1'
|
|
|
|
|
where supplier_id in
|
|
|
|
|
<foreach item="supplierId" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{supplierId}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<select id="checkNameUnique" parameterType="BaseSupplier" resultType ="java.lang.String">
|
|
|
|
|
select zh_desc
|
|
|
|
|
from base_supplier
|
|
|
|
|
where zh_desc = #{zhDesc}
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="checkCodeUnique" parameterType="BaseSupplier" resultType ="java.lang.String">
|
|
|
|
|
select supplier_code
|
|
|
|
|
from base_supplier
|
|
|
|
|
where supplier_code = #{supplierCode}
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|