Min 1 년 전
부모
커밋
20c9134f7a

+ 5 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WeiXinCorpController.java

@@ -3963,12 +3963,14 @@ public class WeiXinCorpController {
      * 复制模板到指定企业
      */
     @RequestMapping("/copyTemplateToCorp")
-    public HttpRespMsg copyTemplateToCorp(Integer companyId){
+    public HttpRespMsg copyTemplateToCorp(@RequestBody String json){
         HttpRespMsg msg=new HttpRespMsg();
-        WxCorpInfo wxCorpInfo = wxCorpInfoService.getOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, companyId));
+        JSONObject item = JSONObject.parseObject(json);
+        WxCorpInfo wxCorpInfo = wxCorpInfoService.getOne(new LambdaQueryWrapper<WxCorpInfo>().eq(WxCorpInfo::getCompanyId, item.getInteger("companyId")));
         if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+            System.out.println("复制模板到企业 companyId========>"+item.getInteger("companyId"));
             try {
-                wxCorpInfoService.copyTemplate(companyId,0);
+                wxCorpInfoService.copyTemplate(item.getInteger("companyId"),0);
             } catch (Exception e) {
                 msg.setError("复制模板到企业失败");
                 e.printStackTrace();