李林
2023-10-07 658d4927d468c47208fd012d9128b09249c07eff
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.chinaztt.mes.plan.controller;
 
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chinaztt.mes.common.wrapper.QueryWrapperUtil;
import com.chinaztt.mes.plan.dto.CustomerOrderDTO;
import com.chinaztt.mes.plan.dto.CustomerOrderForJointStockCompanyDTO;
import com.chinaztt.mes.plan.entity.CustomerOrderForJointStockCompany;
import com.chinaztt.mes.plan.service.CustomerOrderForJointStockCompanyService;
import com.chinaztt.ztt.common.core.util.R;
import com.chinaztt.ztt.common.log.annotation.SysLog;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
 
/**
 * @Description : 客户订单明细表(股份公司)
 * @ClassName : CustomerOrderForJointStockCompanyController
 * @Author : user
 * @Date: 2022-08-16  15:03
 */
@RestController
@AllArgsConstructor
@RequestMapping("/plan/customerOrderForJointStockCompany")
@Api(value = "customerOrderForJointStockCompany", tags = "客户订单表管理(股份公司)")
public class CustomerOrderForJointStockCompanyController{
    private final CustomerOrderForJointStockCompanyService customerOrderForJointStockCompanyService;
 
    @ApiOperation(value = "修改客户订单明细表(股份公司)", notes = "修改客户订单明细表(股份公司)")
    @SysLog("修改客户订单明细表(股份公司)")
    @PutMapping
    public R upd(@RequestBody CustomerOrderForJointStockCompany customerOrderForJointStockCompany){
        return R.ok(customerOrderForJointStockCompanyService.updateById(customerOrderForJointStockCompany));
    }
 
    /**
     * 分页查询
     *
     * @param page              分页对象
     * @param planCustomerOrder 客户订单明细表(股份公司)
     * @return
     */
    @ApiOperation(value = "分页查询", notes = "分页查询")
    @GetMapping("/page/{type}")
    public R qryPage(Page page, CustomerOrderForJointStockCompanyDTO planCustomerOrder, @PathVariable("type") String type) {
        return R.ok(customerOrderForJointStockCompanyService.getCustomerOrderPage(page, QueryWrapperUtil.gen(planCustomerOrder), type));
    }
 
    /**
     * 通过id查询客户订单表
     *
     * @param id id
     * @return R
     */
    @ApiOperation(value = "通过id查询", notes = "通过id查询")
    @GetMapping("/{id}")
    public R qryById(@PathVariable("id") Long id) {
        return R.ok(customerOrderForJointStockCompanyService.getCustomerOrderById(id));
    }
 
}