mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-02 17:10:03 +08:00
深圳停车平台
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package com.jsowell.pile.service;
|
||||
|
||||
import com.jsowell.pile.domain.ChargeParkingDiscount;
|
||||
import com.jsowell.pile.vo.web.ChargeParkingDiscountVO;
|
||||
|
||||
import java.util.List;
|
||||
public interface ChargeParkingDiscountService{
|
||||
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insertSelective(ChargeParkingDiscount record);
|
||||
|
||||
ChargeParkingDiscount selectByPrimaryKey(Integer id);
|
||||
|
||||
/**
|
||||
* 根据车场ID查询车场信息
|
||||
* @param stationId
|
||||
* @return
|
||||
*/
|
||||
ChargeParkingDiscount selectByStationId(String stationId);
|
||||
|
||||
ChargeParkingDiscountVO getChargeParkingDiscount(String stationId);
|
||||
|
||||
int updateByPrimaryKeySelective(ChargeParkingDiscount record);
|
||||
|
||||
int updateBatchSelective(List<ChargeParkingDiscount> list);
|
||||
|
||||
int batchInsert(List<ChargeParkingDiscount> list);
|
||||
|
||||
int insertOrUpdate(ChargeParkingDiscount record);
|
||||
|
||||
int insertOrUpdateSelective(ChargeParkingDiscount record);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.jsowell.pile.service.impl;
|
||||
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.ChargeParkingDiscount;
|
||||
import com.jsowell.pile.mapper.ChargeParkingDiscountMapper;
|
||||
import com.jsowell.pile.service.ChargeParkingDiscountService;
|
||||
import com.jsowell.pile.vo.web.ChargeParkingDiscountVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
@Service
|
||||
public class ChargeParkingDiscountServiceImpl implements ChargeParkingDiscountService{
|
||||
|
||||
@Resource
|
||||
private ChargeParkingDiscountMapper chargeParkingDiscountMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return chargeParkingDiscountMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(ChargeParkingDiscount record) {
|
||||
return chargeParkingDiscountMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChargeParkingDiscount selectByPrimaryKey(Integer id) {
|
||||
return chargeParkingDiscountMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChargeParkingDiscount selectByStationId(String stationId) {
|
||||
return chargeParkingDiscountMapper.selectByStationId(stationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChargeParkingDiscountVO getChargeParkingDiscount(String stationId) {
|
||||
if (StringUtils.isBlank(stationId)) {
|
||||
return null;
|
||||
}
|
||||
ChargeParkingDiscount chargeParkingDiscount = this.selectByStationId(stationId);
|
||||
if (chargeParkingDiscount == null) {
|
||||
return null;
|
||||
}
|
||||
// 查询该站点的停车优惠信息
|
||||
ChargeParkingDiscountVO discountVO = new ChargeParkingDiscountVO();
|
||||
discountVO.setStationId(chargeParkingDiscount.getStationId());
|
||||
discountVO.setConditionType(chargeParkingDiscount.getConditionType());
|
||||
discountVO.setConditionValue(chargeParkingDiscount.getConditionValue());
|
||||
discountVO.setDiscountType(chargeParkingDiscount.getDiscountType());
|
||||
discountVO.setDiscountValue(chargeParkingDiscount.getDiscountValue());
|
||||
discountVO.setStartTime(DateUtils.formatDateTime(chargeParkingDiscount.getStartTime()));
|
||||
discountVO.setEndTime(DateUtils.formatDateTime(chargeParkingDiscount.getEndTime()));
|
||||
return discountVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(ChargeParkingDiscount record) {
|
||||
return chargeParkingDiscountMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateBatchSelective(List<ChargeParkingDiscount> list) {
|
||||
return chargeParkingDiscountMapper.updateBatchSelective(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchInsert(List<ChargeParkingDiscount> list) {
|
||||
return chargeParkingDiscountMapper.batchInsert(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertOrUpdate(ChargeParkingDiscount record) {
|
||||
return chargeParkingDiscountMapper.insertOrUpdate(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertOrUpdateSelective(ChargeParkingDiscount record) {
|
||||
return chargeParkingDiscountMapper.insertOrUpdateSelective(record);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user