Commit 7795245e by 邓实川 Committed by chenzg

客户管理实体、持久层、接口控制器

parent 88d554b2
/**
* <p>Title: IndustryClass.java</p>
* <p>Description: </p>
* @author dsc
* @date 2020年6月5日
* @version 1.0
*/
package cn.timer.api.bean.clazz;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* <p>
* Title: CilentSourceClass.java
* </p>
* <p>
* Description:
* </p>
*
* @author dsc
* @date 2020年6月5日
* @version 1.0
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("客户来源字典表(1.0)")
public class ClientSourceClass extends Model<ClientSourceClass> {
private static final long serialVersionUID = 2504935692833727870L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "主键", example = "1")
private Integer id;
@ApiModelProperty(value = "来源名", example = "行业")
private String name;
@ApiModelProperty(value = "企业id", example = "企业")
private Integer orgCode;
}
/**
* <p>Title: IndustryClass.java</p>
* <p>Description: </p>
* @author dsc
* @date 2020年6月5日
* @version 1.0
*/
package cn.timer.api.bean.clazz;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* <p>
* Title: CilentTypeClass.java
* </p>
* <p>
* Description:
* </p>
*
* @author dsc
* @date 2020年6月5日
* @version 1.0
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("客户类型字典表(1.0)")
public class ClientTypeClass extends Model<ClientTypeClass> {
private static final long serialVersionUID = 4910747953236931117L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "主键", example = "1")
private Integer id;
@ApiModelProperty(value = "类型名", example = "行业")
private String name;
@ApiModelProperty(value = "企业id", example = "企业")
private Integer orgCode;
}
...@@ -14,7 +14,12 @@ import com.baomidou.mybatisplus.annotation.IdType; ...@@ -14,7 +14,12 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/** /**
* <p> * <p>
...@@ -28,6 +33,11 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -28,6 +33,11 @@ import io.swagger.annotations.ApiModelProperty;
* @date 2020年6月5日 * @date 2020年6月5日
* @version 1.0 * @version 1.0
*/ */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("行业字典表(1.0)")
public class IndustryClass extends Model<IndustryClass> { public class IndustryClass extends Model<IndustryClass> {
private static final long serialVersionUID = -5008126674106880292L; private static final long serialVersionUID = -5008126674106880292L;
...@@ -40,4 +50,8 @@ public class IndustryClass extends Model<IndustryClass> { ...@@ -40,4 +50,8 @@ public class IndustryClass extends Model<IndustryClass> {
@ApiModelProperty(value = "行业名", example = "行业") @ApiModelProperty(value = "行业名", example = "行业")
private String name; private String name;
@ApiModelProperty(value = "企业id", example = "企业")
private Integer orgCode;
} }
...@@ -52,7 +52,7 @@ public class SysRegion extends Model<SysRegion>{ ...@@ -52,7 +52,7 @@ public class SysRegion extends Model<SysRegion>{
private String regionName; private String regionName;
@ApiModelProperty(value = "区域编码", example = "1") @ApiModelProperty(value = "区域编码", example = "1")
private String regionCode; private Integer regionCode;
@ApiModelProperty(value = "地名简称", example = "1") @ApiModelProperty(value = "地名简称", example = "1")
private String simpleName; private String simpleName;
......
...@@ -66,24 +66,6 @@ public class CrmBusinessGroup extends Model<CrmBusinessGroup> { ...@@ -66,24 +66,6 @@ public class CrmBusinessGroup extends Model<CrmBusinessGroup> {
@ApiModelProperty(value = "业务组管理员名称") @ApiModelProperty(value = "业务组管理员名称")
private String managerName; private String managerName;
// @ApiModelProperty(value = "回收规则id")
// private Integer ruleId;
@ApiModelProperty(value = "添加客户之后(one)天没有跟进 (以跟进记录为准)")
private Integer one;
@ApiModelProperty(value = "距上次跟进(two)天没有再次跟进 (以跟进记录为准)")
private Integer two;
@ApiModelProperty(value = "添加客户之后(three)天没有成交 (天数必须大于规则1)")
private Integer three;
@ApiModelProperty(value = "系统提前(four)天自动提醒业务员客户将被回收")
private Integer four;
@ApiModelProperty(value = "我的客户数量最多(five)人(合作中的不算)")
private Integer five;
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)
private Date createTime; private Date createTime;
...@@ -100,11 +82,17 @@ public class CrmBusinessGroup extends Model<CrmBusinessGroup> { ...@@ -100,11 +82,17 @@ public class CrmBusinessGroup extends Model<CrmBusinessGroup> {
@ApiModelProperty(value = "企业id") @ApiModelProperty(value = "企业id")
private Integer orgCode; private Integer orgCode;
@Transient @Transient
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value = "组成员id")
private Integer[] ids; private Integer[] ids;
@Transient
@TableField(exist = false)
@ApiModelProperty(value = "回收规则")
private CrmSeaRule crmSeaRules;
// @ApiModelProperty(value = "组成员empNum(字符串,分割)",example = "1,2,3") // @ApiModelProperty(value = "组成员empNum(字符串,分割)",example = "1,2,3")
// private String member; // private String member;
// //
......
/**
* Title: CrmClientAssociates.java
* Description:
* @author dsc
* @date 2020年6月8日
* @version 1.0
*/
package cn.timer.api.bean.crm;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* Title: CrmClientAssociates.java
*
* @Description:
* @author dsc
* @date 2020年6月8日
* @version 1.0
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "crm_client_associates")
@ApiModel("客户协作人表")
public class CrmClientAssociate extends Model<CrmClientAssociate> {
private static final long serialVersionUID = 6199712192983127587L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
@ApiModelProperty(value = "客户数据id")
private Integer cid;
@ApiModelProperty(value = "协作人id")
private Integer associateId;
@ApiModelProperty(value = "协作人企业id")
private Integer orgCode;
}
...@@ -43,7 +43,7 @@ import lombok.NoArgsConstructor; ...@@ -43,7 +43,7 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor @AllArgsConstructor
@Table(name = "crm_client_contacts") @Table(name = "crm_client_contacts")
@ApiModel("客户联系人表") @ApiModel("客户联系人表")
public class CrmClientContacts extends Model<CrmClientContacts>{ public class CrmClientContacts extends Model<CrmClientContacts> {
private static final long serialVersionUID = 7527532835555744270L; private static final long serialVersionUID = 7527532835555744270L;
...@@ -76,7 +76,13 @@ public class CrmClientContacts extends Model<CrmClientContacts>{ ...@@ -76,7 +76,13 @@ public class CrmClientContacts extends Model<CrmClientContacts>{
@ApiModelProperty(value = "地址") @ApiModelProperty(value = "地址")
private String address; private String address;
@ApiModelProperty(value = "企业id") @ApiModelProperty(value = "公司")
private Integer orgCode; private String company;
@ApiModelProperty(value = "备注")
private String remark;
// @ApiModelProperty(value = "企业id")
// private Integer orgCode;
} }
...@@ -8,13 +8,17 @@ ...@@ -8,13 +8,17 @@
package cn.timer.api.bean.crm; package cn.timer.api.bean.crm;
import java.util.Date; import java.util.Date;
import java.util.List;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
...@@ -45,7 +49,7 @@ import lombok.NoArgsConstructor; ...@@ -45,7 +49,7 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor @AllArgsConstructor
@Table(name = "crm_client_data") @Table(name = "crm_client_data")
@ApiModel("客户数据表") @ApiModel("客户数据表")
public class CrmClientData extends Model<CrmClientData>{ public class CrmClientData extends Model<CrmClientData> {
private static final long serialVersionUID = -5368056704790782780L; private static final long serialVersionUID = -5368056704790782780L;
...@@ -72,26 +76,34 @@ public class CrmClientData extends Model<CrmClientData>{ ...@@ -72,26 +76,34 @@ public class CrmClientData extends Model<CrmClientData>{
@ApiModelProperty(value = "行业名") @ApiModelProperty(value = "行业名")
private String industryName; private String industryName;
@ApiModelProperty(value = "客户邮箱") @ApiModelProperty(value = "客户邮箱")
private String clientEmail; private String clientEmail;
@ApiModelProperty(value = "区编号")
private Integer keyId;
@ApiModelProperty(value = "省") @ApiModelProperty(value = "省")
private String province; private String province;
@ApiModelProperty(value = "市") @ApiModelProperty(value = "市")
private String city; private String city;
@ApiModelProperty(value = "区") @ApiModelProperty(value = "区")
private String district; private String district;
@ApiModelProperty(value = "地址")
private String address;
@ApiModelProperty(value = "邮编") @ApiModelProperty(value = "邮编")
private String zipCode; private String zipCode;
@ApiModelProperty(value = "详细地址")
private String address;
@ApiModelProperty(value = "客户类型") @ApiModelProperty(value = "客户类型id")
private String clientType; private Integer clientType;
@ApiModelProperty(value = "客户来源") @ApiModelProperty(value = "客户类型名")
private String clientSource; private String clientTypeName;
@ApiModelProperty(value = "客户来源id")
private Integer clientSource;
@ApiModelProperty(value = "客户来源名")
private String clientSourceName;
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")
private String remarks; private String remarks;
...@@ -102,18 +114,51 @@ public class CrmClientData extends Model<CrmClientData>{ ...@@ -102,18 +114,51 @@ public class CrmClientData extends Model<CrmClientData>{
@ApiModelProperty(value = "客户所属人姓名") @ApiModelProperty(value = "客户所属人姓名")
private String belongUserName; private String belongUserName;
@ApiModelProperty(value = "协作人empNum") @ApiModelProperty(value = "客户所属业务组id")
private Integer associatesUser; private Integer belongGroup;
@ApiModelProperty(value = "协作人姓名") @ApiModelProperty(value = "客户所属业务组名")
private String associatesName; private String belongGroupName;
@ApiModelProperty(value = "客户数据状态 0-无 1-潜在 2-意向 3-签约 4-合作中 5-已封档")
private Integer clientStatus;
@ApiModelProperty(value = "附件地址") @ApiModelProperty(value = "附件地址")
private String fileUrl; private String fileUrl;
@ApiModelProperty(value = "客户联系人数量")
private Integer contactsNum;
@ApiModelProperty(value = "收藏关注 0-否 1-是")
private Integer star;
@ApiModelProperty(value = "创建人")
private Integer createUser;
@TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
private Date createdTime; private Date createTime;
@ApiModelProperty(value = "修改人")
private Integer modifyUser;
@TableField(fill = FieldFill.INSERT_UPDATE)
@ApiModelProperty(value = "修改时间")
private Date modifyTime;
@ApiModelProperty(value = "最近跟进时间")
private Date lastFollowTime;
@ApiModelProperty(value = "企业id") @ApiModelProperty(value = "企业id")
private Integer orgCode; private Integer orgCode;
@Transient
@TableField(exist = false)
@ApiModelProperty(value = "协作人id")
private Integer[] ids;
@Transient
@TableField(exist = false)
@ApiModelProperty(value = "客户联系人数据列表")
private List<CrmClientContacts> CrmClientContacts;
} }
/**
* Title: CrmClientFollow.java
* Description:
* @author dsc
* @date 2020年6月8日
* @version 1.0
*/
package cn.timer.api.bean.crm;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* Title: CrmClientFollow.java
*
* @Description:
* @author dsc
* @date 2020年6月8日
* @version 1.0
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "crm_client_follow")
@ApiModel("客户数据跟进表")
public class CrmClientFollow extends Model<CrmClientFollow> {
private static final long serialVersionUID = -7362549097557018582L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
@ApiModelProperty(value = "客户数据id")
private Integer cid;
@ApiModelProperty(value = "跟进内容")
private Integer content;
@ApiModelProperty(value = "客户数据状态 0-无 1-潜在 2-意向 3-签约 4-合作中 5-已封档")
private String clientStatus;
@ApiModelProperty(value = "联系人姓名")
private String name;
@ApiModelProperty(value = "联系人公司")
private String company;
@ApiModelProperty(value = "联系人职位")
private String position;
@ApiModelProperty(value = "联系人手机号")
private String cellphone;
@ApiModelProperty(value = "创建人")
private Integer createUser;
@ApiModelProperty(value = "企业id")
private Integer orgCode;
@ApiModelProperty(value = "创建人姓名")
private String createUserName;
@TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value = "创建时间")
private Date createTime;
}
/**
* Title: CilentSourceClassMapper.java
* Description:
* @author dsc
* @date 2020年6月8日
* @version 1.0
*/
package cn.timer.api.dao.clazz;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.clazz.ClientSourceClass;
/**
* Title: CilentSourceClassMapper.java
*
* @Description:
* @author dsc
* @date 2020年6月8日
* @version 1.0
*/
public interface CilentSourceClassMapper extends BaseMapper<ClientSourceClass> {
}
/**
* Title: CilentSourceClassMapper.java
* Description:
* @author dsc
* @date 2020年6月8日
* @version 1.0
*/
package cn.timer.api.dao.clazz;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.clazz.ClientTypeClass;
/**
* Title: CilentTypeClassMapper.java
*
* @Description:
* @author dsc
* @date 2020年6月8日
* @version 1.0
*/
public interface CilentTypeClassMapper extends BaseMapper<ClientTypeClass> {
}
/**
* Title: IndustryMapper.java
* Description:
* @author dsc
* @date 2020年6月8日
* @version 1.0
*/
package cn.timer.api.dao.clazz;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.clazz.IndustryClass;
/**
* Title: IndustryClassMapper.java
*
* @Description:
* @author dsc
* @date 2020年6月8日
* @version 1.0
*/
public interface IndustryClassMapper extends BaseMapper<IndustryClass> {
}
/**
* Title: CrmClientAssociatesMapper.java
* Description:
* @author dsc
* @date 2020年6月8日
* @version 1.0
*/
package cn.timer.api.dao.crm;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.crm.CrmClientAssociate;
/**
* Title: CrmClientAssociatesMapper.java
*
* @Description:
* @author dsc
* @date 2020年6月8日
* @version 1.0
*/
public interface CrmClientAssociatesMapper extends BaseMapper<CrmClientAssociate> {
}
/**
* Title: CrmClientFollowMapper.java
* Description:
* @author dsc
* @date 2020年6月8日
* @version 1.0
*/
package cn.timer.api.dao.crm;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.crm.CrmClientFollow;
/**
* Title: CrmClientFollowMapper.java
*
* @Description:
* @author dsc
* @date 2020年6月8日
* @version 1.0
*/
public interface CrmClientFollowMapper extends BaseMapper<CrmClientFollow> {
}
/**
* Title: CrmSeaRuleMapper.java
* Description:
* @author dsc
* @date 2020年6月8日
* @version 1.0
*/
package cn.timer.api.dao.crm;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.crm.CrmSeaRule;
/**
* Title: CrmSeaRuleMapper.java
*
* @Description:
* @author dsc
* @date 2020年6月8日
* @version 1.0
*/
public interface CrmSeaRuleMapper extends BaseMapper<CrmSeaRule> {
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment