| | |
| | | import org.springblade.jfpt.animalheat.vo.AnimalHeatVo; |
| | | import org.springblade.jfpt.parcel.service.ParcelService; |
| | | import org.springblade.jfpt.parcel.vo.ConditionVo; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | |
| | | private final ParcelService parcelService; |
| | | |
| | | /** |
| | | * 获取查询条件 |
| | | * @param conditionVo 查询条件对象 |
| | | * 获取违禁包裹统计数据,远程调用接口 |
| | | * @param conditionVo 查询条件对象 状态码 0:本天 1:本周 2:本月 |
| | | * @param response 返回作用域 |
| | | * @return |
| | | */ |
| | | @PostMapping("/parcelKindStatis") |
| | | public R parcelKindStatis(@RequestBody ConditionVo conditionVo, HttpServletResponse response){ |
| | | @GetMapping("/parcelKindStatis") |
| | | public R parcelKindStatis(ConditionVo conditionVo, HttpServletResponse response){ |
| | | response.setHeader("Access-Control-Allow-Origin", "*"); |
| | | response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); |
| | | response.setHeader("Access-Control-Allow-Credentials","true"); |
| | | return R.data(parcelService.parcelKindStatis(conditionVo)); |
| | | } |
| | | |
| | | /** |
| | | * 获取包裹统计数据,远程调用接口获取数据 |
| | | * @param conditionVo 查询条件对象 status 状态码 0:本天 1:本周 2:本月 |
| | | * @param response 返回作用域 |
| | | * @return |
| | | */ |
| | | @GetMapping("/getParcelStatis") |
| | | public R getParcelStatis(ConditionVo conditionVo, HttpServletResponse response){ |
| | | response.setHeader("Access-Control-Allow-Origin", "*"); |
| | | response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); |
| | | response.setHeader("Access-Control-Allow-Credentials","true"); |
| | | return R.data(parcelService.getParcelStatis(conditionVo)); |
| | | } |
| | | |
| | | /** |
| | | * 获取图片地址 |
| | | * @param imgUrl 图片url |
| | | * @param response |
| | | * @return |
| | | */ |
| | | @GetMapping("/getParcelPic") |
| | | public R getParcelPic(String imgUrl,HttpServletResponse response){ |
| | | response.setHeader("Access-Control-Allow-Origin", "*"); |
| | | response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); |
| | | response.setHeader("Access-Control-Allow-Credentials","true"); |
| | | return R.data(parcelService.getParcelPic(imgUrl)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |