package com.zy.crm.manager.entity;
|
|
import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId;
|
import com.baomidou.mybatisplus.enums.IdType;
|
import com.core.common.SpringUtils;
|
import com.zy.crm.manager.service.PlanService;
|
import com.zy.crm.manager.entity.Plan;
|
import com.baomidou.mybatisplus.annotations.TableField;
|
import com.core.common.SpringUtils;
|
import com.zy.crm.system.service.UserService;
|
import com.zy.crm.system.entity.User;
|
|
import io.swagger.annotations.ApiModelProperty;
|
import lombok.Data;
|
import com.baomidou.mybatisplus.annotations.TableName;
|
import java.io.Serializable;
|
|
@Data
|
@TableName("man_plan_foll")
|
public class PlanFoll implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
/**
|
* ID
|
*/
|
@ApiModelProperty(value= "ID")
|
@TableId(value = "id", type = IdType.AUTO)
|
private Long id;
|
|
/**
|
* 规划单
|
*/
|
@ApiModelProperty(value= "规划单")
|
@TableField("plan_id")
|
private Long planId;
|
|
/**
|
* 跟进人
|
*/
|
@ApiModelProperty(value= "跟进人")
|
@TableField("user_id")
|
private Long userId;
|
|
public PlanFoll() {}
|
|
public PlanFoll(Long planId,Long userId) {
|
this.planId = planId;
|
this.userId = userId;
|
}
|
|
// PlanFoll planFoll = new PlanFoll(
|
// null, // 规划单
|
// null // 跟进人[非空]
|
// );
|
|
public String getPlanId$(){
|
PlanService service = SpringUtils.getBean(PlanService.class);
|
Plan plan = service.selectById(this.planId);
|
if (!Cools.isEmpty(plan)){
|
return String.valueOf(plan.getName());
|
}
|
return null;
|
}
|
|
public String getUserId$(){
|
UserService service = SpringUtils.getBean(UserService.class);
|
User user = service.selectById(this.userId);
|
if (!Cools.isEmpty(user)){
|
return String.valueOf(user.getNickname());
|
}
|
return null;
|
}
|
|
|
}
|