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