This commit is contained in:
linfso 2024-03-07 19:24:50 +08:00
parent b5fca51d5b
commit dcb48f8a20
2 changed files with 31 additions and 16 deletions

View File

@ -2,7 +2,7 @@
* @Project: emis * @Project: emis
* @Title: EmisCustomerAddress.java * @Title: EmisCustomerAddress.java
* @author linfso * @author linfso
* @date 2024-03-01 04:47:51 * @date 2024-03-07 11:24:07
* @Copyright: ShangHai Duta 2022 All rights reserved. * @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0 * @version v1.0
* @Description: <p> 客户收寄件地址 实体类 </p> * @Description: <p> 客户收寄件地址 实体类 </p>
@ -17,6 +17,7 @@ import com.xdadan.erp.common.annotation.Excel;
import com.xdadan.erp.common.core.domain.BaseEntity; import com.xdadan.erp.common.core.domain.BaseEntity;
import com.xdadan.erp.common.core.domain.TreeEntity; import com.xdadan.erp.common.core.domain.TreeEntity;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import lombok.Data; import lombok.Data;
@ -25,7 +26,7 @@ import lombok.Data;
* @ClassName EmisCustomerAddress * @ClassName EmisCustomerAddress
* @Description 客户收寄件地址 * @Description 客户收寄件地址
* @author linfso * @author linfso
* @date 2024-03-01 04:47:51 * @date 2024-03-07 11:24:07
*/ */
@Data @Data
public class EmisCustomerAddress extends BaseEntity public class EmisCustomerAddress extends BaseEntity
@ -36,6 +37,10 @@ public class EmisCustomerAddress extends BaseEntity
private Long id; private Long id;
/* 客户user_id */ /* 客户user_id */
private Long userId; private Long userId;
/* 客户编码 */
private String customerCode;
/* 客户名称 */
private String shortName;
/* 别名 */ /* 别名 */
private String alias; private String alias;
/* 地址类型 1-收 2-寄 */ /* 地址类型 1-收 2-寄 */

View File

@ -7,6 +7,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="EmisCustomerAddress" id="EmisCustomerAddressResult"> <resultMap type="EmisCustomerAddress" id="EmisCustomerAddressResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="userId" column="user_id" /> <result property="userId" column="user_id" />
<result property="customerCode" column="customer_code" />
<result property="shortName" column="short_name" />
<result property="alias" column="alias" /> <result property="alias" column="alias" />
<result property="addressType" column="address_type" /> <result property="addressType" column="address_type" />
<result property="province" column="province" /> <result property="province" column="province" />
@ -31,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectEmisCustomerAddressVo"> <sql id="selectEmisCustomerAddressVo">
select id, user_id, alias, address_type, province, city, district, town, address, post_code, name, phone, country, email, company, bl_default_flag, order_num, del_flag, create_by, create_time, update_by, update_time, remark from emis_customer_address select id, user_id, customer_code, short_name, alias, address_type, province, city, district, town, address, post_code, name, phone, country, email, company, bl_default_flag, order_num, del_flag, create_by, create_time, update_by, update_time, remark from emis_customer_address
</sql> </sql>
<select id="selectEmisCustomerAddressList" parameterType="EmisCustomerAddress" resultMap="EmisCustomerAddressResult"> <select id="selectEmisCustomerAddressList" parameterType="EmisCustomerAddress" resultMap="EmisCustomerAddressResult">
@ -39,6 +41,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> <where>
<if test="id != null "> and id = #{id}</if> <if test="id != null "> and id = #{id}</if>
<if test="userId != null "> and user_id = #{userId}</if> <if test="userId != null "> and user_id = #{userId}</if>
<if test="customerCode != null and customerCode != ''"> and customer_code like concat('%', #{customerCode}, '%')</if>
<if test="shortName != null and shortName != ''"> and short_name like concat('%', #{shortName}, '%')</if>
<if test="alias != null and alias != ''"> and alias like concat('%', #{alias}, '%')</if> <if test="alias != null and alias != ''"> and alias like concat('%', #{alias}, '%')</if>
<if test="addressType != null and addressType != ''"> and address_type like concat('%', #{addressType}, '%')</if> <if test="addressType != null and addressType != ''"> and address_type like concat('%', #{addressType}, '%')</if>
<if test="province != null and province != ''"> and province like concat('%', #{province}, '%')</if> <if test="province != null and province != ''"> and province like concat('%', #{province}, '%')</if>
@ -65,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectEmisCustomerAddressById" parameterType="Long" resultMap="EmisCustomerAddressResult"> <select id="selectEmisCustomerAddressById" parameterType="Long" resultMap="EmisCustomerAddressResult">
select id, user_id, alias, address_type, province, city, district, town, address, post_code, name, phone, country, email, company, bl_default_flag, order_num, del_flag, create_by, create_time, update_by, update_time, remark select id, user_id, customer_code, short_name, alias, address_type, province, city, district, town, address, post_code, name, phone, country, email, company, bl_default_flag, order_num, del_flag, create_by, create_time, update_by, update_time, remark
from emis_customer_address a from emis_customer_address a
where a.id = #{id} where a.id = #{id}
</select> </select>
@ -75,6 +79,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if> <if test="id != null">id,</if>
<if test="userId != null">user_id,</if> <if test="userId != null">user_id,</if>
<if test="customerCode != null and customerCode != ''">customer_code,</if>
<if test="shortName != null and shortName != ''">short_name,</if>
<if test="alias != null and alias != ''">alias,</if> <if test="alias != null and alias != ''">alias,</if>
<if test="addressType != null and addressType != ''">address_type,</if> <if test="addressType != null and addressType != ''">address_type,</if>
<if test="province != null and province != ''">province,</if> <if test="province != null and province != ''">province,</if>
@ -100,6 +106,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if> <if test="id != null">#{id},</if>
<if test="userId != null">#{userId},</if> <if test="userId != null">#{userId},</if>
<if test="customerCode != null and customerCode != ''">#{customerCode},</if>
<if test="shortName != null and shortName != ''">#{shortName},</if>
<if test="alias != null and alias != ''">#{alias},</if> <if test="alias != null and alias != ''">#{alias},</if>
<if test="addressType != null and addressType != ''">#{addressType},</if> <if test="addressType != null and addressType != ''">#{addressType},</if>
<if test="province != null and province != ''">#{province},</if> <if test="province != null and province != ''">#{province},</if>
@ -128,6 +136,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update emis_customer_address update emis_customer_address
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="userId != null">user_id = #{userId},</if> <if test="userId != null">user_id = #{userId},</if>
<if test="customerCode != null and customerCode != ''">customer_code = #{customerCode},</if>
<if test="shortName != null and shortName != ''">short_name = #{shortName},</if>
<if test="alias != null and alias != ''">alias = #{alias},</if> <if test="alias != null and alias != ''">alias = #{alias},</if>
<if test="addressType != null and addressType != ''">address_type = #{addressType},</if> <if test="addressType != null and addressType != ''">address_type = #{addressType},</if>
<if test="province != null and province != ''">province = #{province},</if> <if test="province != null and province != ''">province = #{province},</if>