Commit 6aaaa7d7 by 徐高华

Merge branch 'feature/xgh/240820' into 'developer'

Feature/xgh/240820

See merge request !2134
parents 1ea7e55a 5aff3b67
...@@ -26,6 +26,8 @@ import com.gic.enterprise.api.service.*; ...@@ -26,6 +26,8 @@ import com.gic.enterprise.api.service.*;
import com.gic.haoban.manage.web.qo.StaffAddVO; import com.gic.haoban.manage.web.qo.StaffAddVO;
import com.gic.haoban.manage.web.utils.CustomSwitcher; import com.gic.haoban.manage.web.utils.CustomSwitcher;
import com.gic.haoban.manage.web.vo.*; import com.gic.haoban.manage.web.vo.*;
import com.gic.weimob.dto.guider.WmGuiderInfoDTO;
import com.gic.weimob.service.GicWeimobGuiderRelService;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
...@@ -134,6 +136,9 @@ public class WxStaffController extends WebBaseController { ...@@ -134,6 +136,9 @@ public class WxStaffController extends WebBaseController {
private CustomPageNewService customPageNewService ; private CustomPageNewService customPageNewService ;
@Autowired @Autowired
private EnterpriseWxaLinkService enterpriseWxaLinkService ; private EnterpriseWxaLinkService enterpriseWxaLinkService ;
@Autowired
private GicWeimobGuiderRelService gicWeimobGuiderRelService ;
// 选择成员列表 // 选择成员列表
@RequestMapping("/staff-list") @RequestMapping("/staff-list")
...@@ -333,9 +338,13 @@ public class WxStaffController extends WebBaseController { ...@@ -333,9 +338,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 ;
...@@ -349,12 +358,24 @@ public class WxStaffController extends WebBaseController { ...@@ -349,12 +358,24 @@ public class WxStaffController extends WebBaseController {
@IgnoreLogin @IgnoreLogin
@RequestMapping("/get-ai-custom-setting") @RequestMapping("/get-ai-custom-setting")
public RestResponse<Object> getAiCustomSetting(String enterpriseId , String clerkId) { public RestResponse<Object> getAiCustomSetting(String enterpriseId , String clerkId) {
ClerkDTO clerkDTO = this.clerkService.getClerkByClerkId(clerkId) ; String wmId = "";
List<AiCustomVO> list = CustomSwitcher.haoban_ai_custom ; if(null != clerkId) {
list = list.stream().filter(o->o.getIsOpen()==1 && o.getEid().equals(enterpriseId)).collect(Collectors.toList()); ClerkDTO clerkDTO = this.clerkService.getClerkByClerkId(clerkId);
if(CollectionUtils.isNotEmpty(list)) { if (null != clerkDTO && clerkDTO.getClerkType()<=1) {
AiCustomVO vo = list.get(0) ; String clerkCode = clerkDTO.getClerkCode();
String h5 = String.format(vo.getUrl(),clerkDTO.getClerkCode()) ; ServiceResponse<WmGuiderInfoDTO> resp = this.gicWeimobGuiderRelService.getWmClerkInfoByClerkCode(enterpriseId, clerkCode);
if (null != resp.getResult()) {
logger.info("wm={}", JSONObject.toJSONString(resp));
wmId = "" + resp.getResult().getGuiderVid();
}
}
}
List<JSONObject> list = CustomSwitcher.haoban_ai_custom ;
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)) {
AiCustomVO vo = voList.get(0) ;
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) ;
vo.setPath(map.get("link").toString()); vo.setPath(map.get("link").toString());
......
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
...@@ -175,6 +175,8 @@ ...@@ -175,6 +175,8 @@
<dubbo:reference id="storeRankApiService" interface="com.gic.enterprise.api.service.rank.StoreRankApiService" timeout="100000" retries="0" check="false" /> <dubbo:reference id="storeRankApiService" interface="com.gic.enterprise.api.service.rank.StoreRankApiService" timeout="100000" retries="0" check="false" />
<dubbo:reference id="enterpriseWxaLinkService" interface="com.gic.enterprise.api.service.EnterpriseWxaLinkService" timeout="100000" retries="0" check="false" /> <dubbo:reference id="enterpriseWxaLinkService" interface="com.gic.enterprise.api.service.EnterpriseWxaLinkService" timeout="100000" retries="0" check="false" />
<dubbo:reference id="gicWeimobGuiderRelService" interface="com.gic.weimob.service.GicWeimobGuiderRelService" timeout="100000" retries="0" check="false" />
<dubbo:reference id="memberExtraPropertyApiService" interface="com.gic.member.api.service.extra.MemberExtraPropertyApiService" timeout="100000" retries="0" check="false" /> <dubbo:reference id="memberExtraPropertyApiService" interface="com.gic.member.api.service.extra.MemberExtraPropertyApiService" timeout="100000" retries="0" check="false" />
......
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