fubin 2 лет назад
Родитель
Сommit
ca2eefa457

+ 24 - 0
src/main/java/com/dk/mdm/controller/mst/CustomerController.java

@@ -0,0 +1,24 @@
+package com.dk.mdm.controller.mst;
+
+import com.dk.mdm.model.pojo.mst.Customer;
+import com.dk.common.controller.BaseController;
+import com.dk.common.service.BaseService;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RestController;
+import io.swagger.annotations.Api;
+import com.dk.mdm.service.mst.CustomerService;
+
+@Api(tags = "客户资料API接口")
+@RestController
+@RequestMapping("/mst/customer")
+public class CustomerController{
+
+    public BaseService<Customer> getService() {
+        return customerService;
+    }
+
+    @Autowired
+    private CustomerService customerService;
+
+}

+ 14 - 0
src/main/java/com/dk/mdm/mapper/mst/CustomerMapper.java

@@ -0,0 +1,14 @@
+package com.dk.mdm.mapper.mst;
+
+import com.dk.mdm.model.pojo.mst.Customer;
+import com.dk.common.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+*  客户资料 Mapper
+*/
+@Repository
+public interface CustomerMapper extends BaseMapper<Customer>{
+	
+}
+

+ 273 - 0
src/main/java/com/dk/mdm/mapper/mst/CustomerMapper.xml

