Commit eaeb5100 by 徐高华

操作日志

parent a6933cb1
...@@ -178,6 +178,34 @@ public class GroupChatHmController { ...@@ -178,6 +178,34 @@ public class GroupChatHmController {
content.append(b); content.append(b);
} }
String s = null ;
String oldStoreId = oldDTO.getStoreId();
if(null == oldStoreId) {
oldStoreId = "";
}
String newStoreId = newDTO.getStoreId();
if(null == newStoreId) {
newStoreId = "";
}
if(!oldStoreId.equals(newStoreId)) {
String oldName = "--";
if(StringUtils.isNotBlank(oldStoreId)) {
StoreDTO oldStore = this.storeService.getStore(oldStoreId) ;
if(null != oldStore) {
oldName = oldStore.getStoreName() + "-" + oldStore.getStoreCode();
}
}
String newName = "--";
if(StringUtils.isNotBlank(newStoreId)) {
StoreDTO newStore = this.storeService.getStore(newStoreId) ;
if(null != newStore) {
newName = newStore.getStoreName() + "-" + newStore.getStoreCode();
}
}
s = String.format("归属门店从【%s】修改为【%s】", oldName, newName);
content.append(s) ;
}
String o = null; String o = null;
List<Long> newIdList = newDTO.getChatIdList(); List<Long> newIdList = newDTO.getChatIdList();
...@@ -226,7 +254,7 @@ public class GroupChatHmController { ...@@ -226,7 +254,7 @@ public class GroupChatHmController {
content.append(f); content.append(f);
} }
} }
if (org.apache.commons.lang3.StringUtils.isAllBlank(a, b, c, d, e, f, o, p)) { if (org.apache.commons.lang3.StringUtils.isAllBlank(a, b, c, d, e, f, o, p , s)) {
return null; return null;
} }
StringBuilder sb = new StringBuilder("编辑群活码").append("【").append(oldDTO.getChatHmCode()).append("-") StringBuilder sb = new StringBuilder("编辑群活码").append("【").append(oldDTO.getChatHmCode()).append("-")
......
...@@ -11,6 +11,7 @@ import java.util.stream.Collectors; ...@@ -11,6 +11,7 @@ import java.util.stream.Collectors;
import cn.hutool.core.date.DatePattern; import cn.hutool.core.date.DatePattern;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.gic.api.base.commons.JSONResponse; import com.gic.api.base.commons.JSONResponse;
import com.gic.clerk.api.dto.AuthorizedUser; import com.gic.clerk.api.dto.AuthorizedUser;
import com.gic.qcloud.BucketNameEnum; import com.gic.qcloud.BucketNameEnum;
...@@ -270,6 +271,34 @@ public class HmLinkController { ...@@ -270,6 +271,34 @@ public class HmLinkController {
return sb.append(content).toString(); return sb.append(content).toString();
} }
private String getChatRuleName(String chatRule) {
if(org.apache.commons.lang3.StringUtils.isBlank(chatRule)) {
return "--" ;
}
JSONArray arr = JSON.parseArray(chatRule) ;
List<String> list = new ArrayList<>() ;
for(int i=0;i<arr.size();i++) {
JSONObject json = arr.getJSONObject(i) ;
if(json.getIntValue("open")==1) {
int type = json.getIntValue("type") ;
if(type==1) {
list.add("服务门店");
}else if(type==2) {
list.add("协管门店");
}else if(type==3) {
list.add("LBS定位");
}else if(type==4) {
list.add("指定人群");
}
}
}
if(CollectionUtils.isEmpty(list)) {
return "--" ;
}
return list.stream().collect(Collectors.joining("、"));
}
private String getUpdateLog(HmLinkDTO oldDTO, HmLinkDTO newDTO) { private String getUpdateLog(HmLinkDTO oldDTO, HmLinkDTO newDTO) {
String wxEnterpriseId = newDTO.getWxEnterpriseId(); String wxEnterpriseId = newDTO.getWxEnterpriseId();
String enterpriseId = newDTO.getEnterpriseId(); String enterpriseId = newDTO.getEnterpriseId();
...@@ -282,6 +311,24 @@ public class HmLinkController { ...@@ -282,6 +311,24 @@ public class HmLinkController {
if (null != b) { if (null != b) {
content.append(b); content.append(b);
} }
String oldChatRule = oldDTO.getChatStoreRule();
if(null == oldChatRule) {
oldChatRule = "";
}
String newChatRule = newDTO.getChatStoreRule();
if(null == newChatRule) {
newChatRule = "";
}
String s = null ;
if(!oldChatRule.equals(newChatRule)) {
String oldName = this.getChatRuleName(oldChatRule) ;
String newName = this.getChatRuleName(newChatRule) ;
s = String.format("定向入群设置从【%s】修改为【%s】", oldName, newName) ;
content.append(s) ;
}
String c = comp(wxEnterpriseId, enterpriseId, "分配规则", oldDTO.getStoreRuleJson(), newDTO.getStoreRuleJson(), 3); String c = comp(wxEnterpriseId, enterpriseId, "分配规则", oldDTO.getStoreRuleJson(), newDTO.getStoreRuleJson(), 3);
if (null != c) { if (null != c) {
content.append(c); content.append(c);
...@@ -299,7 +346,7 @@ public class HmLinkController { ...@@ -299,7 +346,7 @@ public class HmLinkController {
if (null != f) { if (null != f) {
content.append(f); content.append(f);
} }
if (org.apache.commons.lang3.StringUtils.isAllBlank(a, b, c, d, e, f)) { if (org.apache.commons.lang3.StringUtils.isAllBlank(a, b, c, d, e, f,s)) {
return null; return null;
} }
StringBuilder sb = new StringBuilder("编辑引流链接").append("【").append(oldDTO.getLinkCode()).append("-") StringBuilder sb = new StringBuilder("编辑引流链接").append("【").append(oldDTO.getLinkCode()).append("-")
......
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