mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 15:55:18 +08:00
完善controller
This commit is contained in:
@@ -359,12 +359,12 @@ public class Codegen {
|
||||
.build())
|
||||
.addParameter(
|
||||
ParameterSpec.builder(
|
||||
ClassName.get(String.class), "request")
|
||||
ClassName.get(IdRequest.class), "request")
|
||||
.addAnnotation(RequestBody.class)
|
||||
.build())
|
||||
.addStatement(
|
||||
"""
|
||||
return this.service.getById(request)
|
||||
return this.service.getById(request.getId())
|
||||
""")
|
||||
.build())
|
||||
.addMethod(
|
||||
|
||||
@@ -48,8 +48,8 @@ public class CoalAnalysisController {
|
||||
}
|
||||
|
||||
@PostMapping("/getById")
|
||||
public CoalAnalysisDto getById(@RequestBody String request) {
|
||||
return this.service.getById(request);
|
||||
public CoalAnalysisDto getById(@RequestBody IdRequest request) {
|
||||
return this.service.getById(request.getId());
|
||||
}
|
||||
|
||||
@PostMapping("/list")
|
||||
|
||||
@@ -8,9 +8,9 @@ import cn.lihongjie.coal.coalAnalysisHis.dto.CoalAnalysisHisDto;
|
||||
import cn.lihongjie.coal.coalAnalysisHis.dto.CreateCoalAnalysisHisDto;
|
||||
import cn.lihongjie.coal.coalAnalysisHis.dto.UpdateCoalAnalysisHisDto;
|
||||
import cn.lihongjie.coal.coalAnalysisHis.service.CoalAnalysisHisService;
|
||||
import java.lang.Object;
|
||||
import java.lang.String;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -48,10 +48,9 @@ public class CoalAnalysisHisController {
|
||||
;
|
||||
}
|
||||
|
||||
@PostMapping("/getById")
|
||||
public CoalAnalysisHisDto getById(@RequestBody String request) {
|
||||
return this.service.getById(request)
|
||||
;
|
||||
@PostMapping("/getById")
|
||||
public CoalAnalysisHisDto getById(@RequestBody IdRequest request) {
|
||||
return this.service.getById(request.getId());
|
||||
}
|
||||
|
||||
@PostMapping("/list")
|
||||
|
||||
@@ -43,8 +43,8 @@ public class CoalInfoController {
|
||||
}
|
||||
|
||||
@PostMapping("/getById")
|
||||
public CoalInfoDto getById(@RequestBody String request) {
|
||||
return this.service.getById(request);
|
||||
public CoalInfoDto getById(@RequestBody IdRequest request) {
|
||||
return this.service.getById(request.getId());
|
||||
}
|
||||
|
||||
@PostMapping("/list")
|
||||
|
||||
@@ -43,8 +43,8 @@ public class CoalPriceController {
|
||||
}
|
||||
|
||||
@PostMapping("/getById")
|
||||
public CoalPriceDto getById(@RequestBody String request) {
|
||||
return this.service.getById(request);
|
||||
public CoalPriceDto getById(@RequestBody IdRequest request) {
|
||||
return this.service.getById(request.getId());
|
||||
}
|
||||
|
||||
@PostMapping("/list")
|
||||
|
||||
@@ -2,6 +2,7 @@ package cn.lihongjie.coal.coalWashingDailyAnalysis.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import cn.lihongjie.coal.coalWashingDailyAnalysis.entity.CoalWashingDailyAnalysisItemVo;
|
||||
import cn.lihongjie.coal.coalWashingDailyAnalysis.entity.CoalWashingDailyAnalysisParamVo;
|
||||
|
||||
import jakarta.persistence.CollectionTable;
|
||||
import jakarta.persistence.ConstraintMode;
|
||||
@@ -36,7 +37,7 @@ public class CoalWashingDailyAnalysisDto extends OrgCommonDto {
|
||||
@ElementCollection
|
||||
@Comment("参数配置")
|
||||
@CollectionTable(foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
|
||||
private List<CoalWashingDailyAnalysisItemVo> params;
|
||||
private List<CoalWashingDailyAnalysisParamVo> paramsInfo;
|
||||
|
||||
@Comment("目标大堆 灰")
|
||||
private Double ddp1;
|
||||
|
||||
@@ -2,6 +2,7 @@ package cn.lihongjie.coal.coalWashingDailyAnalysis.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import cn.lihongjie.coal.coalWashingDailyAnalysis.entity.CoalWashingDailyAnalysisItemVo;
|
||||
import cn.lihongjie.coal.coalWashingDailyAnalysis.entity.CoalWashingDailyAnalysisParamVo;
|
||||
|
||||
import jakarta.persistence.CollectionTable;
|
||||
import jakarta.persistence.ConstraintMode;
|
||||
@@ -36,7 +37,7 @@ public class CreateCoalWashingDailyAnalysisDto extends OrgCommonDto {
|
||||
@ElementCollection
|
||||
@Comment("参数配置")
|
||||
@CollectionTable(foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
|
||||
private List<CoalWashingDailyAnalysisItemVo> params;
|
||||
private List<CoalWashingDailyAnalysisParamVo> paramsInfo;
|
||||
|
||||
@Comment("目标大堆 灰")
|
||||
private Double ddp1;
|
||||
|
||||
@@ -2,6 +2,7 @@ package cn.lihongjie.coal.coalWashingDailyAnalysis.dto;
|
||||
|
||||
import cn.lihongjie.coal.base.dto.OrgCommonDto;
|
||||
import cn.lihongjie.coal.coalWashingDailyAnalysis.entity.CoalWashingDailyAnalysisItemVo;
|
||||
import cn.lihongjie.coal.coalWashingDailyAnalysis.entity.CoalWashingDailyAnalysisParamVo;
|
||||
|
||||
import jakarta.persistence.CollectionTable;
|
||||
import jakarta.persistence.ConstraintMode;
|
||||
@@ -36,7 +37,7 @@ public class UpdateCoalWashingDailyAnalysisDto extends OrgCommonDto {
|
||||
@ElementCollection
|
||||
@Comment("参数配置")
|
||||
@CollectionTable(foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
|
||||
private List<CoalWashingDailyAnalysisItemVo> params;
|
||||
private List<CoalWashingDailyAnalysisParamVo> paramsInfo;
|
||||
|
||||
@Comment("目标大堆 灰")
|
||||
private Double ddp1;
|
||||
|
||||
@@ -38,7 +38,7 @@ public class CoalWashingDailyAnalysisEntity extends OrgCommonEntity {
|
||||
@ElementCollection
|
||||
@Comment("参数配置")
|
||||
@CollectionTable(foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
|
||||
private List<CoalWashingDailyAnalysisItemVo> params;
|
||||
private List<CoalWashingDailyAnalysisParamVo> paramsInfo;
|
||||
|
||||
@Comment("目标大堆 灰")
|
||||
private Double ddp1;
|
||||
|
||||
@@ -8,9 +8,9 @@ import cn.lihongjie.coal.coalWashingDailyAnalysisParam.dto.CoalWashingDailyAnaly
|
||||
import cn.lihongjie.coal.coalWashingDailyAnalysisParam.dto.CreateCoalWashingDailyAnalysisParamDto;
|
||||
import cn.lihongjie.coal.coalWashingDailyAnalysisParam.dto.UpdateCoalWashingDailyAnalysisParamDto;
|
||||
import cn.lihongjie.coal.coalWashingDailyAnalysisParam.service.CoalWashingDailyAnalysisParamService;
|
||||
import java.lang.Object;
|
||||
import java.lang.String;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -50,10 +50,9 @@ public class CoalWashingDailyAnalysisParamController {
|
||||
;
|
||||
}
|
||||
|
||||
@PostMapping("/getById")
|
||||
public CoalWashingDailyAnalysisParamDto getById(@RequestBody String request) {
|
||||
return this.service.getById(request)
|
||||
;
|
||||
@PostMapping("/getById")
|
||||
public CoalWashingDailyAnalysisParamDto getById(@RequestBody IdRequest request) {
|
||||
return this.service.getById(request.getId());
|
||||
}
|
||||
|
||||
@PostMapping("/list")
|
||||
|
||||
@@ -43,8 +43,8 @@ public class EmployeeController {
|
||||
}
|
||||
|
||||
@PostMapping("/getById")
|
||||
public EmployeeDto getById(@RequestBody String request) {
|
||||
return this.service.getById(request);
|
||||
public EmployeeDto getById(@RequestBody IdRequest request) {
|
||||
return this.service.getById(request.getId());
|
||||
}
|
||||
|
||||
@PostMapping("/list")
|
||||
|
||||
@@ -41,8 +41,8 @@ public class EnterpriseController {
|
||||
}
|
||||
|
||||
@PostMapping("/getById")
|
||||
public EnterpriseDto getById(@RequestBody String request) {
|
||||
return this.service.getById(request);
|
||||
public EnterpriseDto getById(@RequestBody IdRequest request) {
|
||||
return this.service.getById(request.getId());
|
||||
}
|
||||
|
||||
@PostMapping("/list")
|
||||
|
||||
@@ -49,8 +49,8 @@ public class FileController {
|
||||
}
|
||||
|
||||
@PostMapping("/getById")
|
||||
public FileDto getById(@RequestBody String request) {
|
||||
return this.service.getById(request);
|
||||
public FileDto getById(@RequestBody IdRequest request) {
|
||||
return this.service.getById(request.getId());
|
||||
}
|
||||
|
||||
@PostMapping("/list")
|
||||
|
||||
@@ -43,8 +43,8 @@ public class SalaryItemController {
|
||||
}
|
||||
|
||||
@PostMapping("/getById")
|
||||
public SalaryItemDto getById(@RequestBody String request) {
|
||||
return this.service.getById(request);
|
||||
public SalaryItemDto getById(@RequestBody IdRequest request) {
|
||||
return this.service.getById(request.getId());
|
||||
}
|
||||
|
||||
@PostMapping("/list")
|
||||
|
||||
Reference in New Issue
Block a user