Commit b506bcb9 by guojuxing

实付配置调整

parent 9123b25c
......@@ -43,6 +43,11 @@ public class DataActuallyPaidConfig implements Serializable{
*/
private boolean hasConfigPerformanceCount;
/**
* 是否已经配置过会员业务(积分折扣(商品)、等级折扣(商品)
*/
private boolean hasConfigMemberBusinessOfGoods;
public Integer getEnterpriseId() {
return enterpriseId;
}
......@@ -96,4 +101,13 @@ public class DataActuallyPaidConfig implements Serializable{
this.memberBusinessOfGoods = memberBusinessOfGoods;
return this;
}
public boolean isHasConfigMemberBusinessOfGoods() {
return hasConfigMemberBusinessOfGoods;
}
public DataActuallyPaidConfig setHasConfigMemberBusinessOfGoods(boolean hasConfigMemberBusinessOfGoods) {
this.hasConfigMemberBusinessOfGoods = hasConfigMemberBusinessOfGoods;
return this;
}
}
......@@ -141,30 +141,36 @@ public class DataConfigApiServiceImpl implements DataConfigApiService {
if (!isRight) {
ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "参数不能为空");
}
list.add(new DataActuallyPaidConfigDTO()
.setEnterpriseId(enterpriseId)
.setClassify(1)
.setConfigStatus(memberBusiness));
list.add(new DataActuallyPaidConfigDTO()
.setEnterpriseId(enterpriseId)
.setClassify(2)
.setConfigStatus(memberBusiness));
list.add(new DataActuallyPaidConfigDTO()
.setEnterpriseId(enterpriseId)
.setClassify(3)
.setConfigStatus(performanceCount));
list.add(new DataActuallyPaidConfigDTO()
.setEnterpriseId(enterpriseId)
.setClassify(4)
.setConfigStatus(performanceCount));
list.add(new DataActuallyPaidConfigDTO()
.setEnterpriseId(enterpriseId)
.setClassify(5)
.setConfigStatus(performanceCount));
list.add(new DataActuallyPaidConfigDTO()
.setEnterpriseId(enterpriseId)
.setClassify(6)
.setConfigStatus(memberBusinessOfGoods));
if (memberBusiness != null) {
list.add(new DataActuallyPaidConfigDTO()
.setEnterpriseId(enterpriseId)
.setClassify(1)
.setConfigStatus(memberBusiness));
list.add(new DataActuallyPaidConfigDTO()
.setEnterpriseId(enterpriseId)
.setClassify(2)
.setConfigStatus(memberBusiness));
}
if (performanceCount != null) {
list.add(new DataActuallyPaidConfigDTO()
.setEnterpriseId(enterpriseId)
.setClassify(3)
.setConfigStatus(performanceCount));
list.add(new DataActuallyPaidConfigDTO()
.setEnterpriseId(enterpriseId)
.setClassify(4)
.setConfigStatus(performanceCount));
list.add(new DataActuallyPaidConfigDTO()
.setEnterpriseId(enterpriseId)
.setClassify(5)
.setConfigStatus(performanceCount));
}
if (memberBusinessOfGoods != null) {
list.add(new DataActuallyPaidConfigDTO()
.setEnterpriseId(enterpriseId)
.setClassify(6)
.setConfigStatus(memberBusinessOfGoods));
}
return configActuallyPaid(list);
}
......@@ -205,6 +211,7 @@ public class DataConfigApiServiceImpl implements DataConfigApiService {
.setPerformanceCount(performanceCount)
.setHasConfigMemberBusiness(dataActuallyPaidConfigService.count(enterpriseId, 1) > 0)
.setHasConfigPerformanceCount(dataActuallyPaidConfigService.count(enterpriseId, 3) > 0)
.setHasConfigMemberBusinessOfGoods(dataActuallyPaidConfigService.count(enterpriseId, 6) > 0)
.setMemberBusinessOfGoods(memberBusinessOfGoods));
}
return ServiceResponse.success(new DataActuallyPaidConfig().setEnterpriseId(enterpriseId).setMemberBusiness(0).setPerformanceCount(0).setMemberBusinessOfGoods(0));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment