|
|
|
@@ -568,6 +568,11 @@ public class WxEnergyServiceImpl implements WxEnergyService { |
|
|
|
msf.setIsPublic(fees.getIsPublic()); |
|
|
|
msf.setFeesId(fees.getId()); |
|
|
|
msf.setPrice(fees.getPrice()); |
|
|
|
if (fees.getIsPublic() == EnumYesOrNo.YES.getCode()) { |
|
|
|
if (null == record.getFormulaList() || record.getFormulaList().size() <= 0 || StringUtils.isBlank(record.getFormula())) { |
|
|
|
throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"请设置公式"); |
|
|
|
} |
|
|
|
} |
|
|
|
if (null != record.getFormulaContentList() && record.getFormulaContentList().size() > 0 ) { |
|
|
|
msf.setFormulaContent(JSON.toJSONString(record.getFormulaContentList())); |
|
|
|
} |
|
|
|
@@ -601,6 +606,11 @@ public class WxEnergyServiceImpl implements WxEnergyService { |
|
|
|
public void updateFeesShop(WxEnergyFeesShop record) { |
|
|
|
Date date = new Date(); |
|
|
|
record.setUpdateTime(date); |
|
|
|
if (record.getIsPublic() == EnumYesOrNo.YES.getCode()) { |
|
|
|
if (null == record.getFormulaList() || record.getFormulaList().size() <= 0 || StringUtils.isBlank(record.getFormula())) { |
|
|
|
throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"请设置公式"); |
|
|
|
} |
|
|
|
} |
|
|
|
if (null != record.getFormulaContentList() && record.getFormulaContentList().size() > 0 ) { |
|
|
|
record.setFormulaContent(JSON.toJSONString(record.getFormulaContentList())); |
|
|
|
} |
|
|
|
|