表合并

This commit is contained in:
517612449@qq.com
2022-07-13 11:34:53 +08:00
parent 8d911d4c33
commit adc7847af8
18 changed files with 481 additions and 574 deletions

View File

@ -1,6 +1,7 @@
package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.controller; package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.controller;
import com.chinaunicom.mall.ebtp.common.base.entity.BasePageResponse;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse; import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
import com.chinaunicom.mall.ebtp.common.poiExport.constant.ExportConstant; import com.chinaunicom.mall.ebtp.common.poiExport.constant.ExportConstant;
import com.chinaunicom.mall.ebtp.common.poiExport.entity.ExcelTable; import com.chinaunicom.mall.ebtp.common.poiExport.entity.ExcelTable;
@ -31,8 +32,6 @@ public class PartyEventMaintainController {
@Resource @Resource
private EventPartyBranchService eventPartyBranchService; private EventPartyBranchService eventPartyBranchService;
@Resource @Resource
private EventSubjectService eventSubjectService;
@Resource
private EventContactService eventContactService; private EventContactService eventContactService;
@Resource @Resource
private EventContactSuggestionService eventContactSuggestionService; private EventContactSuggestionService eventContactSuggestionService;
@ -48,8 +47,8 @@ public class PartyEventMaintainController {
@ApiOperation("保存攻坚项目") @ApiOperation("保存攻坚项目")
@PostMapping("/save/subject") @PostMapping("/save/subject")
public BaseResponse<Boolean> saveSubject(@RequestBody EventSubject inVO) { public BaseResponse<Boolean> saveSubject(@RequestBody EventStyle inVO) {
return BaseResponse.success(eventSubjectService.saveSubject(inVO)); return BaseResponse.success(eventStyleService.saveSubject(inVO));
} }
@ -87,8 +86,8 @@ public class PartyEventMaintainController {
@ApiOperation("后台查询列表") @ApiOperation("后台查询列表")
@PostMapping("/styleProject/list") @PostMapping("/styleProject/list")
public BaseResponse<List<EventMaintainOutVO>> queryStyleAndProject(@RequestBody(required = false) EventMaintainInVO inVO) { public BasePageResponse<EventMaintainOutVO> queryStyleAndProject(@RequestBody(required = false) EventMaintainInVO inVO) {
return BaseResponse.success(eventStyleService.queryStyleAndProject(inVO)); return BasePageResponse.success(eventStyleService.queryStyleAndProject(inVO));
} }
@ -113,8 +112,8 @@ public class PartyEventMaintainController {
@ApiOperation("后台查询列表") @ApiOperation("后台查询列表")
@PostMapping("/suggestion/list") @PostMapping("/suggestion/list")
public BaseResponse<List<EventContactSuggestion>> querySuggestion(@RequestBody(required = false) EventMaintainInVO inVO) { public BasePageResponse<EventContactSuggestion> querySuggestion(@RequestBody(required = false) EventMaintainInVO inVO) {
return BaseResponse.success(eventContactSuggestionService.querySuggestion(inVO)); return BasePageResponse.success(eventContactSuggestionService.querySuggestion(inVO));
} }
@GetMapping(value = "/suggestion/export/") @GetMapping(value = "/suggestion/export/")

View File

@ -25,8 +25,6 @@ public class PartyMemberEventController {
@Resource @Resource
private EventPartyBranchService eventPartyBranchService; private EventPartyBranchService eventPartyBranchService;
@Resource @Resource
private EventSubjectService eventSubjectService;
@Resource
private EventContactService eventContactService; private EventContactService eventContactService;
@Resource @Resource
private EventContactSuggestionService eventContactSuggestionService; private EventContactSuggestionService eventContactSuggestionService;
@ -103,8 +101,8 @@ public class PartyMemberEventController {
@ApiOperation("活动课题列表") @ApiOperation("活动课题列表")
@PostMapping("/eventSubject/list") @PostMapping("/eventSubject/list")
public BaseResponse<List<EventSubject>> getEventSubjectList(@RequestBody(required = false) EventQueryInVO inVO) { public BaseResponse<List<EventStyle>> getEventSubjectList(@RequestBody(required = false) EventQueryInVO inVO) {
return BaseResponse.success(eventSubjectService.getEventSubjectList(inVO)); return BaseResponse.success(eventStyleService.getEventSubjectList(inVO));
} }

View File

@ -1,9 +1,9 @@
package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.dao; //package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.dao;
//
import com.baomidou.mybatisplus.core.mapper.BaseMapper; //import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventSubject; //import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventSubject;
//
public interface EventSubjectMapper extends BaseMapper<EventSubject> { //public interface EventSubjectMapper extends BaseMapper<EventSubject> {
//
//
} //}

View File

@ -1,9 +1,9 @@
package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.dao; //package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.dao;
//
import com.baomidou.mybatisplus.core.mapper.BaseMapper; //import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventSubjectTime; //import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventSubjectTime;
//
public interface EventSubjectTimeMapper extends BaseMapper<EventSubjectTime> { //public interface EventSubjectTimeMapper extends BaseMapper<EventSubjectTime> {
//
//
} //}

View File

@ -1,27 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?> <!--<?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"> <!--<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">-->
<mapper namespace="com.chinaunicom.mall.ebtp.extend.partyMemberEvent.dao.EventSubjectMapper"> <!--<mapper namespace="com.chinaunicom.mall.ebtp.extend.partyMemberEvent.dao.EventSubjectMapper">-->
<resultMap id="BaseResultMap" <!-- <resultMap id="BaseResultMap"-->
type="com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventSubject"> <!-- type="com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventSubject">-->
<result column="id" jdbcType="BIGINT" property="id"/> <!-- <result column="id" jdbcType="BIGINT" property="id"/>-->
<result column="title" jdbcType="VARCHAR" property="title"/> <!-- <result column="title" jdbcType="VARCHAR" property="title"/>-->
<result column="category" jdbcType="VARCHAR" property="category"/> <!-- <result column="category" jdbcType="VARCHAR" property="category"/>-->
<result column="content" jdbcType="VARCHAR" property="content"/> <!-- <result column="content" jdbcType="VARCHAR" property="content"/>-->
<result column="image" jdbcType="VARCHAR" property="image"/> <!-- <result column="image" jdbcType="VARCHAR" property="image"/>-->
<result column="sort" jdbcType="INTEGER" property="sort"/> <!-- <result column="sort" jdbcType="INTEGER" property="sort"/>-->
<result column="status" jdbcType="VARCHAR" property="status"/> <!-- <result column="status" jdbcType="VARCHAR" property="status"/>-->
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> <!-- <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>-->
<result column="send_time" jdbcType="TIMESTAMP" property="sendTime"/> <!-- <result column="send_time" jdbcType="TIMESTAMP" property="sendTime"/>-->
<result column="project_name" jdbcType="VARCHAR" property="projectName"/> <!-- </resultMap>-->
<result column="unit_name" jdbcType="VARCHAR" property="unitName"/>
<result column="team_leader" jdbcType="VARCHAR" property="teamLeader"/>
<result column="team_menber" jdbcType="VARCHAR" property="teamMenber"/>
<result column="project_content_problem" jdbcType="VARCHAR" property="projectContentProblem"/>
<result column="project_content_solve" jdbcType="VARCHAR" property="projectContentSolve"/>
<result column="project_content_result" jdbcType="VARCHAR" property="projectContentResult"/>
<result column="support_resources" jdbcType="VARCHAR" property="supportResources"/>
</resultMap>
</mapper> <!--</mapper>-->

View File

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?> <!--<?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"> <!--<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">-->
<mapper namespace="com.chinaunicom.mall.ebtp.extend.partyMemberEvent.dao.EventSubjectTimeMapper"> <!--<mapper namespace="com.chinaunicom.mall.ebtp.extend.partyMemberEvent.dao.EventSubjectTimeMapper">-->
<resultMap id="BaseResultMap" <!-- <resultMap id="BaseResultMap"-->
type="com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventSubjectTime"> <!-- type="com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventSubjectTime">-->
<result column="id" jdbcType="BIGINT" property="id"/> <!-- <result column="id" jdbcType="BIGINT" property="id"/>-->
<result column="subject_id" jdbcType="VARCHAR" property="subjectId"/> <!-- <result column="subject_id" jdbcType="VARCHAR" property="subjectId"/>-->
<result column="milestone" jdbcType="VARCHAR" property="milestone"/> <!-- <result column="milestone" jdbcType="VARCHAR" property="milestone"/>-->
<result column="milestone_time" jdbcType="TIMESTAMP" property="milestoneTime"/> <!-- <result column="milestone_time" jdbcType="TIMESTAMP" property="milestoneTime"/>-->
<result column="milestone_target" jdbcType="VARCHAR" property="milestoneTarget"/> <!-- <result column="milestone_target" jdbcType="VARCHAR" property="milestoneTarget"/>-->
<result column="sort" jdbcType="INTEGER" property="sort"/> <!-- <result column="sort" jdbcType="INTEGER" property="sort"/>-->
<result column="status" jdbcType="VARCHAR" property="status"/> <!-- <result column="status" jdbcType="VARCHAR" property="status"/>-->
</resultMap> <!-- </resultMap>-->
</mapper> <!--</mapper>-->

View File

@ -11,7 +11,10 @@ import lombok.Data;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime;
/** /**
* 实体类 EventMaintainInVO * 实体类 EventMaintainInVO
@ -63,5 +66,14 @@ public class EventMaintainInVO implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@TableField(typeHandler = CustomLocalDateTimeTypeHandler.class) @TableField(typeHandler = CustomLocalDateTimeTypeHandler.class)
private java.time.LocalDateTime endTime; private LocalDateTime endTime;
@ApiModelProperty("当前页")
@NotNull
@Min(0L)
private Integer pageNo;
@ApiModelProperty("每页显示条数")
@NotNull
@Min(0L)
private Integer pageSize;
} }

View File

@ -60,7 +60,7 @@ public class EventStyle implements Serializable {
/** /**
* 类别 * 类别
*/ */
@ApiModelProperty(value = "类别") @ApiModelProperty(value = "类别 1-首页2-活动风采3-攻坚克难")
private String category; private String category;
/** /**

View File

@ -1,177 +1,108 @@
package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity; //package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity;
//
import com.baomidou.mybatisplus.annotation.TableField; //import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; //import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; //import com.baomidou.mybatisplus.annotation.TableName;
import com.chinaunicom.mall.ebtp.common.config.CustomLocalDateTimeTypeHandler; //import com.chinaunicom.mall.ebtp.common.config.CustomLocalDateTimeTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat; //import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; //import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; //import io.swagger.annotations.ApiModelProperty;
import lombok.Data; //import lombok.Data;
import lombok.experimental.Accessors; //import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat; //import org.springframework.format.annotation.DateTimeFormat;
//
import java.io.Serializable; //import java.io.Serializable;
import java.util.List; //
///**
/** // * 实体类 EventSubject
* 实体类 EventSubject // *
* // * @auto.generated
* @auto.generated // */
*/ //@Data
@Data //@Accessors(chain = true)
@Accessors(chain = true) //@ApiModel
@ApiModel //@TableName(value = "event_subject", autoResultMap = true)
@TableName(value = "event_subject", autoResultMap = true) //public class EventSubject implements Serializable {
public class EventSubject implements Serializable { //
// private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L; //
// /**
/** // * id
* id // */
*/ // @TableId
@TableId // @ApiModelProperty(value = "id")
@ApiModelProperty(value = "id") // private String id;
private String id; //
// /**
/** // * 活动标题
* 活动标题 // */
*/ // @ApiModelProperty(value = "活动标题")
@ApiModelProperty(value = "活动标题") // private String title;
private String title; //
// /**
/** // * 类别
* 类别 // */
*/ // @ApiModelProperty(value = "类别")
@ApiModelProperty(value = "类别") // private String category;
private String category; //
// /**
/** // * 活动内容正文
* 活动内容正文 // */
*/ // @ApiModelProperty(value = "活动内容正文")
@ApiModelProperty(value = "活动内容正文") // private String content;
private String content; //
// /**
/** // * 正文图片id
* 正文图片id // */
*/ // @ApiModelProperty(value = "正文图片id")
@ApiModelProperty(value = "正文图片id") // private String contentImageId;
private String contentImageId; //
// /**
/** // * 活动图片
* 活动图片 // */
*/ // @ApiModelProperty(value = "活动图片")
@ApiModelProperty(value = "活动图片") // private String image;
private String image; //
// /**
/** // * 显示排序
* 显示排序 // */
*/ // @ApiModelProperty(value = "显示排序")
@ApiModelProperty(value = "显示排序") // private Integer sort;
private Integer sort; //
// /**
/** // * 页面显示状态 0-隐藏 1-显示
* 页面显示状态 0-隐藏 1-显示 // */
*/ // @ApiModelProperty(value = "页面显示状态 0-隐藏 1-显示")
@ApiModelProperty(value = "页面显示状态 0-隐藏 1-显示") // private String status;
private String status; //
// /**
/** // * 创建时间
* 创建时间 // */
*/ // @ApiModelProperty(value = "创建时间")
@ApiModelProperty(value = "创建时间") // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") // @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") // @TableField(typeHandler = CustomLocalDateTimeTypeHandler.class)
@TableField(typeHandler = CustomLocalDateTimeTypeHandler.class) // private java.time.LocalDateTime createTime;
private java.time.LocalDateTime createTime; //
// /**
/** // * 发布时间
* 发布时间 // */
*/ // @ApiModelProperty(value = "发布时间")
@ApiModelProperty(value = "发布时间") // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") // @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") // @TableField(typeHandler = CustomLocalDateTimeTypeHandler.class)
@TableField(typeHandler = CustomLocalDateTimeTypeHandler.class) // private java.time.LocalDateTime sendTime;
private java.time.LocalDateTime sendTime; //
// /**
/** // * 发布人
* 发布人 // */
*/ // @ApiModelProperty(value = "发布人")
@ApiModelProperty(value = "发布人") // private String createBy;
private String createBy; //
// /**
// * 删除标识
/** // */
* 删除标识 // @ApiModelProperty(value = "删除标识")
*/ // private String deleteFlag;
@ApiModelProperty(value = "删除标识") //
private String deleteFlag; //}
/**
* 项目名称
*/
@ApiModelProperty(value = "项目名称")
private String projectName;
/**
* 实施单位
*/
@ApiModelProperty(value = "实施单位")
private String unitName;
/**
* 团队牵头人
*/
@ApiModelProperty(value = "团队牵头人")
private String teamLeader;
/**
* 团队成员
*/
@ApiModelProperty(value = "团队成员")
private String teamMenber;
/**
* 项目内容-针对的痛点难点问题
*/
@ApiModelProperty(value = "项目内容-针对的痛点难点问题")
private String projectContentProblem;
/**
* 项目内容-解决问题的主要思路和措施
*/
@ApiModelProperty(value = "项目内容-解决问题的主要思路和措施")
private String projectContentSolve;
/**
* 项目内容-预计达到的可感知可量化的效果
*/
@ApiModelProperty(value = "项目内容-预计达到的可感知可量化的效果")
private String projectContentResult;
/**
* 需要集团公司提供的供应链平台开发及运营支撑资源(若有)
*/
@ApiModelProperty(value = "需要集团公司提供的供应链平台开发及运营支撑资源(若有)")
private String supportResources;
/**
* 团队牵头人信息
*/
@TableField(exist = false)
@ApiModelProperty(value = "团队牵头人信息")
private EventContact teamLeaderInfo;
/**
* 相关人员信息
*/
@TableField(exist = false)
@ApiModelProperty(value = "相关人员信息")
private List<EventContact> teamMenberInfo;
/**
* 项目推进计划及成果目标
*/
@TableField(exist = false)
@ApiModelProperty(value = "项目推进计划及成果目标")
private List<EventSubjectTime> subjectTimeList;
}

View File

@ -1,75 +1,75 @@
package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity; //package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity;
//
import com.baomidou.mybatisplus.annotation.TableField; //import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; //import com.baomidou.mybatisplus.annotation.TableName;
import com.chinaunicom.mall.ebtp.common.config.CustomLocalDateTimeTypeHandler; //import com.chinaunicom.mall.ebtp.common.config.CustomLocalDateTimeTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat; //import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; //import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; //import io.swagger.annotations.ApiModelProperty;
import lombok.Data; //import lombok.Data;
import lombok.experimental.Accessors; //import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat; //import org.springframework.format.annotation.DateTimeFormat;
//
import java.io.Serializable; //import java.io.Serializable;
//
/** ///**
* 实体类 EventSubjectTime // * 实体类 EventSubjectTime
* // *
* @auto.generated // * @auto.generated
*/ // */
@Data //@Data
@Accessors(chain = true) //@Accessors(chain = true)
@ApiModel //@ApiModel
@TableName(value = "event_subject_time", autoResultMap = true) //@TableName(value = "event_subject_time", autoResultMap = true)
public class EventSubjectTime implements Serializable { //public class EventSubjectTime implements Serializable {
//
private static final long serialVersionUID = 1L; // private static final long serialVersionUID = 1L;
//
/** // /**
* id // * id
*/ // */
@ApiModelProperty(value = "id") // @ApiModelProperty(value = "id")
private String id; // private String id;
//
/** // /**
* 活动标题表id // * 活动标题表id
*/ // */
@ApiModelProperty(value = "活动标题表id") // @ApiModelProperty(value = "活动标题表id")
private String subjectId; // private String subjectId;
//
/** // /**
* 里程碑 // * 里程碑
*/ // */
@ApiModelProperty(value = "里程碑") // @ApiModelProperty(value = "里程碑")
private String milestone; // private String milestone;
//
/** // /**
* 里程碑时间 // * 里程碑时间
*/ // */
@ApiModelProperty(value = "里程碑时间") // @ApiModelProperty(value = "里程碑时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") // @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@TableField(typeHandler = CustomLocalDateTimeTypeHandler.class) // @TableField(typeHandler = CustomLocalDateTimeTypeHandler.class)
private java.time.LocalDateTime milestoneTime; // private java.time.LocalDateTime milestoneTime;
//
/** // /**
* 里程碑预期目标 // * 里程碑预期目标
*/ // */
@ApiModelProperty(value = "里程碑预期目标") // @ApiModelProperty(value = "里程碑预期目标")
private String milestoneTarget; // private String milestoneTarget;
//
/** // /**
* 显示排序 // * 显示排序
*/ // */
@ApiModelProperty(value = "显示排序") // @ApiModelProperty(value = "显示排序")
private Integer sort; // private Integer sort;
//
/** // /**
* 页面显示状态 0-隐藏 1-显示 // * 页面显示状态 0-隐藏 1-显示
*/ // */
@ApiModelProperty(value = "页面显示状态 0-隐藏 1-显示") // @ApiModelProperty(value = "页面显示状态 0-隐藏 1-显示")
private String status; // private String status;
//
//
//
} //}

View File

@ -1,5 +1,6 @@
package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service; package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.chinaunicom.mall.ebtp.common.poiExport.entity.ExcelTable; import com.chinaunicom.mall.ebtp.common.poiExport.entity.ExcelTable;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventContactSuggestion; import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventContactSuggestion;
@ -17,7 +18,7 @@ public interface EventContactSuggestionService extends IService<EventContactSugg
Boolean submitSuggestion(EventContactSuggestion suggestion); Boolean submitSuggestion(EventContactSuggestion suggestion);
List<EventContactSuggestion> querySuggestion(EventMaintainInVO inVO); IPage<EventContactSuggestion> querySuggestion(EventMaintainInVO inVO);
ExcelTable export(List<String> ids); ExcelTable export(List<String> ids);
} }

View File

@ -1,5 +1,6 @@
package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service; package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventMaintainInVO; import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventMaintainInVO;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventMaintainOutVO; import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventMaintainOutVO;
@ -20,11 +21,15 @@ public interface EventStyleService extends IService<EventStyle>{
boolean saveStyle(EventStyle inVO); boolean saveStyle(EventStyle inVO);
List<EventMaintainOutVO> queryStyleAndProject(EventMaintainInVO inVO); IPage<EventMaintainOutVO> queryStyleAndProject(EventMaintainInVO inVO);
boolean saveStyleOrProject(EventMaintainOutVO inVO); boolean saveStyleOrProject(EventMaintainOutVO inVO);
boolean sendStyleOrProject(String id,String status); boolean sendStyleOrProject(String id,String status);
boolean deleteStyleOrProject(String id); boolean deleteStyleOrProject(String id);
List<EventStyle> getEventSubjectList(EventQueryInVO inVO);
boolean saveSubject(EventStyle inVO);
} }

View File

@ -1,20 +1,20 @@
package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service; //package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service;
//
import com.baomidou.mybatisplus.extension.service.IService; //import com.baomidou.mybatisplus.extension.service.IService;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventQueryInVO; //import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventQueryInVO;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventSubject; //import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventSubject;
//
import java.util.List; //import java.util.List;
//
/** ///**
* 对数据表 event_subject 操作的 service // * 对数据表 event_subject 操作的 service
* @author Auto create // * @author Auto create
* // *
*/ // */
public interface EventSubjectService extends IService<EventSubject>{ //public interface EventSubjectService extends IService<EventSubject>{
//
//
List<EventSubject> getEventSubjectList(EventQueryInVO inVO); // List<EventSubject> getEventSubjectList(EventQueryInVO inVO);
//
boolean saveSubject(EventSubject inVO); // boolean saveSubject(EventSubject inVO);
} //}

View File

@ -1,15 +1,15 @@
package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service; //package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service;
//
import com.baomidou.mybatisplus.extension.service.IService; //import com.baomidou.mybatisplus.extension.service.IService;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventSubjectTime; //import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventSubjectTime;
//
/** ///**
* 对数据表 event_subject_time 操作的 service // * 对数据表 event_subject_time 操作的 service
* @author Auto create // * @author Auto create
* // *
*/ // */
public interface EventSubjectTimeService extends IService<EventSubjectTime>{ //public interface EventSubjectTimeService extends IService<EventSubjectTime>{
//
//
//
} //}

View File

@ -4,9 +4,10 @@ package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.impl;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseCacheUser; import com.chinaunicom.mall.ebtp.common.base.entity.BaseCacheUser;
import com.chinaunicom.mall.ebtp.common.base.service.IBaseCacheUserService; import com.chinaunicom.mall.ebtp.common.base.service.IBaseCacheUserService;
import com.chinaunicom.mall.ebtp.common.poiExport.entity.ExcelTable; import com.chinaunicom.mall.ebtp.common.poiExport.entity.ExcelTable;
@ -16,7 +17,6 @@ import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.dao.EventContactSuggestionMapper; import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.dao.EventContactSuggestionMapper;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventContactSuggestion; import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventContactSuggestion;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventMaintainInVO; import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventMaintainInVO;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventSubject;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventContactSuggestionService; import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventContactSuggestionService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -25,10 +25,7 @@ import javax.annotation.Resource;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Date; import java.util.*;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
/** /**
@ -57,10 +54,10 @@ public class EventContactSuggestionServiceImpl extends ServiceImpl<EventContactS
} }
@Override @Override
public List<EventContactSuggestion> querySuggestion(EventMaintainInVO inVO) { public IPage<EventContactSuggestion> querySuggestion(EventMaintainInVO inVO) {
if (ObjectUtil.isNull(inVO)) {
return this.list(); Page<EventContactSuggestion> page = new Page<>(inVO.getPageNo(), inVO.getPageSize());
}
LambdaQueryWrapper<EventContactSuggestion> query = Wrappers.lambdaQuery(); LambdaQueryWrapper<EventContactSuggestion> query = Wrappers.lambdaQuery();
if (ObjectUtil.isNotNull(inVO.getStartTime())) { if (ObjectUtil.isNotNull(inVO.getStartTime())) {
query.gt(EventContactSuggestion::getCreateTime, inVO.getStartTime()); query.gt(EventContactSuggestion::getCreateTime, inVO.getStartTime());
@ -72,7 +69,7 @@ public class EventContactSuggestionServiceImpl extends ServiceImpl<EventContactS
if (StrUtil.isNotBlank(inVO.getType())) { if (StrUtil.isNotBlank(inVO.getType())) {
query.eq(EventContactSuggestion::getSuggestionType, inVO.getType()); query.eq(EventContactSuggestion::getSuggestionType, inVO.getType());
} }
return this.list(query); return this.page(page, query);
} }
@ -128,3 +125,4 @@ public class EventContactSuggestionServiceImpl extends ServiceImpl<EventContactS
return table; return table;
} }
} }

View File

@ -1,4 +1,6 @@
package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.impl; package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventContact; import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventContact;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
@ -16,7 +18,7 @@ import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.dao.EventStyleMapper;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.*; import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.*;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.enums.PartyEventExceptionEnum; import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.enums.PartyEventExceptionEnum;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventStyleService; import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventStyleService;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventSubjectService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -40,8 +42,7 @@ public class EventStyleServiceImpl extends ServiceImpl<EventStyleMapper, EventSt
@Resource @Resource
private DocumentCenterService documentCenterService; private DocumentCenterService documentCenterService;
@Resource
private EventSubjectService eventSubjectService;
@Override @Override
public List<EventStyle> getEventStyle(String type, EventQueryInVO inVO) { public List<EventStyle> getEventStyle(String type, EventQueryInVO inVO) {
@ -83,26 +84,42 @@ public class EventStyleServiceImpl extends ServiceImpl<EventStyleMapper, EventSt
inVO.setCreateTime(LocalDateTime.now()); inVO.setCreateTime(LocalDateTime.now());
return this.save(inVO); return this.save(inVO);
} }
@Override
public List<EventStyle> getEventSubjectList(EventQueryInVO inVO) {
LambdaQueryWrapper<EventStyle> query = Wrappers.lambdaQuery();
query.eq(EventStyle::getStatus, "1");
query.eq(EventStyle::getCategory, "3");
if (ObjectUtil.isNotNull(inVO)) {
query.like(StrUtil.isNotBlank(inVO.getParam()), EventStyle::getTitle, inVO.getParam());
}
query.ne(EventStyle::getDeleteFlag, "1");
query.orderByDesc(EventStyle::getCreateTime);
return this.list(query);
}
@Override @Override
public List<EventMaintainOutVO> queryStyleAndProject(EventMaintainInVO inVO) { public boolean saveSubject(EventStyle inVO) {
List<EventStyle> styleList = new ArrayList<>(); if (StrUtil.isNotBlank(inVO.getId())) {
List<EventSubject> subjectList = new ArrayList<>(); return this.updateById(inVO);
}
inVO.setId(PropertyUtils.getSnowflakeId());
inVO.setStatus("1");
inVO.setCreateTime(LocalDateTime.now());
return this.save(inVO);
}
@Override
public IPage<EventMaintainOutVO> queryStyleAndProject(EventMaintainInVO inVO) {
LambdaQueryWrapper<EventStyle> queryStyle = Wrappers.lambdaQuery(); LambdaQueryWrapper<EventStyle> queryStyle = Wrappers.lambdaQuery();
queryStyle.ne(EventStyle::getDeleteFlag, "1"); queryStyle.ne(EventStyle::getDeleteFlag, "1");
LambdaQueryWrapper<EventSubject> queryProject = Wrappers.lambdaQuery();
queryProject.ne(EventSubject::getDeleteFlag, "1");
if (ObjectUtil.isNull(inVO)) {
styleList = this.list(queryStyle);
subjectList = eventSubjectService.list(queryProject);
} else {
if (StrUtil.isNotBlank(inVO.getType()) && !"3".equals(inVO.getType()) ) {
if (StrUtil.isNotBlank(inVO.getTitle())) { if (StrUtil.isNotBlank(inVO.getTitle())) {
queryStyle.like(EventStyle::getTitle, inVO.getTitle()); queryStyle.like(EventStyle::getTitle, inVO.getTitle());
} }
if (StrUtil.isNotBlank(inVO.getType())) { if (StrUtil.isNotBlank(inVO.getType())) {
queryStyle.eq(EventStyle::getBanner, "1".equals(inVO.getType()) ? "1" : "0"); queryStyle.eq(EventStyle::getCategory, inVO.getType());
} }
if (StrUtil.isNotBlank(inVO.getStatus())) { if (StrUtil.isNotBlank(inVO.getStatus())) {
queryStyle.eq(EventStyle::getStatus, inVO.getStatus()); queryStyle.eq(EventStyle::getStatus, inVO.getStatus());
@ -114,33 +131,15 @@ public class EventStyleServiceImpl extends ServiceImpl<EventStyleMapper, EventSt
if (ObjectUtil.isNotNull(inVO.getEndTime())) { if (ObjectUtil.isNotNull(inVO.getEndTime())) {
queryStyle.lt(EventStyle::getSendTime, inVO.getEndTime()); queryStyle.lt(EventStyle::getSendTime, inVO.getEndTime());
} }
styleList = this.list(queryStyle);
}
Page<EventStyle> page = new Page<>(inVO.getPageNo(), inVO.getPageSize());
if (StrUtil.isNotBlank(inVO.getType()) && !"1".equals(inVO.getType()) && !"2".equals(inVO.getType())) { Page<EventStyle> stylePage = this.page(page, queryStyle);
if (StrUtil.isNotBlank(inVO.getTitle())) {
queryProject.like(EventSubject::getTitle, inVO.getTitle());
}
if (StrUtil.isNotBlank(inVO.getStatus())) {
queryProject.eq(EventSubject::getStatus, inVO.getStatus());
}
if (ObjectUtil.isNotNull(inVO.getStartTime())) {
queryProject.gt(EventSubject::getSendTime, inVO.getStartTime());
}
if (ObjectUtil.isNotNull(inVO.getEndTime())) {
queryProject.lt(EventSubject::getSendTime, inVO.getEndTime());
}
subjectList = eventSubjectService.list(queryProject);
}
}
List<EventMaintainOutVO> outVOList = new ArrayList<>(); List<EventMaintainOutVO> outVOList = new ArrayList<>();
if (!styleList.isEmpty()) { if (!stylePage.getRecords().isEmpty()) {
styleList.forEach(s -> outVOList.add( stylePage.getRecords().forEach(s -> outVOList.add(
EventMaintainOutVO.builder() EventMaintainOutVO.builder()
.id(s.getId()) .id(s.getId())
.sort(s.getSort()) .sort(s.getSort())
@ -149,28 +148,20 @@ public class EventStyleServiceImpl extends ServiceImpl<EventStyleMapper, EventSt
.title(s.getTitle()) .title(s.getTitle())
.secordTitle(s.getSecordTitle()) .secordTitle(s.getSecordTitle())
.content(s.getContent()) .content(s.getContent())
.type("1".equals(s.getBanner())? "1" : "2") .type(s.getCategory())
.createTime(s.getCreateTime()) .createTime(s.getCreateTime())
.createBy(s.getCreateBy()) .createBy(s.getCreateBy())
.sendTime(s.getSendTime()) .sendTime(s.getSendTime())
.build())); .build()));
} }
if (!subjectList.isEmpty()) { List<EventMaintainOutVO> collect = outVOList.stream().sorted(Comparator.comparing(EventMaintainOutVO::getSendTime, Comparator.nullsLast(LocalDateTime::compareTo)).reversed()).collect(Collectors.toList());
subjectList.forEach(s -> outVOList.add( IPage<EventMaintainOutVO> iPage = new Page<>();
EventMaintainOutVO.builder() iPage.setTotal(stylePage.getTotal());
.id(s.getId()) iPage.setPages(stylePage.getPages());
.sort(s.getSort()) iPage.setCurrent(stylePage.getCurrent());
.status(s.getStatus()) iPage.setSize(stylePage.getSize());
.image(s.getImage()) iPage.setRecords(collect);
.title(s.getTitle()) return iPage;
.content(s.getContent())
.type("3")
.createTime(s.getCreateTime())
.createBy(s.getCreateBy())
.sendTime(s.getSendTime())
.build()));
}
return outVOList.stream().sorted(Comparator.comparing(EventMaintainOutVO::getSendTime, Comparator.nullsLast(LocalDateTime::compareTo)).reversed()).collect(Collectors.toList());
} }
@Override @Override
@ -182,25 +173,14 @@ public class EventStyleServiceImpl extends ServiceImpl<EventStyleMapper, EventSt
if (StrUtil.isBlank(inVO.getId())) { if (StrUtil.isBlank(inVO.getId())) {
inVO.setId(PropertyUtils.getSnowflakeId()); inVO.setId(PropertyUtils.getSnowflakeId());
} }
if ("3".equals(inVO.getType())) {
EventSubject subject = new EventSubject();
subject.setId(inVO.getId());
subject.setTitle(inVO.getTitle());
subject.setContent(inVO.getContent());
subject.setSort(1);
subject.setStatus("0");
subject.setCreateTime(LocalDateTime.now());
subject.setCreateBy(inVO.getCreateBy());
subject.setContentImageId(inVO.getContentImageId());
return eventSubjectService.saveOrUpdate(subject);
}
EventStyle style = new EventStyle(); EventStyle style = new EventStyle();
style.setId(inVO.getId()); style.setId(inVO.getId());
style.setTitle(inVO.getTitle()); style.setTitle(inVO.getTitle());
style.setSecordTitle(inVO.getSecordTitle()); style.setSecordTitle(inVO.getSecordTitle());
style.setImageWord(inVO.getTitle()); style.setImageWord(inVO.getTitle());
style.setTitleImage(inVO.getImage()); style.setTitleImage(inVO.getImage());
style.setCategory("1"); style.setCategory(inVO.getType());
style.setContent(inVO.getContent()); style.setContent(inVO.getContent());
style.setImage(inVO.getImage()); style.setImage(inVO.getImage());
style.setSort(1); style.setSort(1);
@ -215,12 +195,7 @@ public class EventStyleServiceImpl extends ServiceImpl<EventStyleMapper, EventSt
@Override @Override
public boolean sendStyleOrProject(String id, String status) { public boolean sendStyleOrProject(String id, String status) {
EventSubject subject = eventSubjectService.getById(id);
if (ObjectUtil.isNotNull(subject) && StrUtil.isNotBlank(subject.getId())) {
subject.setStatus(status);
subject.setSendTime(LocalDateTime.now());
return eventSubjectService.updateById(subject);
}
EventStyle style = this.getById(id); EventStyle style = this.getById(id);
if (ObjectUtil.isNotNull(style) && StrUtil.isNotBlank(style.getId())) { if (ObjectUtil.isNotNull(style) && StrUtil.isNotBlank(style.getId())) {
style.setStatus(status); style.setStatus(status);
@ -232,14 +207,10 @@ public class EventStyleServiceImpl extends ServiceImpl<EventStyleMapper, EventSt
@Override @Override
public boolean deleteStyleOrProject(String id) { public boolean deleteStyleOrProject(String id) {
EventSubject subject = eventSubjectService.getById(id);
if (ObjectUtil.isNotNull(subject) && StrUtil.isNotBlank(subject.getId())) {
subject.setDeleteFlag("1");
return eventSubjectService.updateById(subject);
}
EventStyle style = this.getById(id); EventStyle style = this.getById(id);
if (ObjectUtil.isNotNull(style) && StrUtil.isNotBlank(style.getId())) { if (ObjectUtil.isNotNull(style) && StrUtil.isNotBlank(style.getId())) {
subject.setDeleteFlag("1"); style.setDeleteFlag("1");
return this.updateById(style); return this.updateById(style);
} }
return false; return false;

View File

@ -1,93 +1,93 @@
package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.impl; //package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.impl;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.dao.EventSubjectMapper;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventContact;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventQueryInVO;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventSubject;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventSubjectTime;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventContactService;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventSubjectService;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventSubjectTimeService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* 对数据表 event_subject 操作的 serviceImpl
* @author Auto create
*
*/
@Service
public class EventSubjectServiceImpl extends ServiceImpl<EventSubjectMapper, EventSubject> implements EventSubjectService {
@Resource
private EventSubjectTimeService eventSubjectTimeService;
@Resource
private EventContactService contactService;
@Override
public List<EventSubject> getEventSubjectList(EventQueryInVO inVO) {
LambdaQueryWrapper<EventSubject> query = Wrappers.lambdaQuery();
query.eq(EventSubject::getStatus, "1");
if (ObjectUtil.isNotNull(inVO)) {
query.like(StrUtil.isNotBlank(inVO.getParam()), EventSubject::getTitle, inVO.getParam());
}
query.ne(EventSubject::getDeleteFlag, "1");
query.orderByDesc(EventSubject::getCreateTime);
// List<EventSubject> list = this.list(query);
// List<String> subjectIdList = list.stream().map(EventSubject::getId).collect(Collectors.toList());
// List<String> teamLeaderIdList = list.stream().map(EventSubject::getTeamLeader).distinct().collect(Collectors.toList());
// List<String> teamMemberIdList = new ArrayList<>();
// list.forEach(f -> teamMemberIdList.addAll(Stream.of(f.getTeamMenber().split(",")).collect(Collectors.toList())));
// LambdaQueryWrapper<EventSubjectTime> querySubjectTime = Wrappers.lambdaQuery();
// querySubjectTime.eq(EventSubjectTime::getStatus, "1").in(EventSubjectTime::getSubjectId, subjectIdList);
// List<EventSubjectTime> subjectTimeList = eventSubjectTimeService.list(querySubjectTime);
// Map<String, List<EventSubjectTime>> timeMap = subjectTimeList.stream().collect(Collectors.groupingBy(EventSubjectTime::getSubjectId));
// //
// List<EventContact> eventContacts = contactService.listByIds(teamLeaderIdList);
// Map<String, EventContact> leaderMap = eventContacts.stream().collect(Collectors.toMap(EventContact::getId, Function.identity()));
// //
// LambdaQueryWrapper<EventContact> contactLambdaQuery = new LambdaQueryWrapper<>(); //import cn.hutool.core.util.ObjectUtil;
// contactLambdaQuery.eq(EventContact::getStatus, "1").in(EventContact::getId, teamMemberIdList.stream().distinct().collect(Collectors.toList())); //import cn.hutool.core.util.StrUtil;
// List<EventContact> eventContactList = contactService.list(contactLambdaQuery); //import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
// Map<String, EventContact> eventContactMap = eventContactList.stream().collect(Collectors.toMap(EventContact::getId, Function.identity())); //import com.baomidou.mybatisplus.core.toolkit.Wrappers;
// list.forEach(f -> { //import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
// List<EventContact> contactList = new ArrayList<>(); //import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
// List<String> collect = Stream.of(f.getTeamMenber().split(",")).collect(Collectors.toList()); //import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.dao.EventSubjectMapper;
// collect.forEach(c -> contactList.add(eventContactMap.get(c))); //import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventContact;
// f.setTeamMenberInfo(contactList); //import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventQueryInVO;
// f.setSubjectTimeList(timeMap.get(f.getId())); //import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventSubject;
// f.setTeamLeaderInfo(leaderMap.get(f.getTeamLeader())); //import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventSubjectTime;
// }); //import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventContactService;
//import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventSubjectService;
return this.list(query); //import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventSubjectTimeService;
} //import org.springframework.stereotype.Service;
//
@Override //import javax.annotation.Resource;
public boolean saveSubject(EventSubject inVO) { //import java.time.LocalDateTime;
if (StrUtil.isNotBlank(inVO.getId())) { //import java.util.ArrayList;
return this.updateById(inVO); //import java.util.List;
} //import java.util.Map;
inVO.setId(PropertyUtils.getSnowflakeId()); //import java.util.function.Function;
inVO.setStatus("1"); //import java.util.stream.Collectors;
inVO.setCreateTime(LocalDateTime.now()); //import java.util.stream.Stream;
return this.save(inVO); //
} ///**
// * 对数据表 event_subject 操作的 serviceImpl
// * @author Auto create
} // *
// */
//@Service
//public class EventSubjectServiceImpl extends ServiceImpl<EventSubjectMapper, EventSubject> implements EventSubjectService {
//
// @Resource
// private EventSubjectTimeService eventSubjectTimeService;
// @Resource
// private EventContactService contactService;
//
// @Override
// public List<EventSubject> getEventSubjectList(EventQueryInVO inVO) {
// LambdaQueryWrapper<EventSubject> query = Wrappers.lambdaQuery();
// query.eq(EventSubject::getStatus, "1");
// if (ObjectUtil.isNotNull(inVO)) {
// query.like(StrUtil.isNotBlank(inVO.getParam()), EventSubject::getTitle, inVO.getParam());
// }
// query.ne(EventSubject::getDeleteFlag, "1");
// query.orderByDesc(EventSubject::getCreateTime);
//// List<EventSubject> list = this.list(query);
//// List<String> subjectIdList = list.stream().map(EventSubject::getId).collect(Collectors.toList());
//// List<String> teamLeaderIdList = list.stream().map(EventSubject::getTeamLeader).distinct().collect(Collectors.toList());
//// List<String> teamMemberIdList = new ArrayList<>();
//// list.forEach(f -> teamMemberIdList.addAll(Stream.of(f.getTeamMenber().split(",")).collect(Collectors.toList())));
//
//// LambdaQueryWrapper<EventSubjectTime> querySubjectTime = Wrappers.lambdaQuery();
//// querySubjectTime.eq(EventSubjectTime::getStatus, "1").in(EventSubjectTime::getSubjectId, subjectIdList);
//// List<EventSubjectTime> subjectTimeList = eventSubjectTimeService.list(querySubjectTime);
//// Map<String, List<EventSubjectTime>> timeMap = subjectTimeList.stream().collect(Collectors.groupingBy(EventSubjectTime::getSubjectId));
////
//// List<EventContact> eventContacts = contactService.listByIds(teamLeaderIdList);
//// Map<String, EventContact> leaderMap = eventContacts.stream().collect(Collectors.toMap(EventContact::getId, Function.identity()));
////
//// LambdaQueryWrapper<EventContact> contactLambdaQuery = new LambdaQueryWrapper<>();
//// contactLambdaQuery.eq(EventContact::getStatus, "1").in(EventContact::getId, teamMemberIdList.stream().distinct().collect(Collectors.toList()));
//// List<EventContact> eventContactList = contactService.list(contactLambdaQuery);
//// Map<String, EventContact> eventContactMap = eventContactList.stream().collect(Collectors.toMap(EventContact::getId, Function.identity()));
//// list.forEach(f -> {
//// List<EventContact> contactList = new ArrayList<>();
//// List<String> collect = Stream.of(f.getTeamMenber().split(",")).collect(Collectors.toList());
//// collect.forEach(c -> contactList.add(eventContactMap.get(c)));
//// f.setTeamMenberInfo(contactList);
//// f.setSubjectTimeList(timeMap.get(f.getId()));
//// f.setTeamLeaderInfo(leaderMap.get(f.getTeamLeader()));
//// });
//
// return this.list(query);
// }
//
// @Override
// public boolean saveSubject(EventSubject inVO) {
// if (StrUtil.isNotBlank(inVO.getId())) {
// return this.updateById(inVO);
// }
// inVO.setId(PropertyUtils.getSnowflakeId());
// inVO.setStatus("1");
// inVO.setCreateTime(LocalDateTime.now());
// return this.save(inVO);
// }
//
//
//}

View File

@ -1,18 +1,18 @@
package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.impl; //package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.impl;
//
//
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.dao.EventSubjectTimeMapper; //import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.dao.EventSubjectTimeMapper;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventSubjectTime; //import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventSubjectTime;
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventSubjectTimeService; //import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventSubjectTimeService;
import org.springframework.stereotype.Service; //import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; //import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/** ///**
* 对数据表 event_subject_time 操作的 serviceImpl // * 对数据表 event_subject_time 操作的 serviceImpl
* @author Auto create // * @author Auto create
* // *
*/ // */
@Service //@Service
public class EventSubjectTimeServiceImpl extends ServiceImpl<EventSubjectTimeMapper, EventSubjectTime> implements EventSubjectTimeService { //public class EventSubjectTimeServiceImpl extends ServiceImpl<EventSubjectTimeMapper, EventSubjectTime> implements EventSubjectTimeService {
//
//
} //}