shopUser增加 店铺名称字段
This commit is contained in:
@@ -7,9 +7,11 @@ import cn.hutool.core.util.RandomUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbMerchantAccountMapper;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbShopInfoMapper;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbShopUserMapper;
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbUserInfoMapper;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbMerchantAccount;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopInfo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopUser;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbUserInfo;
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.AuthUserDto;
|
||||
@@ -55,6 +57,8 @@ public class UserContoller {
|
||||
@Autowired
|
||||
private TbShopUserMapper shopUserMapper;
|
||||
@Autowired
|
||||
private TbShopInfoMapper shopInfoMapper;
|
||||
@Autowired
|
||||
private TbUserInfoMapper userInfoMapper;
|
||||
|
||||
// @GetMapping("/userInfo")
|
||||
@@ -80,6 +84,7 @@ public class UserContoller {
|
||||
@GetMapping("/shopUserInfo")
|
||||
public Result shopUserInfo(@RequestParam("userId") String userId ,@RequestHeader("openId") String openId,@RequestParam("shopId") String shopId ) throws Exception {
|
||||
TbShopUser shopUser=new TbShopUser();
|
||||
TbShopInfo tbShopInfo = shopInfoMapper.selectByPrimaryKey(Integer.valueOf(shopId));
|
||||
if (StringUtils.isNotBlank(shopId) && !shopId.equals("null")) {
|
||||
shopUser = shopUserMapper.selectByUserIdAndShopId(userId, shopId);
|
||||
if (ObjectUtil.isEmpty(shopUser)) {
|
||||
@@ -116,6 +121,7 @@ public class UserContoller {
|
||||
}else {
|
||||
shopUser.setAmount(BigDecimal.ZERO);
|
||||
}
|
||||
shopUser.setShopName(tbShopInfo.getShopName());
|
||||
return Result.success(CodeEnum.SUCCESS,shopUser);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ public class TbShopUser implements Serializable {
|
||||
private Long updatedAt;
|
||||
|
||||
private String miniOpenId;
|
||||
private String shopName;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -295,6 +296,14 @@ public class TbShopUser implements Serializable {
|
||||
return miniOpenId;
|
||||
}
|
||||
|
||||
public String getShopName() {
|
||||
return shopName;
|
||||
}
|
||||
|
||||
public void setShopName(String shopName) {
|
||||
this.shopName = shopName;
|
||||
}
|
||||
|
||||
public void setMiniOpenId(String miniOpenId) {
|
||||
this.miniOpenId = miniOpenId == null ? null : miniOpenId.trim();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user