mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
配置充电停车优惠
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
package com.jsowell.web.controller.pile;
|
||||
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.pile.domain.ChargeParkingDiscount;
|
||||
import com.jsowell.pile.service.ChargeParkingDiscountService;
|
||||
import com.jsowell.pile.vo.web.ChargeParkingDiscountVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 充电停车优惠
|
||||
*
|
||||
* @author xxxxx
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pile/station")
|
||||
public class ChargeParkingDiscountController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private ChargeParkingDiscountService chargeParkingDiscountService;
|
||||
|
||||
/**
|
||||
* 保存充电停车优惠配置
|
||||
*/
|
||||
@PostMapping("/saveChargeParkingDiscount")
|
||||
public AjaxResult saveChargeParkingDiscount(@RequestBody ChargeParkingDiscount chargeParkingDiscount) {
|
||||
int result = chargeParkingDiscountService.insertOrUpdateSelective(chargeParkingDiscount);
|
||||
if (result > 0) {
|
||||
return success();
|
||||
} else {
|
||||
return error();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询站点充电停车优惠配置
|
||||
*/
|
||||
@GetMapping("/getChargeParkingDiscount/{stationId}")
|
||||
public AjaxResult getChargeParkingDiscount(@PathVariable("stationId") String stationId) {
|
||||
ChargeParkingDiscountVO chargeParkingDiscountVO = chargeParkingDiscountService.getChargeParkingDiscount(stationId);
|
||||
return AjaxResult.success(chargeParkingDiscountVO);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user