Commit 5aff3b67 by 徐高华

ai换装

parent 2c6bf8b1
...@@ -359,9 +359,13 @@ public class WxStaffController extends WebBaseController { ...@@ -359,9 +359,13 @@ public class WxStaffController extends WebBaseController {
private int aiCustom(String enterpriseId) { private int aiCustom(String enterpriseId) {
List<AiCustomVO> list = CustomSwitcher.haoban_ai_custom ; List<JSONObject> list = CustomSwitcher.haoban_ai_custom ;
list = list.stream().filter(o->o.getIsOpen()==1 && o.getEid().equals(enterpriseId)).collect(Collectors.toList()); if(CollectionUtils.isEmpty(list)) {
if(CollectionUtils.isNotEmpty(list)) { return 0 ;
}
List<AiCustomVO> voList = list.stream().map(o->JSONObject.parseObject(o.toJSONString(),AiCustomVO.class)).collect(Collectors.toList());
voList = voList.stream().filter(o->o.getIsOpen()==1 && o.getEid().equals(enterpriseId)).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(voList)) {
return 1 ; return 1 ;
} }
return 0 ; return 0 ;
...@@ -387,10 +391,11 @@ public class WxStaffController extends WebBaseController { ...@@ -387,10 +391,11 @@ public class WxStaffController extends WebBaseController {
} }
} }
} }
List<AiCustomVO> list = CustomSwitcher.haoban_ai_custom ; List<JSONObject> list = CustomSwitcher.haoban_ai_custom ;
list = list.stream().filter(o->o.getIsOpen()==1 && o.getEid().equals(enterpriseId)).collect(Collectors.toList()); List<AiCustomVO> voList = list.stream().map(o->JSONObject.parseObject(o.toJSONString(),AiCustomVO.class)).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(list)) { voList = voList.stream().filter(o->o.getIsOpen()==1 && o.getEid().equals(enterpriseId)).collect(Collectors.toList());
AiCustomVO vo = list.get(0) ; if(CollectionUtils.isNotEmpty(voList)) {
AiCustomVO vo = voList.get(0) ;
String h5 = String.format(vo.getUrl(),wmId) ; String h5 = String.format(vo.getUrl(),wmId) ;
String str = "{\"url\":\""+h5+"\",\"id\":\"5\"}" ; String str = "{\"url\":\""+h5+"\",\"id\":\"5\"}" ;
Map<String, Object> map = this.enterpriseWxaLinkService.getWxaLinkAndQrCode(enterpriseId,str) ; Map<String, Object> map = this.enterpriseWxaLinkService.getWxaLinkAndQrCode(enterpriseId,str) ;
......
package com.gic.haoban.manage.web.utils; package com.gic.haoban.manage.web.utils;
import com.alibaba.fastjson.JSONObject;
import com.gic.commons.switcher.Switcher; import com.gic.commons.switcher.Switcher;
import com.gic.commons.switcher.SwitcherNamespace; import com.gic.commons.switcher.SwitcherNamespace;
import com.gic.haoban.manage.web.vo.AiCustomVO;
import java.util.List; import java.util.List;
...@@ -10,6 +10,6 @@ import java.util.List; ...@@ -10,6 +10,6 @@ import java.util.List;
public class CustomSwitcher { public class CustomSwitcher {
@Switcher @Switcher
public static List<AiCustomVO> haoban_ai_custom ; public static List<JSONObject> haoban_ai_custom ;
} }
\ No newline at end of file
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