Merge remote-tracking branch 'origin/test' into test

This commit is contained in:
2024-11-05 16:31:33 +08:00

View File

@@ -30,15 +30,17 @@ public class TbPointsBasicSettingServiceImpl extends ServiceImpl<TbPointsBasicSe
@Transactional(rollbackFor = Exception.class)
public boolean save(TbPointsBasicSetting entity) {
try {
Assert.notNull(entity.getShopId(), "{}({})不能为空", "店铺id","shopId");
Assert.notNull(entity.getEnableRewards(), "{}({})不能为空", "开启消费赠送积分","enableRewards");
Assert.notNull(entity.getConsumeAmount(), "{}({})不能为空", "每消费xx元赠送1积分","consumeAmount");
Assert.notNull(entity.getEnableDeduction(), "{}({})不能为空", "开启下单积分抵扣","enableDeduction");
Assert.notNull(entity.getMinPaymentAmount(), "{}({})不能为空", "下单实付抵扣门槛","minPaymentAmount");
Assert.notNull(entity.getMaxDeductionRatio(), "{}({})不能为空", "下单最高抵扣比例","maxDeductionRatio");
Assert.notNull(entity.getEquivalentPoints(), "{}({})不能为空", "下单抵扣积分比例","equivalentPoints");
Assert.notNull(entity.getEnablePointsMall(), "{}({})不能为空", "开启积分商城","enablePointsMall");
Assert.notEmpty(entity.getBrowseMode(), "{}({})不能为空", "浏览模式","browseMode");
Assert.notNull(entity.getShopId(), "{}({})不能为空", "店铺id", "shopId");
Assert.notNull(entity.getEnableRewards(), "{}({})不能为空", "开启消费赠送积分", "enableRewards");
Assert.notEmpty(entity.getRewardsGroup(), "{}({})不能为空", "赠积分适用群体", "rewardsGroup");
Assert.notNull(entity.getConsumeAmount(), "{}({})不能为空", "每消费xx元赠送1积分", "consumeAmount");
Assert.notNull(entity.getEnableDeduction(), "{}({})不能为空", "开启下单积分抵扣", "enableDeduction");
Assert.notEmpty(entity.getDeductionGroup(), "{}({})不能为空", "抵扣适用群体", "deductionGroup");
Assert.notNull(entity.getMinPaymentAmount(), "{}({})不能为空", "下单实付抵扣门槛", "minPaymentAmount");
Assert.notNull(entity.getMaxDeductionRatio(), "{}({})不能为空", "下单最高抵扣比例", "maxDeductionRatio");
Assert.notNull(entity.getEquivalentPoints(), "{}({})不能为空", "下单抵扣积分比例", "equivalentPoints");
Assert.notNull(entity.getEnablePointsMall(), "{}({})不能为空", "开启积分商城", "enablePointsMall");
Assert.notEmpty(entity.getBrowseMode(), "{}({})不能为空", "浏览模式", "browseMode");
} catch (IllegalArgumentException e) {
throw new MsgException(e.getMessage());
}