Просмотр исходного кода

优化小程序配置查询逻辑

yjwang 1 неделя назад
Родитель
Сommit
1cf4169a71

+ 5 - 1
fs-admin/src/main/java/com/fs/course/controller/FsCoursePlaySourceConfigController.java

@@ -54,7 +54,8 @@ public class FsCoursePlaySourceConfigController extends BaseController {
                               @RequestParam(required = false) String appid,
                               @RequestParam(required = false) Integer isMall,
                               @RequestParam(required = false, defaultValue = "1") Integer pageNum,
-                              @RequestParam(required = false, defaultValue = "10") Integer pageSize) {
+                              @RequestParam(required = false, defaultValue = "10") Integer pageSize,
+                              @RequestParam(required = false) Integer status) {
         Map<String, Object> params = new HashMap<>();
         params.put("name", name);
         params.put("appid", appid);
@@ -72,6 +73,9 @@ public class FsCoursePlaySourceConfigController extends BaseController {
         }
         params.put("userId", userId);
         params.put("deptId", deptId);
+        if(status != null){
+            params.put("status", status);
+        }
 
         PageHelper.startPage(pageNum, pageSize);
         List<FsCoursePlaySourceConfigVO> list = fsCoursePlaySourceConfigService.selectCoursePlaySourceConfigVOListByMap(params);

+ 3 - 0
fs-service/src/main/resources/mapper/course/FsCoursePlaySourceConfigMapper.xml

@@ -27,6 +27,9 @@
         <if test="params.isMall != null">
             and fcpsc.is_mall = #{params.isMall}
         </if>
+        <if test="params.status != null">
+            and fcpsc.status = #{params.status}
+        </if>
         order by fcpsc.id desc
     </select>
 </mapper>