Browse Source

1、日志打印

guq 6 years ago
parent
commit
b597344fca

+ 5 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxNotifyServiceImpl.java

@@ -8,6 +8,8 @@ import com.usoftchina.smartschool.school.wxschool.mapper.*;
 import com.usoftchina.smartschool.school.wxschool.utils.ObjectUtils;
 import com.usoftchina.smartschool.wechat.api.WxPushApi;
 import org.apache.commons.collections.CollectionUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -50,6 +52,8 @@ public class WxNotifyServiceImpl implements WxNotifyService {
 	private String wechatUrl;
 
 
+	private final static Logger LOGGER = LoggerFactory.getLogger(WxNotifyServiceImpl.class);
+
 	/**
 	 * 获取系统消息和使用帮助
 	 * @param notifyType
@@ -115,6 +119,7 @@ public class WxNotifyServiceImpl implements WxNotifyService {
 									String schoolName = schoolDO.getSchoolName();
 									String teacherName = teacherMapper.get(notifyCreator).getTeacherName();
 									try {
+										LOGGER.error("URL:{}" , wechatUrl);
 										wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),teacherDO.getOpenid(), school, "您好,您有一条通知",schoolName ,teacherName,format.format(new Date()),notifyDetails, "点击查看详情", wechatUrl + "/notifyDetail/teacher/"+notifyDO.getNotifyId()+"?teacherId="+l);
 									}catch (Exception e){
 										e.printStackTrace();