Commit 793fb0c0 by 徐高华

Merge remote-tracking branch 'origin/feature/社群' into developer

Conflicts:
	haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabQywxErrorLogMapper.java
	haoban-manage3-service/src/main/resources/mapper/TabQywxErrorLogMapper.xml
parents 679379ee 65628474
......@@ -47,6 +47,8 @@ public interface GroupChatPlanApiService {
public ServiceResponse<Void> doPlanSendInfoTimer(String params) ;
public ServiceResponse<Void> reflushSendInfo(Long ownerLogId) ;
public ServiceResponse<GroupChatPlanOwnerLogDTO> getOwnerSendInfo(Long ownerLogId) ;
public ServiceResponse<Page<GroupChatPlanOwnerLogDTO>> listOwnerLogPage(Long planId, GroupChatPlanSearchQDTO qdto,
BasePageInfo basePageInfo);
......
package com.gic.haoban.manage.service.dao.mapper;
import com.gic.haoban.manage.api.dto.qdto.QywxErrorLogListQDTO;
import com.gic.haoban.manage.service.entity.TabQywxErrorLog;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* 企微报错日志(TabQywxErrorLog)表数据库访问层
*
* @author mozhu
* @date 2022-04-18 15:28:11
*/
@Repository
public interface TabQywxErrorLogMapper {
/**
* 新增数据
*
* @param tabQywxErrorLog 选项卡qywx错误日志
* @return int
* @author mozhu
* @date 2022-04-18 16:18:25
*/
int insert(TabQywxErrorLog tabQywxErrorLog);
/**
* 修改数据
*
* @param tabQywxErrorLog 选项卡qywx错误日志
* @return int
* @author mozhu
* @date 2022-04-18 16:18:28
*/
int update(TabQywxErrorLog tabQywxErrorLog);
/**
* 通过主键删除数据
*
* @param id 主键
* @return 影响行数
*/
int deleteById(Long id);
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
TabQywxErrorLog queryById(Long id);
/**
* 分页列表
*
* @param qywxErrorLogListQDTO qdto qywx错误日志列表
* @return {@link List }<{@link TabQywxErrorLog }>
* @author mozhu
* @date 2022-04-18 16:55:23
*/
List<TabQywxErrorLog> queryListByPage(QywxErrorLogListQDTO qywxErrorLogListQDTO);
}
package com.gic.haoban.manage.service.dao.mapper;
import com.gic.haoban.manage.api.dto.qdto.QywxErrorLogListQDTO;
import com.gic.haoban.manage.service.entity.TabQywxErrorLog;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* 企微报错日志(TabQywxErrorLog)表数据库访问层
*
* @author mozhu
* @date 2022-04-18 15:28:11
*/
@Repository
public interface TabQywxErrorLogMapper {
/**
* 新增数据
*
* @param tabQywxErrorLog 选项卡qywx错误日志
* @return int
* @author mozhu
* @date 2022-04-18 16:18:25
*/
int insert(TabQywxErrorLog tabQywxErrorLog);
/**
* 通过主键删除数据
*
* @param id 主键
* @return 影响行数
*/
int deleteById(Long id);
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
TabQywxErrorLog queryById(Long id);
/**
* 分页列表
*
* @param qywxErrorLogListQDTO qdto qywx错误日志列表
* @return {@link List }<{@link TabQywxErrorLog }>
* @author mozhu
* @date 2022-04-18 16:55:23
*/
List<TabQywxErrorLog> queryListByPage(QywxErrorLogListQDTO qywxErrorLogListQDTO);
}
......@@ -16,6 +16,7 @@ import com.gic.haoban.manage.api.dto.chat.GroupChatPlanLogDTO;
import com.gic.haoban.manage.api.dto.chat.GroupChatPlanOwnerLogDTO;
import com.gic.haoban.manage.api.dto.qdto.chat.GroupChatPlanSearchQDTO;
import com.gic.haoban.manage.api.service.chat.GroupChatPlanApiService;
import com.gic.haoban.manage.service.entity.chat.TabGroupChatPlanOwnerLog;
import com.gic.haoban.manage.service.pojo.bo.chat.GroupChatPlanBO;
import com.gic.haoban.manage.service.service.chat.GroupChatPlanOwnerLogService;
import com.gic.haoban.manage.service.service.chat.GroupChatPlanService;
......@@ -56,14 +57,15 @@ public class GroupChatPlanApiServiceImpl implements GroupChatPlanApiService {
this.groupChatPlanService.updateRemark(dto);
return ServiceResponse.success(dto);
}
@Override
public ServiceResponse<GroupChatPlanOwnerLogDTO> getOwnerInfo(Long planId, String staffId, String clerkId,
String wxEnterpriseId) {
GroupChatPlanOwnerLogDTO dto = this.groupChatPlanOwnerLogService.getOwnerInfo(planId,staffId,clerkId , wxEnterpriseId) ;
GroupChatPlanOwnerLogDTO dto = this.groupChatPlanOwnerLogService.getOwnerInfo(planId, staffId, clerkId,
wxEnterpriseId);
return ServiceResponse.success(dto);
}
/**
*
* @Title: doPlan
......@@ -93,6 +95,13 @@ public class GroupChatPlanApiServiceImpl implements GroupChatPlanApiService {
}
@Override
public ServiceResponse<GroupChatPlanOwnerLogDTO> getOwnerSendInfo(Long ownerLogId) {
TabGroupChatPlanOwnerLog log = this.groupChatPlanOwnerLogService.getById(ownerLogId);
GroupChatPlanOwnerLogDTO dto = EntityUtil.changeEntityByJSON(GroupChatPlanOwnerLogDTO.class, log);
return ServiceResponse.success(dto);
}
@Override
public ServiceResponse<Page<GroupChatPlanLogDTO>> listLogPage(Long planId, GroupChatPlanSearchQDTO qdto,
BasePageInfo basePageInfo) {
if (null != qdto.getEndDate()) {
......@@ -108,8 +117,8 @@ public class GroupChatPlanApiServiceImpl implements GroupChatPlanApiService {
if (null != qdto.getEndDate()) {
qdto.setEndDate(DateUtil.getEndTimeOfDay(qdto.getEndDate()));
}
if(StringUtils.isNotBlank(qdto.getSearchParams())) {
qdto.setSearchParams("%"+qdto.getSearchParams()+"%");
if (StringUtils.isNotBlank(qdto.getSearchParams())) {
qdto.setSearchParams("%" + qdto.getSearchParams() + "%");
}
Page<GroupChatPlanOwnerLogDTO> page = this.groupChatPlanOwnerLogService.listPage(planId, qdto, basePageInfo);
return ServiceResponse.success(page);
......
......@@ -87,11 +87,12 @@ public class GroupChatPlanController {
@RequestMapping("reflush-send-msg")
public RestResponse<Object> reflush(String wxEnterpriseId, String enterpriseId, Long ownerLogId) {
this.groupChatPlanApiService.reflushSendInfo(ownerLogId);
return RestResponse.successResult();
ServiceResponse<GroupChatPlanOwnerLogDTO> resp = this.groupChatPlanApiService.getOwnerSendInfo(ownerLogId);
return RestResponse.successResult(resp.getResult());
}
@RequestMapping("detail")
public RestResponse<Object> detail(Long planId,String clerkId, String staffId , String wxEnterpriseId) {
public RestResponse<Object> detail(Long planId, String clerkId, String staffId, String wxEnterpriseId) {
if (null == planId) {
return RestResponse.failure("1", "planid为空");
}
......@@ -112,24 +113,25 @@ public class GroupChatPlanController {
Map<String, Object> retMap = new HashMap<>();
retMap.put("plan", plan);
retMap.put("materialList", materials);
if(StringUtils.isNotEmpty(clerkId)) {
ServiceResponse<GroupChatPlanOwnerLogDTO> resp = this.groupChatPlanApiService.getOwnerInfo(planId, staffId, clerkId, wxEnterpriseId) ;
GroupChatPlanOwnerLogDTO owner = resp.getResult() ;
if(!resp.isSuccess()|| null == owner) {
if (StringUtils.isNotEmpty(clerkId)) {
ServiceResponse<GroupChatPlanOwnerLogDTO> resp = this.groupChatPlanApiService.getOwnerInfo(planId, staffId,
clerkId, wxEnterpriseId);
GroupChatPlanOwnerLogDTO owner = resp.getResult();
if (!resp.isSuccess() || null == owner) {
return RestResponse.failure("1", "记录不存在");
}
Map<String,Object> ownerInfo = new HashMap<>() ;
ownerInfo.put("clerkName", owner.getClerkName()) ;
ownerInfo.put("ownerLogId", owner.getOwnerLogId()) ;
ownerInfo.put("sendStatus", owner.getSendStatus()) ;
retMap.put("ownerInfo", ownerInfo) ;
Map<String, Object> ownerInfo = new HashMap<>();
ownerInfo.put("clerkName", owner.getClerkName());
ownerInfo.put("ownerLogId", owner.getOwnerLogId());
ownerInfo.put("sendStatus", owner.getSendStatus());
retMap.put("ownerInfo", ownerInfo);
}
return RestResponse.successResult(retMap);
}
@RequestMapping("owner-do-list")
public RestResponse<Object> ownerDoList(Long planId, String clerkId, String wxEnterpriseId, String enterpriseId,String staffId ,Long ownLogId,
BasePageInfo basePageInfo) {
public RestResponse<Object> ownerDoList(Long planId, String clerkId, String wxEnterpriseId, String enterpriseId,
String staffId, Long ownLogId, BasePageInfo basePageInfo) {
if (null == planId || StringUtils.isEmpty(clerkId)) {
return RestResponse.failure("1", "参数未传");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment