| | |
| | | import com.doumee.dao.business.dao.SmsConfigMapper; |
| | | import com.doumee.dao.business.dao.SmsEmailMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.system.SystemUserMapper; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.SmsEmailService; |
| | | import com.doumee.service.business.third.EmayService; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | private EmayService emayService; |
| | | @Autowired |
| | | private SmsConfigMapper smsConfigMapper; |
| | | @Autowired |
| | | private SystemUserMapper systemUserMapper; |
| | | |
| | | @Value("${debug_model}") |
| | | private boolean debugModel; |
| | |
| | | if(StringUtils.isBlank(smsEmail.getPhone())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | //根据手机号查询用户 |
| | | if(systemUserMapper.selectCount(new QueryWrapper<SystemUser>().lambda().eq(SystemUser::getMobile,smsEmail.getPhone()))==Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对不起,手机号无效请检查后重试!"); |
| | | }; |
| | | String nowDate = DateUtil.getFomartDate(new Date(),"yyyy-MM-dd HH:mm:ss"); |
| | | if(smsEmailMapper.selectCount(new QueryWrapper<SmsEmail>().lambda() |
| | | .eq(SmsEmail::getPhone,smsEmail.getPhone()) |