修改名称

This commit is contained in:
2026-04-29 19:20:29 +08:00
parent 521cc30f94
commit 68d0c7ea37
6 changed files with 44 additions and 44 deletions

View File

@@ -0,0 +1,77 @@
package com.rj.controller;
import com.rj.entity.LbAssessmentApply;
import com.rj.service.ILbAssessmentApplyService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@RestController
@RequestMapping("/api/lbAssessmentApply")
@Tag(name = "申请评估", description = "lb_assessment_apply增删改查与分页")
public class LbAssessmentApplyController {
@Autowired
private ILbAssessmentApplyService lbAssessmentApplyService;
@PostMapping("/add")
@Operation(summary = "新增")
public ResponseEntity<Map<String, Object>> add(
@Parameter(description = "实体", required = true) @RequestBody LbAssessmentApply entity) {
Map<String, Object> result = lbAssessmentApplyService.add(entity);
Boolean success = (Boolean) result.get("success");
if (success != null && success) {
return ResponseEntity.ok(result);
}
return ResponseEntity.badRequest().body(result);
}
@PutMapping("/update")
@Operation(summary = "编辑")
public ResponseEntity<Map<String, Object>> update(
@Parameter(description = "实体", required = true) @RequestBody LbAssessmentApply entity) {
Map<String, Object> result = lbAssessmentApplyService.update(entity);
Boolean success = (Boolean) result.get("success");
if (success != null && success) {
return ResponseEntity.ok(result);
}
return ResponseEntity.badRequest().body(result);
}
@DeleteMapping("/delete/{id}")
@Operation(summary = "删除")
public ResponseEntity<Map<String, Object>> delete(
@Parameter(description = "主键ID(UUID)", required = true) @PathVariable String id) {
Map<String, Object> result = lbAssessmentApplyService.deleteById(id);
Boolean success = (Boolean) result.get("success");
if (success != null && success) {
return ResponseEntity.ok(result);
}
return ResponseEntity.badRequest().body(result);
}
@GetMapping("/list")
@Operation(summary = "分页查询")
public ResponseEntity<Map<String, Object>> list(
@RequestParam(defaultValue = "1") Integer current,
@RequestParam(defaultValue = "10") Integer size,
@RequestParam(required = false) Long tenantId,
@RequestParam(required = false) String applicantName,
@RequestParam(required = false) String applicantPhone,
@RequestParam(required = false) String colleagueName,
@RequestParam(required = false) String teamLeaderName) {
Map<String, Object> result = lbAssessmentApplyService.pageQuery(
current, size, tenantId, applicantName, applicantPhone, colleagueName, teamLeaderName
);
Boolean success = (Boolean) result.get("success");
if (success != null && success) {
return ResponseEntity.ok(result);
}
return ResponseEntity.internalServerError().body(result);
}
}