Commit 50746122 by 墨竹

feat:打印日志

parent 3da1fe64
......@@ -151,7 +151,7 @@ public class AuditApiServiceImpl implements AuditApiService {
if (StringUtils.isNotBlank(batchId)) {
insertBatchLog(batchId, AuditRsultType.fail.getCode(), tab);
}
staffDepartmentRelatedApiService.sendBindAuditMessage(auditId, obj.getStaffId(), clerkId, tab.getAuditReason(), true);
staffDepartmentRelatedApiService.sendBindAuditMessage(auditId, obj.getStaffId(), clerkId, reason, true);
return reason;
}
if (clerkDTO == null) {
......
......@@ -143,7 +143,7 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
if (clerkDTO == null) {
return map;
}
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(relation.getWxEnterpriseId()) ;
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(relation.getWxEnterpriseId());
StaffDTO staffDTO = staffApiService.selectById(relation.getStaffId());
if (staffDTO == null) {
return map;
......@@ -167,7 +167,7 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
if (staffDTO == null) {
return map;
}
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(staffDTO.getWxEnterpriseId()) ;
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(staffDTO.getWxEnterpriseId());
String wxUserId = staffDTO.getWxUserId();
if (qwDTO.needOpenUserId3th()) {
wxUserId = staffDTO.getWxOpenUseId();
......@@ -198,7 +198,7 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
content = content.substring(0, 26);
content = content + "...";
}
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(staffDTO.getWxEnterpriseId()) ;
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(staffDTO.getWxEnterpriseId());
String wxUserId = "";
if (qwDTO.needOpenUserId3th()) {
wxUserId = staffDTO.getWxOpenUseId();
......@@ -261,17 +261,17 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
@Override
public void sendClerkAdd(String clerkName, String clerkCode, String storeId, int auditStatus, String auditReason) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("storeId", storeId);
jsonObject.put("storeId", storeId);
ClerkDTO gicClerk = clerkService.getClerkLeaderByStoreId(storeId);
if(gicClerk == null){
logger.info("店长不存在,发送消息失败{}",storeId);
return ;
}
TabHaobanStaffClerkRelation tab = tabHaobanStaffClerkRelationMapper.getOneByClerkId(gicClerk.getClerkId());
if(tab == null){
logger.info("店长未绑定clerkId={}",gicClerk.getClerkId());
return ;
}
if (gicClerk == null) {
logger.info("店长不存在,发送消息失败{}", storeId);
return;
}
TabHaobanStaffClerkRelation tab = tabHaobanStaffClerkRelationMapper.getOneByClerkId(gicClerk.getClerkId());
if (tab == null) {
logger.info("店长未绑定clerkId={}", gicClerk.getClerkId());
return;
}
Map<String, String> params = new HashMap<String, String>();
params.put("clerkName", clerkName);
params.put("clerkCode", clerkCode);
......@@ -284,25 +284,25 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
, NoticeMessageTypeEnum.CLERK_ADD_REFUSE.getType(), null, params, jsonObject);
}
}
}
//导购删除,,审核记录,,消息发送
@Override
public void sendClerkDel(String clerkName, String clerkCode, String storeId, int auditStatus, String auditReason) {
//导购删除,,审核记录,,消息发送
@Override
public void sendClerkDel(String clerkName, String clerkCode, String storeId, int auditStatus, String auditReason) {
// String messageTitle = "门店导购变更";
// String messageContent = "删除导购:" + clerkName + "(" + clerkCode + ")";
JSONObject jsonObject = new JSONObject();
jsonObject.put("storeId", storeId);
jsonObject.put("storeId", storeId);
ClerkDTO gicClerk = clerkService.getClerkLeaderByStoreId(storeId);
if (gicClerk == null) {
logger.info("店长不存在,发送消息失败{}", storeId);
return;
}
TabHaobanStaffClerkRelation tab = tabHaobanStaffClerkRelationMapper.getOneByClerkId(gicClerk.getClerkId());
if(tab == null){
logger.info("店长未绑定clerkId={}",gicClerk.getClerkId());
return ;
}
if (gicClerk == null) {
logger.info("店长不存在,发送消息失败{}", storeId);
return;
}
TabHaobanStaffClerkRelation tab = tabHaobanStaffClerkRelationMapper.getOneByClerkId(gicClerk.getClerkId());
if (tab == null) {
logger.info("店长未绑定clerkId={}", gicClerk.getClerkId());
return;
}
// String pageUrl = this.getPageUrl(AppPageType.STORE_RELATED_RECORD.getCode(), data);
// this.sendAuditMessage(tab.getStaffId(), messageTitle, messageContent, pageUrl,auditStatus,auditReason);
......@@ -318,17 +318,18 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
, NoticeMessageTypeEnum.CLERK_DEL_AGREE.getType(), null, params, jsonObject);
}
}
@Override
public boolean sendSingleMessage(String clerkId, String title,
String content, String pageUrl) {
if (StringUtils.isEmpty(clerkId)) {
logger.info("clerkId不存在============>");
return false;
}
Map<String, String> map = getWxUserIdByClerkId(clerkId);
String wxUserId = map.get("wxUserId");
String corpId = map.get("corpId");
String name = map.get("clerkName");
@Override
public boolean sendSingleMessage(String clerkId, String title,
String content, String pageUrl) {
if (StringUtils.isEmpty(clerkId)) {
logger.info("clerkId不存在============>");
return false;
}
Map<String, String> map = getWxUserIdByClerkId(clerkId);
String wxUserId = map.get("wxUserId");
String corpId = map.get("corpId");
String name = map.get("clerkName");
if (StringUtils.isBlank(wxUserId)) {
logger.info("wxUserId不存在============clerkId={}", clerkId);
......@@ -494,6 +495,7 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
@Override
public void sendBindAuditMessage(String auditId, String staffId, String clerkId, String reason, boolean isRefuse) {
logger.info("发送审核消息:auditId:{},clerkId:{},reason:{},isRefuse:{}", auditId, clerkId, reason, isRefuse);
ClerkDTO clerkDTO = clerkService.getClerkByClerkId(clerkId);
if (clerkDTO == null) {
return;
......
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