Yansen пре 2 година
родитељ
комит
cbef77398c

+ 16
- 16
src/main/java/com/yunzhi/inte/controller/PostsController.java Прегледај датотеку

@@ -104,22 +104,22 @@ public class PostsController extends BaseController {
104 104
         return ResponseBean.success(posts);
105 105
     }
106 106
 
107
-//    /**
108
-//     * 更新数据
109
-//     *
110
-//     * @param posts 实例对象
111
-//     * @return 实例对象
112
-//     */
113
-//    @ApiOperation("更新数据")
114
-//    @PutMapping("/posts/{id}")
115
-//    public ResponseBean edit(@ApiParam("对象实体") @RequestBody Posts posts,
116
-//                             @ApiParam("对象ID") @PathVariable Integer id) throws Exception {
117
-//
118
-//        posts.setId(id);
119
-//
120
-//        postsService.updateById(posts);
121
-//        return ResponseBean.success(posts);
122
-//    }
107
+    /**
108
+     * 更新数据
109
+     *
110
+     * @param posts 实例对象
111
+     * @return 实例对象
112
+     */
113
+    @ApiOperation("更新数据")
114
+    @PutMapping("/posts/{id}")
115
+    public ResponseBean edit(@ApiParam("对象实体") @RequestBody Posts posts,
116
+                             @ApiParam("对象ID") @PathVariable Integer id) throws Exception {
117
+
118
+        posts.setId(id);
119
+
120
+        postsService.updateById(posts);
121
+        return ResponseBean.success(posts);
122
+    }
123 123
 
124 124
     /**
125 125
      * 通过主键删除数据

+ 5
- 5
src/main/java/com/yunzhi/inte/controller/StatisController.java Прегледај датотеку

@@ -3,10 +3,7 @@ package com.yunzhi.inte.controller;
3 3
 import com.yunzhi.inte.common.BaseController;
4 4
 import com.yunzhi.inte.common.DateUtils;
5 5
 import com.yunzhi.inte.common.ResponseBean;
6
-import com.yunzhi.inte.service.GuaranteeTaskService;
7
-import com.yunzhi.inte.service.PurchaseService;
8
-import com.yunzhi.inte.service.StoreService;
9
-import com.yunzhi.inte.service.UsersService;
6
+import com.yunzhi.inte.service.*;
10 7
 import io.swagger.annotations.Api;
11 8
 import io.swagger.annotations.ApiOperation;
12 9
 import io.swagger.annotations.ApiParam;
@@ -38,6 +35,9 @@ public class StatisController extends BaseController {
38 35
     @Autowired
39 36
     PurchaseService purchaseService;
40 37
 
38
+    @Autowired
39
+    EvaluateService evaluateService;
40
+
41 41
     @ApiOperation("汇总统计")
42 42
     @GetMapping("/summary")
43 43
     public ResponseBean getSummary() {
@@ -47,7 +47,7 @@ public class StatisController extends BaseController {
47 47
         // 接待军人总数
48 48
         Integer personNum = guaranteeTaskService.sumPerson();
49 49
         // 总体评价
50
-        String evaValue = "良";
50
+        String evaValue = evaluateService.getTop1();
51 51
         // 设备数量
52 52
         Integer deviceNum = storeService.countDevice();
53 53
 

+ 2
- 2
src/main/java/com/yunzhi/inte/controller/StoreLogController.java Прегледај датотеку

@@ -68,11 +68,11 @@ public class StoreLogController extends BaseController {
68 68
     public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
69 69
                              @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
70 70
                              @ApiParam("库存ID") @RequestParam(value ="storeId", required = false) Integer storeId,
71
-                             @ApiParam("名称") @RequestParam(value ="name", required = false) String name,
71
+                             @ApiParam("名称") @RequestParam(value ="storeName", required = false) String storeName,
72 72
                              @ApiParam("分类ID") @RequestParam(value ="typeId", required = false) Integer typeId) throws Exception {
73 73
 
74 74
         IPage<StoreLog> pg = new Page<>(pageNum, pageSize);
75
-        IPage<StoreLog> result = storeLogService.getPageBy(pg, storeId, name, typeId);
75
+        IPage<StoreLog> result = storeLogService.getPageBy(pg, storeId, storeName, typeId);
76 76
 
77 77
         return ResponseBean.success(result);
78 78
     }

+ 3
- 2
src/main/java/com/yunzhi/inte/mapper/EvaluateMapper.java Прегледај датотеку

@@ -12,5 +12,6 @@ import com.yunzhi.inte.entity.Evaluate;
12 12
  */
