南昌市物联网技防平台-后台
Administrator
2021-03-10 5c595590ddbcbf6d121810c03f08f5c43730d645
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package org.springblade.jfpt.parcel.controller;
 
import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R;
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 javax.servlet.http.HttpServletResponse;
 
/**
 * @title 包裹控制层
 * @author arsn
 * @time 2021-03-10
 */
 
@RestController
@AllArgsConstructor
@RequestMapping("parcel/parcel")
public class ParcelController {
 
    private final ParcelService parcelService;
 
    /**
     * 获取查询条件
     * @param conditionVo 查询条件对象
     * @param response 返回作用域
     * @return
     */
    @PostMapping("/parcelKindStatis")
    public R parcelKindStatis(@RequestBody 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));
    }
 
 
}