基础信息 供应商

highway
A0010407 1 year ago
parent ab903aae71
commit 5f4f16870a

@ -97,6 +97,17 @@ public class BaseSupplier extends BaseEntity {
@Excel(name = "用户自定义3")
private String userDefined3;
/** 删除标志 */
@Excel(name = "删除标志")
private String delFlag;
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getDelFlag() {
return delFlag;
}
public void setSupplierId(String supplierId) {
this.supplierId = supplierId;
}
@ -274,6 +285,7 @@ public class BaseSupplier extends BaseEntity {
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("delFlag", getDelFlag())
.toString();
}
}

@ -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>
Loading…
Cancel
Save