添加店铺初始化支付方式
This commit is contained in:
@@ -19,4 +19,6 @@ public interface ShopPayTypeService extends IService<ShopPayType> {
|
||||
Boolean add(Long shopId, ShopPayType shopPayType);
|
||||
|
||||
Boolean edit(Long shopId, ShopPayTypeDTO shopPayTypeDTO);
|
||||
|
||||
void addInfo(Long shopId);
|
||||
}
|
||||
|
||||
@@ -59,6 +59,8 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
|
||||
private ShopExtendService shopExtendService;
|
||||
@Resource
|
||||
private RedisService redisService;
|
||||
@Resource
|
||||
private ShopPayTypeService shopPayTypeService;
|
||||
|
||||
@DubboReference
|
||||
private SysParamsService sysParamsService;
|
||||
@@ -144,6 +146,9 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
|
||||
if (StrUtil.isNotBlank(shopInfoAddDTO.getActivateCode())) {
|
||||
activateShop(shopInfo, shopInfoAddDTO.getActivateCode());
|
||||
}
|
||||
|
||||
// 增加支付方式
|
||||
shopPayTypeService.addInfo(shopInfo.getId());
|
||||
return updateById(shopInfo);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,11 +29,13 @@ public class ShopPayTypeServiceImpl extends ServiceImpl<ShopPayTypeMapper, ShopP
|
||||
"cash", "现金",
|
||||
"bank", "银行卡",
|
||||
"scanCode", "扫码支付",
|
||||
"deposit", "储值卡"
|
||||
"deposit", "储值卡",
|
||||
"virtual", "挂账支付"
|
||||
);
|
||||
|
||||
private void addInfo(Long shopId) {
|
||||
payTypeMap.forEach((k, v) -> save(new ShopPayType().setPayType(k).setPayName(v).setShopId(shopId)));
|
||||
@Override
|
||||
public void addInfo(Long shopId) {
|
||||
payTypeMap.forEach((k, v) -> save(new ShopPayType().setPayType(k).setPayName(v).setShopId(shopId).setIsShowShortcut("挂账支付".equals(v) ? 0 : 1)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
and a.area_id=#{areaId}
|
||||
</if>
|
||||
<if test="tableCode != null and tableCode != ''">
|
||||
and a.area_id=#{areaId}
|
||||
and a.table_code=#{tableCode}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
and a.status=#{status}
|
||||
|
||||
Reference in New Issue
Block a user