package com.jttech.pfcs.controller; import com.jttech.pfcs.services.IBillService; import com.jttech.pfcs.vo.req.bill.BillApiReqVo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import com.jttech.pfcs.vo.resp.ResponseVo; /** * 账单 * @author wanghc * @version 1.0.0 * @date 2023-03-07 */ @RestController @RequestMapping("/bill") public class BillController { private Logger mLogger = LoggerFactory.getLogger(getClass()); @Autowired private IBillService mBillService; @RequestMapping(value = "/postData", method = RequestMethod.POST) public ResponseVo post(@RequestBody BillApiReqVo reqVo) { final long beginTime = System.currentTimeMillis(); ResponseVo result = new ResponseVo(); try { return mBillService.post(reqVo); } finally { final long endTime = System.currentTimeMillis(); mLogger.info("Execute heart the result is {} time spent is {} ", result, (endTime - beginTime)); } } }