zouxuan %!s(int64=5) %!d(string=hai) anos
pai
achega
66042d96ad

+ 4 - 4
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/MessageTypeEnum.java

@@ -16,15 +16,15 @@ public enum MessageTypeEnum implements BaseEnum<String, MessageTypeEnum> {
     SMS_WITHDRAW_SUCCESS("SMS_WITHDRAW_SUCCESS", "提现成功"),
     SMS_MUSIC_GROUP_CLOSE("SMS_MUSIC_GROUP_CLOSE", "乐团关闭(关闭后)"),
 
-    STUDENT_SMS_PAYMENT_SUCCESS("STUDENT_SMS_PAYMENT_RESULT", "缴费成功结果通知"),
-    STUDENT_SMS_PAYMENT_FAILED("STUDENT_SMS_PAYMENT_RESULT", "缴费失败结果通知"),
+    STUDENT_SMS_PAYMENT_SUCCESS("STUDENT_SMS_PAYMENT_SUCCESS", "缴费成功结果通知"),
+    STUDENT_SMS_PAYMENT_FAILED("STUDENT_SMS_PAYMENT_FAILED", "缴费失败结果通知"),
     STUDENT_PUSH_PAYMENT_RESULT("STUDENT_PUSH_PAYMENT_RESULT", "缴费结果"),
     STUDENT_PUSH_MUSIC_GROUP_CLOSE("STUDENT_PUSH_MUSIC_GROUP_CLOSE", "乐团关闭(确认后)"),
     STUDENT_PUSH_BASICS_SKILL_APPLY_MESSAGE("STUDENT_PUSH_BASICS_SKILL_APPLY_MESSAGE", "基础技能训练报名通知"),
     STUDENT_SMS_WAIT_RENEW_MESSAGE("STUDENT_SMS_WAIT_RENEW_MESSAGE", "待续费通知"),
     STUDENT_PUSH_WAIT_RENEW_MESSAGE("STUDENT_PUSH_WAIT_RENEW_MESSAGE", "待续费通知"),
-    STUDENT_SMS_MUSIC_GROUP_RENEW_RESULT("STUDENT_SMS_MUSIC_GROUP_RENEW_RESULT", "乐团续费结果"),
-    STUDENT_PUSH_MUSIC_GROUP_RENEW_RESULT("STUDENT_PUSH_MUSIC_GROUP_RENEW_RESULT", "乐团续费结果"),
+    STUDENT_SMS_MUSIC_GROUP_RENEW_SUCCESS("STUDENT_SMS_MUSIC_GROUP_RENEW_SUCCESS", "乐团续费成功结果"),
+    STUDENT_PUSH_MUSIC_GROUP_RENEW_FAILED("STUDENT_PUSH_MUSIC_GROUP_RENEW_FAILED", "乐团续费失败结果"),
     STUDENT_SMS_BALANCE_CONSUME("STUDENT_SMS_BALANCE_CONSUME", "余额消费"),
     STUDENT_PUSH_BALANCE_CONSUME("STUDENT_PUSH_BALANCE_CONSUME", "余额消费"),
     STUDENT_PUSH_VIP_BUY("STUDENT_PUSH_VIP_BUY", "VIP课购买"),

+ 1 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/StudentCourseHomeworkService.java

@@ -37,6 +37,7 @@ public interface StudentCourseHomeworkService extends BaseService<Long, StudentC
     boolean updateReplyStatus(Integer teacherId,Long courseHomeworkId,Integer studentId);
 
     /**
+     * @author Gaoyong
      * 课程作业提醒
      * @return
      */

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/SysConfigService.java

@@ -96,6 +96,8 @@ public interface SysConfigService extends BaseService<Long, SysConfig> {
 
 	String MUSIC_GROUP_SETTLEMENT_SINGLE_CLASS_MINUTES="music_group_settlement_single_class_minutes";
 
+	String REFUND_PERIOD = "refund_period";
+
 	/**
 	 * @params paramName
 	 * @return com.ym.mec.biz.dal.entity.SysConfig

+ 46 - 27
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java

@@ -19,6 +19,7 @@ import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.thirdparty.message.MessageSenderPluginContext.MessageSender;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
+import com.ym.mec.util.string.MessageFormatter;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -110,6 +111,9 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 	@Autowired
 	private SysMessageConfigDao sysMessageConfigDao;
 
+	@Autowired
+	private SysConfigDao sysConfigDao;
+
     @Override
     public BaseDAO<String, MusicGroup> getDAO() {
         return musicGroupDao;
@@ -195,7 +199,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         //乐团状态是否正确
         MusicGroup musicGroup = musicGroupDao.get(musicGroupId);
         if(musicGroup != null){
-            if(musicGroup.getStatus() != MusicGroupStatusEnum.DRAFT || musicGroup.getStatus() != MusicGroupStatusEnum.AUDIT_FAILED){
+            if(musicGroup.getStatus() != MusicGroupStatusEnum.DRAFT && musicGroup.getStatus() != MusicGroupStatusEnum.AUDIT_FAILED){
                 throw new Exception("当前乐团状态不支持此操作");
             }
             //记录日志信息
@@ -363,7 +367,13 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         }
         //获取当前乐团所有已报名学员
         List<StudentRegistration> registrations = studentRegistrationDao.findClassGroupStu(musicGroupId, null);
-
+        Map<Integer,String> map = new HashMap<>(registrations.size());
+        registrations.forEach(e->{
+            map.put(e.getUserId(),e.getParentsPhone());
+        });
+        String content = sysMessageConfigDao.findContent(MessageTypeEnum.STUDENT_PUSH_MUSIC_GROUP_CLOSE.getCode());
+        content = MessageFormatter.arrayFormat(content,sysConfigDao.findConfigValue(SysConfigService.REFUND_PERIOD));
+        sysMessageService.batchSendMessage(MessageSender.JIGUANG,"",content,map,new Date(),0,"");
         //记录建团日志
         musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId,"取消乐团",sysUser.getId(),""));
         return true;
@@ -633,26 +643,34 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         if(musicGroupStudentFee == null){
             throw new BizException("系统数据异常,找不到学员预缴费信息");
         }
-
         Date date = new Date();
-
-        musicGroupStudentFee.setUpdateTime(date);
-        musicGroupStudentFee.setLatestPaidTime(date);
-        musicGroupStudentFee.setPaymentStatus(PaymentStatus.PAID_COMPLETED);
-        musicGroupStudentFee.setTemporaryCourseFee(new BigDecimal(0));
-        musicGroupStudentFee.setNextPaymentDate(musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId));
-
-        musicGroupStudentFeeDao.update(musicGroupStudentFee);
-        
-		SysUser user = sysUserFeignService.queryUserById(userId);
-        Map<Integer, String> receivers = new HashMap<Integer, String>();
-        receivers.put(user.getId(), userId + "");
-
-		// 发送续费结果通知
-		sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.STUDENT_PUSH_MUSIC_GROUP_RENEW_RESULT, receivers, null, 0, "",
-				user.getRealName());
-
-        return true;
+        Map<Integer, String> receivers = new HashMap<Integer, String>(1);
+        StudentRegistration studentRegistration = studentRegistrationDao.queryByUserIdAndMusicGroupId(userId, musicGroupId);
+        receivers.put(userId, studentRegistration.getParentsPhone());
+        if(studentPaymentOrder.getStatus() == DealStatusEnum.SUCCESS){
+            musicGroupStudentFee.setUpdateTime(date);
+            musicGroupStudentFee.setLatestPaidTime(date);
+            musicGroupStudentFee.setPaymentStatus(PaymentStatus.PAID_COMPLETED);
+            musicGroupStudentFee.setTemporaryCourseFee(new BigDecimal(0));
+            musicGroupStudentFee.setNextPaymentDate(musicGroupPaymentCalenderService.getNextPaymentDate(musicGroupId));
+            musicGroupStudentFeeDao.update(musicGroupStudentFee);
+            // 发送续费结果通知
+
+            sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.STUDENT_SMS_MUSIC_GROUP_RENEW_SUCCESS, receivers, null, 0, "",
+                    studentRegistration.getParentsName(),studentPaymentOrder.getActualAmount());
+            sysMessageService.batchSendMessage(MessageSender.YIMEI, MessageTypeEnum.STUDENT_SMS_MUSIC_GROUP_RENEW_SUCCESS, receivers, null, 0, "",
+                    studentRegistration.getParentsName(),studentPaymentOrder.getActualAmount());
+            return true;
+        }
+        if(studentPaymentOrder.getStatus() == DealStatusEnum.CLOSE || studentPaymentOrder.getStatus() == DealStatusEnum.FAilED){
+            String studentApplyUrl = sysConfigDao.findConfigValue(SysConfigService.STUDENT_APPLY_URL + musicGroupId);
+            sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.STUDENT_PUSH_MUSIC_GROUP_RENEW_FAILED, receivers, null, 0, "",
+                    studentApplyUrl);
+            sysMessageService.batchSendMessage(MessageSender.YIMEI, MessageTypeEnum.STUDENT_PUSH_MUSIC_GROUP_RENEW_FAILED, receivers, null, 0, "",
+                    studentApplyUrl);
+            return false;
+        }
+        return false;
     }
 
     @Override
@@ -743,9 +761,9 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             throw new Exception("用户信息获取失败");
         }
         String musicGroupId = subFeeSettingDto.getMusicGroup().getId();
-        MusicGroup musicGroup = saveLog(musicGroupId,MusicGroupStatusEnum.DRAFT);
-        if(musicGroup.getStatus() != MusicGroupStatusEnum.AUDIT_FAILED){
-            throw new Exception("当前乐团状态不支持此操作");
+        MusicGroup musicGroup = musicGroupDao.get(musicGroupId);
+        if(musicGroup == null){
+            throw new Exception("乐团信息不存在");
         }
 
         Date date = new Date();
@@ -902,8 +920,9 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         //获取所有家长电话
         Set<String> parentsPhones = students.stream().map(StudentRegistration::getParentsPhone).collect(Collectors.toSet());
         //获取对应家长的用户编号
-//        Map<Integer,String> userIds = MapUtil.convertMybatisMap(studentRegistrationService.findParentId(StringUtils.join(parentsPhones,",")));
-//        String content = sysMessageConfigDao.findContent(MessageTypeEnum.SMS_BASICS_SKILL_APPLY_MESSAGE.getCode());
-//        sysMessageService.batchSendMessage(MessageSender.YIMEI,"",content,userIds,date,0,"");
+        Map<Integer,String> userIds = MapUtil.convertMybatisMap(studentRegistrationDao.findParentId(StringUtils.join(parentsPhones,",")));
+        userIds = JSONObject.parseObject(JSONObject.toJSONString(userIds),HashMap.class);
+        String content = sysMessageConfigDao.findContent(MessageTypeEnum.SMS_BASICS_SKILL_APPLY_MESSAGE.getCode());
+        sysMessageService.batchSendMessage(MessageSender.YIMEI,"",content,userIds,new Date(),0,"");
     }
 }

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentCourseHomeworkServiceImpl.java

@@ -110,7 +110,7 @@ public class StudentCourseHomeworkServiceImpl extends BaseServiceImpl<Long, Stud
 		List<StudentCourseHomework> list = studentCourseHomeworkDao.queryNotDoneHomeworkList();
 
 		for (StudentCourseHomework sch : list) {
-			Map<Integer, String> receivers = new HashMap<Integer, String>();
+			Map<Integer, String> receivers = new HashMap<Integer, String>(1);
 			receivers.put(sch.getUserId(), sch.getUserId() + "");
 
 			sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.STUDENT_PUSH_JOB_MESSAGE, receivers, null, 0, "", sch.getCourseHomework()

+ 24 - 19
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java

@@ -195,14 +195,15 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
 //        musicGroupSubjectPlanService.addApplyStudentNum(studentRegistration.getMusicGroupId(), studentRegistration.getSubjectId(),1);
         //报名成功后,发送短信
         String studentApplyUrl = sysConfigDao.findConfigValue(SysConfigService.STUDENT_APPLY_URL + studentRegistration.getMusicGroupId());
-        String content = sysMessageConfigDao.findContent(MessageTypeEnum.SMS_APPLY_MESSAGE.getCode());
+        String serverPhone = sysConfigDao.findConfigValue(SysConfigService.SERVER_PHONE);
         Subject subject = subjectDao.get(studentRegistration.getActualSubjectId());
         MusicGroup musicGroup = musicGroupDao.get(studentRegistration.getMusicGroupId());
-        String format = DateUtil.format(musicGroup.getApplyExpireDate(), DateUtil.DATE_FORMAT_MIN);
-        sysMessageService.sendMessage(MessageSenderPluginContext.MessageSender.YIMEI,sysUser.getId(),"",
-                MessageFormatter.arrayFormat(content, studentRegistration.getParentsName(),subject.getName(),
-                        studentApplyUrl,musicGroup.getApplyExpireDate(),format,sysConfigDao.findConfigValue(SysConfigService.SERVER_PHONE)),
-                studentRegistration.getParentsPhone(),date,0,null);
+
+        Map<Integer,String> map = new HashMap<>(1);
+        map.put(studentRegistration.getUserId(),studentRegistration.getParentsPhone());
+        sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.YIMEI,
+                MessageTypeEnum.SMS_APPLY_MESSAGE,map,null,0,"",
+                studentRegistration.getParentsName(),subject.getName(),studentApplyUrl,musicGroup.getApplyExpireDate(),serverPhone);
         return studentRegistration;
     }
 
@@ -511,13 +512,15 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
             musicGroupStudentFee.setPaymentStatus(MusicGroupStudentFee.PaymentStatus.PAID_COMPLETED);
             musicGroupStudentFeeDao.insert(musicGroupStudentFee);
             //发送缴费成功通知(短信 + push)
-            String content = sysMessageConfigDao.findContent(MessageTypeEnum.STUDENT_SMS_PAYMENT_SUCCESS.getCode());
-            content = MessageFormatter.arrayFormat(content,studentRegistration.getParentsName(),studentPaymentOrder.getActualAmount());
-            sysMessageService.sendMessage(MessageSenderPluginContext.MessageSender.YIMEI,studentPaymentOrder.getUserId(),"",
-                    content,studentRegistration.getUserId().toString(),nowDate,0,"");
+            Map<Integer,String> map = new HashMap<>(1);
+            map.put(studentPaymentOrder.getUserId(),studentRegistration.getParentsPhone());
+            sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.YIMEI,
+                    MessageTypeEnum.STUDENT_SMS_PAYMENT_SUCCESS,map,null,0,"",
+                    studentRegistration.getParentsName(),studentPaymentOrder.getActualAmount());
             //push
-            sysMessageService.sendMessage(MessageSenderPluginContext.MessageSender.JIGUANG,studentPaymentOrder.getUserId(),"",
-                    content,studentRegistration.getUserId().toString(),nowDate,0,"");
+            sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG,
+                    MessageTypeEnum.STUDENT_SMS_PAYMENT_SUCCESS,map,null,0,"",
+                    studentRegistration.getParentsName(),studentPaymentOrder.getActualAmount());
         }
 
         //失败减去已收款金额
@@ -527,14 +530,16 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
             musicOneSubjectClassPlan.setPaidStudentNum(musicOneSubjectClassPlan.getPaidStudentNum() - 1);
             musicGroupSubjectPlanService.update(musicOneSubjectClassPlan);
             //发送缴费成功通知(短信 + push)
-            String content = sysMessageConfigDao.findContent(MessageTypeEnum.STUDENT_SMS_PAYMENT_FAILED.getCode());
             String studentApplyUrl = sysConfigDao.findConfigValue(SysConfigService.STUDENT_APPLY_URL + studentRegistration.getMusicGroupId());
-            content = MessageFormatter.arrayFormat(content,studentApplyUrl);
-            sysMessageService.sendMessage(MessageSenderPluginContext.MessageSender.YIMEI,studentPaymentOrder.getUserId(),"",
-                    content,studentRegistration.getUserId().toString(),nowDate,0,"");
-            //push
-            sysMessageService.sendMessage(MessageSenderPluginContext.MessageSender.JIGUANG,studentPaymentOrder.getUserId(),"",
-                    content,studentRegistration.getUserId().toString(),nowDate,0,"");
+
+            Map<Integer,String> map = new HashMap<>(1);
+            map.put(studentPaymentOrder.getUserId(),studentRegistration.getParentsPhone());
+            sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.YIMEI,
+                    MessageTypeEnum.STUDENT_SMS_PAYMENT_FAILED,map,null,0,"",
+                    studentApplyUrl);
+            sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG,
+                    MessageTypeEnum.STUDENT_SMS_PAYMENT_FAILED,map,null,0,"",
+                    studentApplyUrl);
         }
 
         return studentPaymentOrder;

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysMessageServiceImpl.java

@@ -268,7 +268,7 @@ public class SysMessageServiceImpl extends BaseServiceImpl<Long, SysMessage> imp
 		if (debugMode == false) {
 			code = getRandomCode(messageType, receiver);
 		}
-		Map<Integer, String> receivers = new HashMap<Integer, String>();
+		Map<Integer, String> receivers = new HashMap<>(1);
 		receivers.put(userId, receiver);
 		batchSendMessage(messageSender, messageType, receivers, null, 1, "", code);
 		redisCache.put(key, code, CODE_EXPIRE);

+ 8 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -17,6 +17,7 @@ import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.im.ImFeignService;
+import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
 import org.apache.commons.lang3.StringUtils;
@@ -88,6 +89,8 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 	@Autowired
 	private SysUserCashAccountDetailService sysUserCashAccountDetailService;
 	@Autowired
+	private SysMessageService sysMessageService;
+	@Autowired
 	private VipGroupDefaultClassesCycleDao vipGroupDefaultClassesCycleDao;
 
 	@Override
@@ -810,6 +813,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		Integer userId = order.getUserId();
 		boolean isOk=order.getStatus().equals(DealStatusEnum.SUCCESS);
 
+		VipGroup vipGroup = vipGroupDao.get(vipGroupId);
 		studentPaymentOrderDao.update(order);
 
 		//将学生加入到班级,更新班级报名状态及人数信息
@@ -839,10 +843,12 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
 			sysUserCashAccountDetailService.insert(sysUserIncomeCashAccountDetail);
 			sysUserCashAccountDetailService.insert(sysUserExpendCashAccountDetail);
+			Map<Integer,String> map = new HashMap<>(1);
+			map.put(userId,userId.toString());
+			sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.STUDENT_PUSH_VIP_BUY, map, null, 0, "",
+					vipGroup.getName());
 		}
 
-		VipGroup vipGroup = vipGroupDao.get(vipGroupId);
-
 		//生成学生单课缴费信息
 		courseScheduleStudentPaymentService.createCourseScheduleStudentPaymentForVipGroup(vipGroupId,userId);
 

+ 1 - 2
mec-biz/src/main/resources/config/mybatis/StudentRegistrationMapper.xml

@@ -432,8 +432,7 @@
         WHERE sr.music_group_id_ = #{musicGroupId}
         GROUP BY actual_subject_id_
     </select>
-
-    <select id="findParentId" resultType="java.util.Map">
+    <select id="findParentId" resultType="map">
         SELECT MAX(sr.user_id_) `key`,sr.parents_phone_ `value`
         FROM student_registration sr
         WHERE FIND_IN_SET(sr.parents_phone_,#{parentPhones})

+ 20 - 16
mec-im/src/main/java/com/ym/service/Impl/HereWhiteServiceImpl.java

@@ -35,22 +35,26 @@ public class HereWhiteServiceImpl implements HereWhiteService {
         String url = "/room?token=" + hereWhiteToken;
         JSONObject jsonObject = JSONObject.parseObject(requestParam(json, url));
         if(jsonObject.getString("code").equals("200")){
-            JSONObject room = jsonObject.getJSONObject("msg").getJSONObject("room");
-            HereWhite hereWhite = new HereWhite();
-            Date date = new Date();
-            hereWhite.setCourseScheduleId(courseScheduleId);
-            hereWhite.setName(room.getString("name"));
-            hereWhite.setLimit(room.getInteger("limit"));
-            hereWhite.setTeamId(room.getInteger("teamId"));
-            hereWhite.setAdminId(room.getInteger("adminId"));
-            hereWhite.setMode(room.getString("mode"));
-            hereWhite.setTemplate(room.getString("template"));
-            hereWhite.setRegion(room.getString("region"));
-            hereWhite.setUuid(room.getString("uuid"));
-            hereWhite.setRoomToken(jsonObject.getJSONObject("msg").getString("roomToken"));
-            hereWhite.setUpdatedAt(date);
-            hereWhite.setCreatedAt(date);
-            return hereWhiteDao.save(hereWhite);
+            HereWhite hereWhite = hereWhiteDao.findByCourseScheduleId(courseScheduleId);
+            if(hereWhite == null){
+                JSONObject room = jsonObject.getJSONObject("msg").getJSONObject("room");
+                hereWhite = new HereWhite();
+                Date date = new Date();
+                hereWhite.setCourseScheduleId(courseScheduleId);
+                hereWhite.setName(room.getString("name"));
+                hereWhite.setLimit(room.getInteger("limit"));
+                hereWhite.setTeamId(room.getInteger("teamId"));
+                hereWhite.setAdminId(room.getInteger("adminId"));
+                hereWhite.setMode(room.getString("mode"));
+                hereWhite.setTemplate(room.getString("template"));
+                hereWhite.setRegion(room.getString("region"));
+                hereWhite.setUuid(room.getString("uuid"));
+                hereWhite.setRoomToken(jsonObject.getJSONObject("msg").getString("roomToken"));
+                hereWhite.setUpdatedAt(date);
+                hereWhite.setCreatedAt(date);
+                hereWhiteDao.save(hereWhite);
+            }
+            return hereWhite;
         }else {
             throw new Exception(jsonObject.getString("msg"));
         }

+ 10 - 21
mec-student/src/main/java/com/ym/mec/student/controller/StudentManageController.java

@@ -1,11 +1,17 @@
 package com.ym.mec.student.controller;
 
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.dto.CashAccountDetail;
+import com.ym.mec.biz.dal.entity.SysSuggestion;
+import com.ym.mec.biz.dal.entity.SysUserBankCard;
+import com.ym.mec.biz.service.*;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.entity.UploadReturnBean;
+import com.ym.mec.util.upload.UploadUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
-
-import java.util.Date;
-
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -17,22 +23,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 
-import com.ym.mec.auth.api.client.SysUserFeignService;
-import com.ym.mec.auth.api.entity.SysUser;
-import com.ym.mec.biz.dal.dto.CashAccountDetail;
-import com.ym.mec.biz.dal.entity.SysSuggestion;
-import com.ym.mec.biz.dal.entity.SysUserBankCard;
-import com.ym.mec.biz.service.ClassGroupService;
-import com.ym.mec.biz.service.StudentManageService;
-import com.ym.mec.biz.service.StudentWithdrawService;
-import com.ym.mec.biz.service.SysSuggestionService;
-import com.ym.mec.biz.service.SysUserBankCardService;
-import com.ym.mec.biz.service.SysUserCashAccountDetailService;
-import com.ym.mec.biz.service.SysUserCashAccountService;
-import com.ym.mec.biz.service.UploadFileService;
-import com.ym.mec.common.controller.BaseController;
-import com.ym.mec.common.entity.UploadReturnBean;
-import com.ym.mec.util.upload.UploadUtil;
+import java.util.Date;
 
 @Api(tags = "学生管理")
 @RestController
@@ -49,8 +40,6 @@ public class StudentManageController extends BaseController {
     @Autowired
     private ClassGroupService classGroupService;
     @Autowired
-    private StudentWithdrawService studentWithdrawService;
-    @Autowired
     private SysUserBankCardService sysUserBankCardService;
     @Autowired
     private StudentManageService studentManageService;

+ 0 - 1
mec-student/src/main/java/com/ym/mec/student/controller/StudentOrderController.java

@@ -71,7 +71,6 @@ public class StudentOrderController {
         }else if(order.getType().equals(OrderTypeEnum.RENEW)){
         	musicGroupService.renewForCallback(order);
         }
-
         return "SUCCESS";
     }