koul 6 年 前
コミット
b2d09b1344

+ 6 - 2
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxTaskNotifyServiceImpl.java

@@ -45,6 +45,9 @@ public class WxTaskNotifyServiceImpl implements WxTaskNotifyService {
 	@Autowired
 	private WxParentsStuMapper wxParentsStuMapper;
 
+	@Autowired
+	private WxSubjectMapper wxSubjectMapper;
+
 	/**
 	 * 发布作业
 	 * @param taskString
@@ -61,7 +64,8 @@ public class WxTaskNotifyServiceImpl implements WxTaskNotifyService {
 		taskNotifyDO.setTaskCreator(taskCreator);
 		Long schoolId = teacherMapper.get(taskCreator).getSchoolId();
 		taskNotifyDO.setSchoolId(schoolId);
-		taskNotifyDO.setSubjectId(json.getLong("subjectId"));
+		Long subjectId = json.getLong("subjectId");
+		taskNotifyDO.setSubjectId(subjectId);
 		taskNotifyDO.setTaskFiles(json.getString("taskFiles"));
 		taskNotifyDO.setTaskStatus(json.getInteger("taskStatus"));
 		taskNotifyDO.setCreateDate(new Date());
@@ -82,7 +86,7 @@ public class WxTaskNotifyServiceImpl implements WxTaskNotifyService {
 					if (parentsStuDOS.size()>0){
 						for (ParentsStuDO ps:parentsStuDOS) {
 							ParentsDO parentsDO = parentsMapper.get(ps.getParentId());
-							wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),parentsDO.getOpenid(), "WwKtiHd4lso9axuavfLdpHIVbzTiopOTyh_uCsL3ZI8",taskTitle,"-",format.format(new Date()), taskContext,"-", "点击查看详情", "");
+							wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),parentsDO.getOpenid(), "WwKtiHd4lso9axuavfLdpHIVbzTiopOTyh_uCsL3ZI8",taskTitle,wxSubjectMapper.get(subjectId).getSubjectName(),format.format(new Date()), taskContext,"-", "点击查看详情", "");
 						}
 						}
 					}

+ 1 - 1
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxUserServiceImpl.java

@@ -54,7 +54,7 @@ public class WxUserServiceImpl implements WxUserService {
 	 * @return
 	 */
 	public SendSmsResponse sendCode(String userPhone) throws Exception {
-		System.err.println(userPhone);
+		//System.err.println(userPhone);
 		UserDO user = userMapper.selectUserByPhone(userPhone);
 		if (ObjectUtils.isNotEmpty(user)){
 			String vcode = SendMsgUtil.createRandomVcode(CodeConfig.getCodeNumber());

+ 2 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/impl/WxPushServiceImpl.java

@@ -38,7 +38,7 @@ public class WxPushServiceImpl implements WxPushService{
                         .header("Content-Type", "application/json")
                         .send(json.getBytes());
                 String result= hRequest.body();
-                System.err.println("WxPushResult======="+result);
+                //System.err.println("WxPushResult======="+result);
 
 			/*if(JSON.parseObject(result).getInteger("errcode")==0&&JSON.parseObject(result).getString("errmsg").equals("ok")){
 				return "推送成功!";
@@ -59,7 +59,7 @@ public class WxPushServiceImpl implements WxPushService{
             params.put("grant_type", "client_credential");
             HttpRequest httpRequest= HttpRequest.get("https://api.weixin.qq.com/cgi-bin/token",params,false);
             String content=httpRequest.body();
-            System.err.println("WxPushToken======"+content);
+           // System.err.println("WxPushToken======"+content);
             return content;
         }
 }