瀏覽代碼

fix: 线索查询列表修改为POST方式

zhaomuran 4 月之前
父節點
當前提交
b82e94e9b2

+ 4 - 3
bound-link-api/blink-backend/src/main/java/com/wx/blink/backend/controller/BlinkClueController.java

@@ -12,6 +12,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.validation.Valid;
 
 @RestController
 @Tag(name = "线索管理")
@@ -24,13 +25,13 @@ public class BlinkClueController {
 
     @Operation(summary = "新增线索")
     @PostMapping("/supports/clue/create")
-    public ResponseDTO<String> supportsClueCreate(@RequestBody BlinkClueDTO dto) {
+    public ResponseDTO<String> supportsClueCreate(@RequestBody @Valid BlinkClueDTO dto) {
         return clueService.supportsClueCreate(dto);
     }
 
     @Operation(summary = "查询线索列表")
-    @GetMapping("/supports/clue/queryPage")
-    public ResponseDTO<PageResult<BlinkClueDTO>> supportsClueQueryPage(BlinkClueQry qry) {
+    @PostMapping("/supports/clue/queryPage")
+    public ResponseDTO<PageResult<BlinkClueDTO>> supportsClueQueryPage(@RequestBody @Valid BlinkClueQry qry) {
         return clueService.supportsClueQueryPage(qry);
     }
 

+ 4 - 4
bound-link-api/blink-backend/src/main/resources/mapper/BlinkClueRepositoryMapper.xml

@@ -18,11 +18,11 @@
         select *
         from blink_clue
         where deleted_flag = '0'
-        <if test="query.projectName != null and query.projectName !=''">
-            AND project_name = #{query.projectName}
+        <if test="query.projectName != null and query.projectName != ''">
+            AND project_name LIKE concat('%', #{query.projectName}, '%')
         </if>
-        <if test="query.projectId != null and query.projectId !=''">
-            AND project_id = #{query.projectId}
+        <if test="query.projectId != null and query.projectId != ''">
+            AND project_id LIKE concat('%', #{query.projectId}, '%')
         </if>
         <if test="query.id != null">
             AND id = #{query.id}