shopUser返回店铺拓展参数
This commit is contained in:
@@ -1,11 +1,14 @@
|
|||||||
package com.czg.account.dto.shopuser;
|
package com.czg.account.dto.shopuser;
|
||||||
|
|
||||||
|
import com.czg.account.entity.ShopExtend;
|
||||||
import com.czg.account.entity.ShopInfo;
|
import com.czg.account.entity.ShopInfo;
|
||||||
import com.czg.account.entity.ShopUser;
|
import com.czg.account.entity.ShopUser;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Administrator
|
* @author Administrator
|
||||||
@@ -30,6 +33,13 @@ public class ShopUserDetailDTO extends ShopUser {
|
|||||||
*/
|
*/
|
||||||
private Long shopId;
|
private Long shopId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 店铺信息
|
||||||
|
*/
|
||||||
private ShopInfo shopInfo;
|
private ShopInfo shopInfo;
|
||||||
|
/**
|
||||||
|
* 店铺拓展参数
|
||||||
|
*/
|
||||||
|
private List<ShopExtend> shopExtendList = new ArrayList<>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,10 +6,7 @@ import cn.hutool.core.util.RandomUtil;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.czg.account.dto.shopuser.*;
|
import com.czg.account.dto.shopuser.*;
|
||||||
import com.czg.account.entity.*;
|
import com.czg.account.entity.*;
|
||||||
import com.czg.account.service.ShopActivateCouponRecordService;
|
import com.czg.account.service.*;
|
||||||
import com.czg.account.service.ShopUserFlowService;
|
|
||||||
import com.czg.account.service.ShopUserService;
|
|
||||||
import com.czg.account.service.UserInfoService;
|
|
||||||
import com.czg.config.RedisCst;
|
import com.czg.config.RedisCst;
|
||||||
import com.czg.exception.ApiNotPrintException;
|
import com.czg.exception.ApiNotPrintException;
|
||||||
import com.czg.resp.CzgResult;
|
import com.czg.resp.CzgResult;
|
||||||
@@ -32,6 +29,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -55,6 +53,8 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
|||||||
private ShopActivateCouponRecordService shopActivateCouponRecordService;
|
private ShopActivateCouponRecordService shopActivateCouponRecordService;
|
||||||
@Resource
|
@Resource
|
||||||
private ShopInfoMapper shopInfoMapper;
|
private ShopInfoMapper shopInfoMapper;
|
||||||
|
@Resource
|
||||||
|
private ShopExtendService shopExtendService;
|
||||||
|
|
||||||
private ShopUser getUserInfo(Long shopId, Long shopUserId) {
|
private ShopUser getUserInfo(Long shopId, Long shopUserId) {
|
||||||
ShopUser shopUser = queryChain().eq(ShopUser::getShopId, shopId).eq(ShopUser::getId, shopUserId).one();
|
ShopUser shopUser = queryChain().eq(ShopUser::getShopId, shopId).eq(ShopUser::getId, shopUserId).one();
|
||||||
@@ -279,6 +279,8 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
|||||||
shopUserDetailDTO.setShopName(shopInfo.getShopName());
|
shopUserDetailDTO.setShopName(shopInfo.getShopName());
|
||||||
shopUserDetailDTO.setShopId(shopInfo.getId());
|
shopUserDetailDTO.setShopId(shopInfo.getId());
|
||||||
shopUserDetailDTO.setShopInfo(shopInfo);
|
shopUserDetailDTO.setShopInfo(shopInfo);
|
||||||
|
List<ShopExtend> shopExtends = shopExtendService.list(new QueryWrapper().eq(ShopExtend::getShopId, shopInfo.getId()));
|
||||||
|
shopUserDetailDTO.setShopExtendList(shopExtends);
|
||||||
}
|
}
|
||||||
return shopUserDetailDTO;
|
return shopUserDetailDTO;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user