feat: 店铺信息返回霸王餐相关配置
This commit is contained in:
@@ -25,7 +25,7 @@ public class TbFreeDineConfig implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 是否启用
|
* 是否启用
|
||||||
*/
|
*/
|
||||||
private Integer enable;
|
private Integer enable = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 充值多少倍免单
|
* 充值多少倍免单
|
||||||
|
|||||||
@@ -107,9 +107,11 @@ public class ProductService {
|
|||||||
private RedisUtil redisUtil;
|
private RedisUtil redisUtil;
|
||||||
@Autowired
|
@Autowired
|
||||||
private StringRedisTemplate stringRedisTemplate;
|
private StringRedisTemplate stringRedisTemplate;
|
||||||
|
private final TbFreeDineConfigService freeDineConfigService;
|
||||||
|
|
||||||
public ProductService(ShopUtils shopUtils) {
|
public ProductService(ShopUtils shopUtils, TbFreeDineConfigService freeDineConfigService) {
|
||||||
this.shopUtils = shopUtils;
|
this.shopUtils = shopUtils;
|
||||||
|
this.freeDineConfigService = freeDineConfigService;
|
||||||
}
|
}
|
||||||
|
|
||||||
private TbOrderInfo getCurrentOrder(ShopEatTypeInfoDTO eatTypeInfoDTO, String tableId, Object shopId) {
|
private TbOrderInfo getCurrentOrder(ShopEatTypeInfoDTO eatTypeInfoDTO, String tableId, Object shopId) {
|
||||||
@@ -167,6 +169,12 @@ public class ProductService {
|
|||||||
concurrentMap.put("storeInfo", shopInfo);
|
concurrentMap.put("storeInfo", shopInfo);
|
||||||
concurrentMap.put("distance", distance);
|
concurrentMap.put("distance", distance);
|
||||||
TbShopUser shopUser = tbShopUserMapper.selectByUserIdAndShopId(userId, shopId != null ? shopId.toString() : tbShopTable.getShopId().toString());
|
TbShopUser shopUser = tbShopUserMapper.selectByUserIdAndShopId(userId, shopId != null ? shopId.toString() : tbShopTable.getShopId().toString());
|
||||||
|
TbFreeDineConfig freeDineConfig = freeDineConfigService.getOne(new LambdaQueryWrapper<TbFreeDineConfig>()
|
||||||
|
.eq(TbFreeDineConfig::getShopId, shopId));
|
||||||
|
if (freeDineConfig == null) {
|
||||||
|
freeDineConfig = new TbFreeDineConfig();
|
||||||
|
}
|
||||||
|
concurrentMap.put("freeDingConfig", freeDineConfig);
|
||||||
try {
|
try {
|
||||||
if (ObjectUtil.isEmpty(shopUser)) {
|
if (ObjectUtil.isEmpty(shopUser)) {
|
||||||
TbUserInfo tbUserInfo = tbUserInfoMapper.selectByPrimaryKey(Integer.valueOf(userId));
|
TbUserInfo tbUserInfo = tbUserInfoMapper.selectByPrimaryKey(Integer.valueOf(userId));
|
||||||
|
|||||||
Reference in New Issue
Block a user