|
@@ -8,19 +8,16 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
-import io.protostuff.Response;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
-import oracle.jdbc.proxy.annotation.Post;
|
|
|
import org.springblade.common.base.BaseEntity;
|
|
|
import org.springblade.common.cache.DictBizCache;
|
|
|
import org.springblade.common.cache.DictCache;
|
|
|
import org.springblade.common.constant.CommonConstant;
|
|
|
import org.springblade.common.enums.DictBizEnum;
|
|
|
import org.springblade.common.enums.DictEnum;
|
|
|
-import org.springblade.core.boot.ctrl.BladeController;
|
|
|
import org.springblade.core.cache.utils.CacheUtil;
|
|
|
import org.springblade.core.mp.support.Condition;
|
|
|
import org.springblade.core.mp.support.Query;
|
|
@@ -45,9 +42,10 @@ import org.springblade.modules.system.entity.Region;
|
|
|
import org.springblade.modules.system.entity.User;
|
|
|
import org.springblade.modules.system.entity.UserApp;
|
|
|
import org.springblade.modules.system.service.IRegionService;
|
|
|
+import org.springblade.modules.system.service.IUserMerchantService;
|
|
|
import org.springblade.modules.system.service.IUserService;
|
|
|
-import org.springblade.modules.system.service.impl.UserServiceImpl;
|
|
|
import org.springblade.modules.system.vo.UserAppVO;
|
|
|
+import org.springblade.modules.system.vo.UserMerchantVO;
|
|
|
import org.springframework.util.Assert;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
@@ -70,7 +68,7 @@ import static org.springblade.core.cache.constant.CacheConstant.USER_CACHE;
|
|
|
@AllArgsConstructor
|
|
|
@RequestMapping(CommonConstant.API_URL)
|
|
|
@Api(value = "我的", tags = "04.个人中心")
|
|
|
-public class UserCenterController extends BladeController {
|
|
|
+public class UserCenterController extends BaseController {
|
|
|
|
|
|
private final IUserAddressService userAddressService;
|
|
|
private final IUserFeedbacksService userFeedbacksService;
|
|
@@ -82,6 +80,8 @@ public class UserCenterController extends BladeController {
|
|
|
private final IFreightService freightService;
|
|
|
private final IUserCardInfoService userCardInfoService;
|
|
|
private final BladeRedis bladeRedis;
|
|
|
+ private final IUserMerchantService iUserMerchantService;
|
|
|
+
|
|
|
@Resource
|
|
|
private IMessageService messageService;
|
|
|
@Resource
|
|
@@ -124,6 +124,15 @@ public class UserCenterController extends BladeController {
|
|
|
user.setSex(request.getSex());
|
|
|
user.setPhone(request.getPhone());
|
|
|
user.setWxQrcode(request.getWxQrcode());
|
|
|
+
|
|
|
+ if (!isMerchant()){//子账号可以更新身份证号码
|
|
|
+ UserMerchantVO userMerchantVO1 = iUserMerchantService.getByUserId(user.getId());
|
|
|
+ if (Objects.nonNull(userMerchantVO1)){
|
|
|
+ userMerchantVO1.setIdCard(request.getIdCard());
|
|
|
+ iUserMerchantService.updateById(userMerchantVO1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
boolean flg = userService.updateById(user);
|
|
|
if (flg){
|
|
|
//清除缓存
|