Commit 207cb0a9 by 吕明尚

Merge branch 'dev' into test

parents 8406a1d0 5e7ba8fb
......@@ -78,7 +78,7 @@ public class PackServiceImpl extends ServiceImpl<PackMapper, SPack> implements I
public int insertPack(SPack sPack) {
sPack.setCreateTime(DateUtils.getNowDate());
if (sPack.getType().equals(YesNoEnum.yes.getIndex())) {
if ((Integer.parseInt(sPack.getPackaEndPeriod()) - Integer.parseInt(sPack.getPackaStartPeriod())) != Integer.parseInt(sPack.getDuration())) {
if ((Double.parseDouble(sPack.getPackaEndPeriod()) - Double.parseDouble(sPack.getPackaStartPeriod())) != Double.parseDouble(sPack.getDuration())) {
throw new BaseException("套餐时长和使用时长不匹配!");
}
}
......@@ -95,7 +95,7 @@ public class PackServiceImpl extends ServiceImpl<PackMapper, SPack> implements I
public int updatePack(SPack SPack) {
SPack.setUpdateTime(DateUtils.getNowDate());
if (SPack.getType().equals(YesNoEnum.yes.getIndex())) {
if ((Integer.parseInt(SPack.getPackaEndPeriod()) - Integer.parseInt(SPack.getPackaStartPeriod())) != Integer.parseInt(SPack.getDuration())) {
if ((Double.parseDouble(SPack.getPackaEndPeriod()) - Double.parseDouble(SPack.getPackaStartPeriod())) != Double.parseDouble(SPack.getDuration())) {
throw new BaseException("套餐时长和使用时长不匹配!");
}
}
......
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