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.WeeklyService;
|
import com.zy.crm.manager.entity.Weekly;
|
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_weekly_foll")
|
public class WeeklyFoll implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
/**
|
* ID
|
*/
|
@ApiModelProperty(value= "ID")
|
@TableId(value = "id", type = IdType.AUTO)
|
private Long id;
|
|
/**
|
* 周报
|
*/
|
@ApiModelProperty(value= "周报")
|
@TableId(value = "weekly_id", type = IdType.INPUT)
|
@TableField("weekly_id")
|
private Long weeklyId;
|
|
/**
|
* 跟进人
|
*/
|
@ApiModelProperty(value= "跟进人")
|
@TableId(value = "user_id", type = IdType.INPUT)
|
@TableField("user_id")
|
private Long userId;
|
|
public WeeklyFoll() {}
|
|
public WeeklyFoll(Long weeklyId,Long userId) {
|
this.weeklyId = weeklyId;
|
this.userId = userId;
|
}
|
|
// WeeklyFoll weeklyFoll = new WeeklyFoll(
|
// null, // 周报[非空]
|
// null // 跟进人[非空]
|
// );
|
|
public String getWeeklyId$(){
|
WeeklyService service = SpringUtils.getBean(WeeklyService.class);
|
Weekly weekly = service.selectById(this.weeklyId);
|
if (!Cools.isEmpty(weekly)){
|
return String.valueOf(weekly.getId());
|
}
|
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;
|
}
|
|
|
}
|