|
@@ -6,6 +6,7 @@ import com.huijy.common.constant.Constants;
|
|
|
import com.huijy.management.domain.Content;
|
|
|
import com.huijy.system.service.ISysConfigService;
|
|
|
import com.huijy.weixin.service.WxUserService;
|
|
|
+import me.chanjar.weixin.common.error.WxErrorException;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -117,6 +118,12 @@ public class EarlyWarningController extends BaseController
|
|
|
public AjaxResult updateSend(@RequestBody EarlyWarning earlyWarning){
|
|
|
Integer num = earlyWarningService.updateSendFlag(earlyWarning.getEarlyWarningId(),earlyWarning.getSendFlag(),getUserId());
|
|
|
if (num>0 && earlyWarning.getSendFlag().equalsIgnoreCase("1")){
|
|
|
+ //先同步用户信息
|
|
|
+ try {
|
|
|
+ wxUserService.synchroWxUser();
|
|
|
+ } catch (WxErrorException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
String tempId = sysConfigService.selectConfigByKey(Constants.WX_MP_TEMPLATE_ID_KEY);
|
|
|
//发送消息
|
|
|
wxUserService.sendWxTemp(earlyWarning.getEarlyWarningId(),tempId);
|