1. 优惠券调整
This commit is contained in:
parent
f43e93f7fa
commit
bea016d61c
|
@ -172,4 +172,7 @@ public class EtFeeRule extends BaseEntity
|
|||
/** 是否已删除*/
|
||||
@Excel(name = "是否已删除")
|
||||
private String isDeleted;
|
||||
|
||||
@Excel(name = "描述")
|
||||
private String description;
|
||||
}
|
||||
|
|
|
@ -3,13 +3,17 @@ package com.ruoyi.system.service.impl;
|
|||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.constant.ServiceConstants;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.system.domain.EtAreaRule;
|
||||
import com.ruoyi.system.domain.EtOperatingArea;
|
||||
import com.ruoyi.system.domain.vo.IntervalRuleVo;
|
||||
import com.ruoyi.system.domain.vo.StartingRuleVo;
|
||||
import com.ruoyi.system.mapper.EtAreaRuleMapper;
|
||||
import com.ruoyi.system.service.IEtOperatingAreaService;
|
||||
import com.ruoyi.system.service.IWxPayService;
|
||||
|
@ -86,7 +90,25 @@ public class EtFeeRuleServiceImpl implements IEtFeeRuleService
|
|||
SysDept sysDept = wxPayService.getDeptObjByAreaId(etFeeRule.getAreaId());
|
||||
etFeeRule.setDeptId(sysDept.getDeptId());
|
||||
}
|
||||
return etFeeRuleMapper.selectEtFeeRuleList(etFeeRule);
|
||||
List<EtFeeRule> etFeeRules = etFeeRuleMapper.selectEtFeeRuleList(etFeeRule);
|
||||
for (EtFeeRule rule:etFeeRules) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
String ridingRuleJson = rule.getRidingRuleJson();
|
||||
String unit = "";
|
||||
if(rule.getRidingRule().equals("1")){
|
||||
StartingRuleVo startingRule = JSONObject.parseObject(ridingRuleJson, StartingRuleVo.class);
|
||||
String rentalUnit = rule.getRentalUnit();
|
||||
if(rentalUnit.equals(ServiceConstants.RENTAL_UNIT_MINUTES)){
|
||||
unit = "分钟";
|
||||
}else if(rentalUnit.equals(ServiceConstants.RENTAL_UNIT_HOURS)){
|
||||
unit = "小时";
|
||||
}
|
||||
sb.append("起步价:"+startingRule.getStartingPrice()+"元(含"+startingRule.getStartingTime()+unit+"),");
|
||||
sb.append("超出价:"+startingRule.getTimeoutPrice()+"元/"+startingRule.getTimeoutTime()+unit);
|
||||
}
|
||||
rule.setDescription(sb.toString());
|
||||
}
|
||||
return etFeeRules;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user