Browse Source

用户信息表

ruqinhu 5 years ago
parent
commit
5e2a35cff0

+ 72 - 0
src/main/java/com/ygj/yuemum/controller/customer/CustomerInfoBasicController.java

@@ -0,0 +1,72 @@
+package com.ygj.yuemum.controller.customer;
+
+import com.ygj.yuemum.domain.customer.CustomerInfoBasic;
+import com.ygj.yuemum.domain.customer.dto.CustomerInfoBasicDto;
+import com.ygj.yuemum.service.customer.CustomerInfoBasicService;
+import com.ygj.yuemum.utils.ResponseUtil;
+import io.swagger.annotations.Api;
+import org.apache.shiro.SecurityUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+
+@Api(tags = "客户信息相关接口")
+@RestController
+@RequestMapping(value = "/CustomerInfoBasic")
+public class CustomerInfoBasicController {
+
+    @Resource
+    private CustomerInfoBasicService customerInfoBasicService;
+
+    /**
+     * [新增]
+     * @author zrz
+     * @date 2020/06/17
+     **/
+    @RequestMapping("/insert")
+    public int insert(CustomerInfoBasic customerInfoBasic){
+        Object principal = SecurityUtils.getSubject().getPrincipal();
+        customerInfoBasic.setCreate_person(String.valueOf(principal));
+        return customerInfoBasicService.insert(customerInfoBasic);
+    }
+
+    /**
+     * [刪除]
+     * @author zrz
+     * @date 2020/06/17
+     **/
+    @RequestMapping("/delete")
+    public int delete(int id){
+        return customerInfoBasicService.delete(id);
+    }
+
+    /**
+     * [更新]
+     * @author zrz
+     * @date 2020/06/17
+     **/
+    @RequestMapping("/update")
+    public int update(CustomerInfoBasic customerInfoBasic){
+        return customerInfoBasicService.update(customerInfoBasic);
+    }
+
+    /**
+     * [查询] 根据主键 id 查询
+     * @author zrz
+     * @date 2020/06/17
+     **/
+    @RequestMapping("/load")
+    public CustomerInfoBasic load(int id){
+        return customerInfoBasicService.load(id);
+    }
+
+    @RequestMapping("/list")
+    public Map<String, Object> selectByPageNumSize(CustomerInfoBasicDto customerInfoBasic) {
+        List<CustomerInfoBasic> customerInfoBasics = customerInfoBasicService.selectByPageNumSize(customerInfoBasic);
+        return ResponseUtil.convertRetMap(customerInfoBasics);
+    }
+
+}

+ 14 - 2
src/main/java/com/ygj/yuemum/controller/customer/CustomerInfoFeedbackController.java

@@ -5,8 +5,8 @@ import com.ygj.yuemum.domain.customer.dto.CustomerInfoFeedbackDto;
 import com.ygj.yuemum.service.customer.CustomerInfoFeedbackService;
 import com.ygj.yuemum.utils.ResponseUtil;
 import io.swagger.annotations.Api;
+import org.apache.shiro.SecurityUtils;
 import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
@@ -27,7 +27,19 @@ public class CustomerInfoFeedbackController {
     }
 
     @PostMapping("/info/feedback/insert")
-    public Integer insertInfoFeedback(@RequestBody CustomerInfoFeedback customerInfoFeedback) {
+    public Integer insertInfoFeedback(CustomerInfoFeedback customerInfoFeedback) {
+        Object principal = SecurityUtils.getSubject().getPrincipal();
+        customerInfoFeedback.setCreate_person(String.valueOf(principal));
         return customerInfoFeedbackService.insertInfoFeedback(customerInfoFeedback);
     }
+
+    @PostMapping("/info/feedback/get")
+    public CustomerInfoFeedback getById(CustomerInfoFeedbackDto customerInfoFeedbackDto) {
+        return customerInfoFeedbackService.getById(customerInfoFeedbackDto.getId());
+    }
+
+    @PostMapping("/info/feedback/update")
+    public int updateById(CustomerInfoFeedback customerInfoFeedback) {
+        return customerInfoFeedbackService.updateByPrimaryKeySelective(customerInfoFeedback);
+    }
 }

