|  | @@ -17,8 +17,10 @@ import com.ym.mec.common.entity.ImUserModel;
 | 
	
		
			
				|  |  |  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 com.ym.mec.util.string.MessageFormatter;
 | 
	
		
			
				|  |  |  import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.stereotype.Service;
 | 
	
	
		
			
				|  | @@ -65,7 +67,11 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private SysConfigDao sysConfigDao;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  | +    private SysMessageService sysMessageService;
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  |      private SysMessageConfigDao sysMessageConfigDao;
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  | +    private MusicGroupDao musicGroupDao;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  |      public BaseDAO<Long, StudentRegistration> getDAO() {
 | 
	
	
		
			
				|  | @@ -188,10 +194,15 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
 | 
	
		
			
				|  |  |          //增加报名学生数
 | 
	
		
			
				|  |  |          musicGroupSubjectPlanService.addApplyStudentNum(studentRegistration.getMusicGroupId(), studentRegistration.getSubjectId(),1);
 | 
	
		
			
				|  |  |          //报名成功后,发送短信
 | 
	
		
			
				|  |  | -//        String studentApplyUrl = sysConfigDao.findConfigValue("student_apply_url" + studentRegistration.getMusicGroupId());
 | 
	
		
			
				|  |  | -//        sysMessageConfigDao.findContent(MessageTypeEnum.SMS_APPLY_MESSAGE.getCode());
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -        sysConfigDao.findConfigValue("");
 | 
	
		
			
				|  |  | +        String studentApplyUrl = sysConfigDao.findConfigValue("student_apply_url" + studentRegistration.getMusicGroupId());
 | 
	
		
			
				|  |  | +        String content = sysMessageConfigDao.findContent(MessageTypeEnum.SMS_APPLY_MESSAGE.getCode());
 | 
	
		
			
				|  |  | +        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("server_phone")),
 | 
	
		
			
				|  |  | +                studentRegistration.getParentsPhone(),date,0,null);
 | 
	
		
			
				|  |  |          return studentRegistration;
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 |