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