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); } }