tanzh пре 3 година
родитељ
комит
5f9e98f4a0

+ 1 - 1
zhongzheng-admin/src/main/java/com/zhongzheng/controller/mock/MockApplyController.java

@@ -74,7 +74,7 @@ public class MockApplyController extends BaseController {
     @PreAuthorize("@ss.hasPermi('system:apply:query')")
     @GetMapping("/{applyId}")
     public AjaxResult<MockApplyVo> getInfo(@PathVariable("applyId" ) Long applyId) {
-        return AjaxResult.success(iMockApplyService.queryById(applyId));
+        return AjaxResult.success(iMockApplyService.queryByApplyId(applyId));
     }
 
     /**

+ 2 - 2
zhongzheng-admin/src/main/java/com/zhongzheng/controller/user/UserMockSubscribeController.java

@@ -105,11 +105,11 @@ public class UserMockSubscribeController extends BaseController {
     /**
      * 删除用户预约模考
      */
-    @ApiOperation("删除用户预约模考")
+    /*@ApiOperation("删除用户预约模考")
     @PreAuthorize("@ss.hasPermi('system:subscribe:remove')")
     @Log(title = "用户预约模考" , businessType = BusinessType.DELETE)
     @DeleteMapping("/{subscribeIds}")
     public AjaxResult<Void> remove(@PathVariable Long[] subscribeIds) {
         return toAjax(iUserMockSubscribeService.deleteWithValidByIds(Arrays.asList(subscribeIds), true) ? 1 : 0);
-    }
+    }*/
 }

+ 15 - 1
zhongzheng-api/src/main/java/com/zhongzheng/controller/user/UserMockSubscribeController.java

@@ -112,11 +112,25 @@ public class UserMockSubscribeController extends BaseController {
     /**
      * 删除用户预约模考
      */
-    @ApiOperation("删除用户预约模考")
+    /*@ApiOperation("删除用户预约模考")
     @PreAuthorize("@ss.hasPermi('system:subscribe:remove')")
     @Log(title = "用户预约模考" , businessType = BusinessType.DELETE)
     @DeleteMapping("/{subscribeIds}")
     public AjaxResult<Void> remove(@PathVariable Long[] subscribeIds) {
         return toAjax(iUserMockSubscribeService.deleteWithValidByIds(Arrays.asList(subscribeIds), true) ? 1 : 0);
+    }*/
+
+    /**
+     * 查询用户个人预约模考列表
+     */
+    @ApiOperation("查询用户个人预约模考列表")
+    @PreAuthorize("@ss.hasPermi('system:subscribe:list')")
+    @GetMapping("/listSubscribe")
+    public TableDataInfo<UserMockSubscribeVo> listSubscribe(@RequestBody UserMockSubscribeQueryBo bo) {
+        startPage();
+        ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
+        bo.setUserId(loginUser.getUser().getUserId());
+        List<UserMockSubscribeVo> list = iUserMockSubscribeService.listSubscribe(bo);
+        return getDataTable(list);
     }
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/mock/service/IMockApplyService.java

@@ -55,4 +55,6 @@ public interface IMockApplyService extends IService<MockApply> {
 	List<MockApplyVo> listApply(MockApplyQueryBo bo);
 
 	List<MockApplyVo> queryApplyList(MockApplyQueryBo bo);
+
+	MockApplyVo queryByApplyId(Long applyId);
 }

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/mock/service/impl/MockApplyServiceImpl.java

@@ -276,4 +276,9 @@ public class MockApplyServiceImpl extends ServiceImpl<MockApplyMapper, MockApply
     public List<MockApplyVo> queryApplyList(MockApplyQueryBo bo) {
         return baseMapper.queryApplyList(bo);
     }
+
+    @Override
+    public MockApplyVo queryByApplyId(Long applyId) {
+        return null;
+    }
 }

+ 9 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserMockSubscribeQueryBo.java

@@ -101,9 +101,17 @@ public class UserMockSubscribeQueryBo extends BaseEntity {
 
 	/** 模考标题 */
 	@ApiModelProperty("模考标题")
-	private Long applyName;
+	private String applyName;
 
 	/** 关键字 */
 	@ApiModelProperty("关键字")
 	private String searchKey;
+
+	/** 考试开始时间 */
+	@ApiModelProperty("考试开始时间")
+	private Long startTime;
+
+	/** 考试结束时间 */
+	@ApiModelProperty("考试结束时间")
+	private Long endTime;
 }

+ 3 - 0
zhongzheng-system/src/main/resources/mapper/modules/mock/MockApplyMapper.xml

@@ -110,6 +110,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="majorId != null and majorId != ''">
             and major_id = #{majorId}
         </if>
+        <if test="businessId != null and businessId != ''">
+            and ma.business_id = #{businessId}
+        </if>
         ORDER BY mmst.exam_time
     </select>
 

+ 9 - 0
zhongzheng-system/src/main/resources/mapper/modules/user/UserMockSubscribeMapper.xml

@@ -142,6 +142,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="businessId != null and businessId != ''">
             AND ma.business_id = #{businessId}
         </if>
+        <if test="userId != null and userId != ''">
+            AND u.user_id = #{userId}
+        </if>
         <if test="searchKey != null and searchKey != ''">
             AND (u.realname like concat('%', #{searchKey}, '%') or u.id_card like concat('%', #{searchKey}, '%'))
         </if>
@@ -157,6 +160,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="subscribeStatus != null and subscribeStatus != ''">
             AND ums.subscribe_status = #{subscribeStatus}
         </if>
+        <if test="startTime != null and startTime != ''">
+            AND ums.apply_site_exam_time &gt; #{startTime}
+        </if>
+        <if test="endTime != null and endTime != ''">
+            AND ums.apply_site_exam_time &lt; #{endTime}
+        </if>
     </select>