Commit 47431ee2 by dengshichuan

Merge branch 'dsc' into 'develop'

Dsc

See merge request 8timerv2/8timerapiv200!161
parents b67057c6 1a1a9e41
/**
* <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;
}
/**
* <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: IndustryClass.java
* </p>
* <p>
* Description:
* </p>
*
* @author dsc
* @date 2020年6月5日
* @version 1.0
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("行业字典表(1.0)")
public class IndustryClass extends Model<IndustryClass> {
private static final long serialVersionUID = -5008126674106880292L;
@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;
}
...@@ -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;
......
/**
* Title: CrmBusinessGroup.java
* Description:
* @author dsc
* @date 2020年6月5日
* @version 1.0
*/
package cn.timer.api.bean.crm;
import java.util.Date;
import java.util.List;
import java.util.Map;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
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.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: CrmBusinessGroup.java
*
* @Description:
* @author dsc
* @date 2020年6月5日
* @version 1.0
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "crm_business_group")
@ApiModel("业务组表")
public class CrmBusinessGroup extends Model<CrmBusinessGroup> {
private static final long serialVersionUID = -6502869518965155561L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
@ApiModelProperty(value = "公司内排序")
private Integer sort;
@ApiModelProperty(value = "业务组名称")
private String name;
@ApiModelProperty(value = "创建时间")
@TableField(fill = FieldFill.INSERT)
private Date createTime;
@ApiModelProperty(value = "创建人")
private Integer createUser;
@ApiModelProperty(value = "修改时间")
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date modifyTime;
@ApiModelProperty(value = "修改人")
private Integer modifyUser;
@ApiModelProperty(value = "企业id")
private Integer orgCode;
@Transient
@TableField(exist = false)
@ApiModelProperty(value = "组管理员信息")
private List<Map<String, Object>> managers;
@Transient
@TableField(exist = false)
@ApiModelProperty(value = "组管理员id")
private Integer[] managerIds;
@Transient
@TableField(exist = false)
@ApiModelProperty(value = "组成员id")
private Integer[] memberIds;
@Transient
@TableField(exist = false)
@ApiModelProperty(value = "回收规则")
private CrmSeaRule crmSeaRules;
// @ApiModelProperty(value = "组成员empNum(字符串,分割)",example = "1,2,3")
// private String member;
//
// @ApiModelProperty(value = "组成员姓名")
// private String memberName;
// @ApiModelProperty(value = "业务组管理员empNum")
// private Integer manager;
//
// @ApiModelProperty(value = "业务组管理员名称")
// private String managerName;
}
/**
* Title: CrmBusinessGroupMember.java
* Description:
* @author dsc
* @date 2020年6月5日
* @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: CrmBusinessGroupMember.java
* @Description:
* @author dsc
* @date 2020年6月5日
* @version 1.0
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "crm_business_group_member")
@ApiModel("业务组成员表")
public class CrmBusinessGroupMember extends Model<CrmBusinessGroupMember>{
private static final long serialVersionUID = 3513845730484806330L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
@ApiModelProperty(value = "组id")
private Integer gid;
@ApiModelProperty(value = "员工id")
private Integer empNum;
@ApiModelProperty(value = "0-普通成员 1-管理员")
private Integer type;
@ApiModelProperty(value = "企业id")
private Integer orgCode;
}
/**
* 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_associate")
@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;
}
/**
* <p>Title: CrmClientData.java</p>
* <p>Description: </p>
* @author dsc
* @date 2020年6月5日
* @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;
/**
* <p>
* Title: CrmClientContacts.java
* </p>
* <p>
* Description:
* </p>
*
* @author dsc
* @date 2020年6月5日
* @version 1.0
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "crm_client_contacts")
@ApiModel("客户联系人表")
public class CrmClientContacts extends Model<CrmClientContacts> {
private static final long serialVersionUID = 7527532835555744270L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
@ApiModelProperty(value = "客户数据表id")
private Integer cid;
@ApiModelProperty(value = "联系人姓名")
private String name;
@ApiModelProperty(value = "性别 0-女 1-男")
private Integer gender;
@ApiModelProperty(value = "职位")
private String position;
@ApiModelProperty(value = "座机")
private String telephone;
@ApiModelProperty(value = "手机")
private String cellphone;
@ApiModelProperty(value = "客户邮箱")
private String email;
@ApiModelProperty(value = "地址")
private String address;
@ApiModelProperty(value = "公司")
private String company;
@ApiModelProperty(value = "备注")
private String remark;
// @ApiModelProperty(value = "企业id")
// private Integer orgCode;
}
/**
* <p>Title: CrmClientData.java</p>
* <p>Description: </p>
* @author dsc
* @date 2020年6月5日
* @version 1.0
*/
package cn.timer.api.bean.crm;
import java.util.Date;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
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.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;
/**
* <p>
* Title: CrmClientData.java
* </p>
* <p>
* Description:
* </p>
*
* @author dsc
* @date 2020年6月5日
* @version 1.0
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "crm_client_data")
@ApiModel("客户数据表")
public class CrmClientData extends Model<CrmClientData> {
private static final long serialVersionUID = -5368056704790782780L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
@ApiModelProperty(value = "客户姓名")
private String clientName;
@ApiModelProperty(value = "客户手机号")
private String clientCellphone;
@ApiModelProperty(value = "客户座机")
private String clientTelephone;
@ApiModelProperty(value = "客户官网")
private String clientUrl;
@ApiModelProperty(value = "行业id(字典表)")
private Integer industry;
@ApiModelProperty(value = "行业名")
private String industryName;
@ApiModelProperty(value = "客户邮箱")
private String clientEmail;
@ApiModelProperty(value = "省")
private String province;
@ApiModelProperty(value = "省id")
private Integer provinceId;
@ApiModelProperty(value = "市")
private String city;
@ApiModelProperty(value = "市")
private Integer cityId;
@ApiModelProperty(value = "区")
private String district;
@ApiModelProperty(value = "区编号")
private Integer districtId;
@ApiModelProperty(value = "邮编")
private String zipCode;
@ApiModelProperty(value = "详细地址")
private String address;
@ApiModelProperty(value = "客户类型id")
private Integer clientType;
@ApiModelProperty(value = "客户类型名")
private String clientTypeName;
@ApiModelProperty(value = "客户来源id")
private Integer clientSource;
@ApiModelProperty(value = "客户来源名")
private String clientSourceName;
@ApiModelProperty(value = "备注")
private String remarks;
@ApiModelProperty(value = "客户所属(创建人empNum) 0-进入客户公海")
private Integer belongUser;
@ApiModelProperty(value = "客户所属人姓名")
private String belongUserName;
@ApiModelProperty(value = "客户所属业务组id")
private Integer belongGroup;
@ApiModelProperty(value = "客户所属业务组名")
private String belongGroupName;
@ApiModelProperty(value = "客户数据状态 0-无 1-潜在 2-意向 3-签约 4-合作中 5-已封档")
private Integer clientStatus;
@ApiModelProperty(value = "附件地址")
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 = "创建时间")
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")
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: CrmSeaRule.java
* Description:
* @author dsc
* @date 2020年6月5日
* @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: CrmSeaRule.java
*
* @Description:
* @author dsc
* @date 2020年6月5日
* @version 1.0
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "crm_sea_rule")
@ApiModel("公海规则对应表")
public class CrmSeaRule extends Model<CrmSeaRule> {
private static final long serialVersionUID = 4427752422137750653L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
@ApiModelProperty(value = "组id")
private Integer gid;
@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;
}
...@@ -18,6 +18,8 @@ public class MyMetaObjectHandler implements MetaObjectHandler { ...@@ -18,6 +18,8 @@ public class MyMetaObjectHandler implements MetaObjectHandler {
log.info("start insert fill ...."); log.info("start insert fill ....");
Date date = new Date(); Date date = new Date();
this.strictInsertFill(metaObject, "createTime", Date.class, date); // 起始版本 3.3.0(推荐使用) this.strictInsertFill(metaObject, "createTime", Date.class, date); // 起始版本 3.3.0(推荐使用)
this.strictInsertFill(metaObject, "createdTime", Date.class, date); // 起始版本 3.3.0(推荐使用)
this.strictInsertFill(metaObject, "modifyTime", Date.class, date); // 起始版本 3.3.0(推荐使用)
this.strictInsertFill(metaObject, "lrsjTime", Date.class, date); this.strictInsertFill(metaObject, "lrsjTime", Date.class, date);
this.strictInsertFill(metaObject, "regTime", Date.class, date); this.strictInsertFill(metaObject, "regTime", Date.class, date);
this.strictInsertFill(metaObject, "registerTime", Date.class, date); this.strictInsertFill(metaObject, "registerTime", Date.class, date);
......
...@@ -498,24 +498,26 @@ public class LoginController { ...@@ -498,24 +498,26 @@ public class LoginController {
.operName(username).endTime(DateUtil.offsetDay(new Date(), offset)) .operName(username).endTime(DateUtil.offsetDay(new Date(), offset))
.level(CommonEnum.LEVEL_PROBATION.getType()).build(); .level(CommonEnum.LEVEL_PROBATION.getType()).build();
boolean b1 = qyzxEntInfoM.insert(); boolean b1 = qyzxEntInfoM.insert();
Integer qyId = qyzxEntInfoM.getId();
if (!b1) { if (!b1) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return ResultUtil.error("注册企业失败1"); return ResultUtil.error("注册企业失败1");
} }
if (login == null) { if (login == null) {
System.err.println("kanxia");
// 员工信息 // 员工信息
QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().phone(phone).pw(Md5.md5(pw)) QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().phone(phone).pw(Md5.md5(pw))
.sts(CommonEnum.U_STS_ON.getType()).orgId(qyzxEntInfoM.getId()).regTime(DateUtil.date()) .sts(CommonEnum.U_STS_ON.getType()).orgId(qyId).regTime(DateUtil.date())
.build(); .build();
boolean b2 = qyzxEmpLogin.insert(); boolean b2 = qyzxEmpLogin.insert();
if (!b2) { if (!b2) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return ResultUtil.error("注册企业失败2"); return ResultUtil.error("注册企业失败2");
} }
login = qyzxEmpLogin;
} }
boolean b4 = YgglMainEmp.builder().orgCode(qyId).empNum(login.getId()).rzTime(new Date())
boolean b4 = YgglMainEmp.builder().orgCode(qyzxEntInfoM.getId()).empNum(login.getId()).rzTime(new Date())
.isManager(SysRoleType.U_TYPE_ADMIN.getType()).name(username).phone(phone) .isManager(SysRoleType.U_TYPE_ADMIN.getType()).name(username).phone(phone)
.jobType(YgJobType.QUANZHI.getType()).jobStatus(YgEnumInterface.jobStatus.ZHENSHI.getType()).build() .jobType(YgJobType.QUANZHI.getType()).jobStatus(YgEnumInterface.jobStatus.ZHENSHI.getType()).build()
.insert(); .insert();
...@@ -592,7 +594,6 @@ public class LoginController { ...@@ -592,7 +594,6 @@ public class LoginController {
return ResultUtil.error("没有任何公司可以查看!"); return ResultUtil.error("没有任何公司可以查看!");
qyzxEmpLogin1.setQys(qys); qyzxEmpLogin1.setQys(qys);
QysDto ctrl = qys.get(0); QysDto ctrl = qys.get(0);
if (qyzxEmpLogin1.getOrgId() != null) { if (qyzxEmpLogin1.getOrgId() != null) {
...@@ -603,9 +604,8 @@ public class LoginController { ...@@ -603,9 +604,8 @@ public class LoginController {
} }
} }
YgglMainEmp userInfo = ygglMainEmpMapper.selectOne(new QueryWrapper<YgglMainEmp>().lambda() YgglMainEmp userInfo = ygglMainEmpMapper.selectOne(new QueryWrapper<YgglMainEmp>().lambda()
.select(YgglMainEmp::getName,YgglMainEmp::getPhone,YgglMainEmp::getBmgwId) .select(YgglMainEmp::getName, YgglMainEmp::getPhone, YgglMainEmp::getBmgwId)
.eq(YgglMainEmp::getEmpNum, qyzxEmpLogin1.getId()) .eq(YgglMainEmp::getEmpNum, qyzxEmpLogin1.getId())
.eq(YgglMainEmp::getOrgCode, qyzxEmpLogin1.getOrgId())); .eq(YgglMainEmp::getOrgCode, qyzxEmpLogin1.getOrgId()));
if (userInfo == null) { if (userInfo == null) {
......
/**
* 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 ClientSourceClassMapper 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 ClientTypeClassMapper 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: CrmBusinessGroupMapper.java
* Description:
* @author dsc
* @date 2020年6月6日
* @version 1.0
*/
package cn.timer.api.dao.crm;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.crm.CrmBusinessGroup;
/**
* Title: CrmBusinessGroupMapper.java
*
* @Description:
* @author dsc
* @date 2020年6月6日
* @version 1.0
*/
public interface CrmBusinessGroupMapper extends BaseMapper<CrmBusinessGroup> {
}
/**
* Title: CrmBusinessGroupMemberMapper.java
* Description:
* @author dsc
* @date 2020年6月6日
* @version 1.0
*/
package cn.timer.api.dao.crm;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.crm.CrmBusinessGroupMember;
/**
* Title: CrmBusinessGroupMemberMapper.java
*
* @Description:
* @author dsc
* @date 2020年6月6日
* @version 1.0
*/
public interface CrmBusinessGroupMemberMapper extends BaseMapper<CrmBusinessGroupMember> {
}
/**
* 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> {
}
/**
* <p>Title: CrmClientContactsMapper.java</p>
* <p>Description: </p>
* @author dsc
* @date 2020年6月5日
* @version 1.0
*/
package cn.timer.api.dao.crm;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.crm.CrmClientContacts;
/**
* <p>
* Title: CrmClientContactsMapper.java
* </p>
* <p>
* Description:
* </p>
*
* @author dsc
* @date 2020年6月5日
* @version 1.0
*/
public interface CrmClientContactsMapper extends BaseMapper<CrmClientContacts> {
}
/**
* <p>Title: CrmClientDataMapper.java</p>
* <p>Description: </p>
* @author dsc
* @date 2020年6月5日
* @version 1.0
*/
package cn.timer.api.dao.crm;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.crm.CrmClientData;
/**
* Title: CrmClientDataMapper.java
* Description:
*
* @author dsc
* @date 2020年6月5日
* @version 1.0
*/
public interface CrmClientDataMapper extends BaseMapper<CrmClientData> {
}
/**
* 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> {
}
...@@ -9,6 +9,10 @@ package cn.timer.api.utils; ...@@ -9,6 +9,10 @@ package cn.timer.api.utils;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -87,6 +91,17 @@ public class CheckUtil { ...@@ -87,6 +91,17 @@ public class CheckUtil {
return list1.stream().distinct().collect(Collectors.toList()); return list1.stream().distinct().collect(Collectors.toList());
} }
/**
* 字段条件去重
* @param <T>
* @param keyExtractor
* @return
*/
public static <T> Predicate<T> distinctByKey(Function<? super T, Object> keyExtractor) {
Map<Object, Boolean> seen = new ConcurrentHashMap<>();
return object -> seen.putIfAbsent(keyExtractor.apply(object), Boolean.TRUE) == null;
}
// public static void main(String[] args) { // public static void main(String[] args) {
// List<String> list1 = new ArrayList<String>(); // List<String> list1 = new ArrayList<String>();
// list1.add("a"); // list1.add("a");
......
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