@@ -0,0 +1,273 @@
+<?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.dk.mdm.mapper.mst.CustomerMapper">
+
+    <!-- 通用设置 -->
+    <!-- 通用查询列 -->
+    <sql id="Base_Column_List">
+        cus_id, cus_code, cus_name, cus_phone, address_area, address_name, address_no, address_gcj02, address_full, contact_name, contact_phone, cus_from, channel_id, org_id, staff_id, report_staff, report_time, sale_status, remarks, follow_staffs, last_follow_staff, last_follow_id, last_follow_status, last_follow_time, follow_count, flg_valid, cp_id, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user
+    </sql>
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.mst.Customer">
+        <id column="cus_id" property="cusId"/>
+                <result column="cus_code" property="cusCode"/>
+                <result column="cus_name" property="cusName"/>
+                <result column="cus_phone" property="cusPhone"/>
+                <result column="address_area" property="addressArea" typeHandler="JsonTypeHandler"/>
+                <result column="address_name" property="addressName"/>
+                <result column="address_no" property="addressNo"/>
+                <result column="address_gcj02" property="addressGcj02" typeHandler="JsonTypeHandler"/>
+                <result column="address_full" property="addressFull"/>
+                <result column="contact_name" property="contactName"/>
+                <result column="contact_phone" property="contactPhone"/>
+                <result column="cus_from" property="cusFrom" typeHandler="UuidTypeHandler"/>
+                <result column="channel_id" property="channelId" typeHandler="UuidTypeHandler"/>
+                <result column="org_id" property="orgId" typeHandler="UuidTypeHandler"/>
+                <result column="staff_id" property="staffId" typeHandler="UuidTypeHandler"/>
+                <result column="report_staff" property="reportStaff" typeHandler="UuidTypeHandler"/>
+            <result column="report_time" property="reportTime" typeHandler="TimestampTypeHandler"/>
+                <result column="sale_status" property="saleStatus"/>
+                <result column="remarks" property="remarks"/>
+                <result column="follow_staffs" property="followStaffs" typeHandler="UuidListTypeHandler"/>
+                <result column="last_follow_staff" property="lastFollowStaff" typeHandler="UuidTypeHandler"/>
+                <result column="last_follow_id" property="lastFollowId" typeHandler="UuidTypeHandler"/>
+                <result column="last_follow_status" property="lastFollowStatus"/>
+            <result column="last_follow_time" property="lastFollowTime" typeHandler="TimestampTypeHandler"/>
+                <result column="follow_count" property="followCount"/>
+                <result column="flg_valid" property="flgValid"/>
+                <result column="cp_id" property="cpId"/>
+            <result column="op_create_time" property="opCreateTime" typeHandler="TimestampTypeHandler"/>
+                <result column="op_create_user_id" property="opCreateUserId" typeHandler="UuidTypeHandler"/>
+            <result column="op_update_time" property="opUpdateTime" typeHandler="TimestampTypeHandler"/>
+                <result column="op_update_user_id" property="opUpdateUserId" typeHandler="UuidTypeHandler"/>
+                <result column="op_app_code" property="opAppCode"/>
+            <result column="op_timestamp" property="opTimestamp" typeHandler="TimestampTypeHandler"/>
+                <result column="op_db_user" property="opDbUser"/>
+    </resultMap>
+
+    <!-- 通用条件列 -->
+    <sql id="Condition">
+        <where>
+            <if test="cusCode != null and cusCode != ''">
+                AND cus_code = #{cusCode}
+            </if>
+            <if test="cusName != null and cusName != ''">
+                AND cus_name = #{cusName}
+            </if>
+            <if test="cusPhone != null and cusPhone != ''">
+                AND cus_phone = #{cusPhone}
+            </if>
+            <if test="addressArea != null and addressArea != ''">
+                AND address_area = #{addressArea}
+            </if>
+            <if test="addressName != null and addressName != ''">
+                AND address_name = #{addressName}
+            </if>
+            <if test="addressNo != null and addressNo != ''">
+                AND address_no = #{addressNo}
+            </if>
+            <if test="addressGcj02 != null and addressGcj02 != ''">
+                AND address_gcj02 = #{addressGcj02}
+            </if>
+            <if test="addressFull != null and addressFull != ''">
+                AND address_full = #{addressFull}
+            </if>
+            <if test="contactName != null and contactName != ''">
+                AND contact_name = #{contactName}
+            </if>
+            <if test="contactPhone != null and contactPhone != ''">
+                AND contact_phone = #{contactPhone}
+            </if>
+            <if test="cusFrom != null and cusFrom != ''">
+                AND cus_from = #{cusFrom}
+            </if>
+            <if test="channelId != null and channelId != ''">
+                AND channel_id = #{channelId}
+            </if>
+            <if test="orgId != null and orgId != ''">
+                AND org_id = #{orgId}
+            </if>
+            <if test="staffId != null and staffId != ''">
+                AND staff_id = #{staffId}
+            </if>
+            <if test="reportStaff != null and reportStaff != ''">
+                AND report_staff = #{reportStaff}
+            </if>
+            <if test="reportTime != null">
+                AND report_time = #{reportTime}
+            </if>
+            <if test="saleStatus != null and saleStatus != ''">
+                AND sale_status = #{saleStatus}
+            </if>
+            <if test="remarks != null and remarks != ''">
+                AND remarks = #{remarks}
+            </if>
+            <if test="followStaffs != null and followStaffs != ''">
+                AND follow_staffs = #{followStaffs}
+            </if>
+            <if test="lastFollowStaff != null and lastFollowStaff != ''">
+                AND last_follow_staff = #{lastFollowStaff}
+            </if>
+            <if test="lastFollowId != null and lastFollowId != ''">
+                AND last_follow_id = #{lastFollowId}
+            </if>
+            <if test="lastFollowStatus != null and lastFollowStatus != ''">
+                AND last_follow_status = #{lastFollowStatus}
+            </if>
+            <if test="lastFollowTime != null">
+                AND last_follow_time = #{lastFollowTime}
+            </if>
+            <if test="followCount != null">
+                AND follow_count = #{followCount}
+            </if>
+            <if test="flgValid != null">
+                AND flg_valid = #{flgValid}
+            </if>
+            <if test="cpId != null">
+                AND cp_id = #{cpId}
+            </if>
+            <if test="opCreateTime != null">
+                AND op_create_time = #{opCreateTime}
+            </if>
+            <if test="opCreateUserId != null and opCreateUserId != ''">
+                AND op_create_user_id = #{opCreateUserId}
+            </if>
+            <if test="opUpdateTime != null">
+                AND op_update_time = #{opUpdateTime}
+            </if>
+            <if test="opUpdateUserId != null and opUpdateUserId != ''">
+                AND op_update_user_id = #{opUpdateUserId}
+            </if>
+            <if test="opAppCode != null and opAppCode != ''">
+                AND op_app_code = #{opAppCode}
+            </if>
+            <if test="opTimestamp != null">
+                AND op_timestamp = #{opTimestamp}
+            </if>
+            <if test="opDbUser != null and opDbUser != ''">
+                AND op_db_user = #{opDbUser}
+            </if>
+        </where>
+    </sql>
+
+    <sql id="idsForeach">
+        <!-- 根据主键cusId批量操作 -->
+        WHERE cus_id in
+        <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
+            #{item}
+        </foreach>
+    </sql>
+
+    <!-- 查询表t_mst_customer,(条件查询+分页)列表 -->
+    <select id="selectByCond" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mst_customer
+        <include refid="Condition"/>
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 查询表t_mst_customer,(条件查询)个数 -->
+    <select id="countByCond" resultType="Long">
+        SELECT
+        count(1)
+        FROM t_mst_customer
+        <include refid="Condition"/>
+    </select>
+
+    <!-- 根据主键查询表t_mst_customer的一行数据 -->
+    <select id="selectById" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mst_customer
+        WHERE cus_id = #{cusId}::uuid
+    </select>
+
+    <!-- 根据主键锁定表t_mst_customer的一行数据 -->
+    <select id="selectByIdForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mst_customer
+        WHERE cus_id = #{cusId}
+        for update
+    </select>
+
+    <!-- 根据主键锁定表t_mst_customer的多行数据 -->
+    <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM t_mst_customer
+        <include refid="idsForeach"/>
+        for update
+    </select>
+
+    <insert id="insertBatch">
+        insert into t_mst_customer
+        (
+        <trim suffixOverrides=",">
+            cus_code,
+            cus_name,
+            cus_phone,
+            address_area,
+            address_name,
+            address_no,
+            address_gcj02,
+            address_full,
+            contact_name,
+            contact_phone,
+            cus_from,
+            channel_id,
+            org_id,
+            staff_id,
+            report_staff,
+            report_time,
+            sale_status,
+            remarks,
+            follow_staffs,
+            last_follow_staff,
+            last_follow_id,
+            last_follow_status,
+            last_follow_time,
+            follow_count,
+            cp_id,
+            op_app_code,
+        </trim>
+        )
+        values
+        <foreach collection="list" index="index" item="item" separator=",">
+            (
+            <trim suffixOverrides=",">
+                #{item.cusCode},
+                #{item.cusName},
+                #{item.cusPhone},
+                #{item.addressArea},
+                #{item.addressName},
+                #{item.addressNo},
+                #{item.addressGcj02},
+                #{item.addressFull},
+                #{item.contactName},
+                #{item.contactPhone},
+                #{item.cusFrom}::uuid,
+                #{item.channelId}::uuid,
+                #{item.orgId}::uuid,
+                #{item.staffId}::uuid,
+                #{item.reportStaff}::uuid,
+                #{item.reportTime},
+                #{item.saleStatus},
+                #{item.remarks},
+                #{item.followStaffs},
+                #{item.lastFollowStaff}::uuid,
+                #{item.lastFollowId}::uuid,
+                #{item.lastFollowStatus},
+                #{item.lastFollowTime},
+                #{item.followCount},
+                #{item.cpId},
+                #{item.opAppCode},
+            </trim>
+            )
+        </foreach>
+    </insert>
+</mapper>

