Merge branch 'uat_partyMemberEvent' into uat_code
# Conflicts: # src/main/java/com/chinaunicom/mall/ebtp/extend/partyMemberEvent/service/impl/EventContactServiceImpl.java
This commit is contained in:
@ -1,11 +1,14 @@
|
|||||||
package com.chinaunicom.mall.ebtp.extend.feign.client;
|
package com.chinaunicom.mall.ebtp.extend.feign.client;
|
||||||
|
|
||||||
import com.chinaunicom.mall.ebtp.extend.feign.client.factory.DocumentCenterServiceFallbackFactory;
|
import com.chinaunicom.mall.ebtp.extend.feign.client.factory.DocumentCenterServiceFallbackFactory;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.feign.entity.DocumentDataVO;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 连接山分的文档中心服务
|
* 连接山分的文档中心服务
|
||||||
*
|
*
|
||||||
@ -34,4 +37,14 @@ public interface DocumentCenterService {
|
|||||||
@RequestMapping(method = RequestMethod.POST, value = "v1.0/files/downloadStream")
|
@RequestMapping(method = RequestMethod.POST, value = "v1.0/files/downloadStream")
|
||||||
String getFileObjectDetail(@RequestParam("fileId") String fileId);
|
String getFileObjectDetail(@RequestParam("fileId") String fileId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计查询 sys_storage表中数据
|
||||||
|
*
|
||||||
|
* @param list
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping(method = RequestMethod.POST, value = "v1.0/files/queryReturn")
|
||||||
|
List<DocumentDataVO> queryReturn(@RequestParam("objectIdList") List<String> list);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
package com.chinaunicom.mall.ebtp.extend.feign.client.fallback;
|
package com.chinaunicom.mall.ebtp.extend.feign.client.fallback;
|
||||||
|
|
||||||
import com.chinaunicom.mall.ebtp.extend.feign.client.DocumentCenterService;
|
import com.chinaunicom.mall.ebtp.extend.feign.client.DocumentCenterService;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.feign.entity.DocumentDataVO;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 熔断
|
* 熔断
|
||||||
*
|
*
|
||||||
@ -27,4 +30,11 @@ public class DocumentCenterServiceFallbackImpl implements DocumentCenterService
|
|||||||
public String getFileObjectDetail(String fileId) {
|
public String getFileObjectDetail(String fileId) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DocumentDataVO> queryReturn(List<String> list) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.feign.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体类 DocumentDataVO
|
||||||
|
*
|
||||||
|
* @author yss
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class DocumentDataVO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
private String fileId;
|
||||||
|
private String objectId;
|
||||||
|
private String originalName;
|
||||||
|
private String filePath;
|
||||||
|
private String fileSize;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -52,9 +52,9 @@ public class PartyMemberEventController {
|
|||||||
|
|
||||||
|
|
||||||
@ApiOperation("活动联系人列表-按公司分组")
|
@ApiOperation("活动联系人列表-按公司分组")
|
||||||
@GetMapping("/eventContact/group")
|
@PostMapping("/eventContact/group")
|
||||||
public BaseResponse<Map<String, List<EventContact>>> getEventContactGroup(@RequestParam(value = "param", required = false) String param) {
|
public BaseResponse<Map<String, List<EventContact>>> getEventContactGroup(@RequestBody(required = false) EventQueryInVO inVO) {
|
||||||
return BaseResponse.success(eventContactService.getEventContactGroup(param));
|
return BaseResponse.success(eventContactService.getEventContactGroup(inVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("活动联系人列表")
|
@ApiOperation("活动联系人列表")
|
||||||
|
@ -111,5 +111,10 @@ public class EventStyle implements Serializable {
|
|||||||
@TableField(typeHandler = CustomLocalDateTimeTypeHandler.class)
|
@TableField(typeHandler = CustomLocalDateTimeTypeHandler.class)
|
||||||
private java.time.LocalDateTime sendTime;
|
private java.time.LocalDateTime sendTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件地址
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "文件地址")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String filePath;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ 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.EventContact;
|
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventContact;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventQueryInVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -15,7 +16,7 @@ public interface EventContactService extends IService<EventContact>{
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Map<String, List<EventContact>> getEventContactGroup(String param);
|
Map<String, List<EventContact>> getEventContactGroup(EventQueryInVO inVO);
|
||||||
|
|
||||||
List<EventContact> getEventContactList();
|
List<EventContact> getEventContactList();
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
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 cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
@ -8,7 +9,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
||||||
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.dao.EventContactMapper;
|
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.entity.EventContact;
|
||||||
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.service.EventContactService;
|
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventContactService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@ -26,11 +27,11 @@ public class EventContactServiceImpl extends ServiceImpl<EventContactMapper, Eve
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, List<EventContact>> getEventContactGroup(String param) {
|
public Map<String, List<EventContact>> getEventContactGroup(EventQueryInVO inVO) {
|
||||||
LambdaQueryWrapper<EventContact> query = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<EventContact> query = Wrappers.lambdaQuery();
|
||||||
query.eq(EventContact::getStatus, "1");
|
query.eq(EventContact::getStatus, "1");
|
||||||
if (StrUtil.isNotBlank(param)) {
|
if (ObjectUtil.isNotNull(inVO) && StrUtil.isNotBlank(inVO.getParam())) {
|
||||||
query.eq(EventContact::getContactUnit, param);
|
query.eq(EventContact::getContactUnit, inVO.getParam());
|
||||||
}
|
}
|
||||||
return this.list(query).stream().sorted(Comparator.comparing(EventContact::getSort)).collect(Collectors.groupingBy(EventContact::getContactUnit,LinkedHashMap::new,Collectors.toList()));
|
return this.list(query).stream().sorted(Comparator.comparing(EventContact::getSort)).collect(Collectors.groupingBy(EventContact::getContactUnit,LinkedHashMap::new,Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.feign.client.DocumentCenterService;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.feign.entity.DocumentDataVO;
|
||||||
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.dao.EventStyleMapper;
|
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.EventQueryInVO;
|
||||||
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventStyle;
|
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.EventStyle;
|
||||||
@ -14,8 +16,12 @@ import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventStyleServi
|
|||||||
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;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 对数据表 event_style 操作的 serviceImpl
|
* 对数据表 event_style 操作的 serviceImpl
|
||||||
@ -25,6 +31,8 @@ import java.util.List;
|
|||||||
@Service
|
@Service
|
||||||
public class EventStyleServiceImpl extends ServiceImpl<EventStyleMapper, EventStyle> implements EventStyleService {
|
public class EventStyleServiceImpl extends ServiceImpl<EventStyleMapper, EventStyle> implements EventStyleService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DocumentCenterService documentCenterService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<EventStyle> getEventStyle(String type, EventQueryInVO inVO) {
|
public List<EventStyle> getEventStyle(String type, EventQueryInVO inVO) {
|
||||||
@ -33,13 +41,19 @@ public class EventStyleServiceImpl extends ServiceImpl<EventStyleMapper, EventSt
|
|||||||
query.like(EventStyle::getTitle, inVO.getParam());
|
query.like(EventStyle::getTitle, inVO.getParam());
|
||||||
}
|
}
|
||||||
query.orderByDesc(EventStyle::getCreateTime);
|
query.orderByDesc(EventStyle::getCreateTime);
|
||||||
|
List<EventStyle> list;
|
||||||
if ("banner".equals(type)) {
|
if ("banner".equals(type)) {
|
||||||
query.eq(EventStyle::getBanner, "1").eq(EventStyle::getStatus, "1").orderByAsc(EventStyle::getSort);
|
query.eq(EventStyle::getBanner, "1").eq(EventStyle::getStatus, "1").orderByAsc(EventStyle::getSort);
|
||||||
return this.list(query);
|
|
||||||
} else {
|
} else {
|
||||||
query.eq(EventStyle::getBanner, "0").eq(EventStyle::getStatus, "1").orderByAsc(EventStyle::getSort);
|
query.eq(EventStyle::getBanner, "0").eq(EventStyle::getStatus, "1").orderByAsc(EventStyle::getSort);
|
||||||
return this.list(query);
|
|
||||||
}
|
}
|
||||||
|
list = this.list(query);
|
||||||
|
List<String> imageIdList = list.stream().map(EventStyle::getImage).collect(Collectors.toList());
|
||||||
|
List<DocumentDataVO> queryReturn = documentCenterService.queryReturn(imageIdList);
|
||||||
|
Map<String, String> collect = queryReturn.stream().collect(Collectors.toMap(DocumentDataVO::getObjectId, DocumentDataVO::getFilePath));
|
||||||
|
|
||||||
|
list.forEach(l -> l.setFilePath(collect.get(l.getImage())));
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user