kongdeqiang
2022-09-19 a9862e81851bbe037edc6bb1c7f562c1e55c0d7f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package com.boying.controller;
 
import com.boying.common.BaseController;
import com.boying.common.util.DateUtil;
import com.boying.entity.Park;
import com.boying.service.CostRuleService;
import com.boying.service.ParkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import java.text.ParseException;
 
 
@RestController
@RequestMapping("rule")
public class CostRuleController extends BaseController {
 
    @Autowired
    private CostRuleService costRuleService;
 
    @GetMapping("test")
    public Object save(String start,String end) throws ParseException {
        double money = costRuleService.getMoney(Long.valueOf(1), DateUtil.stringToDate(start, null), DateUtil.stringToDate(end, null), 1);
        return success("保存成功",money);
    }
}