Commit cb219dde by 邓实川

客户管理接口

parent 43b69972
/**
* Title: CrmBusinessManager.java
* Description:
* @author dsc
* @date 2020年6月9日
* @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: CrmBusinessGroupManager.java
*
* @Description:
* @author dsc
* @date 2020年6月9日
* @version 1.0
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "crm_business_group_manager")
@ApiModel("业务组管理员表")
public class CrmBusinessGroupManager extends Model<CrmBusinessGroupManager> {
private static final long serialVersionUID = -957497237692110042L;
@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 = "企业id")
private Integer orgCode;
}
......@@ -54,6 +54,9 @@ public class CrmBusinessGroupMember extends Model<CrmBusinessGroupMember>{
@ApiModelProperty(value = "员工id")
private Integer empNum;
@ApiModelProperty(value = "0-普通成员 1-管理员")
private Integer type;
@ApiModelProperty(value = "企业id")
private Integer orgCode;
}
......@@ -37,7 +37,7 @@ import lombok.NoArgsConstructor;
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "crm_client_associates")
@Table(name = "crm_client_associate")
@ApiModel("客户协作人表")
public class CrmClientAssociate extends Model<CrmClientAssociate> {
......
/**
* Title: CrmBusinessGroupManagerMapper.java
* Description:
* @author dsc
* @date 2020年6月9日
* @version 1.0
*/
package cn.timer.api.dao.crm;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.crm.CrmBusinessGroupManager;
/**
* Title: CrmBusinessGroupManagerMapper.java
*
* @Description:
* @author dsc
* @date 2020年6月9日
* @version 1.0
*/
public interface CrmBusinessGroupManagerMapper extends BaseMapper<CrmBusinessGroupManager> {
}
......@@ -9,6 +9,10 @@ package cn.timer.api.utils;
import java.lang.reflect.Field;
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;
/**
......@@ -86,6 +90,17 @@ public class CheckUtil {
return list1;
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) {
// List<String> list1 = new ArrayList<String>();
......
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