he2802 hace 3 años
padre
commit
9fb49674c7

+ 64 - 0
zhongzheng-api/src/main/java/com/zhongzheng/controller/base/ApplyAreasController.java

@@ -0,0 +1,64 @@
+package com.zhongzheng.controller.base;
+
+import com.zhongzheng.common.annotation.Log;
+import com.zhongzheng.common.core.controller.BaseController;
+import com.zhongzheng.common.core.domain.AjaxResult;
+import com.zhongzheng.common.core.page.TableDataInfo;
+import com.zhongzheng.common.enums.BusinessType;
+import com.zhongzheng.modules.base.bo.ApplyAreasAddBo;
+import com.zhongzheng.modules.base.bo.ApplyAreasEditBo;
+import com.zhongzheng.modules.base.bo.ApplyAreasQueryBo;
+import com.zhongzheng.modules.base.domain.ApplyAreas;
+import com.zhongzheng.modules.base.service.IApplyAreasService;
+import com.zhongzheng.modules.base.vo.ApplyAreasVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * 报考地区Controller
+ *
+ * @author hjl
+ * @date 2021-10-08
+ */
+@Api(value = "报考省市控制器", tags = {"报考省市管理"})
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
+@RestController
+@RequestMapping("/apply/areas")
+public class ApplyAreasController extends BaseController {
+
+    private final IApplyAreasService iApplyAreasService;
+
+    /**
+     * 查询报考省地区列表
+     */
+    @ApiOperation("查询报考省地区列表")
+    @GetMapping("/list")
+    public TableDataInfo<ApplyAreasVo> list(ApplyAreasQueryBo bo) {
+        bo.setStatus(new ArrayList<Integer>(Arrays.asList(1)));
+        bo.setParentId(0L);
+        startPage();
+        List<ApplyAreasVo> list = iApplyAreasService.queryList(bo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询报考市地区列表
+     */
+    @ApiOperation("查询报考市地区列表")
+    @GetMapping("/cityList")
+    public TableDataInfo<ApplyAreas> cityList(ApplyAreasQueryBo bo) {
+        startPage();
+        List<ApplyAreas> list = iApplyAreasService.selectCityList(bo);
+        return getDataTable(list);
+    }
+
+
+}

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/bank/QuestionMapper.xml

@@ -152,7 +152,7 @@
         question q
         LEFT JOIN question_business qb ON q.question_id = qb.major_id and qb.type = 1
         WHERE
-        1 = 1
+        1 = 1 AND q.status !=-1
         <if test="status != null and status.size()!=0 ">
             AND q.status in
             <foreach collection="status" item="item" index="index" open="(" close=")" separator=",">