+ 348 - 0
src/main/java/com/dk/mdm/model/pojo/mst/Customer.java

@@ -0,0 +1,348 @@
+package com.dk.mdm.model.pojo.mst;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.baomidou.mybatisplus.annotation.*;
+import java.io.Serializable;
+
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.*;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import lombok.AllArgsConstructor;
+import lombok.NoArgsConstructor;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.alibaba.fastjson.JSONObject;
+
+import java.util.List;
+import java.time.LocalDateTime;
+
+/**
+ *  客户资料
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("客户资料")
+@TableName(value = "t_mst_customer", autoResultMap = true)
+@ApiModel(value="实体类:客户资料", description="表名:t_mst_customer")
+public class Customer extends PageInfo<Customer> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 客户ID
+     */
+    @TableId(value = "cus_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "客户ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusId;
+
+
+    /**
+     * 客户编号
+     */
+    @Excel(name = "客户编号")
+    @ApiModelProperty(value = "客户编号")
+    private String cusCode;
+
+
+    /**
+     * 客户名称
+     */
+    @Excel(name = "客户名称")
+    @ApiModelProperty(value = "客户名称")
+    private String cusName;
+
+
+    /**
+     * 客户电话
+     */
+    @Excel(name = "客户电话")
+    @ApiModelProperty(value = "客户电话")
+    private String cusPhone;
+
+
+    /**
+     * 行政区划 (a1:省 a2:市 a3:区)
+     */
+    @Excel(name = "行政区划 (a1:省 a2:市 a3:区)")
+    @ApiModelProperty(value = "行政区划 (a1:省 a2:市 a3:区)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject addressArea;
+
+
+    /**
+     * 小区或POI
+     */
+    @Excel(name = "小区或POI")
+    @ApiModelProperty(value = "小区或POI")
+    private String addressName;
+
+
+    /**
+     * 门牌号
+     */
+    @Excel(name = "门牌号")
+    @ApiModelProperty(value = "门牌号")
+    private String addressNo;
+
+
+    /**
+     * 地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)
+     */
+    @Excel(name = "地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)")
+    @ApiModelProperty(value = "地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject addressGcj02;
+
+
+    /**
+     * 详细地址
+     */
+    @Excel(name = "详细地址")
+    @ApiModelProperty(value = "详细地址")
+    private String addressFull;
+
+
+    /**
+     * 联系人
+     */
+    @Excel(name = "联系人")
+    @ApiModelProperty(value = "联系人")
+    private String contactName;
+
+
+    /**
+     * 联系电话
+     */
+    @Excel(name = "联系电话")
+    @ApiModelProperty(value = "联系电话")
+    private String contactPhone;
+
+
+    /**
+     * 客户来源 (【数据字典】)
+     */
+    @Excel(name = "客户来源 (【数据字典】)")
+    @ApiModelProperty(value = "客户来源 (【数据字典】)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusFrom;
+
+
+    /**
+     * 销售渠道
+     */
+    @Excel(name = "销售渠道")
+    @ApiModelProperty(value = "销售渠道")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String channelId;
+
+
+    /**
+     * 部门
+     */
+    @Excel(name = "部门")
+    @ApiModelProperty(value = "部门")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orgId;
+
+
+    /**
+     * 业务员
+     */
+    @Excel(name = "业务员")
+    @ApiModelProperty(value = "业务员")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String staffId;
+
+
+    /**
+     * 报备人
+     */
+    @Excel(name = "报备人")
+    @ApiModelProperty(value = "报备人")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String reportStaff;
+
+
+    /**
+     * 报备时间
+     */
+    @Excel(name = "报备时间")
+    @ApiModelProperty(value = "报备时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime reportTime;
+
+
+    /**
+     * 销售状态 (【系统字典】客销状态:公海、潜客、成交)
+     */
+    @Excel(name = "销售状态 (【系统字典】客销状态:公海、潜客、成交)")
+    @ApiModelProperty(value = "销售状态 (【系统字典】客销状态:公海、潜客、成交)")
+    private String saleStatus;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 当前跟进人
+     */
+    @Excel(name = "当前跟进人")
+    @ApiModelProperty(value = "当前跟进人")
+    @TableField(typeHandler = UuidListTypeHandler.class)
+    private String followStaffs;
+
+
+    /**
+     * 最后跟进人
+     */
+    @Excel(name = "最后跟进人")
+    @ApiModelProperty(value = "最后跟进人")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String lastFollowStaff;
+
+
+    /**
+     * 最后跟进ID
+     */
+    @Excel(name = "最后跟进ID")
+    @ApiModelProperty(value = "最后跟进ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String lastFollowId;
+
+
+    /**
+     * 最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)
+     */
+    @Excel(name = "最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)")
+    @ApiModelProperty(value = "最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)")
+    private String lastFollowStatus;
+
+
+    /**
+     * 最后跟进时间
+     */
+    @Excel(name = "最后跟进时间")
+    @ApiModelProperty(value = "最后跟进时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime lastFollowTime;
+
+
+    /**
+     * 跟进次数
+     */
+    @Excel(name = "跟进次数")
+    @ApiModelProperty(value = "跟进次数")
+    private Integer followCount;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @Excel(name = "创建时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "创建时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opCreateTime;
+
+
+    /**
+     * 创建用户 (触发器自动处理)
+     */
+    @Excel(name = "创建用户 (触发器自动处理)")
+    @ApiModelProperty(value = "创建用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
+
+
+    /**
+     * 修改时间 (触发器自动处理)
+     */
+    @Excel(name = "修改时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "修改时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opUpdateTime;
+
+
+    /**
+     * 修改用户 (触发器自动处理)
+     */
+    @Excel(name = "修改用户 (触发器自动处理)")
+    @ApiModelProperty(value = "修改用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
+
+
+    /**
+     * 数据操作应用 (触发器自动处理)
+     */
+    @Excel(name = "数据操作应用 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作应用 (触发器自动处理)")
+    private String opAppCode;
+
+
+    /**
+     * 数据时间戳 (触发器自动处理)
+     */
+    @Excel(name = "数据时间戳 (触发器自动处理)")
+    @ApiModelProperty(value = "数据时间戳 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opTimestamp;
+
+
+    /**
+     * 数据操作数据库用户 (触发器自动处理)
+     */
+    @Excel(name = "数据操作数据库用户 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
+    private String opDbUser;
+
+
+    /*
+     * 相关属性
+     * @TableField(exist = false)
+     */
+
+    /*
+     * 关联属性 + 查询条件
+     * @TableField(exist = false)
+     */
+
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 352 - 0
src/main/java/com/dk/mdm/model/query/mst/CustomerQuery.java

@@ -0,0 +1,352 @@
+package com.dk.mdm.model.query.mst;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.JsonTypeHandler;
+import com.dk.common.infrastructure.handler.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.UuidListTypeHandler;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ *  客户资料
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("客户资料")
+@TableName(value = "t_mst_customer", autoResultMap = true)
+@ApiModel(value="实体类:客户资料", description="表名:t_mst_customer")
+public class CustomerQuery extends PageInfo<CustomerQuery> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 客户ID
+     */
+    @TableId(value = "cus_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "客户ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusId;
+
+
+    /**
+     * 客户编号
+     */
+    @Excel(name = "客户编号")
+    @ApiModelProperty(value = "客户编号")
+    private String cusCode;
+
+
+    /**
+     * 客户名称
+     */
+    @Excel(name = "客户名称")
+    @ApiModelProperty(value = "客户名称")
+    private String cusName;
+
+
+    /**
+     * 客户电话
+     */
+    @Excel(name = "客户电话")
+    @ApiModelProperty(value = "客户电话")
+    private String cusPhone;
+
+
+    /**
+     * 行政区划 (a1:省 a2:市 a3:区)
+     */
+    @Excel(name = "行政区划 (a1:省 a2:市 a3:区)")
+    @ApiModelProperty(value = "行政区划 (a1:省 a2:市 a3:区)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject addressArea;
+
+
+    /**
+     * 小区或POI
+     */
+    @Excel(name = "小区或POI")
+    @ApiModelProperty(value = "小区或POI")
+    private String addressName;
+
+
+    /**
+     * 门牌号
+     */
+    @Excel(name = "门牌号")
+    @ApiModelProperty(value = "门牌号")
+    private String addressNo;
+
+
+    /**
+     * 地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)
+     */
+    @Excel(name = "地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)")
+    @ApiModelProperty(value = "地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject addressGcj02;
+
+
+    /**
+     * 详细地址
+     */
+    @Excel(name = "详细地址")
+    @ApiModelProperty(value = "详细地址")
+    private String addressFull;
+
+
+    /**
+     * 联系人
+     */
+    @Excel(name = "联系人")
+    @ApiModelProperty(value = "联系人")
+    private String contactName;
+
+
+    /**
+     * 联系电话
+     */
+    @Excel(name = "联系电话")
+    @ApiModelProperty(value = "联系电话")
+    private String contactPhone;
+
+
+    /**
+     * 客户来源 (【数据字典】)
+     */
+    @Excel(name = "客户来源 (【数据字典】)")
+    @ApiModelProperty(value = "客户来源 (【数据字典】)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusFrom;
+
+
+    /**
+     * 销售渠道
+     */
+    @Excel(name = "销售渠道")
+    @ApiModelProperty(value = "销售渠道")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String channelId;
+
+
+    /**
+     * 部门
+     */
+    @Excel(name = "部门")
+    @ApiModelProperty(value = "部门")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orgId;
+
+
+    /**
+     * 业务员
+     */
+    @Excel(name = "业务员")
+    @ApiModelProperty(value = "业务员")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String staffId;
+
+
+    /**
+     * 报备人
+     */
+    @Excel(name = "报备人")
+    @ApiModelProperty(value = "报备人")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String reportStaff;
+
+
+    /**
+     * 报备时间
+     */
+    @Excel(name = "报备时间")
+    @ApiModelProperty(value = "报备时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime reportTime;
+
+
+    /**
+     * 销售状态 (【系统字典】客销状态:公海、潜客、成交)
+     */
+    @Excel(name = "销售状态 (【系统字典】客销状态:公海、潜客、成交)")
+    @ApiModelProperty(value = "销售状态 (【系统字典】客销状态:公海、潜客、成交)")
+    private String saleStatus;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 当前跟进人
+     */
+    @Excel(name = "当前跟进人")
+    @ApiModelProperty(value = "当前跟进人")
+    @TableField(typeHandler = UuidListTypeHandler.class)
+    private String followStaffs;
+
+
+    /**
+     * 最后跟进人
+     */
+    @Excel(name = "最后跟进人")
+    @ApiModelProperty(value = "最后跟进人")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String lastFollowStaff;
+
+
+    /**
+     * 最后跟进ID
+     */
+    @Excel(name = "最后跟进ID")
+    @ApiModelProperty(value = "最后跟进ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String lastFollowId;
+
+
+    /**
+     * 最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)
+     */
+    @Excel(name = "最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)")
+    @ApiModelProperty(value = "最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)")
+    private String lastFollowStatus;
+
+
+    /**
+     * 最后跟进时间
+     */
+    @Excel(name = "最后跟进时间")
+    @ApiModelProperty(value = "最后跟进时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime lastFollowTime;
+
+
+    /**
+     * 跟进次数
+     */
+    @Excel(name = "跟进次数")
+    @ApiModelProperty(value = "跟进次数")
+    private Integer followCount;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @Excel(name = "创建时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "创建时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opCreateTime;
+
+
+    /**
+     * 创建用户 (触发器自动处理)
+     */
+    @Excel(name = "创建用户 (触发器自动处理)")
+    @ApiModelProperty(value = "创建用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
+
+
+    /**
+     * 修改时间 (触发器自动处理)
+     */
+    @Excel(name = "修改时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "修改时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opUpdateTime;
+
+
+    /**
+     * 修改用户 (触发器自动处理)
+     */
+    @Excel(name = "修改用户 (触发器自动处理)")
+    @ApiModelProperty(value = "修改用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
+
+
+    /**
+     * 数据操作应用 (触发器自动处理)
+     */
+    @Excel(name = "数据操作应用 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作应用 (触发器自动处理)")
+    private String opAppCode;
+
+
+    /**
+     * 数据时间戳 (触发器自动处理)
+     */
+    @Excel(name = "数据时间戳 (触发器自动处理)")
+    @ApiModelProperty(value = "数据时间戳 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opTimestamp;
+
+
+    /**
+     * 数据操作数据库用户 (触发器自动处理)
+     */
+    @Excel(name = "数据操作数据库用户 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
+    private String opDbUser;
+
+
+    /*
+     * 相关属性
+     * @TableField(exist = false)
+     */
+
+    /*
+     * 关联属性 + 查询条件
+     * @TableField(exist = false)
+     */
+
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 352 - 0
src/main/java/com/dk/mdm/model/response/mst/CustomerResponse.java

@@ -0,0 +1,352 @@
+package com.dk.mdm.model.response.mst;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.JsonTypeHandler;
+import com.dk.common.infrastructure.handler.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.UuidListTypeHandler;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ *  客户资料
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("客户资料")
+@TableName(value = "t_mst_customer", autoResultMap = true)
+@ApiModel(value="实体类:客户资料", description="表名:t_mst_customer")
+public class CustomerResponse extends PageInfo<CustomerResponse> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 客户ID
+     */
+    @TableId(value = "cus_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "客户ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusId;
+
+
+    /**
+     * 客户编号
+     */
+    @Excel(name = "客户编号")
+    @ApiModelProperty(value = "客户编号")
+    private String cusCode;
+
+
+    /**
+     * 客户名称
+     */
+    @Excel(name = "客户名称")
+    @ApiModelProperty(value = "客户名称")
+    private String cusName;
+
+
+    /**
+     * 客户电话
+     */
+    @Excel(name = "客户电话")
+    @ApiModelProperty(value = "客户电话")
+    private String cusPhone;
+
+
+    /**
+     * 行政区划 (a1:省 a2:市 a3:区)
+     */
+    @Excel(name = "行政区划 (a1:省 a2:市 a3:区)")
+    @ApiModelProperty(value = "行政区划 (a1:省 a2:市 a3:区)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject addressArea;
+
+
+    /**
+     * 小区或POI
+     */
+    @Excel(name = "小区或POI")
+    @ApiModelProperty(value = "小区或POI")
+    private String addressName;
+
+
+    /**
+     * 门牌号
+     */
+    @Excel(name = "门牌号")
+    @ApiModelProperty(value = "门牌号")
+    private String addressNo;
+
+
+    /**
+     * 地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)
+     */
+    @Excel(name = "地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)")
+    @ApiModelProperty(value = "地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject addressGcj02;
+
+
+    /**
+     * 详细地址
+     */
+    @Excel(name = "详细地址")
+    @ApiModelProperty(value = "详细地址")
+    private String addressFull;
+
+
+    /**
+     * 联系人
+     */
+    @Excel(name = "联系人")
+    @ApiModelProperty(value = "联系人")
+    private String contactName;
+
+
+    /**
+     * 联系电话
+     */
+    @Excel(name = "联系电话")
+    @ApiModelProperty(value = "联系电话")
+    private String contactPhone;
+
+
+    /**
+     * 客户来源 (【数据字典】)
+     */
+    @Excel(name = "客户来源 (【数据字典】)")
+    @ApiModelProperty(value = "客户来源 (【数据字典】)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusFrom;
+
+
+    /**
+     * 销售渠道
+     */
+    @Excel(name = "销售渠道")
+    @ApiModelProperty(value = "销售渠道")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String channelId;
+
+
+    /**
+     * 部门
+     */
+    @Excel(name = "部门")
+    @ApiModelProperty(value = "部门")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orgId;
+
+
+    /**
+     * 业务员
+     */
+    @Excel(name = "业务员")
+    @ApiModelProperty(value = "业务员")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String staffId;
+
+
+    /**
+     * 报备人
+     */
+    @Excel(name = "报备人")
+    @ApiModelProperty(value = "报备人")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String reportStaff;
+
+
+    /**
+     * 报备时间
+     */
+    @Excel(name = "报备时间")
+    @ApiModelProperty(value = "报备时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime reportTime;
+
+
+    /**
+     * 销售状态 (【系统字典】客销状态:公海、潜客、成交)
+     */
+    @Excel(name = "销售状态 (【系统字典】客销状态:公海、潜客、成交)")
+    @ApiModelProperty(value = "销售状态 (【系统字典】客销状态:公海、潜客、成交)")
+    private String saleStatus;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 当前跟进人
+     */
+    @Excel(name = "当前跟进人")
+    @ApiModelProperty(value = "当前跟进人")
+    @TableField(typeHandler = UuidListTypeHandler.class)
+    private String followStaffs;
+
+
+    /**
+     * 最后跟进人
+     */
+    @Excel(name = "最后跟进人")
+    @ApiModelProperty(value = "最后跟进人")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String lastFollowStaff;
+
+
+    /**
+     * 最后跟进ID
+     */
+    @Excel(name = "最后跟进ID")
+    @ApiModelProperty(value = "最后跟进ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String lastFollowId;
+
+
+    /**
+     * 最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)
+     */
+    @Excel(name = "最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)")
+    @ApiModelProperty(value = "最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)")
+    private String lastFollowStatus;
+
+
+    /**
+     * 最后跟进时间
+     */
+    @Excel(name = "最后跟进时间")
+    @ApiModelProperty(value = "最后跟进时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime lastFollowTime;
+
+
+    /**
+     * 跟进次数
+     */
+    @Excel(name = "跟进次数")
+    @ApiModelProperty(value = "跟进次数")
+    private Integer followCount;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @Excel(name = "创建时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "创建时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opCreateTime;
+
+
+    /**
+     * 创建用户 (触发器自动处理)
+     */
+    @Excel(name = "创建用户 (触发器自动处理)")
+    @ApiModelProperty(value = "创建用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
+
+
+    /**
+     * 修改时间 (触发器自动处理)
+     */
+    @Excel(name = "修改时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "修改时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opUpdateTime;
+
+
+    /**
+     * 修改用户 (触发器自动处理)
+     */
+    @Excel(name = "修改用户 (触发器自动处理)")
+    @ApiModelProperty(value = "修改用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
+
+
+    /**
+     * 数据操作应用 (触发器自动处理)
+     */
+    @Excel(name = "数据操作应用 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作应用 (触发器自动处理)")
+    private String opAppCode;
+
+
+    /**
+     * 数据时间戳 (触发器自动处理)
+     */
+    @Excel(name = "数据时间戳 (触发器自动处理)")
+    @ApiModelProperty(value = "数据时间戳 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opTimestamp;
+
+
+    /**
+     * 数据操作数据库用户 (触发器自动处理)
+     */
+    @Excel(name = "数据操作数据库用户 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
+    private String opDbUser;
+
+
+    /*
+     * 相关属性
+     * @TableField(exist = false)
+     */
+
+    /*
+     * 关联属性 + 查询条件
+     * @TableField(exist = false)
+     */
+
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 352 - 0
src/main/java/com/dk/mdm/model/vo/mst/CustomerVO.java

@@ -0,0 +1,352 @@
+package com.dk.mdm.model.vo.mst;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.dk.common.infrastructure.annotaiton.ExportTitle;
+import com.dk.common.infrastructure.handler.JsonTypeHandler;
+import com.dk.common.infrastructure.handler.TimestampTypeHandler;
+import com.dk.common.infrastructure.handler.UuidListTypeHandler;
+import com.dk.common.infrastructure.handler.UuidTypeHandler;
+import com.dk.common.model.pojo.PageInfo;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ *  客户资料
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@Accessors(chain = true)
+@ExportTitle("客户资料")
+@TableName(value = "t_mst_customer", autoResultMap = true)
+@ApiModel(value="实体类:客户资料", description="表名:t_mst_customer")
+public class CustomerVO extends PageInfo<CustomerVO> implements Serializable {
+
+    /*
+     * 数据库字段
+     */
+
+    /**
+     * 客户ID
+     */
+    @TableId(value = "cus_id", type = IdType.AUTO)
+    @ApiModelProperty(value = "客户ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusId;
+
+
+    /**
+     * 客户编号
+     */
+    @Excel(name = "客户编号")
+    @ApiModelProperty(value = "客户编号")
+    private String cusCode;
+
+
+    /**
+     * 客户名称
+     */
+    @Excel(name = "客户名称")
+    @ApiModelProperty(value = "客户名称")
+    private String cusName;
+
+
+    /**
+     * 客户电话
+     */
+    @Excel(name = "客户电话")
+    @ApiModelProperty(value = "客户电话")
+    private String cusPhone;
+
+
+    /**
+     * 行政区划 (a1:省 a2:市 a3:区)
+     */
+    @Excel(name = "行政区划 (a1:省 a2:市 a3:区)")
+    @ApiModelProperty(value = "行政区划 (a1:省 a2:市 a3:区)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject addressArea;
+
+
+    /**
+     * 小区或POI
+     */
+    @Excel(name = "小区或POI")
+    @ApiModelProperty(value = "小区或POI")
+    private String addressName;
+
+
+    /**
+     * 门牌号
+     */
+    @Excel(name = "门牌号")
+    @ApiModelProperty(value = "门牌号")
+    private String addressNo;
+
+
+    /**
+     * 地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)
+     */
+    @Excel(name = "地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)")
+    @ApiModelProperty(value = "地址坐标(gcj02) (LAT:纬度的值 LON:经度的值)")
+    @TableField(typeHandler = JsonTypeHandler.class)
+    private JSONObject addressGcj02;
+
+
+    /**
+     * 详细地址
+     */
+    @Excel(name = "详细地址")
+    @ApiModelProperty(value = "详细地址")
+    private String addressFull;
+
+
+    /**
+     * 联系人
+     */
+    @Excel(name = "联系人")
+    @ApiModelProperty(value = "联系人")
+    private String contactName;
+
+
+    /**
+     * 联系电话
+     */
+    @Excel(name = "联系电话")
+    @ApiModelProperty(value = "联系电话")
+    private String contactPhone;
+
+
+    /**
+     * 客户来源 (【数据字典】)
+     */
+    @Excel(name = "客户来源 (【数据字典】)")
+    @ApiModelProperty(value = "客户来源 (【数据字典】)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String cusFrom;
+
+
+    /**
+     * 销售渠道
+     */
+    @Excel(name = "销售渠道")
+    @ApiModelProperty(value = "销售渠道")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String channelId;
+
+
+    /**
+     * 部门
+     */
+    @Excel(name = "部门")
+    @ApiModelProperty(value = "部门")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String orgId;
+
+
+    /**
+     * 业务员
+     */
+    @Excel(name = "业务员")
+    @ApiModelProperty(value = "业务员")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String staffId;
+
+
+    /**
+     * 报备人
+     */
+    @Excel(name = "报备人")
+    @ApiModelProperty(value = "报备人")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String reportStaff;
+
+
+    /**
+     * 报备时间
+     */
+    @Excel(name = "报备时间")
+    @ApiModelProperty(value = "报备时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime reportTime;
+
+
+    /**
+     * 销售状态 (【系统字典】客销状态:公海、潜客、成交)
+     */
+    @Excel(name = "销售状态 (【系统字典】客销状态:公海、潜客、成交)")
+    @ApiModelProperty(value = "销售状态 (【系统字典】客销状态:公海、潜客、成交)")
+    private String saleStatus;
+
+
+    /**
+     * 备注
+     */
+    @Excel(name = "备注")
+    @ApiModelProperty(value = "备注")
+    private String remarks;
+
+
+    /**
+     * 当前跟进人
+     */
+    @Excel(name = "当前跟进人")
+    @ApiModelProperty(value = "当前跟进人")
+    @TableField(typeHandler = UuidListTypeHandler.class)
+    private String followStaffs;
+
+
+    /**
+     * 最后跟进人
+     */
+    @Excel(name = "最后跟进人")
+    @ApiModelProperty(value = "最后跟进人")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String lastFollowStaff;
+
+
+    /**
+     * 最后跟进ID
+     */
+    @Excel(name = "最后跟进ID")
+    @ApiModelProperty(value = "最后跟进ID")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String lastFollowId;
+
+
+    /**
+     * 最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)
+     */
+    @Excel(name = "最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)")
+    @ApiModelProperty(value = "最后跟进状态 (【系统字典】跟进状态:报备、跟进、邀约、报价、成交)")
+    private String lastFollowStatus;
+
+
+    /**
+     * 最后跟进时间
+     */
+    @Excel(name = "最后跟进时间")
+    @ApiModelProperty(value = "最后跟进时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime lastFollowTime;
+
+
+    /**
+     * 跟进次数
+     */
+    @Excel(name = "跟进次数")
+    @ApiModelProperty(value = "跟进次数")
+    private Integer followCount;
+
+
+    /**
+     * 有效标识 (1:正常 0:停用)
+     */
+    @Excel(name = "有效标识 (1:正常 0:停用)")
+    @ApiModelProperty(value = "有效标识 (1:正常 0:停用)")
+    private Boolean flgValid;
+
+
+    /**
+     * 企业ID
+     */
+    @Excel(name = "企业ID")
+    @ApiModelProperty(value = "企业ID")
+    private Integer cpId;
+
+
+    /**
+     * 创建时间 (触发器自动处理)
+     */
+    @Excel(name = "创建时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "创建时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opCreateTime;
+
+
+    /**
+     * 创建用户 (触发器自动处理)
+     */
+    @Excel(name = "创建用户 (触发器自动处理)")
+    @ApiModelProperty(value = "创建用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opCreateUserId;
+
+
+    /**
+     * 修改时间 (触发器自动处理)
+     */
+    @Excel(name = "修改时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
+    @ApiModelProperty(value = "修改时间 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opUpdateTime;
+
+
+    /**
+     * 修改用户 (触发器自动处理)
+     */
+    @Excel(name = "修改用户 (触发器自动处理)")
+    @ApiModelProperty(value = "修改用户 (触发器自动处理)")
+    @TableField(typeHandler = UuidTypeHandler.class)
+    private String opUpdateUserId;
+
+
+    /**
+     * 数据操作应用 (触发器自动处理)
+     */
+    @Excel(name = "数据操作应用 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作应用 (触发器自动处理)")
+    private String opAppCode;
+
+
+    /**
+     * 数据时间戳 (触发器自动处理)
+     */
+    @Excel(name = "数据时间戳 (触发器自动处理)")
+    @ApiModelProperty(value = "数据时间戳 (触发器自动处理)")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @TableField(typeHandler = TimestampTypeHandler.class)
+    private LocalDateTime opTimestamp;
+
+
+    /**
+     * 数据操作数据库用户 (触发器自动处理)
+     */
+    @Excel(name = "数据操作数据库用户 (触发器自动处理)")
+    @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
+    private String opDbUser;
+
+
+    /*
+     * 相关属性
+     * @TableField(exist = false)
+     */
+
+    /*
+     * 关联属性 + 查询条件
+     * @TableField(exist = false)
+     */
+
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 23 - 0
src/main/java/com/dk/mdm/service/mst/CustomerService.java

@@ -0,0 +1,23 @@
+package com.dk.mdm.service.mst;
+
+import com.dk.mdm.model.pojo.mst.Customer;
+import com.dk.mdm.mapper.mst.CustomerMapper;
+import com.dk.common.service.BaseService;
+import com.dk.common.mapper.BaseMapper;
+import org.springframework.stereotype.Service;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+@Service
+@Transactional
+public class CustomerService extends BaseService<Customer> {
+
+	@Override
+	public BaseMapper<Customer> getRepository() {
+		return customerMapper;
+	}
+
+	@Autowired
+	private CustomerMapper customerMapper;
+
+}