|
@@ -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();
|