|
@@ -1,5 +1,6 @@
|
|
|
package org.jeecg.modules.okki.site.controller;
|
|
|
|
|
|
+import com.lark.oapi.service.contact.v3.model.P1UserChangedV3;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.http.HttpHeaders;
|
|
@@ -7,15 +8,20 @@ import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.util.FastJsonUtil;
|
|
|
import org.jeecg.modules.okki.site.dto.FeiShuRecordSheetDto;
|
|
|
import org.jeecg.modules.okki.site.dto.FeiShuSeoTeamRecordSheetDto;
|
|
|
+import org.jeecg.modules.okki.site.dto.WeChatMsgDto;
|
|
|
import org.jeecg.modules.okki.site.param.ChangeSiteStatusParam;
|
|
|
import org.jeecg.modules.okki.site.param.OkkiSiteParam;
|
|
|
import org.jeecg.modules.okki.site.service.IFeiShuMsgService;
|
|
|
import org.jeecg.modules.okki.site.service.IFeiShuSeoTeamSheetService;
|
|
|
import org.jeecg.modules.okki.site.service.IFeiShuSheetService;
|
|
|
import org.jeecg.modules.okki.site.service.IOkkiSiteService;
|
|
|
+import org.jeecg.modules.okki.wechatgroup.entity.OkkiShopWechatGroupMsg;
|
|
|
+import org.jeecg.modules.okki.wechatgroup.service.IOkkiShopWechatGroupMsgService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* @Description: 站点
|
|
|
* @Author: Jack
|
|
@@ -39,6 +45,9 @@ public class ShopApiController {
|
|
|
@Autowired
|
|
|
private IFeiShuMsgService feiShuMsgService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IOkkiShopWechatGroupMsgService okkiShopWechatGroupMsgService;
|
|
|
+
|
|
|
@PostMapping(value = "/add")
|
|
|
public Result<String> add(@RequestBody OkkiSiteParam okkiSiteParam, @RequestHeader(HttpHeaders.AUTHORIZATION) String authorization) {
|
|
|
log.info("请求参数 param" + okkiSiteParam.toString() + "authorization" + authorization);
|
|
@@ -171,4 +180,25 @@ public class ShopApiController {
|
|
|
return Result.ok();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据站点ID获取企微群组消息
|
|
|
+ *
|
|
|
+ * @param weChatMsgDto
|
|
|
+ * @param authorization
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PostMapping(value = "/get/site/wechat/msg")
|
|
|
+ public Result<?> getSiteWeChatMsg(@RequestBody WeChatMsgDto weChatMsgDto, @RequestHeader(HttpHeaders.AUTHORIZATION) String authorization) {
|
|
|
+ log.info("请求参数 weChatMsgDto:{}", FastJsonUtil.toJSONString(weChatMsgDto));
|
|
|
+ log.info("请求参数 authorization:{}", authorization);
|
|
|
+ String Authorization = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImRlYW4iLCJleHAiOjE3MTQ0NjU5Njl9.QdCBYR8mioXcKGi1n5RdMQ5RbJHCSGbE8dkdwYuOXh4";
|
|
|
+ if (!authorization.equals(Authorization)) {
|
|
|
+ return Result.error("sign 验证不通过");
|
|
|
+ }
|
|
|
+ if (StringUtils.isBlank(weChatMsgDto.getSiteId()) || StringUtils.isBlank(weChatMsgDto.getLimit().toString())) {
|
|
|
+ return Result.error("siteId 和 limit参数不能为空");
|
|
|
+ }
|
|
|
+ List<OkkiShopWechatGroupMsg> okkiShopWechatGroupMsgs = okkiShopWechatGroupMsgService.getSiteWechatMsgBySiteId(weChatMsgDto);
|
|
|
+ return Result.ok(okkiShopWechatGroupMsgs);
|
|
|
+ }
|
|
|
}
|