master
wangning 8 years ago
parent f32c5f78e2
commit c2595dec95

@ -148,5 +148,5 @@ public interface RetailAppService {
void applyToCompliance(JSONObject device); void applyToCompliance(JSONObject device);
void sendVerifyEmail(JSONObject device); JSONObject sendVerifyEmail(JSONObject device);
} }

@ -388,7 +388,7 @@ public class RetailAppServiceImp implements RetailAppService {
} }
@Override @Override
public void sendVerifyEmail(JSONObject device) { public JSONObject sendVerifyEmail(JSONObject device) {
JSONObject client = clientManager.getClientInfo(device.getIntValue("client_id")); JSONObject client = clientManager.getClientInfo(device.getIntValue("client_id"));
JSONObject account = clientAccountMapper.findById(device.getString("account_id")); JSONObject account = clientAccountMapper.findById(device.getString("account_id"));
if(client==null){ if(client==null){
@ -398,6 +398,9 @@ public class RetailAppServiceImp implements RetailAppService {
throw new NotFoundException("Account Not Found"); throw new NotFoundException("Account Not Found");
} }
clientManager.sendVerifyEmail(client,account.getString("account_id")); clientManager.sendVerifyEmail(client,account.getString("account_id"));
JSONObject result = new JSONObject();
result.put("email",client.getString("contact_email"));
return result;
} }
@Override @Override

@ -266,8 +266,8 @@ public class RetailAppController {
@RequestMapping(value = "/client/verify/email", method = RequestMethod.PUT) @RequestMapping(value = "/client/verify/email", method = RequestMethod.PUT)
@ResponseBody @ResponseBody
public void sendVerifyEmail(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) { public JSONObject sendVerifyEmail(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
retailAppService.sendVerifyEmail(device); return retailAppService.sendVerifyEmail(device);
} }
@RequestMapping(value = "/client/check", method = RequestMethod.GET) @RequestMapping(value = "/client/check", method = RequestMethod.GET)

Loading…
Cancel
Save