mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-19 18:45:03 +08:00
update 修改查询停车减免接口字段
This commit is contained in:
@@ -35,4 +35,18 @@ public enum ParkingPlatformEnum {
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据code获取label
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
public static String getByCode(String code) {
|
||||
for (ParkingPlatformEnum value : ParkingPlatformEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value.getLabel();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.jsowell.pile.service.impl;
|
||||
|
||||
import com.jsowell.common.constant.CacheConstants;
|
||||
import com.jsowell.common.core.redis.RedisCache;
|
||||
import com.jsowell.common.enums.parkplatform.ParkingPlatformEnum;
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.pile.domain.CarCouponRecord;
|
||||
import com.jsowell.pile.dto.ParkingCouponRecordQueryDTO;
|
||||
@@ -11,7 +12,9 @@ import com.jsowell.pile.vo.uniapp.customer.ParkingOrderVO;
|
||||
import com.jsowell.pile.vo.web.ParkingCouponRecordVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@@ -123,7 +126,9 @@ public class CarCouponRecordServiceImpl implements CarCouponRecordService {
|
||||
@Override
|
||||
public List<ParkingCouponRecordVO> selectParkingCouponRecordList(ParkingCouponRecordQueryDTO queryDTO) {
|
||||
List<ParkingCouponRecordVO> list = carCouponRecordMapper.selectParkingCouponRecordList(queryDTO);
|
||||
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
// 循环list,将各参数值换成汉字
|
||||
for (ParkingCouponRecordVO parkingCouponRecordVO : list) {
|
||||
String conditionType = parkingCouponRecordVO.getConditionType();
|
||||
@@ -138,6 +143,9 @@ public class CarCouponRecordServiceImpl implements CarCouponRecordService {
|
||||
} else if ("2".equals(discountType)) {
|
||||
parkingCouponRecordVO.setDiscountType("减免停车金额(单位:元)");
|
||||
}
|
||||
String parkingPlatformId = parkingCouponRecordVO.getParkingPlatformId();
|
||||
String label = ParkingPlatformEnum.getByCode(parkingPlatformId);
|
||||
parkingCouponRecordVO.setParkingPlatformName(label);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,10 @@ public class ParkingCouponRecordVO {
|
||||
private String returnMsg;
|
||||
|
||||
@ApiModelProperty("停车平台ID")
|
||||
private Integer parkingPlatformId;
|
||||
private String parkingPlatformId;
|
||||
|
||||
@ApiModelProperty("停车平台名称")
|
||||
private String parkingPlatformName;
|
||||
|
||||
@ApiModelProperty("条件类型(1-固定电量;2-固定时长)")
|
||||
private String conditionType;
|
||||
|
||||
Reference in New Issue
Block a user