src/main/java/com/zy/crm/manager/entity/AllFoll.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/crm/manager/mapper/AllFollMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/crm/manager/service/AllFollService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/crm/manager/service/impl/AllFollServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/AllFollMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/zy/crm/manager/entity/AllFoll.java
New file @@ -0,0 +1,82 @@ package com.zy.crm.manager.entity; import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.enums.IdType; import com.core.common.Cools; import com.core.common.SpringUtils; import com.zy.crm.manager.service.PlanService; import com.zy.crm.system.entity.User; import com.zy.crm.system.service.UserService; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @Data @TableName("man_all_foll") public class AllFoll 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; /** * memo */ @ApiModelProperty(value= "表类") @TableField("memo") private Long memo; public AllFoll() {} public AllFoll(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; } } src/main/java/com/zy/crm/manager/mapper/AllFollMapper.java
New file @@ -0,0 +1,12 @@ package com.zy.crm.manager.mapper; import com.baomidou.mybatisplus.mapper.BaseMapper; import com.zy.crm.manager.entity.AllFoll; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; @Mapper @Repository public interface AllFollMapper extends BaseMapper<AllFoll> { } src/main/java/com/zy/crm/manager/service/AllFollService.java
New file @@ -0,0 +1,8 @@ package com.zy.crm.manager.service; import com.baomidou.mybatisplus.service.IService; import com.zy.crm.manager.entity.AllFoll; public interface AllFollService extends IService<AllFoll> { } src/main/java/com/zy/crm/manager/service/impl/AllFollServiceImpl.java
New file @@ -0,0 +1,12 @@ package com.zy.crm.manager.service.impl; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.zy.crm.manager.entity.AllFoll; import com.zy.crm.manager.mapper.AllFollMapper; import com.zy.crm.manager.service.AllFollService; import org.springframework.stereotype.Service; @Service("allFollService") public class AllFollServiceImpl extends ServiceImpl<AllFollMapper, AllFoll> implements AllFollService { } src/main/resources/mapper/AllFollMapper.xml
New file @@ -0,0 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.zy.crm.manager.mapper.AllFollMapper"> <!-- 通用查询映射结果 --> <resultMap id="BaseResultMap" type="com.zy.crm.manager.entity.AllFoll"> <id column="id" property="id" /> <result column="plan_id" property="planId" /> <result column="user_id" property="userId" /> </resultMap> </mapper>