+ 39 - 0
src/main/java/com/ygj/yuemum/controller/customer/CustomerInfoStateController.java

@@ -0,0 +1,39 @@
+package com.ygj.yuemum.controller.customer;
+
+import com.ygj.yuemum.domain.customer.CustomerInfoState;
+import com.ygj.yuemum.service.customer.CustomerInfoStateService;
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Api(tags = "客户状态相关接口")
+@RestController
+@RequestMapping(value = "/CustomerInfoState")
+public class CustomerInfoStateController {
+
+    @Resource
+    private CustomerInfoStateService customerInfoStateService;
+
+    /**
+     * [新增]
+     * @author zrz
+     * @date 2020/06/17
+     **/
+    @RequestMapping("/insert")
+    public int insert(CustomerInfoState customerInfoBasic){
+        return customerInfoStateService.insert(customerInfoBasic);
+    }
+
+    /**
+     * [新增]
+     * @author zrz
+     * @date 2020/06/17
+     **/
+    @RequestMapping("/all")
+    public List<CustomerInfoState> selectAll(){
+        return customerInfoStateService.selectAll();
+    }
+}

+ 62 - 0
src/main/java/com/ygj/yuemum/dao/customer/CustomerInfoBasicDao.java

@@ -0,0 +1,62 @@
+package com.ygj.yuemum.dao.customer;
+
+import com.ygj.yuemum.domain.customer.CustomerInfoBasic;
+import com.ygj.yuemum.domain.customer.dto.CustomerInfoBasicDto;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+/**
+* customer_info_basic
+* @author zrz
+* @date 2020/06/17
+*/
+@Repository
+public interface CustomerInfoBasicDao {
+
+    /**
+    * [新增]
+    * @author zrz
+    * @date 2020/06/17
+    **/
+    int insert(CustomerInfoBasic customerInfoBasic);
+
+    /**
+    * [刪除]
+    * @author zrz
+    * @date 2020/06/17
+    **/
+    int delete(int id);
+
+    /**
+    * [更新]
+    * @author zrz
+    * @date 2020/06/17
+    **/
+    int update(CustomerInfoBasic customerInfoBasic);
+
+    /**
+    * [查询] 根据主键 id 查询
+    * @author zrz
+    * @date 2020/06/17
+    **/
+    CustomerInfoBasic load(int id);
+
+    /**
+    * [查询] 分页查询
+    * @author zrz
+    * @date 2020/06/17
+    **/
+    List<CustomerInfoBasic> pageList(int offset,int pagesize);
+
+    /**
+    * [查询] 分页查询 count
+    * @author zrz
+    * @date 2020/06/17
+    **/
+    int pageListCount(int offset,int pagesize);
+
+    List<CustomerInfoBasic> selectByPageNumSize(CustomerInfoBasicDto customerInfoBasic);
+
+}

+ 6 - 0
src/main/java/com/ygj/yuemum/dao/customer/CustomerInfoFeedbackDao.java

@@ -2,12 +2,18 @@ package com.ygj.yuemum.dao.customer;
 
 import com.ygj.yuemum.domain.customer.CustomerInfoFeedback;
 import com.ygj.yuemum.domain.customer.dto.CustomerInfoFeedbackDto;
+import org.springframework.stereotype.Repository;
 
 import java.util.List;
 
+@Repository
 public interface CustomerInfoFeedbackDao {
 
     List<CustomerInfoFeedback> selectByPageNumSize(CustomerInfoFeedbackDto customerInfoFeedback);
 
     int insertInfoFeedback(CustomerInfoFeedback customerInfoFeedback);
+
+    CustomerInfoFeedback getById(Integer id);
+
+    int updateByPrimaryKeySelective(CustomerInfoFeedback customerInfoFeedback);
 }

+ 60 - 0
src/main/java/com/ygj/yuemum/dao/customer/CustomerInfoStateMapper.java

