客户关系管理
This commit is contained in:
@ -0,0 +1,99 @@
|
||||
package com.ruoyi.project.benyi.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||
import com.ruoyi.project.benyi.domain.ByCustomer;
|
||||
import com.ruoyi.project.benyi.service.IByCustomerService;
|
||||
import com.ruoyi.framework.web.controller.BaseController;
|
||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 本一-客户关系管理Controller
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2021-03-01
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/benyi/customer")
|
||||
public class ByCustomerController extends BaseController {
|
||||
@Autowired
|
||||
private IByCustomerService byCustomerService;
|
||||
|
||||
/**
|
||||
* 查询本一-客户关系管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:customer:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ByCustomer byCustomer) {
|
||||
startPage();
|
||||
List<ByCustomer> list = byCustomerService.selectByCustomerList(byCustomer);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出本一-客户关系管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:customer:export')")
|
||||
@Log(title = "本一-客户关系管理", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ByCustomer byCustomer) {
|
||||
List<ByCustomer> list = byCustomerService.selectByCustomerList(byCustomer);
|
||||
ExcelUtil<ByCustomer> util = new ExcelUtil<ByCustomer>(ByCustomer.class);
|
||||
return util.exportExcel(list, "customer");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取本一-客户关系管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:customer:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(byCustomerService.selectByCustomerById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增本一-客户关系管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:customer:add')")
|
||||
@Log(title = "本一-客户关系管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ByCustomer byCustomer) {
|
||||
byCustomer.setCreateUserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
return toAjax(byCustomerService.insertByCustomer(byCustomer));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改本一-客户关系管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:customer:edit')")
|
||||
@Log(title = "本一-客户关系管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ByCustomer byCustomer) {
|
||||
return toAjax(byCustomerService.updateByCustomer(byCustomer));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除本一-客户关系管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:customer:remove')")
|
||||
@Log(title = "本一-客户关系管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(byCustomerService.deleteByCustomerByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,322 @@
|
||||
package com.ruoyi.project.benyi.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 本一-客户关系管理对象 by_customer
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2021-03-01
|
||||
*/
|
||||
public class ByCustomer extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@Excel(name = "姓名")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 身份
|
||||
*/
|
||||
@Excel(name = "身份")
|
||||
private String sflx;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@Excel(name = "联系电话")
|
||||
private String lxdh;
|
||||
|
||||
/**
|
||||
* 微信
|
||||
*/
|
||||
@Excel(name = "微信")
|
||||
private String wx;
|
||||
|
||||
/**
|
||||
* 抖音
|
||||
*/
|
||||
@Excel(name = "抖音")
|
||||
private String dy;
|
||||
|
||||
/**
|
||||
* 其他
|
||||
*/
|
||||
@Excel(name = "其他")
|
||||
private String qt;
|
||||
|
||||
/**
|
||||
* 幼儿园名称
|
||||
*/
|
||||
@Excel(name = "幼儿园名称")
|
||||
private String schoolname;
|
||||
|
||||
/**
|
||||
* 幼儿园人数
|
||||
*/
|
||||
@Excel(name = "幼儿园人数")
|
||||
private Long rs;
|
||||
|
||||
/**
|
||||
* 所在省
|
||||
*/
|
||||
@Excel(name = "所在省")
|
||||
private String sheng;
|
||||
|
||||
/**
|
||||
* 所在省编号
|
||||
*/
|
||||
@Excel(name = "所在省编号")
|
||||
private String shengid;
|
||||
|
||||
/**
|
||||
* 所在市
|
||||
*/
|
||||
@Excel(name = "所在市")
|
||||
private String shi;
|
||||
|
||||
/**
|
||||
* 所在市编号
|
||||
*/
|
||||
@Excel(name = "所在市编号")
|
||||
private String shiid;
|
||||
|
||||
/**
|
||||
* 客户来源
|
||||
*/
|
||||
@Excel(name = "客户来源")
|
||||
private String khly;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Excel(name = "创建人")
|
||||
private Long createUserid;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Excel(name = "备注")
|
||||
private String bz;
|
||||
|
||||
/**
|
||||
* 转换跟进
|
||||
*/
|
||||
@Excel(name = "转换跟进")
|
||||
private String zhgj;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Excel(name = "状态")
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 消费项目
|
||||
*/
|
||||
@Excel(name = "消费项目")
|
||||
private String xfxm;
|
||||
|
||||
/**
|
||||
* 消费价值
|
||||
*/
|
||||
@Excel(name = "消费价值")
|
||||
private String xfjz;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setSflx(String sflx) {
|
||||
this.sflx = sflx;
|
||||
}
|
||||
|
||||
public String getSflx() {
|
||||
return sflx;
|
||||
}
|
||||
|
||||
public void setLxdh(String lxdh) {
|
||||
this.lxdh = lxdh;
|
||||
}
|
||||
|
||||
public String getLxdh() {
|
||||
return lxdh;
|
||||
}
|
||||
|
||||
public void setWx(String wx) {
|
||||
this.wx = wx;
|
||||
}
|
||||
|
||||
public String getWx() {
|
||||
return wx;
|
||||
}
|
||||
|
||||
public void setDy(String dy) {
|
||||
this.dy = dy;
|
||||
}
|
||||
|
||||
public String getDy() {
|
||||
return dy;
|
||||
}
|
||||
|
||||
public void setQt(String qt) {
|
||||
this.qt = qt;
|
||||
}
|
||||
|
||||
public String getQt() {
|
||||
return qt;
|
||||
}
|
||||
|
||||
public void setSchoolname(String schoolname) {
|
||||
this.schoolname = schoolname;
|
||||
}
|
||||
|
||||
public String getSchoolname() {
|
||||
return schoolname;
|
||||
}
|
||||
|
||||
public void setRs(Long rs) {
|
||||
this.rs = rs;
|
||||
}
|
||||
|
||||
public Long getRs() {
|
||||
return rs;
|
||||
}
|
||||
|
||||
public void setSheng(String sheng) {
|
||||
this.sheng = sheng;
|
||||
}
|
||||
|
||||
public String getSheng() {
|
||||
return sheng;
|
||||
}
|
||||
|
||||
public void setShengid(String shengid) {
|
||||
this.shengid = shengid;
|
||||
}
|
||||
|
||||
public String getShengid() {
|
||||
return shengid;
|
||||
}
|
||||
|
||||
public void setShi(String shi) {
|
||||
this.shi = shi;
|
||||
}
|
||||
|
||||
public String getShi() {
|
||||
return shi;
|
||||
}
|
||||
|
||||
public void setShiid(String shiid) {
|
||||
this.shiid = shiid;
|
||||
}
|
||||
|
||||
public String getShiid() {
|
||||
return shiid;
|
||||
}
|
||||
|
||||
public void setKhly(String khly) {
|
||||
this.khly = khly;
|
||||
}
|
||||
|
||||
public String getKhly() {
|
||||
return khly;
|
||||
}
|
||||
|
||||
public void setCreateUserid(Long createUserid) {
|
||||
this.createUserid = createUserid;
|
||||
}
|
||||
|
||||
public Long getCreateUserid() {
|
||||
return createUserid;
|
||||
}
|
||||
|
||||
public void setBz(String bz) {
|
||||
this.bz = bz;
|
||||
}
|
||||
|
||||
public String getBz() {
|
||||
return bz;
|
||||
}
|
||||
|
||||
public void setZhgj(String zhgj) {
|
||||
this.zhgj = zhgj;
|
||||
}
|
||||
|
||||
public String getZhgj() {
|
||||
return zhgj;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setXfxm(String xfxm) {
|
||||
this.xfxm = xfxm;
|
||||
}
|
||||
|
||||
public String getXfxm() {
|
||||
return xfxm;
|
||||
}
|
||||
|
||||
public void setXfjz(String xfjz) {
|
||||
this.xfjz = xfjz;
|
||||
}
|
||||
|
||||
public String getXfjz() {
|
||||
return xfjz;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("sflx", getSflx())
|
||||
.append("lxdh", getLxdh())
|
||||
.append("wx", getWx())
|
||||
.append("dy", getDy())
|
||||
.append("qt", getQt())
|
||||
.append("schoolname", getSchoolname())
|
||||
.append("rs", getRs())
|
||||
.append("sheng", getSheng())
|
||||
.append("shengid", getShengid())
|
||||
.append("shi", getShi())
|
||||
.append("shiid", getShiid())
|
||||
.append("khly", getKhly())
|
||||
.append("createUserid", getCreateUserid())
|
||||
.append("bz", getBz())
|
||||
.append("zhgj", getZhgj())
|
||||
.append("state", getState())
|
||||
.append("xfxm", getXfxm())
|
||||
.append("xfjz", getXfjz())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.benyi.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.project.benyi.domain.ByCustomer;
|
||||
|
||||
/**
|
||||
* 本一-客户关系管理Mapper接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2021-03-01
|
||||
*/
|
||||
public interface ByCustomerMapper {
|
||||
/**
|
||||
* 查询本一-客户关系管理
|
||||
*
|
||||
* @param id 本一-客户关系管理ID
|
||||
* @return 本一-客户关系管理
|
||||
*/
|
||||
public ByCustomer selectByCustomerById(Long id);
|
||||
|
||||
/**
|
||||
* 查询本一-客户关系管理列表
|
||||
*
|
||||
* @param byCustomer 本一-客户关系管理
|
||||
* @return 本一-客户关系管理集合
|
||||
*/
|
||||
public List<ByCustomer> selectByCustomerList(ByCustomer byCustomer);
|
||||
|
||||
/**
|
||||
* 新增本一-客户关系管理
|
||||
*
|
||||
* @param byCustomer 本一-客户关系管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertByCustomer(ByCustomer byCustomer);
|
||||
|
||||
/**
|
||||
* 修改本一-客户关系管理
|
||||
*
|
||||
* @param byCustomer 本一-客户关系管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateByCustomer(ByCustomer byCustomer);
|
||||
|
||||
/**
|
||||
* 删除本一-客户关系管理
|
||||
*
|
||||
* @param id 本一-客户关系管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByCustomerById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除本一-客户关系管理
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByCustomerByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.benyi.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.project.benyi.domain.ByCustomer;
|
||||
|
||||
/**
|
||||
* 本一-客户关系管理Service接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2021-03-01
|
||||
*/
|
||||
public interface IByCustomerService {
|
||||
/**
|
||||
* 查询本一-客户关系管理
|
||||
*
|
||||
* @param id 本一-客户关系管理ID
|
||||
* @return 本一-客户关系管理
|
||||
*/
|
||||
public ByCustomer selectByCustomerById(Long id);
|
||||
|
||||
/**
|
||||
* 查询本一-客户关系管理列表
|
||||
*
|
||||
* @param byCustomer 本一-客户关系管理
|
||||
* @return 本一-客户关系管理集合
|
||||
*/
|
||||
public List<ByCustomer> selectByCustomerList(ByCustomer byCustomer);
|
||||
|
||||
/**
|
||||
* 新增本一-客户关系管理
|
||||
*
|
||||
* @param byCustomer 本一-客户关系管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertByCustomer(ByCustomer byCustomer);
|
||||
|
||||
/**
|
||||
* 修改本一-客户关系管理
|
||||
*
|
||||
* @param byCustomer 本一-客户关系管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateByCustomer(ByCustomer byCustomer);
|
||||
|
||||
/**
|
||||
* 批量删除本一-客户关系管理
|
||||
*
|
||||
* @param ids 需要删除的本一-客户关系管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByCustomerByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除本一-客户关系管理信息
|
||||
*
|
||||
* @param id 本一-客户关系管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByCustomerById(Long id);
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
package com.ruoyi.project.benyi.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.project.benyi.mapper.ByCustomerMapper;
|
||||
import com.ruoyi.project.benyi.domain.ByCustomer;
|
||||
import com.ruoyi.project.benyi.service.IByCustomerService;
|
||||
|
||||
/**
|
||||
* 本一-客户关系管理Service业务层处理
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2021-03-01
|
||||
*/
|
||||
@Service
|
||||
public class ByCustomerServiceImpl implements IByCustomerService {
|
||||
@Autowired
|
||||
private ByCustomerMapper byCustomerMapper;
|
||||
|
||||
/**
|
||||
* 查询本一-客户关系管理
|
||||
*
|
||||
* @param id 本一-客户关系管理ID
|
||||
* @return 本一-客户关系管理
|
||||
*/
|
||||
@Override
|
||||
public ByCustomer selectByCustomerById(Long id) {
|
||||
return byCustomerMapper.selectByCustomerById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询本一-客户关系管理列表
|
||||
*
|
||||
* @param byCustomer 本一-客户关系管理
|
||||
* @return 本一-客户关系管理
|
||||
*/
|
||||
@Override
|
||||
public List<ByCustomer> selectByCustomerList(ByCustomer byCustomer) {
|
||||
return byCustomerMapper.selectByCustomerList(byCustomer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增本一-客户关系管理
|
||||
*
|
||||
* @param byCustomer 本一-客户关系管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertByCustomer(ByCustomer byCustomer) {
|
||||
byCustomer.setCreateTime(DateUtils.getNowDate());
|
||||
return byCustomerMapper.insertByCustomer(byCustomer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改本一-客户关系管理
|
||||
*
|
||||
* @param byCustomer 本一-客户关系管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateByCustomer(ByCustomer byCustomer) {
|
||||
return byCustomerMapper.updateByCustomer(byCustomer);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除本一-客户关系管理
|
||||
*
|
||||
* @param ids 需要删除的本一-客户关系管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByCustomerByIds(Long[] ids) {
|
||||
return byCustomerMapper.deleteByCustomerByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除本一-客户关系管理信息
|
||||
*
|
||||
* @param id 本一-客户关系管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByCustomerById(Long id) {
|
||||
return byCustomerMapper.deleteByCustomerById(id);
|
||||
}
|
||||
}
|
153
ruoyi/src/main/resources/mybatis/benyi/ByCustomerMapper.xml
Normal file
153
ruoyi/src/main/resources/mybatis/benyi/ByCustomerMapper.xml
Normal file
@ -0,0 +1,153 @@
|
||||
<?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.ruoyi.project.benyi.mapper.ByCustomerMapper">
|
||||
|
||||
<resultMap type="ByCustomer" id="ByCustomerResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="sflx" column="sflx"/>
|
||||
<result property="lxdh" column="lxdh"/>
|
||||
<result property="wx" column="wx"/>
|
||||
<result property="dy" column="dy"/>
|
||||
<result property="qt" column="qt"/>
|
||||
<result property="schoolname" column="schoolname"/>
|
||||
<result property="rs" column="rs"/>
|
||||
<result property="sheng" column="sheng"/>
|
||||
<result property="shengid" column="shengid"/>
|
||||
<result property="shi" column="shi"/>
|
||||
<result property="shiid" column="shiid"/>
|
||||
<result property="khly" column="khly"/>
|
||||
<result property="createUserid" column="create_userid"/>
|
||||
<result property="bz" column="bz"/>
|
||||
<result property="zhgj" column="zhgj"/>
|
||||
<result property="state" column="state"/>
|
||||
<result property="xfxm" column="xfxm"/>
|
||||
<result property="xfjz" column="xfjz"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByCustomerVo">
|
||||
select id, name, sflx, lxdh, wx, dy, qt, schoolname, rs, sheng, shengid, shi, shiid, khly, create_userid, bz, zhgj, state, xfxm, xfjz, create_time from by_customer
|
||||
</sql>
|
||||
|
||||
<select id="selectByCustomerList" parameterType="ByCustomer" resultMap="ByCustomerResult">
|
||||
<include refid="selectByCustomerVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
||||
<if test="sflx != null and sflx != ''">and sflx = #{sflx}</if>
|
||||
<if test="lxdh != null and lxdh != ''">and lxdh = #{lxdh}</if>
|
||||
<if test="wx != null and wx != ''">and wx = #{wx}</if>
|
||||
<if test="dy != null and dy != ''">and dy = #{dy}</if>
|
||||
<if test="qt != null and qt != ''">and qt = #{qt}</if>
|
||||
<if test="schoolname != null and schoolname != ''">and schoolname like concat('%', #{schoolname}, '%')</if>
|
||||
<if test="rs != null ">and rs = #{rs}</if>
|
||||
<if test="sheng != null and sheng != ''">and sheng = #{sheng}</if>
|
||||
<if test="shengid != null and shengid != ''">and shengid = #{shengid}</if>
|
||||
<if test="shi != null and shi != ''">and shi = #{shi}</if>
|
||||
<if test="shiid != null and shiid != ''">and shiid = #{shiid}</if>
|
||||
<if test="khly != null and khly != ''">and khly = #{khly}</if>
|
||||
<if test="createUserid != null ">and create_userid = #{createUserid}</if>
|
||||
<if test="bz != null and bz != ''">and bz = #{bz}</if>
|
||||
<if test="zhgj != null and zhgj != ''">and zhgj = #{zhgj}</if>
|
||||
<if test="state != null and state != ''">and state = #{state}</if>
|
||||
<if test="xfxm != null and xfxm != ''">and xfxm = #{xfxm}</if>
|
||||
<if test="xfjz != null and xfjz != ''">and xfjz = #{xfjz}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByCustomerById" parameterType="Long" resultMap="ByCustomerResult">
|
||||
<include refid="selectByCustomerVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertByCustomer" parameterType="ByCustomer">
|
||||
insert into by_customer
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null ">id,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="sflx != null and sflx != ''">sflx,</if>
|
||||
<if test="lxdh != null and lxdh != ''">lxdh,</if>
|
||||
<if test="wx != null and wx != ''">wx,</if>
|
||||
<if test="dy != null and dy != ''">dy,</if>
|
||||
<if test="qt != null and qt != ''">qt,</if>
|
||||
<if test="schoolname != null and schoolname != ''">schoolname,</if>
|
||||
<if test="rs != null ">rs,</if>
|
||||
<if test="sheng != null and sheng != ''">sheng,</if>
|
||||
<if test="shengid != null and shengid != ''">shengid,</if>
|
||||
<if test="shi != null and shi != ''">shi,</if>
|
||||
<if test="shiid != null and shiid != ''">shiid,</if>
|
||||
<if test="khly != null and khly != ''">khly,</if>
|
||||
<if test="createUserid != null ">create_userid,</if>
|
||||
<if test="bz != null and bz != ''">bz,</if>
|
||||
<if test="zhgj != null and zhgj != ''">zhgj,</if>
|
||||
<if test="state != null and state != ''">state,</if>
|
||||
<if test="xfxm != null and xfxm != ''">xfxm,</if>
|
||||
<if test="xfjz != null and xfjz != ''">xfjz,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null ">#{id},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="sflx != null and sflx != ''">#{sflx},</if>
|
||||
<if test="lxdh != null and lxdh != ''">#{lxdh},</if>
|
||||
<if test="wx != null and wx != ''">#{wx},</if>
|
||||
<if test="dy != null and dy != ''">#{dy},</if>
|
||||
<if test="qt != null and qt != ''">#{qt},</if>
|
||||
<if test="schoolname != null and schoolname != ''">#{schoolname},</if>
|
||||
<if test="rs != null ">#{rs},</if>
|
||||
<if test="sheng != null and sheng != ''">#{sheng},</if>
|
||||
<if test="shengid != null and shengid != ''">#{shengid},</if>
|
||||
<if test="shi != null and shi != ''">#{shi},</if>
|
||||
<if test="shiid != null and shiid != ''">#{shiid},</if>
|
||||
<if test="khly != null and khly != ''">#{khly},</if>
|
||||
<if test="createUserid != null ">#{createUserid},</if>
|
||||
<if test="bz != null and bz != ''">#{bz},</if>
|
||||
<if test="zhgj != null and zhgj != ''">#{zhgj},</if>
|
||||
<if test="state != null and state != ''">#{state},</if>
|
||||
<if test="xfxm != null and xfxm != ''">#{xfxm},</if>
|
||||
<if test="xfjz != null and xfjz != ''">#{xfjz},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByCustomer" parameterType="ByCustomer">
|
||||
update by_customer
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="sflx != null and sflx != ''">sflx = #{sflx},</if>
|
||||
<if test="lxdh != null and lxdh != ''">lxdh = #{lxdh},</if>
|
||||
<if test="wx != null and wx != ''">wx = #{wx},</if>
|
||||
<if test="dy != null and dy != ''">dy = #{dy},</if>
|
||||
<if test="qt != null and qt != ''">qt = #{qt},</if>
|
||||
<if test="schoolname != null and schoolname != ''">schoolname = #{schoolname},</if>
|
||||
<if test="rs != null ">rs = #{rs},</if>
|
||||
<if test="sheng != null and sheng != ''">sheng = #{sheng},</if>
|
||||
<if test="shengid != null and shengid != ''">shengid = #{shengid},</if>
|
||||
<if test="shi != null and shi != ''">shi = #{shi},</if>
|
||||
<if test="shiid != null and shiid != ''">shiid = #{shiid},</if>
|
||||
<if test="khly != null and khly != ''">khly = #{khly},</if>
|
||||
<if test="createUserid != null ">create_userid = #{createUserid},</if>
|
||||
<if test="bz != null and bz != ''">bz = #{bz},</if>
|
||||
<if test="zhgj != null and zhgj != ''">zhgj = #{zhgj},</if>
|
||||
<if test="state != null and state != ''">state = #{state},</if>
|
||||
<if test="xfxm != null and xfxm != ''">xfxm = #{xfxm},</if>
|
||||
<if test="xfjz != null and xfjz != ''">xfjz = #{xfjz},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByCustomerById" parameterType="Long">
|
||||
delete from by_customer where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByCustomerByIds" parameterType="String">
|
||||
delete from by_customer where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user