|
|
|
@@ -56,15 +56,15 @@ public class WxMallApplyServiceImpl implements WxMallApplyService { |
|
|
|
@Override |
|
|
|
public ResultData saveOrUpdate(WxMallApply record) { |
|
|
|
|
|
|
|
WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); |
|
|
|
wxMsgValidationcode.setTenantId("1"); |
|
|
|
wxMsgValidationcode.setCode(record.getVerifyCode()); |
|
|
|
wxMsgValidationcode.setPhone(record.getPhone()); |
|
|
|
List<WxMsgValidationcode> wxmsgvalidationcodelist = wxMsgValidationcodeMapper.findList(wxMsgValidationcode); |
|
|
|
Date currentdate = new Date(); |
|
|
|
wxmsgvalidationcodelist = wxmsgvalidationcodelist.stream().filter(validationcode -> |
|
|
|
validationcode.getExpiretime().after(currentdate)).collect(Collectors.toList()); |
|
|
|
if(wxmsgvalidationcodelist.size()==0) return new ResultData(ErrorCode.MSG_VERIFY_CODE_NOT_FOUND.getCode(),ErrorCode.MSG_VERIFY_CODE_NOT_FOUND.getMessage(),true); |
|
|
|
// WxMsgValidationcode wxMsgValidationcode = new WxMsgValidationcode(); |
|
|
|
// wxMsgValidationcode.setTenantId("1"); |
|
|
|
// wxMsgValidationcode.setCode(record.getVerifyCode()); |
|
|
|
// wxMsgValidationcode.setPhone(record.getPhone()); |
|
|
|
// List<WxMsgValidationcode> wxmsgvalidationcodelist = wxMsgValidationcodeMapper.findList(wxMsgValidationcode); |
|
|
|
// Date currentdate = new Date(); |
|
|
|
// wxmsgvalidationcodelist = wxmsgvalidationcodelist.stream().filter(validationcode -> |
|
|
|
// validationcode.getExpiretime().after(currentdate)).collect(Collectors.toList()); |
|
|
|
// if(wxmsgvalidationcodelist.size()==0) return new ResultData(ErrorCode.MSG_VERIFY_CODE_NOT_FOUND.getCode(),ErrorCode.MSG_VERIFY_CODE_NOT_FOUND.getMessage(),true); |
|
|
|
|
|
|
|
if (record.getId() == null) { |
|
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
|
|