@@ -0,0 +1,60 @@
+package com.ygj.yuemum.dao.customer;
+
+import com.ygj.yuemum.domain.customer.CustomerInfoBasic;
+import com.ygj.yuemum.domain.customer.CustomerInfoState;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CustomerInfoStateMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer_info_state
+     *
+     * @mbg.generated Wed Jun 17 10:50:44 CST 2020
+     */
+    int deleteByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer_info_state
+     *
+     * @mbg.generated Wed Jun 17 10:50:44 CST 2020
+     */
+    int insert(CustomerInfoState record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer_info_state
+     *
+     * @mbg.generated Wed Jun 17 10:50:44 CST 2020
+     */
+    int insertSelective(CustomerInfoState record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer_info_state
+     *
+     * @mbg.generated Wed Jun 17 10:50:44 CST 2020
+     */
+    CustomerInfoState selectByPrimaryKey(Integer id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer_info_state
+     *
+     * @mbg.generated Wed Jun 17 10:50:44 CST 2020
+     */
+    int updateByPrimaryKeySelective(CustomerInfoState record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table customer_info_state
+     *
+     * @mbg.generated Wed Jun 17 10:50:44 CST 2020
+     */
+    int updateByPrimaryKey(CustomerInfoState record);
+
+    List<CustomerInfoState> selectAll();
+}

+ 110 - 0
src/main/java/com/ygj/yuemum/domain/customer/CustomerInfoBasic.java

@@ -0,0 +1,110 @@
+package com.ygj.yuemum.domain.customer;
+
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+*  customer_info_basic
+* @author zrz 2020-06-17
+*/
+@Data
+public class CustomerInfoBasic implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * id
+    */
+    private Integer id;
+
+    /**
+    * 所属城市
+    */
+    private String branche_name;
+
+    /**
+    * 用户姓名
+    */
+    private String fb_customer_name;
+
+    /**
+    * 用户电话
+    */
+    private String fb_customer_phone;
+
+    /**
+    * 用户产品类型
+    */
+    private String p_code;
+
+    /**
+    * 微信号
+    */
+    private String fb_wechat_number;
+
+    /**
+    * 渠道来源
+    */
+    private String source_channel;
+
+    /**
+    * 用户状态
+    */
+    private String customer_state;
+
+    /**
+    * 预产期
+    */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date edc_date;
+
+    /**
+    * 计划生产方式
+    */
+    private String pregnancy_way;
+
+    /**
+    * 地址
+    */
+    private String address_basic;
+
+    /**
+    * 详细地址
+    */
+    private String address_detail;
+
+    /**
+    * 备注
+    */
+    private String fb_remarks;
+
+    /**
+    * 录入时间
+    */
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date entry_date;
+
+    /**
+    * 创建人
+    */
+    private String create_person;
+
+    private Integer page;
+    private Integer limit;
+    private String start_entry_date;
+    private String end_entry_date;
+
+    private List<String> address_basic_str;
+
+    public CustomerInfoBasic() {
+    }
+
+}

+ 19 - 2
src/main/java/com/ygj/yuemum/domain/customer/CustomerInfoFeedback.java

@@ -1,6 +1,8 @@
 package com.ygj.yuemum.domain.customer;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.util.Date;
 
@@ -9,7 +11,9 @@ public class CustomerInfoFeedback {
 
     private Integer id;
 
-    private Date fb_Date;
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date fb_date;
 
     private String source_channel;
 
@@ -25,7 +29,21 @@ public class CustomerInfoFeedback {
 
     private String customer_manager;
 
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date entry_date;
+
+    private String p_code;
+
+    private String fb_customer_name;
+
+    private String fb_wechat_number;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date edc_date;
+
+    private String fb_remarks;
 //
 //
 //    private Integer page;
@@ -34,5 +52,4 @@ public class CustomerInfoFeedback {
 //    private String end_fb_date;
 //    private String start_entry_date;
 //    private String end_entry_date;
-
 }

+ 27 - 0
src/main/java/com/ygj/yuemum/domain/customer/CustomerInfoState.java

@@ -0,0 +1,27 @@
+package com.ygj.yuemum.domain.customer;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class CustomerInfoState implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column customer_info_state.id
+     *
+     * @mbg.generated Wed Jun 17 10:50:44 CST 2020
+     */
+    private Integer id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column customer_info_state.customer_state
+     *
+     * @mbg.generated Wed Jun 17 10:50:44 CST 2020
+     */
+    private String customer_state;
+
+}

+ 90 - 0
src/main/java/com/ygj/yuemum/domain/customer/dto/CustomerInfoBasicDto.java

@@ -0,0 +1,90 @@
+package com.ygj.yuemum.domain.customer.dto;
+
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class CustomerInfoBasicDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * id
+     */
+    private Integer id;
+
+    /**
+     * 用户姓名
+     */
+    private String fb_customer_name;
+
+    /**
+     * 用户电话
+     */
+    private String fb_customer_phone;
+
+    /**
+     * 用户产品类型
+     */
+    private String p_code;
+
+    /**
+     * 微信号
+     */
+    private String fb_wechat_number;
+
+    /**
+     * 渠道来源
+     */
+    private List<String> source_channel;
+
+    /**
+     * 预产期
+     */
+    private Date edc_date;
+
+    /**
+     * 计划生产方式
+     */
+    private String pregnancy_way;
+
+    /**
+     * 地址
+     */
+    private String address_basic;
+
+    /**
+     * 详细地址
+     */
+    private String address_detail;
+
+    /**
+     * 备注
+     */
+    private String fb_remarks;
+
+    /**
+     * 录入时间
+     */
+    private Date entry_date;
+
+    private Integer page;
+    private Integer limit;
+    private String start_entry_date;
+    private String end_entry_date;
+
+    private List<String> branche_name;
+
+    private List<String> fb_type;
+
+    private List<String> create_person;
+
+    private List<String> in_charge_person;
+
+    private List<String> customer_manager;
+
+    private List<String> customer_state;
+
+}

+ 66 - 0
src/main/java/com/ygj/yuemum/service/customer/CustomerInfoBasicService.java

@@ -0,0 +1,66 @@
+package com.ygj.yuemum.service.customer;
+
+import com.github.pagehelper.PageHelper;
+import com.ygj.yuemum.dao.customer.CustomerInfoBasicDao;
+import com.ygj.yuemum.domain.customer.CustomerInfoBasic;
+import com.ygj.yuemum.domain.customer.dto.CustomerInfoBasicDto;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+* customer_info_basic
+* @author zrz
+* @date 2020/06/17
+*/
+@Service
+public class CustomerInfoBasicService {
+
+	@Resource
+	private CustomerInfoBasicDao customerInfoBasicDao;
+
+
+	public int insert(CustomerInfoBasic customerInfoBasic) {
+		return customerInfoBasicDao.insert(customerInfoBasic);
+	}
+
+
+	public int delete(int id) {
+		int ret = customerInfoBasicDao.delete(id);
+		return ret;
+	}
+
+
+	public int update(CustomerInfoBasic customerInfoBasic) {
+		int ret = customerInfoBasicDao.update(customerInfoBasic);
+		return ret;
+	}
+
+
+	public CustomerInfoBasic load(int id) {
+		return customerInfoBasicDao.load(id);
+	}
+
+
+	public Map<String,Object> pageList(int offset, int pagesize) {
+
+		List<CustomerInfoBasic> pageList = customerInfoBasicDao.pageList(offset, pagesize);
+		int totalCount = customerInfoBasicDao.pageListCount(offset, pagesize);
+
+		// result
+		Map<String, Object> result = new HashMap<String, Object>();
+		result.put("pageList", pageList);
+		result.put("totalCount", totalCount);
+
+		return result;
+	}
+
+	public List<CustomerInfoBasic> selectByPageNumSize(CustomerInfoBasicDto customerInfoBasic) {
+		PageHelper.startPage(customerInfoBasic.getPage(), customerInfoBasic.getLimit());
+		return customerInfoBasicDao.selectByPageNumSize(customerInfoBasic);
+	}
+
+}

+ 12 - 0
src/main/java/com/ygj/yuemum/service/customer/CustomerInfoFeedbackService.java

@@ -4,6 +4,7 @@ import com.github.pagehelper.PageHelper;
 import com.ygj.yuemum.dao.customer.CustomerInfoFeedbackDao;
 import com.ygj.yuemum.domain.customer.CustomerInfoFeedback;
 import com.ygj.yuemum.domain.customer.dto.CustomerInfoFeedbackDto;
+import org.apache.commons.lang.StringUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
@@ -21,7 +22,18 @@ public class CustomerInfoFeedbackService {
     }
 
     public int insertInfoFeedback(CustomerInfoFeedback customerInfoFeedback) {
+        if (StringUtils.isBlank(customerInfoFeedback.getFb_remarks())) {
+            customerInfoFeedback.setFb_remarks("");
+        }
         return feedbackDao.insertInfoFeedback(customerInfoFeedback);
     }
 
+    public CustomerInfoFeedback getById(Integer id) {
+        return feedbackDao.getById(id);
+    }
+
+    public int updateByPrimaryKeySelective(CustomerInfoFeedback customerInfoFeedback) {
+        return feedbackDao.updateByPrimaryKeySelective(customerInfoFeedback);
+    }
+
 }

+ 32 - 0
src/main/java/com/ygj/yuemum/service/customer/CustomerInfoStateService.java

@@ -0,0 +1,32 @@
+package com.ygj.yuemum.service.customer;
+
+import com.ygj.yuemum.dao.customer.CustomerInfoStateMapper;
+import com.ygj.yuemum.domain.customer.CustomerInfoState;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+* customer_info_state
+* @author zrz
+* @date 2020/06/17
+*/
+@Service
+public class CustomerInfoStateService {
+
+	@Resource
+	private CustomerInfoStateMapper customerInfoStateMapper;
+
+
+
+	public int insert(CustomerInfoState customerInfoState) {
+		return customerInfoStateMapper.insert(customerInfoState);
+	}
+
+	public List<CustomerInfoState> selectAll() {
+		return customerInfoStateMapper.selectAll();
+	}
+
+
+}

+ 239 - 0
src/main/resources/mybatis/mapper/customer/CustomerInfoBasicDao.xml

@@ -0,0 +1,239 @@
+<?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.ygj.yuemum.dao.customer.CustomerInfoBasicDao">
+
+    <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.customer.CustomerInfoBasic" >
+        <result column="id" property="id" />
+        <result column="branche_name" property="branche_name" />
+        <result column="fb_customer_name" property="fb_customer_name" />
+        <result column="fb_customer_phone" property="fb_customer_phone" />
+        <result column="p_code" property="p_code" />
+        <result column="fb_wechat_number" property="fb_wechat_number" />
+        <result column="source_channel" property="source_channel" />
+        <result column="customer_state" property="customer_state" />
+        <result column="edc_date" property="edc_date" />
+        <result column="pregnancy_way" property="pregnancy_way" />
+        <result column="address_basic" property="address_basic" />
+        <result column="address_detail" property="address_detail" />
+        <result column="fb_remarks" property="fb_remarks" />
+        <result column="entry_date" property="entry_date" />
+        <result column="create_person" property="create_person" />
+    </resultMap>
+
+    <sql id="Base_Column_List">
+                id,
+                branche_name,
+                fb_customer_name,
+                fb_customer_phone,
+                p_code,
+                fb_wechat_number,
+                source_channel,
+                customer_state,
+                edc_date,
+                pregnancy_way,
+                address_basic,
+                address_detail,
+                fb_remarks,
+                entry_date,
+                create_person
+    </sql>
+
+    <insert id="insert" useGeneratedKeys="true" keyColumn="id" keyProperty="id" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoBasic">
+        INSERT INTO customer_info_basic
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test ='null != branche_name'>
+                branche_name,
+            </if>
+            <if test ='null != fb_customer_name'>
+                fb_customer_name,
+            </if>
+            <if test ='null != fb_customer_phone'>
+                fb_customer_phone,
+            </if>
+            <if test ='null != p_code'>
+                p_code,
+            </if>
+            <if test ='null != fb_wechat_number'>
+                fb_wechat_number,
+            </if>
+            <if test ='null != source_channel'>
+                source_channel,
+            </if>
+            <if test ='null != customer_state'>
+                customer_state,
+            </if>
+            <if test ='null != edc_date'>
+                edc_date,
+            </if>
+            <if test ='null != pregnancy_way'>
+                pregnancy_way,
+            </if>
+            <if test ='null != address_basic'>
+                address_basic,
+            </if>
+            <if test ='null != address_detail'>
+                address_detail,
+            </if>
+            <if test ='null != fb_remarks'>
+                fb_remarks,
+            </if>
+            <if test ='null != entry_date'>
+                entry_date,
+            </if>
+            <if test ='null != create_person'>
+                create_person
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test ='null != branche_name'>
+                #{branche_name},
+            </if>
+            <if test ='null != fb_customer_name'>
+                #{fb_customer_name},
+            </if>
+            <if test ='null != fb_customer_phone'>
+                #{fb_customer_phone},
+            </if>
+            <if test ='null != p_code'>
+                #{p_code},
+            </if>
+            <if test ='null != fb_wechat_number'>
+                #{fb_wechat_number},
+            </if>
+            <if test ='null != source_channel'>
+                #{source_channel},
+            </if>
+            <if test ='null != customer_state'>
+                #{customer_state},
+            </if>
+            <if test ='null != edc_date'>
+                #{edc_date},
+            </if>
+            <if test ='null != pregnancy_way'>
+                #{pregnancy_way},
+            </if>
+            <if test ='null != address_basic'>
+                #{address_basic},
+            </if>
+            <if test ='null != address_detail'>
+                #{address_detail},
+            </if>
+            <if test ='null != fb_remarks'>
+                #{fb_remarks},
+            </if>
+            <if test ='null != entry_date'>
+                #{entry_date},
+            </if>
+            <if test ='null != create_person'>
+                #{create_person}
+            </if>
+        </trim>
+    </insert>
+
+    <delete id="delete" >
+        DELETE FROM customer_info_basic
+        WHERE id = #{id}
+    </delete>
+
+    <update id="update" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoBasic">
+        UPDATE customer_info_basic
+        <set>
+            <if test ='null != branche_name'>branche_name = #{branche_name},</if>
+            <if test ='null != fb_customer_name'>fb_customer_name = #{fb_customer_name},</if>
+            <if test ='null != fb_customer_phone'>fb_customer_phone = #{fb_customer_phone},</if>
+            <if test ='null != p_code'>p_code = #{p_code},</if>
+            <if test ='null != fb_wechat_number'>fb_wechat_number = #{fb_wechat_number},</if>
+            <if test ='null != source_channel'>source_channel = #{source_channel},</if>
+            <if test ='null != customer_state'>customer_state = #{customer_state},</if>
+            <if test ='null != edc_date'>edc_date = #{edc_date},</if>
+            <if test ='null != pregnancy_way'>pregnancy_way = #{pregnancy_way},</if>
+            <if test ='null != address_basic'>address_basic = #{address_basic},</if>
+            <if test ='null != address_detail'>address_detail = #{address_detail},</if>
+            <if test ='null != fb_remarks'>fb_remarks = #{fb_remarks},</if>
+            <if test ='null != entry_date'>entry_date = #{entry_date},</if>
+            <if test ='null != create_person'>create_person = #{create_person}</if>
+        </set>
+        WHERE id = #{id}
+    </update>
+
+
+    <select id="load" resultMap="BaseResultMap">
+        SELECT <include refid="Base_Column_List" />
+        FROM customer_info_basic
+        WHERE id = #{id}
+    </select>
+
+    <select id="pageList" resultMap="BaseResultMap">
+        SELECT <include refid="Base_Column_List" />
+        FROM customer_info_basic
+        LIMIT #{offset}, #{pageSize}
+    </select>
+
+    <select id="pageListCount" resultType="java.lang.Integer">
+        SELECT count(1)
+        FROM customer_info_basic
+    </select>
+
+    <!--获取所有数据-->
+    <select id="selectByPageNumSize" resultType="com.ygj.yuemum.domain.customer.CustomerInfoBasic" parameterType="com.ygj.yuemum.domain.customer.dto.CustomerInfoBasicDto">
+        SELECT
+            id,
+            branche_name,
+            fb_customer_name,
+            fb_customer_phone,
+            (select p.p_name from packages p where p.p_code = c.p_code) as p_code,
+            fb_wechat_number,
+            source_channel,
+            customer_state,
+            edc_date,
+            pregnancy_way,
+            address_basic,
+            address_detail,
+            fb_remarks,
+            entry_date,
+            create_person
+        FROM
+        customer_info_basic c
+        where 1=1
+        <if test="p_code != null and p_code !=''">
+            and id = #{p_code}
+        </if>
+        <if test="id != null and id !=''">
+            and id = #{id}
+        </if>
+        <if test="start_entry_date != null and start_entry_date !=''">
+            and entry_date &gt;= #{start_entry_date}
+        </if>
+        <if test="end_entry_date != null and end_entry_date !=''">
+            and entry_date &lt; #{end_entry_date}
+        </if>
+        <if test="source_channel != null ">
+            and source_channel in
+            <foreach collection="source_channel" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="fb_customer_phone != null and fb_customer_phone !=''">
+            and fb_customer_phone like "%"#{fb_customer_phone,jdbcType=VARCHAR}"%"
+        </if>
+        <if test="branche_name != null ">
+            and branche_name in
+            <foreach collection="branche_name" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="create_person != null ">
+            and create_person in
+            <foreach collection="create_person" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="customer_state != null ">
+            and customer_state in
+            <foreach collection="customer_state" item="item" index="index" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
+    </select>
+</mapper>

+ 89 - 3
src/main/resources/mybatis/mapper/customer/CustomerInfoFeedbackMapper.xml

@@ -14,10 +14,17 @@
             create_person,
             in_charge_person,
             customer_manager,
-            entry_date
+            entry_date,
+            edc_date,
+            fb_wechat_number,
+            fb_customer_name,
+            fb_remarks
         FROM
             customer_info_feedback
         where 1=1
+        <if test="id != null and id !=''">
+            and id = #{id}
+        </if>
         <if test="start_fb_date != null and start_fb_date !=''">
             and fb_Date &gt;= #{start_fb_date}
         </if>
@@ -66,8 +73,87 @@
     </select>
     
     <insert id="insertInfoFeedback" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoFeedback">
-        insert into customer_info_feedback (fb_date, source_channel, fb_customer_phone, branche_name, fb_type, create_person, in_charge_person, customer_manager, entry_date)
-        values (#{fb_date}, #{source_channel}, #{fb_customer_phone}, #{branche_name}, #{fb_type}, #{create_person}, #{in_charge_person}, #{customer_manager}, #{entry_date))
+        insert into customer_info_feedback (fb_date, source_channel, fb_customer_phone, branche_name, fb_type, create_person, in_charge_person, customer_manager, entry_date, p_code, fb_customer_name, fb_wechat_number, edc_date, fb_remarks)
+        values (#{fb_date}, #{source_channel}, #{fb_customer_phone}, #{branche_name}, #{fb_type}, #{create_person}, #{in_charge_person}, #{customer_manager}, #{entry_date}, #{p_code}, #{fb_customer_name}, #{fb_wechat_number}, #{edc_date}, #{fb_remarks})
     </insert>
 
+    <select id="getById" resultType="com.ygj.yuemum.domain.customer.CustomerInfoFeedback">
+            SELECT
+                id,
+                fb_date,
+                source_channel,
+                fb_customer_phone,
+                branche_name,
+                fb_type,
+                create_person,
+                in_charge_person,
+                customer_manager,
+                entry_date,
+                edc_date,
+                fb_wechat_number,
+                fb_customer_name,
+                fb_remarks,
+                (
+                    SELECT
+                        p.p_name
+                    FROM
+                        packages p
+                    WHERE
+                        p.p_code = customer_info_feedback.p_code
+                ) AS p_code
+            FROM
+                customer_info_feedback
+            WHERE
+                id = #{id}
+    </select>
+
+    <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoFeedback">
+        update customer_info_feedback
+        <set>
+            <if test="fb_date != null">
+                `fb_date` = #{fb_date,jdbcType=TIMESTAMP},
+            </if>
+            <if test="source_channel != null">
+                `source_channel` = #{source_channel,jdbcType=VARCHAR},
+            </if>
+            <if test="fb_customer_phone != null">
+                `fb_customer_phone` = #{fb_customer_phone,jdbcType=VARCHAR},
+            </if>
+            <if test="branche_name != null">
+                `branche_name` = #{branche_name,jdbcType=VARCHAR},
+            </if>
+            <if test="fb_type != null">
+                `fb_type` = #{fb_type,jdbcType=VARCHAR},
+            </if>
+            <if test="create_person != null">
+                `create_person` = #{create_person,jdbcType=VARCHAR},
+            </if>
+            <if test="in_charge_person != null">
+                `in_charge_person` = #{in_charge_person,jdbcType=VARCHAR},
+            </if>
+            <if test="customer_manager != null">
+                `customer_manager` = #{customer_manager,jdbcType=VARCHAR},
+            </if>
+            <if test="entry_date != null">
+                `entry_date` = #{entry_date,jdbcType=TIMESTAMP},
+            </if>
+            <if test="p_code != null">
+                `p_code` = #{p_code,jdbcType=VARCHAR},
+            </if>
+            <if test="fb_customer_name != null">
+                `fb_customer_name` = #{fb_customer_name,jdbcType=VARCHAR},
+            </if>
+            <if test="fb_wechat_number != null">
+                `fb_wechat_number` = #{fb_wechat_number,jdbcType=VARCHAR},
+            </if>
+            <if test="edc_date != null">
+                `edc_date` = #{edc_date,jdbcType=TIMESTAMP},
+            </if>
+            <if test="fb_remarks != null">
+                `fb_remarks` = #{fb_remarks,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where `id` = #{id,jdbcType=INTEGER}
+    </update>
+
 </mapper>

+ 105 - 0
src/main/resources/mybatis/mapper/customer/CustomerInfoStateMapper.xml

@@ -0,0 +1,105 @@
+<?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.ygj.yuemum.dao.customer.CustomerInfoStateMapper">
+  <resultMap id="BaseResultMap" type="com.ygj.yuemum.domain.customer.CustomerInfoState">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 17 10:50:44 CST 2020.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="customer_state" jdbcType="VARCHAR" property="customer_state" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 17 10:50:44 CST 2020.
+    -->
+    `id`, `customer_state`
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 17 10:50:44 CST 2020.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from customer_info_state
+    where `id` = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 17 10:50:44 CST 2020.
+    -->
+    delete from customer_info_state
+    where `id` = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoState">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 17 10:50:44 CST 2020.
+    -->
+    insert into customer_info_state (`id`, `customer_state`)
+    values (#{id,jdbcType=INTEGER}, #{customer_state,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoState">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 17 10:50:44 CST 2020.
+    -->
+    insert into customer_info_state
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        `id`,
+      </if>
+      <if test="customer_state != null">
+        `customer_state`,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="customer_state != null">
+        #{customer_state,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoState">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 17 10:50:44 CST 2020.
+    -->
+    update customer_info_state
+    <set>
+      <if test="customer_state != null">
+        `customer_state` = #{customer_state,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where `id` = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.ygj.yuemum.domain.customer.CustomerInfoState">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Wed Jun 17 10:50:44 CST 2020.
+    -->
+    update customer_info_state
+    set `customer_state` = #{customer_state,jdbcType=VARCHAR}
+    where `id` = #{id,jdbcType=INTEGER}
+  </update>
+
+  <select id="selectAll" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+
+    select
+    <include refid="Base_Column_List" />
+    from customer_info_state
+  </select>
+</mapper>