md
This commit is contained in:
parent
2134b5b249
commit
f691655de7
@ -0,0 +1,118 @@
|
||||
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisCustomerAddressController.java
|
||||
* @author linfso
|
||||
* @date 2024-03-01 04:47:51
|
||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 客户收寄件地址 控制器 </p>
|
||||
*/
|
||||
|
||||
package com.xdadan.erp.web.emis;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.xdadan.erp.common.annotation.Log;
|
||||
import com.xdadan.erp.common.core.controller.BaseController;
|
||||
import com.xdadan.erp.common.core.domain.AjaxResult;
|
||||
import com.xdadan.erp.common.core.page.TableDataInfo;
|
||||
import com.xdadan.erp.common.enums.BusinessType;
|
||||
import com.xdadan.erp.common.utils.StringUtils;
|
||||
import com.xdadan.erp.common.utils.poi.ExcelUtil;
|
||||
|
||||
import com.xdadan.erp.emis.domain.EmisCustomerAddress;
|
||||
import com.xdadan.erp.emis.service.IEmisCustomerAddressService;
|
||||
|
||||
/**
|
||||
* 客户收寄件地址Controller
|
||||
*
|
||||
* @author linfso
|
||||
* @date 2024-03-01 04:47:51
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/emis/emisCustomerAddress")
|
||||
public class EmisCustomerAddressController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IEmisCustomerAddressService emisCustomerAddressService;
|
||||
|
||||
/**
|
||||
* 查询客户收寄件地址列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisCustomerAddress:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EmisCustomerAddress emisCustomerAddress)
|
||||
{
|
||||
startPage();
|
||||
List<EmisCustomerAddress> list = emisCustomerAddressService.selectEmisCustomerAddressList(emisCustomerAddress);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出客户收寄件地址列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisCustomerAddress:export')")
|
||||
@Log(title = "客户收寄件地址", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EmisCustomerAddress emisCustomerAddress)
|
||||
{
|
||||
List<EmisCustomerAddress> list = emisCustomerAddressService.selectEmisCustomerAddressList(emisCustomerAddress);
|
||||
ExcelUtil<EmisCustomerAddress> util = new ExcelUtil<EmisCustomerAddress>(EmisCustomerAddress.class);
|
||||
util.exportExcel(response, list, "客户收寄件地址数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取客户收寄件地址详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisCustomerAddress:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(emisCustomerAddressService.selectEmisCustomerAddressById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增客户收寄件地址
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisCustomerAddress:add')")
|
||||
@Log(title = "客户收寄件地址", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EmisCustomerAddress emisCustomerAddress)
|
||||
{
|
||||
return toAjax(emisCustomerAddressService.insertEmisCustomerAddress(emisCustomerAddress));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改客户收寄件地址
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisCustomerAddress:edit')")
|
||||
@Log(title = "客户收寄件地址", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EmisCustomerAddress emisCustomerAddress)
|
||||
{
|
||||
return toAjax(emisCustomerAddressService.updateEmisCustomerAddress(emisCustomerAddress));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除客户收寄件地址
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('emis:emisCustomerAddress:remove')")
|
||||
@Log(title = "客户收寄件地址", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(emisCustomerAddressService.deleteEmisCustomerAddressByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisCustomerAddress.java
|
||||
* @author linfso
|
||||
* @date 2024-03-01 04:47:51
|
||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 客户收寄件地址 实体类 </p>
|
||||
*/
|
||||
|
||||
package com.xdadan.erp.emis.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
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.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName EmisCustomerAddress
|
||||
* @Description 客户收寄件地址
|
||||
* @author linfso
|
||||
* @date 2024-03-01 04:47:51
|
||||
*/
|
||||
@Data
|
||||
public class EmisCustomerAddress extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/* id */
|
||||
private Long id;
|
||||
/* 客户user_id */
|
||||
private Long userId;
|
||||
/* 别名 */
|
||||
private String alias;
|
||||
/* 地址类型 1-收 2-寄 */
|
||||
private String addressType;
|
||||
/* 省 */
|
||||
private String province;
|
||||
/* 市 */
|
||||
private String city;
|
||||
/* 区 */
|
||||
private String district;
|
||||
/* 城镇 */
|
||||
private String town;
|
||||
/* 地址 */
|
||||
private String address;
|
||||
/* 邮编 */
|
||||
private String postCode;
|
||||
/* 姓名 */
|
||||
private String name;
|
||||
/* 电话 */
|
||||
private String phone;
|
||||
/* 国家 */
|
||||
private String country;
|
||||
/* email */
|
||||
private String email;
|
||||
/* 公司 */
|
||||
private String company;
|
||||
/* 是否默认 1-是 0-否 */
|
||||
private String blDefaultFlag;
|
||||
/* 排序 */
|
||||
private String orderNum;
|
||||
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisCustomerAddressMapper.java
|
||||
* @author linfso
|
||||
* @date 2024-03-01 04:47:51
|
||||
* @Copyright: ShangHai Doitinfo 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 客户收寄件地址 Mapper 接口 </p>
|
||||
* <span style='color:red'> Warning : This file is generate by ai tools,don't edit!!! </span>
|
||||
*/
|
||||
package com.xdadan.erp.emis.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xdadan.erp.emis.domain.EmisCustomerAddress;
|
||||
/**
|
||||
* @ClassName EmisCustomerAddressMapper
|
||||
* @Description <p> 客户收寄件地址 Mapper 接口 </p>
|
||||
* @author linfso
|
||||
* @date 2024-03-01 04:47:51
|
||||
*/
|
||||
public interface EmisCustomerAddressMapper extends BaseMapper<EmisCustomerAddress>
|
||||
{
|
||||
/**
|
||||
* 主键查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public EmisCustomerAddress selectEmisCustomerAddressById(Long id);
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*
|
||||
* @param emisCustomerAddress
|
||||
* @return 集合
|
||||
*/
|
||||
public List<EmisCustomerAddress> selectEmisCustomerAddressList(EmisCustomerAddress emisCustomerAddress);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param emisCustomerAddress
|
||||
* @return
|
||||
*/
|
||||
public int insertEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param emisCustomerAddress
|
||||
* @return
|
||||
*/
|
||||
public int updateEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisCustomerAddressById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisCustomerAddressByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisCustomerAddressService.java
|
||||
* @author linfso
|
||||
* @date 2024-03-01 04:47:51
|
||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 客户收寄件地址 服务类接口 </p>
|
||||
*/
|
||||
package com.xdadan.erp.emis.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.xdadan.erp.emis.domain.EmisCustomerAddress;
|
||||
|
||||
/**
|
||||
* @ClassName EmisCustomerAddressService
|
||||
* @Description 客户收寄件地址
|
||||
* @author linfso
|
||||
* @date 2024-03-01 04:47:51
|
||||
*/
|
||||
public interface IEmisCustomerAddressService
|
||||
{
|
||||
/**
|
||||
* 主键查询
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public EmisCustomerAddress selectEmisCustomerAddressById(Long id);
|
||||
|
||||
/**
|
||||
* 查询客户收寄件地址列表
|
||||
*
|
||||
* @param emisCustomerAddress 客户收寄件地址
|
||||
* @return 客户收寄件地址集合
|
||||
*/
|
||||
public List<EmisCustomerAddress> selectEmisCustomerAddressList(EmisCustomerAddress emisCustomerAddress);
|
||||
|
||||
/**
|
||||
* 新增客户收寄件地址
|
||||
*
|
||||
* @param emisCustomerAddress 客户收寄件地址
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress);
|
||||
|
||||
/**
|
||||
* 修改客户收寄件地址
|
||||
*
|
||||
* @param emisCustomerAddress 客户收寄件地址
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress);
|
||||
|
||||
/**
|
||||
* 批量删除客户收寄件地址
|
||||
*
|
||||
* @param ids 需要删除的客户收寄件地址主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisCustomerAddressByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除客户收寄件地址信息
|
||||
*
|
||||
* @param id 客户收寄件地址主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisCustomerAddressById(Long id);
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisCustomerAddressServiceImpl.java
|
||||
* @author linfso
|
||||
* @date 2024-03-01 04:47:51
|
||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 客户收寄件地址 实体类 </p>
|
||||
*/
|
||||
|
||||
package com.xdadan.erp.emis.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.xdadan.erp.emis.domain.EmisCustomerAddress;
|
||||
import com.xdadan.erp.emis.mapper.EmisCustomerAddressMapper;
|
||||
import com.xdadan.erp.emis.service.IEmisCustomerAddressService;
|
||||
|
||||
/**
|
||||
* 客户收寄件地址Service业务层处理
|
||||
*
|
||||
* @author linfso
|
||||
* @date 2024-03-01 04:47:51
|
||||
*/
|
||||
@Service
|
||||
public class EmisCustomerAddressServiceImpl implements IEmisCustomerAddressService
|
||||
{
|
||||
@Autowired
|
||||
private EmisCustomerAddressMapper emisCustomerAddressMapper;
|
||||
|
||||
/**
|
||||
* 查询客户收寄件地址
|
||||
*
|
||||
* @param id 客户收寄件地址主键
|
||||
* @return 客户收寄件地址
|
||||
*/
|
||||
@Override
|
||||
public EmisCustomerAddress selectEmisCustomerAddressById(Long id)
|
||||
{
|
||||
return emisCustomerAddressMapper.selectEmisCustomerAddressById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询客户收寄件地址列表
|
||||
*
|
||||
* @param emisCustomerAddress 客户收寄件地址
|
||||
* @return 客户收寄件地址
|
||||
*/
|
||||
@Override
|
||||
public List<EmisCustomerAddress> selectEmisCustomerAddressList(EmisCustomerAddress emisCustomerAddress)
|
||||
{
|
||||
return emisCustomerAddressMapper.selectEmisCustomerAddressList(emisCustomerAddress);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增客户收寄件地址
|
||||
*
|
||||
* @param emisCustomerAddress 客户收寄件地址
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress)
|
||||
{
|
||||
return emisCustomerAddressMapper.insertEmisCustomerAddress(emisCustomerAddress);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改客户收寄件地址
|
||||
*
|
||||
* @param emisCustomerAddress 客户收寄件地址
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateEmisCustomerAddress(EmisCustomerAddress emisCustomerAddress)
|
||||
{
|
||||
return emisCustomerAddressMapper.updateEmisCustomerAddress(emisCustomerAddress);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除客户收寄件地址
|
||||
*
|
||||
* @param ids 需要删除的客户收寄件地址主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmisCustomerAddressByIds(Long[] ids)
|
||||
{
|
||||
return emisCustomerAddressMapper.deleteEmisCustomerAddressByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除客户收寄件地址信息
|
||||
*
|
||||
* @param id 客户收寄件地址主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteEmisCustomerAddressById(Long id)
|
||||
{
|
||||
return emisCustomerAddressMapper.deleteEmisCustomerAddressById(id);
|
||||
}
|
||||
|
||||
}
|
||||
166
emis-biz/src/main/resources/mapper/EmisCustomerAddressMapper.xml
Normal file
166
emis-biz/src/main/resources/mapper/EmisCustomerAddressMapper.xml
Normal file
@ -0,0 +1,166 @@
|
||||
<?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">
|
||||
<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="alias" column="alias" />
|
||||
<result property="addressType" column="address_type" />
|
||||
<result property="province" column="province" />
|
||||
<result property="city" column="city" />
|
||||
<result property="district" column="district" />
|
||||
<result property="town" column="town" />
|
||||
<result property="address" column="address" />
|
||||
<result property="postCode" column="post_code" />
|
||||
<result property="name" column="name" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="country" column="country" />
|
||||
<result property="email" column="email" />
|
||||
<result property="company" column="company" />
|
||||
<result property="blDefaultFlag" column="bl_default_flag" />
|
||||
<result property="orderNum" column="order_num" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</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
|
||||
</sql>
|
||||
|
||||
<select id="selectEmisCustomerAddressList" parameterType="EmisCustomerAddress" resultMap="EmisCustomerAddressResult">
|
||||
<include refid="selectEmisCustomerAddressVo"/>
|
||||
<where>
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</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>
|
||||
<if test="city != null and city != ''"> and city like concat('%', #{city}, '%')</if>
|
||||
<if test="district != null and district != ''"> and district like concat('%', #{district}, '%')</if>
|
||||
<if test="town != null and town != ''"> and town like concat('%', #{town}, '%')</if>
|
||||
<if test="address != null and address != ''"> and address like concat('%', #{address}, '%')</if>
|
||||
<if test="postCode != null and postCode != ''"> and post_code like concat('%', #{postCode}, '%')</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="phone != null and phone != ''"> and phone like concat('%', #{phone}, '%')</if>
|
||||
<if test="country != null and country != ''"> and country like concat('%', #{country}, '%')</if>
|
||||
<if test="email != null and email != ''"> and email like concat('%', #{email}, '%')</if>
|
||||
<if test="company != null and company != ''"> and company like concat('%', #{company}, '%')</if>
|
||||
<if test="blDefaultFlag != null and blDefaultFlag != ''"> and bl_default_flag like concat('%', #{blDefaultFlag}, '%')</if>
|
||||
<if test="orderNum != null and orderNum != ''"> and order_num like concat('%', #{orderNum}, '%')</if>
|
||||
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
|
||||
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
|
||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||||
</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
|
||||
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="alias != null and alias != ''">alias,</if>
|
||||
<if test="addressType != null and addressType != ''">address_type,</if>
|
||||
<if test="province != null and province != ''">province,</if>
|
||||
<if test="city != null and city != ''">city,</if>
|
||||
<if test="district != null and district != ''">district,</if>
|
||||
<if test="town != null and town != ''">town,</if>
|
||||
<if test="address != null and address != ''">address,</if>
|
||||
<if test="postCode != null and postCode != ''">post_code,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="phone != null and phone != ''">phone,</if>
|
||||
<if test="country != null and country != ''">country,</if>
|
||||
<if test="email != null and email != ''">email,</if>
|
||||
<if test="company != null and company != ''">company,</if>
|
||||
<if test="blDefaultFlag != null and blDefaultFlag != ''">bl_default_flag,</if>
|
||||
<if test="orderNum != null and orderNum != ''">order_num,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<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 prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="userId != null">#{userId},</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>
|
||||
<if test="city != null and city != ''">#{city},</if>
|
||||
<if test="district != null and district != ''">#{district},</if>
|
||||
<if test="town != null and town != ''">#{town},</if>
|
||||
<if test="address != null and address != ''">#{address},</if>
|
||||
<if test="postCode != null and postCode != ''">#{postCode},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="phone != null and phone != ''">#{phone},</if>
|
||||
<if test="country != null and country != ''">#{country},</if>
|
||||
<if test="email != null and email != ''">#{email},</if>
|
||||
<if test="company != null and company != ''">#{company},</if>
|
||||
<if test="blDefaultFlag != null and blDefaultFlag != ''">#{blDefaultFlag},</if>
|
||||
<if test="orderNum != null and orderNum != ''">#{orderNum},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
</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="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>
|
||||
<if test="city != null and city != ''">city = #{city},</if>
|
||||
<if test="district != null and district != ''">district = #{district},</if>
|
||||
<if test="town != null and town != ''">town = #{town},</if>
|
||||
<if test="address != null and address != ''">address = #{address},</if>
|
||||
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="phone != null and phone != ''">phone = #{phone},</if>
|
||||
<if test="country != null and country != ''">country = #{country},</if>
|
||||
<if test="email != null and email != ''">email = #{email},</if>
|
||||
<if test="company != null and company != ''">company = #{company},</if>
|
||||
<if test="blDefaultFlag != null and blDefaultFlag != ''">bl_default_flag = #{blDefaultFlag},</if>
|
||||
<if test="orderNum != null and orderNum != ''">order_num = #{orderNum},</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmisCustomerAddressById" parameterType="Long">
|
||||
delete from emis_customer_address where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisCustomerAddressByIds" parameterType="String">
|
||||
delete from emis_customer_address where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user