12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- package com.xjrsoft.module.erpModel.caseErpCustomer.controller;
- import cn.hutool.core.bean.BeanUtil;
- import com.baomidou.mybatisplus.core.toolkit.Wrappers;
- import com.xjrsoft.common.annotation.XjrLog;
- import com.xjrsoft.common.constant.GlobalConstant;
- import com.xjrsoft.common.model.result.R;
- import com.xjrsoft.module.erpModel.caseErpCustomer.dto.AddCaseErpCustomerGatherDetailDto;
- import com.xjrsoft.module.erpModel.caseErpCustomer.dto.AddCaseErpCustomerGatherDto;
- import com.xjrsoft.module.erpModel.caseErpCustomer.dto.UpdateCaseErpCustomerGatherDetailDto;
- import com.xjrsoft.module.erpModel.caseErpCustomer.dto.UpdateCaseErpCustomerGatherDto;
- import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerGather;
- import com.xjrsoft.module.erpModel.caseErpCustomer.entity.CaseErpCustomerGatherDetail;
- import com.xjrsoft.module.erpModel.caseErpCustomer.service.ICaseErpCustomerGatherDetailService;
- import com.xjrsoft.module.erpModel.caseErpCustomer.vo.CaseErpCusGatherDetailInfo;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import lombok.AllArgsConstructor;
- import org.springframework.web.bind.annotation.*;
- import org.springframework.stereotype.Controller;
- import javax.validation.Valid;
- /**
- * <p>
- * 客户回款详情【case_erp_customer_gather_detail】 前端控制器
- * </p>
- *
- * @author hnyyzy
- * @since 2023-07-12
- */
- @RestController
- @RequestMapping(GlobalConstant.CASE_ERP_CUSTOMER +"/caseErpCustomerGatherDetail")
- @Api(value = GlobalConstant.CASE_ERP_CUSTOMER +"/caseErpCustomerGatherDetail", tags = "客户回款详情")
- @AllArgsConstructor
- public class CaseErpCustomerGatherDetailController {
- private ICaseErpCustomerGatherDetailService caseErpCustomerGatherDetailService;
- @PostMapping
- @ApiOperation(value = "新增客户回款详情信息")
- public R add(@Valid @RequestBody AddCaseErpCustomerGatherDetailDto dto) {
- return R.ok(caseErpCustomerGatherDetailService.add(dto));
- }
- @PutMapping
- @ApiOperation(value = "修改客户回款详情信息")
- public R update(@Valid @RequestBody UpdateCaseErpCustomerGatherDetailDto dto) {
- return R.ok(caseErpCustomerGatherDetailService.edit(dto));
- }
- @GetMapping(value = "/info")
- @ApiOperation(value = "根据id查询客户回款详情信息")
- public R info(@RequestParam Long id) {
- CaseErpCustomerGatherDetail caseErpCustomerGatherDetail = caseErpCustomerGatherDetailService.getById(id);
- if (caseErpCustomerGatherDetail == null) {
- R.error("找不到此客户回款详情信息!");
- }
- return R.ok(BeanUtil.toBean(caseErpCustomerGatherDetail, CaseErpCusGatherDetailInfo.class));
- }
- @DeleteMapping
- @ApiOperation(value = "删除")
- @XjrLog(value = "删除客户回款详情信息")
- public R delete(@Valid @RequestBody Long id) {
- return R.ok(caseErpCustomerGatherDetailService.delete(id));
- }
- }
|