Browse Source

Merge branch 'master' of http://47.100.37.243:10191/wutt/manHourHousekeeper

Guo1B0 1 year ago
parent
commit
a9cbc9e979

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

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

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/WxCorpInfoServiceImpl.java

@@ -2374,7 +2374,7 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
                           .setTemplateId(respJson.getString("template_id"))
                           .setTemplateId(respJson.getString("template_id"))
                           .setType(templateType);
                           .setType(templateType);
             wxCorpTemplateService.saveOrUpdate(wxCorpTemplate);
             wxCorpTemplateService.saveOrUpdate(wxCorpTemplate);
-            System.out.println(resp);
+            System.out.println("复制模板到企业-------------------->"+resp);
         }
         }
     }
     }