|
|
@@ -70,19 +70,20 @@ public class ContactUsServiceImpl extends ServiceImpl<IContactUsMapper, ContactU
|
|
|
String redisKey2 = String.format(RedisKeyUtil.CONTACT_US_KEY,uuid);
|
|
|
|
|
|
User user = userService.getByUserName(contactUs.getEmail());
|
|
|
+ contactUs.setCountry(IPUtils.getCountry(contactUs.getIpAddress()));
|
|
|
if(user !=null){
|
|
|
- return;
|
|
|
+ mailTemplateService.sendContactUs2(contactUs.getEmail());
|
|
|
+ this.save(contactUs);
|
|
|
+ return;
|
|
|
}
|
|
|
String callBackUrl = ucenterConfig.getContactUsCallBackUrl() + uuid;
|
|
|
Boolean b = mailTemplateService.sendContactUs(contactUs.getEmail(),callBackUrl);
|
|
|
-
|
|
|
if(!b){
|
|
|
throw new BusinessException(ResultCode.email_submit_error);
|
|
|
}
|
|
|
- contactUs.setCountry(IPUtils.getCountry(contactUs.getIpAddress()));
|
|
|
this.save(contactUs);
|
|
|
- redisUtil.set(redisKey, uuid,7* 24 * 60 * 60);
|
|
|
- redisUtil.set(redisKey2, JSONObject.toJSONString(contactUs),7* 24 * 60 * 60);
|
|
|
+ redisUtil.set(redisKey, uuid,ucenterConfig.getEmailExTime());
|
|
|
+ redisUtil.set(redisKey2, JSONObject.toJSONString(contactUs),ucenterConfig.getEmailExTime());
|
|
|
}
|
|
|
|
|
|
@Override
|