Merge branch 'uat_partyMemberEvent'
This commit is contained in:
@ -109,4 +109,38 @@ public class PartyMemberEventController {
|
||||
return BaseResponse.success(eventStyleService.getEventStyle("list", inVO));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("保存联系人")
|
||||
@PostMapping("/save/contact")
|
||||
public BaseResponse<Boolean> saveContact(@RequestBody EventContact inVO) {
|
||||
return BaseResponse.success(eventContactService.saveContact(inVO));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("保存攻坚项目")
|
||||
@PostMapping("/save/subject")
|
||||
public BaseResponse<Boolean> saveSubject(@RequestBody EventSubject inVO) {
|
||||
return BaseResponse.success(eventSubjectService.saveSubject(inVO));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("保存活动风采")
|
||||
@PostMapping("/save/style")
|
||||
public BaseResponse<Boolean> saveStyle(@RequestBody EventStyle inVO) {
|
||||
return BaseResponse.success(eventStyleService.saveStyle(inVO));
|
||||
}
|
||||
|
||||
@ApiOperation("保存党支部")
|
||||
@PostMapping("/save/branch")
|
||||
public BaseResponse<Boolean> saveBranch(@RequestBody EventPartyBranch inVO) {
|
||||
return BaseResponse.success(eventPartyBranchService.saveBranch(inVO));
|
||||
}
|
||||
|
||||
@ApiOperation("保存党员")
|
||||
@PostMapping("/save/member")
|
||||
public BaseResponse<Boolean> saveMember(@RequestBody EventPartyBranch inVO) {
|
||||
return BaseResponse.success(eventPartyBranchService.saveMember(inVO));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.chinaunicom.mall.ebtp.common.config.CustomLocalDateTimeTypeHandler;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
@ -28,6 +29,7 @@ public class EventContact implements Serializable {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.chinaunicom.mall.ebtp.common.config.CustomLocalDateTimeTypeHandler;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
@ -28,6 +29,7 @@ public class EventContactSuggestion implements Serializable {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.chinaunicom.mall.ebtp.common.config.CustomLocalDateTimeTypeHandler;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
@ -28,6 +29,7 @@ public class EventPartyBranch implements Serializable {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.chinaunicom.mall.ebtp.common.config.CustomLocalDateTimeTypeHandler;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
@ -28,6 +29,7 @@ public class EventStyle implements Serializable {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.chinaunicom.mall.ebtp.common.config.CustomLocalDateTimeTypeHandler;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
@ -29,6 +30,7 @@ public class EventSubject implements Serializable {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
|
||||
|
@ -0,0 +1,30 @@
|
||||
package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.enums;
|
||||
|
||||
import com.chinaunicom.mall.ebtp.common.exception.service.BusinessExceptionAssert;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum PartyEventExceptionEnum implements BusinessExceptionAssert {
|
||||
/**
|
||||
* 没有党支部信息
|
||||
*/
|
||||
FRAME_EXCEPTION_NO_BRANCH_INFO_FAIL(2200001, "没有党支部信息!"),
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 判断接口返回是否有数据
|
||||
*/
|
||||
IS_SUCCESS(2200002, "接口返回异常");
|
||||
|
||||
/**
|
||||
* 返回码
|
||||
*/
|
||||
private final int code;
|
||||
/**
|
||||
* 返回消息
|
||||
*/
|
||||
private final String message;
|
||||
}
|
@ -19,4 +19,5 @@ public interface EventContactService extends IService<EventContact>{
|
||||
|
||||
List<EventContact> getEventContactList();
|
||||
|
||||
boolean saveContact(EventContact inVO);
|
||||
}
|
||||
|
@ -26,4 +26,7 @@ public interface EventPartyBranchService extends IService<EventPartyBranch>{
|
||||
|
||||
List<EventPartyBranch> getPartyMemberListByParam(EventQueryInVO inVO);
|
||||
|
||||
boolean saveBranch(EventPartyBranch inVO);
|
||||
|
||||
boolean saveMember(EventPartyBranch inVO);
|
||||
}
|
||||
|
@ -15,4 +15,6 @@ public interface EventStyleService extends IService<EventStyle>{
|
||||
|
||||
|
||||
List<EventStyle> getEventStyle(String type, EventQueryInVO inVO);
|
||||
|
||||
boolean saveStyle(EventStyle inVO);
|
||||
}
|
||||
|
@ -15,4 +15,6 @@ public interface EventSubjectService extends IService<EventSubject>{
|
||||
|
||||
|
||||
List<EventSubject> getEventSubjectList(EventQueryInVO inVO);
|
||||
|
||||
boolean saveSubject(EventSubject inVO);
|
||||
}
|
||||
|
@ -1,14 +1,17 @@
|
||||
package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.impl;
|
||||
|
||||
|
||||
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.EventContactMapper;
|
||||
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventContact;
|
||||
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventContactService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -35,5 +38,18 @@ public class EventContactServiceImpl extends ServiceImpl<EventContactMapper, Eve
|
||||
return this.list(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveContact(EventContact inVO) {
|
||||
if (StrUtil.isNotBlank(inVO.getId())) {
|
||||
return this.updateById(inVO);
|
||||
}
|
||||
inVO.setId(PropertyUtils.getSnowflakeId());
|
||||
inVO.setStatus("1");
|
||||
inVO.setSort(99);
|
||||
inVO.setCreateTime(LocalDateTime.now());
|
||||
return this.save(inVO);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -6,13 +6,16 @@ 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.EventPartyBranchMapper;
|
||||
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventPartyBranch;
|
||||
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventQueryInVO;
|
||||
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.MockDataValue;
|
||||
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.enums.PartyEventExceptionEnum;
|
||||
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventPartyBranchService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -112,5 +115,39 @@ public class EventPartyBranchServiceImpl extends ServiceImpl<EventPartyBranchMap
|
||||
return this.list(queryMember);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveBranch(EventPartyBranch inVO) {
|
||||
if (StrUtil.isNotBlank(inVO.getId())) {
|
||||
inVO.setType("1");
|
||||
return this.updateById(inVO);
|
||||
}
|
||||
inVO.setId(PropertyUtils.getSnowflakeId());
|
||||
inVO.setStatus("1");
|
||||
inVO.setType("1");
|
||||
inVO.setCreateTime(LocalDateTime.now());
|
||||
return this.save(inVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveMember(EventPartyBranch inVO) {
|
||||
if (StrUtil.isNotBlank(inVO.getId())) {
|
||||
inVO.setType("2");
|
||||
return this.updateById(inVO);
|
||||
}
|
||||
if (StrUtil.isBlank(inVO.getBranchName())) {
|
||||
PartyEventExceptionEnum.FRAME_EXCEPTION_NO_BRANCH_INFO_FAIL.customValid(true);
|
||||
}
|
||||
LambdaQueryWrapper<EventPartyBranch> queryWrapper = Wrappers.lambdaQuery();
|
||||
queryWrapper.eq(EventPartyBranch::getBranchName, inVO.getBranchName()).eq(EventPartyBranch::getType, "1");
|
||||
EventPartyBranch one = this.getOne(queryWrapper);
|
||||
inVO.setBranchCode(one.getBranchCode());
|
||||
inVO.setBelongBranch(one.getBranchCode());
|
||||
inVO.setId(PropertyUtils.getSnowflakeId());
|
||||
inVO.setStatus("1");
|
||||
inVO.setType("2");
|
||||
inVO.setCreateTime(LocalDateTime.now());
|
||||
return this.save(inVO);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
||||
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.dao.EventStyleMapper;
|
||||
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventQueryInVO;
|
||||
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventStyle;
|
||||
@ -13,6 +14,7 @@ import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventStyleServi
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -38,4 +40,20 @@ public class EventStyleServiceImpl extends ServiceImpl<EventStyleMapper, EventSt
|
||||
return this.list(query);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveStyle(EventStyle inVO) {
|
||||
if (StrUtil.isNotBlank(inVO.getId())) {
|
||||
return this.updateById(inVO);
|
||||
}
|
||||
if (StrUtil.isNotBlank(inVO.getImage())) {
|
||||
inVO.setTitleImage(inVO.getImage());
|
||||
} else {
|
||||
inVO.setImage(inVO.getTitleImage());
|
||||
}
|
||||
inVO.setId(PropertyUtils.getSnowflakeId());
|
||||
inVO.setStatus("1");
|
||||
inVO.setCreateTime(LocalDateTime.now());
|
||||
return this.save(inVO);
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ 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;
|
||||
@ -17,6 +18,7 @@ import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventSubjectTim
|
||||
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;
|
||||
@ -44,6 +46,7 @@ public class EventSubjectServiceImpl extends ServiceImpl<EventSubjectMapper, Eve
|
||||
if (ObjectUtil.isNotNull(inVO)) {
|
||||
query.like(StrUtil.isNotBlank(inVO.getParam()), EventSubject::getTitle, inVO.getParam());
|
||||
}
|
||||
query.orderByAsc(EventSubject::getSort);
|
||||
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());
|
||||
@ -74,5 +77,16 @@ public class EventSubjectServiceImpl extends ServiceImpl<EventSubjectMapper, Eve
|
||||
return list;
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user