支付方式接口修改
This commit is contained in:
parent
04f9457916
commit
51743ff067
|
|
@ -45,8 +45,10 @@ public class ShopPayTypeServiceImpl extends ServiceImpl<ShopPayTypeMapper, ShopP
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean add(Long shopId, ShopPayType shopPayType) {
|
public Boolean add(Long shopId, ShopPayType shopPayType) {
|
||||||
long count = count(new QueryWrapper().eq(ShopPayType::getPayType, shopPayType.getPayType()).or(r -> {
|
long count = count(new QueryWrapper().eq(ShopPayType::getShopId, shopId).and(r -> {
|
||||||
r.eq(ShopPayType::getPayName, shopPayType.getPayName());
|
r.eq(ShopPayType::getPayType, shopPayType.getPayType()).or(r1 -> {
|
||||||
|
r1.eq(ShopPayType::getPayName, shopPayType.getPayName());
|
||||||
|
});
|
||||||
}));
|
}));
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
throw new ApiNotPrintException("支付方式或支付名称已存在");
|
throw new ApiNotPrintException("支付方式或支付名称已存在");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue