md
This commit is contained in:
parent
b5fca51d5b
commit
dcb48f8a20
@ -1,10 +1,10 @@
|
||||
/**
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisCustomerAddress.java
|
||||
* @author linfso
|
||||
* @date 2024-03-01 04:47:51
|
||||
* @date 2024-03-07 11:24:07
|
||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @version v1.0
|
||||
* @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.TreeEntity;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
@ -25,9 +26,9 @@ import lombok.Data;
|
||||
* @ClassName EmisCustomerAddress
|
||||
* @Description 客户收寄件地址
|
||||
* @author linfso
|
||||
* @date 2024-03-01 04:47:51
|
||||
* @date 2024-03-07 11:24:07
|
||||
*/
|
||||
@Data
|
||||
@Data
|
||||
public class EmisCustomerAddress extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -36,6 +37,10 @@ public class EmisCustomerAddress extends BaseEntity
|
||||
private Long id;
|
||||
/* 客户user_id */
|
||||
private Long userId;
|
||||
/* 客户编码 */
|
||||
private String customerCode;
|
||||
/* 客户名称 */
|
||||
private String shortName;
|
||||
/* 别名 */
|
||||
private String alias;
|
||||
/* 地址类型 1-收 2-寄 */
|
||||
|
||||
@ -1,12 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xdadan.erp.emis.mapper.EmisCustomerAddressMapper">
|
||||
|
||||
|
||||
<resultMap type="EmisCustomerAddress" id="EmisCustomerAddressResult">
|
||||
<result property="id" column="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="addressType" column="address_type" />
|
||||
<result property="province" column="province" />
|
||||
@ -31,14 +33,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<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>
|
||||
|
||||
<select id="selectEmisCustomerAddressList" parameterType="EmisCustomerAddress" resultMap="EmisCustomerAddressResult">
|
||||
<include refid="selectEmisCustomerAddressVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="id != null "> and id = #{id}</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="addressType != null and addressType != ''"> and address_type like concat('%', #{addressType}, '%')</if>
|
||||
<if test="province != null and province != ''"> and province like concat('%', #{province}, '%')</if>
|
||||
@ -63,18 +67,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<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
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertEmisCustomerAddress" parameterType="EmisCustomerAddress">
|
||||
insert into emis_customer_address
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">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="addressType != null and addressType != ''">address_type,</if>
|
||||
<if test="province != null and province != ''">province,</if>
|
||||
@ -96,10 +102,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
</trim>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</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="addressType != null and addressType != ''">#{addressType},</if>
|
||||
<if test="province != null and province != ''">#{province},</if>
|
||||
@ -121,13 +129,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
</trim>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEmisCustomerAddress" parameterType="EmisCustomerAddress">
|
||||
update emis_customer_address
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<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="addressType != null and addressType != ''">address_type = #{addressType},</if>
|
||||
<if test="province != null and province != ''">province = #{province},</if>
|
||||
@ -158,7 +168,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisCustomerAddressByIds" parameterType="String">
|
||||
delete from emis_customer_address where id in
|
||||
delete from emis_customer_address where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user