超级会员相关
This commit is contained in:
parent
5a6a34d85b
commit
de5229051c
|
|
@ -62,11 +62,6 @@ public class MemberConfigDTO {
|
|||
@Valid
|
||||
private List<condition> conditionList;
|
||||
|
||||
/**
|
||||
* 购买开通金额
|
||||
*/
|
||||
@DecimalMin(value = "0.01", message = "金额不能小于0.01")
|
||||
private BigDecimal openAmount;
|
||||
|
||||
/**
|
||||
* 参与会员价门店
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ import lombok.NoArgsConstructor;
|
|||
@Table("tb_member_config")
|
||||
public class TbMemberConfig implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
|
|
@ -52,10 +51,6 @@ public class TbMemberConfig implements Serializable {
|
|||
*/
|
||||
private String conditionList;
|
||||
|
||||
/**
|
||||
* 购买开通金额
|
||||
*/
|
||||
private BigDecimal openAmount;
|
||||
|
||||
/**
|
||||
* 参与会员价门店
|
||||
|
|
|
|||
|
|
@ -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()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue