Eric 2 years ago
parent
commit
08a2b1143e

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/DegreeServiceImpl.java

@@ -228,7 +228,7 @@ public class DegreeServiceImpl extends ServiceImpl<DegreeMapper, Degree> impleme
 
         Date currentDate = DateTime.now().toDate();
         // 考级时间不匹配
-        if (degree.getStartTime().after(currentDate) || degree.getEndTime().before(currentDate)) {
+        if (degree.getEndTime().before(currentDate)) {
             throw new BizException("考级报名已经结束");
         }
 

+ 6 - 0
mec-biz/src/main/resources/config/mybatis/DegreeMapper.xml

@@ -19,6 +19,12 @@
             <if test="param.tenantId != null">
                 and t.tenant_id_ = #{param.tenantId}
             </if>
+		    <if test="param.organId != null">
+                AND FIND_IN_SET(#{param.organId},t.organ_ids_)
+            </if>
+		    <if test="param.degreeStatuses != null">
+                AND t.status_ IN (<foreach collection="param.degreeStatuses" separator="," item="item">#{item}</foreach>)
+            </if>
         </where>
 	</select>
 

+ 0 - 5
mec-student/src/main/java/com/ym/mec/student/controller/degree/DegreeLevelFeeController.java

@@ -1,6 +1,5 @@
 package com.ym.mec.student.controller.degree;
 
-import com.alibaba.fastjson.JSONObject;
 import com.microsvc.toolkit.common.response.paging.PageInfo;
 import com.microsvc.toolkit.common.response.paging.QueryInfo;
 import com.ym.mec.auth.api.client.SysUserFeignService;
@@ -16,17 +15,14 @@ import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
-import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.List;
 import java.util.Objects;
 
 @Slf4j
@@ -51,7 +47,6 @@ public class DegreeLevelFeeController extends BaseController {
 	}
     
     @ApiOperation(value = "查询分页", notes = "考级等级费用配置- 传入 DegreeLevelFeeWrapper.DegreeLevelFeeQuery") 
-    @PreAuthorize("@pcs.hasPermissions('degreeLevelFee/page')")
     @PostMapping("/page")
     public HttpResponseResult<PageInfo<DegreeLevelFeeNewVo>> page(@RequestBody DegreeLevelFeeWrapper.DegreeLevelFeeQuery query) {