超级会员相关
This commit is contained in:
@@ -91,7 +91,8 @@ public class TbMemberConfigServiceImpl extends ServiceImpl<TbMemberConfigMapper,
|
||||
public Boolean edit(Long shopId, MemberConfigDTO memberDTO) {
|
||||
TbMemberConfig memberConfig = getOne(new QueryWrapper().eq(TbMemberConfig::getShopId, shopId));
|
||||
BeanUtil.copyProperties(memberDTO, memberConfig);
|
||||
if ((memberDTO.getConfigList() == null || memberDTO.getConfigList().isEmpty()) && memberDTO.getOpenAmount() == null) {
|
||||
if ((memberDTO.getConfigList() == null || memberDTO.getConfigList().isEmpty()) &&
|
||||
(memberDTO.getConditionList() == null || memberDTO.getConditionList().isEmpty())) {
|
||||
throw new CzgException("会员开通方式必须选择一个");
|
||||
}
|
||||
|
||||
@@ -106,7 +107,8 @@ public class TbMemberConfigServiceImpl extends ServiceImpl<TbMemberConfigMapper,
|
||||
memberConfig.setConditionList(null);
|
||||
}
|
||||
|
||||
if (memberConfig.getConfigList() != null && !memberConfig.getConfigList().isEmpty() && memberConfig.getOpenAmount() != null) {
|
||||
if (memberConfig.getConfigList() != null && !memberConfig.getConfigList().isEmpty() &&
|
||||
(memberConfig.getConditionList() != null || !memberConfig.getConditionList().isEmpty())) {
|
||||
throw new CzgException("会员开通方式为单选条件");
|
||||
}
|
||||
|
||||
@@ -122,7 +124,7 @@ public class TbMemberConfigServiceImpl extends ServiceImpl<TbMemberConfigMapper,
|
||||
// });
|
||||
|
||||
memberConfig.setConditionList(JSONObject.toJSONString(memberDTO.getConditionList()));
|
||||
memberConfig.setOpenAmount(null);
|
||||
memberConfig.setConfigList(null);
|
||||
}
|
||||
|
||||
if (memberDTO.getMemberPriceShopIdList() != null && !memberDTO.getMemberPriceShopIdList().isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user