Commit 663068b9 by giaogiao

修复bug :更换手机号更换成已注册的手机可以更换成功,从新登录时提示系统异常

parent 6733ad5b
...@@ -31,6 +31,14 @@ public interface AppUserApiService { ...@@ -31,6 +31,14 @@ public interface AppUserApiService {
*/ */
boolean updateAppUser(AppUserInfoParam appUserInfoParam) throws Exception; boolean updateAppUser(AppUserInfoParam appUserInfoParam) throws Exception;
/**
* 修改手机号
* @param phoneArea
* @param phone
* @param code
* @return
* @throws Exception
*/
ApiResult<Boolean> updatePhone(String phoneArea, String phone, String code) throws Exception; ApiResult<Boolean> updatePhone(String phoneArea, String phone, String code) throws Exception;
......
...@@ -44,6 +44,15 @@ public class AppUserApiServiceImpl implements AppUserApiService { ...@@ -44,6 +44,15 @@ public class AppUserApiServiceImpl implements AppUserApiService {
// 删除已使用的验证码 // 删除已使用的验证码
appSmsService.deleteUpdatePhoneCode(appUserById.getPhoneArea(), appUserById.getPhone()); appSmsService.deleteUpdatePhoneCode(appUserById.getPhoneArea(), appUserById.getPhone());
// 判断手机号是否已经注册
AppUser one = appUserService.getOne(new QueryWrapper<AppUser>().lambda()
.eq(AppUser::getPhoneArea, phoneArea)
.eq(AppUser::getPhone, phone));
if (one != null) {
return ApiResult.fail(ApiCode.BUSINESS_EXCEPTION);
}
AppUser appUser = new AppUser(); AppUser appUser = new AppUser();
appUser.setPhoneArea(phoneArea); appUser.setPhoneArea(phoneArea);
appUser.setPhone(phone); appUser.setPhone(phone);
......
...@@ -70,13 +70,13 @@ public class StrokeQueryVo implements Serializable { ...@@ -70,13 +70,13 @@ public class StrokeQueryVo implements Serializable {
@ApiModelProperty("返程飞机型号ID") @ApiModelProperty("返程飞机型号ID")
private Long arrivePlainTypeId; private Long arrivePlainTypeId;
@NotBlank(message = "返程出发机场名称不能为空") // @NotBlank(message = "返程出发机场名称不能为空")
@ApiModelProperty("返程出发机场名称") // @ApiModelProperty("返程出发机场名称")
private String backOutsetAirportName; // private String backOutsetAirportName;
//
@NotBlank(message = "返程到达机场名称不能为空") // @NotBlank(message = "返程到达机场名称不能为空")
@ApiModelProperty("返程到达机场名称") // @ApiModelProperty("返程到达机场名称")
private String backArriveAirportName; // private String backArriveAirportName;
@NotNull(message = "付款状态不能为空") @NotNull(message = "付款状态不能为空")
@ApiModelProperty("付款状态,0-未付款,1-付款中,2-已付款,3-退款中,99-已退款") @ApiModelProperty("付款状态,0-未付款,1-付款中,2-已付款,3-退款中,99-已退款")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment