Browse Source

客户列表模块,增加一个事业部字段,一个职务字段,新增客户表操作记录。

erp、
zhangsiqi 1 year ago
parent
commit
aa7c7a4f8f
  1. 89
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomerOper.java
  2. 47
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysCustomerOperMapper.java
  3. 49
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerOperService.java
  4. 42
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerOperServiceImpl.java
  5. 47
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerOperMapper.xml

89
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCustomerOper.java

@ -0,0 +1,89 @@
package com.ruoyi.system.domain;
import lombok.Data;
import java.util.Date;
import java.util.Formatter;
public class SysCustomerOper {
//客户表的操作记录id
private int id;
//客户表中的业务员信息
private String sysCustomerPuser;
//客户表中的客户名称
private String sysCustomerEnterPriseName;
//操作
private String oper;
private Date updateTime;
private String updateBy;
private String updateStatus;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getSysCustomerPuser() {
return sysCustomerPuser;
}
public void setSysCustomerPuser(String sysCustomerPuser) {
this.sysCustomerPuser = sysCustomerPuser;
}
public String getSysCustomerEnterPriseName() {
return sysCustomerEnterPriseName;
}
public void setSysCustomerEnterPriseName(String sysCustomerEnterPriseName) {
this.sysCustomerEnterPriseName = sysCustomerEnterPriseName;
}
public String getOper() {
return oper;
}
public void setOper(String oper) {
this.oper = oper;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public String getUpdateStatus() {
return updateStatus;
}
public void setUpdateStatus(String updateStatus) {
this.updateStatus = updateStatus;
}
@Override
public String toString() {
return "SysCustomerOper{" +
"id=" + id +
", sysCustomerPuser='" + sysCustomerPuser + '\'' +
", sysCustomerEnterPriseName='" + sysCustomerEnterPriseName + '\'' +
", oper='" + oper + '\'' +
", updateTime=" + updateTime +
", updateBy='" + updateBy + '\'' +
", updateStatus='" + updateStatus + '\'' +
'}';
}
}

47
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysCustomerOperMapper.java

@ -0,0 +1,47 @@
package com.ruoyi.system.mapper;
import com.ruoyi.system.domain.SysCustomerOper;
import java.util.List;
/**
* 客户表操作信息Mapper接口
*
* @author ruoyi
* @date 2022-11-02
*/
public interface SysCustomerOperMapper
{
/**
* 查询客户操作记录信息
*
* @param id 客户操作信息ID
* @return 客户操作信息
*/
public SysCustomerOper selectSysCustomerOperById(long id);
/**
* 查询客户操作信息列表
*
* @param sysCustomerOper 客户基本信息
* @return 客户基本信息集合
*/
public List<SysCustomerOper> selectSysCustomerOperList(SysCustomerOper sysCustomerOper);
/**
* 新增客户操作信息
*
* @param sysCustomerOper 客户基本信息
* @return 结果
*/
public int insertSysCustomerOper(SysCustomerOper sysCustomerOper);
/**
* 修改客户操作信息
*
* @param sysCustomerOper 客户基本信息
* @return 结果
*/
public int updateSysCustomerOper(SysCustomerOper sysCustomerOper);
}

49
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerOperService.java

@ -0,0 +1,49 @@
package com.ruoyi.system.service;
import com.ruoyi.system.domain.SysCustomer;
import com.ruoyi.system.domain.SysCustomerOper;
import org.activiti.engine.runtime.ProcessInstance;
import java.util.List;
import java.util.Map;
/**
* 客户基本信息Service接口
*
* @author ruoyi
* @date 2022-11-02
*/
public interface ISysCustomerOperService
{
/**
* 查询客户操作记录信息
*
* @param id 客户操作信息ID
* @return 客户操作信息
*/
public SysCustomerOper selectSysCustomerOperOperById(long id);
/**
* 查询客户操作信息列表
*
* @param sysCustomerOper 客户基本信息
* @return 客户基本信息集合
*/
public List<SysCustomerOper> selectSysCustomerOperList(SysCustomerOper sysCustomerOper);
/**
* 新增客户操作信息
*
* @param sysCustomerOper 客户基本信息
* @return 结果
*/
public int insertSysCustomerOper(SysCustomerOper sysCustomerOper);
/**
* 修改客户操作信息
*
* @param sysCustomerOper 客户基本信息
* @return 结果
*/
public int updateSysCustomerOper(SysCustomerOper sysCustomerOper);
}

42
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerOperServiceImpl.java

@ -0,0 +1,42 @@
package com.ruoyi.system.service.impl;
import com.ruoyi.system.domain.SysCustomerOper;
import com.ruoyi.system.mapper.SysCustomerOperMapper;
import com.ruoyi.system.service.ISysCustomerOperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 客户表操作信息Service业务层处理
*
* @author ruoyi
* @date 2022-11-02
*/
@Service
public class SysCustomerOperServiceImpl implements ISysCustomerOperService
{
@Autowired
private SysCustomerOperMapper sysCustomerOperMapper;
@Override
public SysCustomerOper selectSysCustomerOperOperById(long id) {
return sysCustomerOperMapper.selectSysCustomerOperById(id);
}
@Override
public List<SysCustomerOper> selectSysCustomerOperList(SysCustomerOper sysCustomerOper) {
return sysCustomerOperMapper.selectSysCustomerOperList(sysCustomerOper);
}
@Override
public int insertSysCustomerOper(SysCustomerOper sysCustomerOper) {
return sysCustomerOperMapper.insertSysCustomerOper(sysCustomerOper);
}
@Override
public int updateSysCustomerOper(SysCustomerOper sysCustomerOper) {
return sysCustomerOperMapper.updateSysCustomerOper(sysCustomerOper);
}
}

47
ruoyi-admin/src/main/resources/mapper/system/SysCustomerOperMapper.xml

@ -0,0 +1,47 @@
<?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.system.mapper.SysCustomerOperMapper">
<resultMap type="SysCustomerOper" id="SysCustomerOperResult">
<result property="id" column="id" />
<result property="sysCustomerPuser" column="sys_customer_purser" />
<result property="sysCustomerEnterPriseName" column="sys_customer_enterpriseName" />
<result property="oper" column="oper" />
<result property="updateTime" column="updateTime" />
<result property="updateBy" column="updateBy" />
<result property="updateStatus" column="operStatus" />
</resultMap>
<sql id="selectSysCustomerOperVo">
select id,sys_customer_purser,sys_customer_enterpriseName,oper,updateTime,updateBy,operStatus from sys_customer_oper
</sql>
<select id="selectSysCustomerOperList" parameterType="SysCustomerOper" resultMap="SysCustomerOperResult">
<include refid="selectSysCustomerVo"/>
<where>
<if test="sysCustomerPuser != null and sysCustomerPuser != ''"> and sys_customer_purser like concat('%', #{sysCustomerPuser}, '%')</if>
<if test="sysCustomerEnterPriseName!= null and sysCustomerEnterPriseName != ''"> and sys_customer_enterpriseName = #{sysCustomerEnterPriseName}</if>
<if test="updateBy != null and updateBy != ''"> and updateBy like concat('%', #{updateBy}, '%')</if>
</where>
</select>
<select id="selectSysCustomerOperById" parameterType="Long" resultMap="SysCustomerOperResult">
<include refid="selectSysCustomerOperVo"/>
where id = #{id}
</select>
<insert id="insertSysCustomerOper" parameterType="SysCustomerOper" useGeneratedKeys="true" keyProperty="id">
insert into sys_customer_oper
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="sysCustomerPuser != null and sysCustomerPuser != ''">#{sysCustomerPuser},</if>
<if test="sysCustomerEnterPriseName!= null">#{sysCustomerEnterPriseName},</if>
<if test="oper != null and oper != ''">#{oper},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateStatus != null">#{updateStatus},</if>
now(),
</trim>
</insert>
</mapper>
Loading…
Cancel
Save