Commit ab2e43d4 by fudahua

同步日志

parent aec697b3
......@@ -59,6 +59,8 @@ public class PreDealLogInfoDTO implements Serializable {
*/
private Integer statusFlag;
private String dataContent;
private String reason;
/**
......@@ -71,6 +73,14 @@ public class PreDealLogInfoDTO implements Serializable {
*/
private Date updateTime;
public String getDataContent() {
return dataContent;
}
public void setDataContent(String dataContent) {
this.dataContent = dataContent;
}
/**
*/
private static final long serialVersionUID = 1L;
......
......@@ -485,33 +485,43 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
@Override
public Page<PreDealLogInfoDTO> listSyncTaskDetail(String wxEnterpriseId, String taskId, BasePageInfo pageInfo) {
TabHaobanSyncTask syncTask = syncTaskService.getSyncTask(taskId);
Page<PreDealLogInfoDTO> page = preDealService.listExceptionByTaskId(taskId, pageInfo);
if (CollectionUtils.isEmpty(page.getResult())) {
return page;
}
List<PreDealLogInfoDTO> result = page.getResult();
for (PreDealLogInfoDTO dto : result) {
if (dto.getDataType().equals(PreDealTypeEnum.group.getVal())) {
StoreGroupDTO midGroup = storeGroupService.getStoreGroupById(dto.getDataId());
if (midGroup != null) {
dto.setDataName(midGroup.getStoreGroupName());
dto.setChainName(midGroup.getStoreGroupNameLevel());
}
} else if (dto.getDataType().equals(PreDealTypeEnum.store.getVal())) {
StoreDTO store = storeService.getStore(dto.getDataId());
if (null != store) {
dto.setDataName(store.getStoreName());
dto.setChainName(store.getStoreGroupName());
dto.setDataCode(store.getStoreCode());
}
} else if (dto.getDataType().equals(PreDealTypeEnum.clerk.getVal())) {
ClerkDTO clerkDTO = clerkService.getClerkByClerkId(dto.getDataId());
if (null != clerkDTO) {
dto.setDataName(clerkDTO.getClerkName());
dto.setChainName(clerkDTO.getStoreName());
dto.setDataCode(clerkDTO.getClerkCode());
//gic同步微信
if (syncTask.getTaskType().equals(0)) {
List<PreDealLogInfoDTO> result = page.getResult();
for (PreDealLogInfoDTO dto : result) {
if (dto.getDataType().equals(PreDealTypeEnum.group.getVal())) {
StoreGroupDTO midGroup = storeGroupService.getStoreGroupById(dto.getDataId());
if (midGroup != null) {
dto.setDataName(midGroup.getStoreGroupName());
dto.setChainName(midGroup.getStoreGroupNameLevel());
}
} else if (dto.getDataType().equals(PreDealTypeEnum.store.getVal())) {
StoreDTO store = storeService.getStore(dto.getDataId());
if (null != store) {
dto.setDataName(store.getStoreName());
dto.setChainName(store.getStoreGroupName());
dto.setDataCode(store.getStoreCode());
}
} else if (dto.getDataType().equals(PreDealTypeEnum.clerk.getVal())) {
ClerkDTO clerkDTO = clerkService.getClerkByClerkId(dto.getDataId());
if (null != clerkDTO) {
dto.setDataName(clerkDTO.getClerkName());
dto.setChainName(clerkDTO.getStoreName());
dto.setDataCode(clerkDTO.getClerkCode());
}
}
}
}else{
List<PreDealLogInfoDTO> result = page.getResult();
for (PreDealLogInfoDTO dto : result) {
dto.setDataCode(dto.getDataId());
dto.setDataName(dto.getDataContent());
}
}
return page;
}
......
......@@ -29,6 +29,7 @@ import com.gic.redis.data.util.RedisUtil;
import com.gic.wechat.api.dto.qywx.UserDTO;
import com.gic.wechat.api.service.qywx.QywxDepartmentApiService;
import com.gic.wechat.api.service.qywx.QywxUserApiService;
import com.vdurmont.emoji.EmojiParser;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -211,6 +212,7 @@ public class QywxGroupSyncOperation implements BaseSyncOperation {
dealLog.setpDataId(dataId);
dealLog.setDataType(PreDealTypeEnum.clerk.getVal());
dealLog.setStatusFlag(0);
dealLog.setDataContent(EmojiParser.removeAllEmojis(userDTO.getName()));
dealLog.setTaskId(taskId);
dealLog.setWxEnterpriseId(wxEnterpriseId);
dealLog.setEnterpriseId(enterpriseId);
......
......@@ -296,7 +296,7 @@
<select id="listExceptionByTask" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
<include refid="Base_Column_List_data"/>
from tab_haoban_pre_deal_log
where task_id = #{taskId}
and status_flag =3
......
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