Commit 2c6bf8b1 by 徐高华

ai换装

parent 65d4f31b
...@@ -21,6 +21,8 @@ import com.gic.enterprise.api.service.*; ...@@ -21,6 +21,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;
...@@ -155,6 +157,9 @@ public class WxStaffController extends WebBaseController { ...@@ -155,6 +157,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")
...@@ -370,12 +375,23 @@ public class WxStaffController extends WebBaseController { ...@@ -370,12 +375,23 @@ 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 = "";
if(null != clerkId) {
ClerkDTO clerkDTO = this.clerkService.getClerkByClerkId(clerkId);
if (null != clerkDTO && clerkDTO.getClerkType()<=1) {
String clerkCode = 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<AiCustomVO> list = CustomSwitcher.haoban_ai_custom ; List<AiCustomVO> list = CustomSwitcher.haoban_ai_custom ;
list = list.stream().filter(o->o.getIsOpen()==1 && o.getEid().equals(enterpriseId)).collect(Collectors.toList()); list = list.stream().filter(o->o.getIsOpen()==1 && o.getEid().equals(enterpriseId)).collect(Collectors.toList());
if(CollectionUtils.isNotEmpty(list)) { if(CollectionUtils.isNotEmpty(list)) {
AiCustomVO vo = list.get(0) ; AiCustomVO vo = list.get(0) ;
String h5 = String.format(vo.getUrl(),clerkDTO.getClerkCode()) ; 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());
......
...@@ -174,6 +174,8 @@ ...@@ -174,6 +174,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" />
</beans> </beans>
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