13 13
 @Mapper
14 14
 public interface EvaluateMapper  extends BaseMapper<Evaluate>{
15
-    
16
-}
15
+
16
+     String getTop1();
17
+ }

+ 1
- 1
src/main/java/com/yunzhi/inte/mapper/StoreMapper.java Прегледај датотеку

@@ -19,7 +19,7 @@ public interface StoreMapper  extends BaseMapper<Store>{
19 19
 
20 20
     IPage<Store> getPageBy(IPage<Store> pg, @Param("id") Integer id, @Param("name") String name, @Param("typeId") String typeId, @Param("isDish") Integer isDish);
21 21
 
22
-    List<Store> getListBy(@Param("name") String name, @Param("typeId") String typeId, @Param("isDish") Integer isDish);
22
+    List<Store> getListBy(@Param("id") Integer id, @Param("name") String name, @Param("typeId") String typeId, @Param("isDish") Integer isDish);
23 23
 
24 24
     List<Map<String, Integer>> countByDeviceType();
25 25
 

+ 3
- 2
src/main/java/com/yunzhi/inte/service/EvaluateService.java Прегледај датотеку

@@ -9,5 +9,6 @@ import com.yunzhi.inte.entity.Evaluate;
9 9
  * @date : 2022-10-13
10 10
  */
11 11
 public interface EvaluateService extends IBaseService<Evaluate> {
12
-    
13
-}
12
+
13
+     String getTop1();
14
+ }

+ 9
- 3
src/main/java/com/yunzhi/inte/service/impl/EvaluateServiceImpl.java Прегледај датотеку

@@ -5,12 +5,18 @@ import org.springframework.stereotype.Service;
5 5
 import com.yunzhi.inte.entity.Evaluate;
6 6
 import com.yunzhi.inte.mapper.EvaluateMapper;
7 7
 import com.yunzhi.inte.service.EvaluateService;
8
- /**
8
+
9
+/**
9 10
  * 评价表;(evaluate)表服务实现类
11
+ *
10 12
  * @author : http://www.chiner.pro
11 13
  * @date : 2022-10-13
12 14
  */
13 15
 @Service
14 16
 public class EvaluateServiceImpl extends BaseServiceImpl<EvaluateMapper, Evaluate> implements EvaluateService {
15
-    
16
-}
17
+
18
+    @Override
19
+    public String getTop1() {
20
+        return baseMapper.getTop1();
21
+    }
22
+}

+ 1
- 1
src/main/java/com/yunzhi/inte/service/impl/StoreServiceImpl.java Прегледај датотеку

@@ -39,7 +39,7 @@ public class StoreServiceImpl extends BaseServiceImpl<StoreMapper, Store> implem
39 39
             name = "%" + name + "%";
40 40
         }
41 41
 
42
-        return baseMapper.getListBy(name, typeId, isDish);
42
+        return baseMapper.getListBy(null, name, typeId, isDish);
43 43
     }
44 44
 
45 45
     @Override

+ 4
- 1
src/main/resources/mapper/EvaluateMapper.xml Прегледај датотеку

@@ -2,5 +2,8 @@
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 
4 4
 <mapper namespace="com.yunzhi.inte.mapper.EvaluateMapper">
5
-    
5
+
6
+    <select id="getTop1" resultType="java.lang.String">
7
+
8
+    </select>
6 9
 </mapper>