Jelajahi Sumber

Merge branch 'feature/0406-degree' into master_saas

Eric 2 tahun lalu
induk
melakukan
317654f4f8

+ 4 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/mapper/DegreeLevelFeeMapper.java

@@ -26,5 +26,8 @@ public interface DegreeLevelFeeMapper extends BaseMapper<DegreeLevelFeeNew> {
 	 */
 	List<DegreeLevelFeeNewVo> selectPage(@Param("page") IPage<DegreeLevelFeeNewVo> page, @Param("param") DegreeLevelFeeWrapper.DegreeLevelFeeQuery param);
 
-    String checkSave(@Param("subjectId") Integer subjectId, @Param("degreeType") String degreeType, @Param("levels") String levels);
+    String checkSave(@Param("subjectId") Integer subjectId,
+					 @Param("degreeType") String degreeType,
+					 @Param("levels") String levels,
+					 @Param("degreeLevelFeeId") Integer degreeLevelFeeId);
 }

+ 96 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/wrapper/DegreeWrapper.java

@@ -2,6 +2,7 @@ package com.ym.mec.biz.dal.wrapper;
 
 import com.alibaba.fastjson.JSON;
 import com.microsvc.toolkit.common.response.paging.QueryInfo;
+import com.ym.mec.biz.dal.entity.Organization;
 import com.ym.mec.biz.dal.enums.EDegreeStatus;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -13,6 +14,7 @@ import org.apache.commons.lang3.StringUtils;
 
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.NotNull;
+import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
@@ -51,8 +53,15 @@ public class DegreeWrapper {
         @ApiModelProperty("报名状态 NOT_START:未开始,START:报名中,END:报名结束")
         private EDegreeStatus status;
 
+        @ApiModelProperty("机构ID")
         private Integer tenantId;
 
+        @ApiModelProperty("城市分部ID")
+        private Integer organId;
+
+        @ApiModelProperty("报名状态集合 NOT_START:未开始,START:报名中,END:报名结束")
+        private List<EDegreeStatus> degreeStatuses;
+
         public String getKeyword() {
             return Optional.ofNullable(keyword).filter(StringUtils::isNotBlank).orElse(null);
         }
@@ -64,7 +73,32 @@ public class DegreeWrapper {
         public static DegreeQuery from(String json) {
             return JSON.parseObject(json, DegreeQuery.class);
         }
-    }  
+
+        public DegreeQuery page(Integer page) {
+            this.page = page;
+            return this;
+        }
+
+        public DegreeQuery rows(Integer rows) {
+            this.rows = rows;
+            return this;
+        }
+
+        public DegreeQuery tenantId(Integer tenantId) {
+            this.tenantId = tenantId;
+            return this;
+        }
+
+        public DegreeQuery organId(Integer organId) {
+            this.organId = organId;
+            return this;
+        }
+
+        public DegreeQuery degreeStatuses(List<EDegreeStatus> degreeStatuses) {
+            this.degreeStatuses = degreeStatuses;
+            return this;
+        }
+    }
 
     @Data
 	@ApiModel(" Degree-考级信息")
@@ -146,4 +180,65 @@ public class DegreeWrapper {
         private BigDecimal courseIncome;
 
     }
+
+    @Data
+    @ApiModel(" Degree-考级信息")
+    public static class StudentDegreeInfo {
+
+
+        @ApiModelProperty("主键ID")
+        private Long id;
+
+        @ApiModelProperty("机构ID")
+        private Integer tenantId;
+
+        @ApiModelProperty(value = "分部ID")
+        private String organIds;
+
+        @ApiModelProperty("分部名称")
+        private List<Organization> organs;
+
+        @ApiModelProperty(value = "考级名称")
+        private String name;
+
+        @ApiModelProperty(value = "报名开始时间")
+        private Date startTime;
+
+        @ApiModelProperty(value = "报名结束时间")
+        private Date endTime;
+
+        @ApiModelProperty(value = "登记时间")
+        private Date registrationTime;
+
+        @ApiModelProperty("报名状态 NOT_START:未开始,START:报名中,END:报名结束")
+        private EDegreeStatus status;
+
+        @ApiModelProperty("考级城市分部")
+        private List<DegreeCity> degreeCities;
+
+
+        public String jsonString() {
+            return JSON.toJSONString(this);
+        }
+
+        public static StudentDegreeInfo from(String json) {
+            return JSON.parseObject(json, StudentDegreeInfo.class);
+        }
+    }
+
+    @Data
+    @NoArgsConstructor
+    @AllArgsConstructor
+    @ApiModel("考级城市分部")
+    public static class DegreeCity implements Serializable {
+
+        @ApiModelProperty("主键ID")
+        private Integer id;
+
+        @ApiModelProperty(value = "机构名称")
+        private String name;
+
+        @ApiModelProperty(value = "区域编码")
+        private Integer areaId;
+    }
 }

+ 2 - 14
mec-biz/src/main/java/com/ym/mec/biz/service/DegreeLevelFeeService.java

@@ -29,20 +29,6 @@ public interface DegreeLevelFeeService extends IService<DegreeLevelFeeNew>  {
      * @return IPage<DegreeLevelFee>
      */
     IPage<DegreeLevelFeeNewVo> selectPage(IPage<DegreeLevelFeeNewVo> page, DegreeLevelFeeWrapper.DegreeLevelFeeQuery query);
-	
-    /**
-     * 添加
-     * @param degreeLevelFee DegreeLevelFeeWrapper.DegreeLevelFee
-     * @return Boolean
-     */
-     Boolean add(DegreeLevelFeeWrapper.DegreeLevelFee degreeLevelFee);   
-
-    /**
-     * 更新
-     * @param degreeLevelFee DegreeLevelFeeWrapper.DegreeLevelFee
-     * @return Boolean
-     */
-     Boolean update(DegreeLevelFeeWrapper.DegreeLevelFee degreeLevelFee);
 
     /**
      * 机构考级价格配置
@@ -59,4 +45,6 @@ public interface DegreeLevelFeeService extends IService<DegreeLevelFeeNew>  {
     * @date 2023/4/11 19:43
     */
     void batchSave(List<DegreeLevelFeeNew> degreeLevelFees);
+
+    void update(DegreeLevelFeeNew degreeLevelFee);
 }

+ 7 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/DegreeService.java

@@ -45,4 +45,11 @@ public interface DegreeService extends IService<Degree>  {
      * @param id 详情ID
      */
     DegreeWrapper.DegreeStatistical statistic(Long id);
+
+    /**
+     * 学生考级信息查询
+     * @param id 考级ID
+     * @return DegreeWrapper.StudentDegreeInfo
+     */
+    DegreeWrapper.StudentDegreeInfo studentDegreeInfoById(Long id);
 }

+ 27 - 30
mec-biz/src/main/java/com/ym/mec/biz/service/impl/DegreeLevelFeeServiceImpl.java

@@ -8,16 +8,16 @@ import com.ym.mec.biz.dal.dao.SubjectDao;
 import com.ym.mec.biz.dal.entity.DegreeLevelFeeNew;
 import com.ym.mec.biz.dal.entity.Subject;
 import com.ym.mec.biz.dal.enums.DegreeTypeEnum;
+import com.ym.mec.biz.dal.mapper.DegreeLevelFeeMapper;
+import com.ym.mec.biz.dal.vo.DegreeLevelFeeNewVo;
+import com.ym.mec.biz.dal.wrapper.DegreeLevelFeeWrapper;
+import com.ym.mec.biz.service.DegreeLevelFeeService;
 import com.ym.mec.common.exception.BizException;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import com.ym.mec.biz.dal.vo.DegreeLevelFeeNewVo;
 import org.springframework.stereotype.Service;
-import lombok.extern.slf4j.Slf4j;
-import com.ym.mec.biz.dal.wrapper.DegreeLevelFeeWrapper;
-import com.ym.mec.biz.dal.mapper.DegreeLevelFeeMapper;
-import com.ym.mec.biz.service.DegreeLevelFeeService;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.List;
@@ -59,27 +59,6 @@ public class DegreeLevelFeeServiceImpl extends ServiceImpl<DegreeLevelFeeMapper,
         return page.setRecords(baseMapper.selectPage(page, query));
     }
 
-    /**
-     * 添加
-     * @param degreeLevelFee DegreeLevelFeeWrapper.DegreeLevelFee
-     * @return Boolean
-     */
-    @Override
-    public Boolean add(DegreeLevelFeeWrapper.DegreeLevelFee degreeLevelFee) {
-
-        return this.save(JSON.parseObject(degreeLevelFee.jsonString(), DegreeLevelFeeNew.class));
-    }
-
-    /**
-     * 更新
-     * @param degreeLevelFee DegreeLevelFeeWrapper.DegreeLevelFee
-     * @return Boolean
-     */
-    @Override
-    public Boolean update(DegreeLevelFeeWrapper.DegreeLevelFee degreeLevelFee){
-
-        return this.updateById(JSON.parseObject(degreeLevelFee.jsonString(), DegreeLevelFeeNew.class));
-    }
 
     /**
      * 机构考级价格配置
@@ -162,15 +141,33 @@ public class DegreeLevelFeeServiceImpl extends ServiceImpl<DegreeLevelFeeMapper,
     @Transactional(rollbackFor = Exception.class)
     public void batchSave(List<DegreeLevelFeeNew> degreeLevelFees) {
         DegreeLevelFeeNew degreeLevelFeeNew = degreeLevelFees.get(0);
-        Integer subjectId = degreeLevelFeeNew.getSubjectId();
-        DegreeTypeEnum degreeType = degreeLevelFeeNew.getDegreeType();
         String levels = degreeLevelFees.stream().map(e -> e.getLevel().toString()).collect(Collectors.joining(","));
-        String level = baseMapper.checkSave(subjectId,degreeType.getCode(),levels);
+        this.check(degreeLevelFeeNew.getSubjectId(),degreeLevelFeeNew.getDegreeType(),levels,null);
+        this.saveBatch(degreeLevelFees);
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public void update(DegreeLevelFeeNew degreeLevelFee) {
+        this.check(degreeLevelFee.getSubjectId(),degreeLevelFee.getDegreeType(),degreeLevelFee.getLevel().toString(),degreeLevelFee.getId());
+        if(degreeLevelFee.getDegreeType() == DegreeTypeEnum.THEORY){
+            this.lambdaUpdate().eq(DegreeLevelFeeNew::getId,degreeLevelFee.getId())
+                    .set(DegreeLevelFeeNew::getLevel,degreeLevelFee.getLevel())
+                    .set(DegreeLevelFeeNew::getDegreeType,degreeLevelFee.getDegreeType())
+                    .set(DegreeLevelFeeNew::getFee,degreeLevelFee.getFee())
+                    .set(DegreeLevelFeeNew::getCredentials,degreeLevelFee.getCredentials())
+                    .set(DegreeLevelFeeNew::getSubjectId,null).update();
+        }else {
+            this.updateById(degreeLevelFee);
+        }
+    }
+
+    private void check(Integer subjectId,DegreeTypeEnum degreeType,String levels,Integer degreeLevelFeeId){
+        String level = baseMapper.checkSave(subjectId,degreeType.getCode(),levels,degreeLevelFeeId);
         if(StringUtils.isNotEmpty(level)){
             StringBuffer sb = new StringBuffer(degreeType.getMsg());
             sb.append("/级别").append(level).append("配置已存在");
             throw new BizException(sb.toString());
         }
-        this.saveBatch(degreeLevelFees);
     }
 }

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

@@ -4,14 +4,17 @@ import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ym.mec.biz.dal.dao.DegreeRegistrationDao;
+import com.ym.mec.biz.dal.dao.OrganizationDao;
 import com.ym.mec.biz.dal.dao.StudentPaymentOrderDetailDao;
 import com.ym.mec.biz.dal.entity.*;
 import com.ym.mec.biz.dal.enums.EDegreeStatus;
 import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
 import com.ym.mec.biz.service.OrganizationService;
-import com.ym.mec.biz.service.StudentPaymentOrderDetailService;
 import com.ym.mec.biz.service.StudentPaymentOrderService;
+import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.tenant.TenantContextHolder;
+import org.apache.commons.lang3.StringUtils;
+import org.joda.time.DateTime;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import lombok.extern.slf4j.Slf4j;
@@ -47,6 +50,9 @@ public class DegreeServiceImpl extends ServiceImpl<DegreeMapper, Degree> impleme
     @Autowired
     private StudentPaymentOrderDetailDao studentPaymentOrderDetailDao;
 
+    @Autowired
+    private OrganizationDao organizationDao;
+
 	/**
      * 查询详情
      * @param id 详情ID
@@ -204,4 +210,46 @@ public class DegreeServiceImpl extends ServiceImpl<DegreeMapper, Degree> impleme
 
         return statistical;
     }
+
+    /**
+     * 学生考级信息查询
+     *
+     * @param id 考级ID
+     * @return DegreeWrapper.StudentDegreeInfo
+     */
+    @Override
+    public DegreeWrapper.StudentDegreeInfo studentDegreeInfoById(Long id) {
+
+        Degree degree = getById(id);
+        // 考级信息不存在
+        if (Objects.isNull(degree)) {
+            throw new BizException("考级信息不存在");
+        }
+
+        Date currentDate = DateTime.now().toDate();
+        // 考级时间不匹配
+        if (degree.getEndTime().before(currentDate)) {
+            throw new BizException("考级报名已经结束");
+        }
+
+        // 考级分部信息
+        DegreeWrapper.StudentDegreeInfo wrapper = DegreeWrapper.StudentDegreeInfo.from(JSON.toJSONString(degree));
+
+        // 分部信息
+        if(StringUtils.isNotEmpty(wrapper.getOrganIds())){
+
+            // 考级分部ID
+            List<Integer> collect = Arrays.stream(wrapper.getOrganIds().split(","))
+                    .mapToInt(Integer::valueOf).boxed()
+                    .collect(Collectors.toList());
+
+            List<Organization> organs = organizationDao.findOrgans(collect);
+
+            if (org.apache.commons.collections.CollectionUtils.isNotEmpty(organs)) {
+                wrapper.setDegreeCities(JSON.parseArray(JSON.toJSONString(organs), DegreeWrapper.DegreeCity.class));
+            }
+        }
+
+        return wrapper;
+    }
 }

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/DegreeLevelFeeNewMapper.xml

@@ -27,6 +27,9 @@
 		<if test="subjectId != null">
 			AND subject_id_ = #{subjectId}
 		</if>
+		<if test="degreeLevelFeeId != null">
+			AND id_ != #{degreeLevelFeeId}
+		</if>
 	</select>
 
 </mapper>

+ 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>
 

+ 124 - 0
mec-student/src/main/java/com/ym/mec/student/controller/degree/DegreeInfoController.java

@@ -0,0 +1,124 @@
+package com.ym.mec.student.controller.degree;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.google.common.collect.Lists;
+import com.microsvc.toolkit.common.response.paging.PageInfo;
+import com.microsvc.toolkit.common.response.paging.QueryInfo;
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.enums.EDegreeStatus;
+import com.ym.mec.biz.dal.wrapper.DegreeWrapper;
+import com.ym.mec.biz.service.DegreeService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.entity.HttpResponseResult;
+import com.ym.mec.common.exception.BizException;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+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.RestController;
+
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+@Slf4j
+@Validated
+@RestController
+@RequestMapping("/degree")
+@Api(tags = "考级信息")
+public class DegreeInfoController extends BaseController {
+
+    @Autowired
+    private DegreeService degreeService;
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
+
+    @ApiOperation(value = "详情", notes = "考级信息-根据详情ID查询单条, 传入id")
+    @GetMapping("/detail/{id}")
+    public HttpResponseResult<DegreeWrapper.StudentDegreeInfo> detail(@PathVariable("id") Long id) {
+
+        // 登录用户信息
+        SysUser user = sysUserFeignService.queryUserInfo();
+        if (Objects.isNull(user) || Objects.isNull(user.getId())){
+            return failed(HttpStatus.FORBIDDEN,"请登录");
+        }
+
+        // 考级信息
+        DegreeWrapper.StudentDegreeInfo wrapper = degreeService.studentDegreeInfoById(id);
+
+        // 考级机构-暂未开放此活动
+        if (!user.getTenantId().equals(wrapper.getTenantId())) {
+            throw new BizException("暂未开放此活动");
+        }
+
+        // 考级城市-暂未开放此活动
+        boolean noneMatch = Arrays.stream(wrapper.getOrganIds().split(","))
+                .mapToInt(Integer::parseInt).noneMatch(x -> x == user.getOrganId());
+        if (Objects.nonNull(user.getOrganId()) && noneMatch) {
+            throw new BizException("暂未开放此活动");
+        }
+
+        // 查询机构信息
+        return succeed(wrapper);
+    }
+    
+    @ApiOperation(value = "查询分页", notes = "考级信息- 传入 DegreeWrapper.DegreeQuery") 
+    @PostMapping("/page")
+    public HttpResponseResult<PageInfo<DegreeWrapper.Degree>> page(@RequestBody DegreeWrapper.DegreeQuery query) {
+
+        // 登录用户信息
+        SysUser user = sysUserFeignService.queryUserInfo();
+        if (Objects.isNull(user) || Objects.isNull(user.getId())) {
+            return failed(HttpStatus.FORBIDDEN, "请登录");
+        }
+
+        // 设置用户机构ID和城市分部ID
+        query.tenantId(user.getTenantId()).organId(user.getOrganId()).setDegreeStatuses(Lists.newArrayList(EDegreeStatus.END));
+
+        IPage<DegreeWrapper.Degree> pages = degreeService.selectPage(QueryInfo.getPage(query), query);
+
+        // 首页查询时,默认查询进行中,未开始插入首页
+        if (query.getPage() == 1) {
+
+            // 设置分页查询参数
+            query.rows(1000).degreeStatuses(Lists.newArrayList(EDegreeStatus.NOT_START, EDegreeStatus.START));
+
+            // 考级信息
+            Map<EDegreeStatus, List<DegreeWrapper.Degree>> collect = degreeService.selectPage(QueryInfo.getPage(query), query).getRecords().stream()
+                    .collect(Collectors.groupingBy(DegreeWrapper.Degree::getStatus));
+
+            List<DegreeWrapper.Degree> degrees = Lists.newArrayList();
+            // 进行中
+            if (collect.containsKey(EDegreeStatus.START)) {
+                degrees.addAll(collect.get(EDegreeStatus.START).stream()
+                        .sorted(Comparator.comparing(DegreeWrapper.Degree::getStartTime))
+                        .collect(Collectors.toList()));
+            }
+
+            // 未开始
+            if (collect.containsKey(EDegreeStatus.NOT_START)) {
+                degrees.addAll(collect.get(EDegreeStatus.NOT_START).stream()
+                        .sorted(Comparator.comparing(DegreeWrapper.Degree::getStartTime))
+                        .collect(Collectors.toList()));
+            }
+
+            if (CollectionUtils.isNotEmpty(degrees)) {
+                pages.getRecords().addAll(0, degrees);
+            }
+        }
+        
+        return succeed(QueryInfo.pageInfo(pages));
+    }
+}

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

@@ -0,0 +1,69 @@
+package com.ym.mec.student.controller.degree;
+
+import com.microsvc.toolkit.common.response.paging.PageInfo;
+import com.microsvc.toolkit.common.response.paging.QueryInfo;
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.entity.DegreeLevelFeeNew;
+import com.ym.mec.biz.dal.vo.DegreeLevelFeeNewVo;
+import com.ym.mec.biz.dal.wrapper.DegreeLevelFeeWrapper;
+import com.ym.mec.biz.service.DegreeLevelFeeService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.entity.HttpResponseResult;
+import io.swagger.annotations.Api;
+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.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.RestController;
+
+import java.util.Objects;
+
+@Slf4j
+@Validated
+@RestController
+@RequestMapping("/degreeLevelFee")
+@Api(tags = "考级等级费用配置")
+public class DegreeLevelFeeController extends BaseController {
+
+    @Autowired
+    private DegreeLevelFeeService degreeLevelFeeService;
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
+
+	@ApiOperation(value = "详情", notes = "考级等级费用配置-根据详情ID查询单条, 传入id")
+    @GetMapping("/detail/{id}")
+    public HttpResponseResult<DegreeLevelFeeNew> detail(@PathVariable("id") Long id) {
+
+        DegreeLevelFeeNew wrapper = degreeLevelFeeService.detail(id);
+        
+        return succeed(wrapper);
+	}
+    
+    @ApiOperation(value = "查询分页", notes = "考级等级费用配置- 传入 DegreeLevelFeeWrapper.DegreeLevelFeeQuery") 
+    @PostMapping("/page")
+    public HttpResponseResult<PageInfo<DegreeLevelFeeNewVo>> page(@RequestBody DegreeLevelFeeWrapper.DegreeLevelFeeQuery query) {
+        
+        return succeed(QueryInfo.pageInfo(degreeLevelFeeService.selectPage(QueryInfo.getPage(query), query)));
+	}
+    
+    @ApiOperation(value = "考级费用配置", notes = "考级费用配置查询")
+    @GetMapping("/degreeLevelFeeConfig")
+    public HttpResponseResult<DegreeLevelFeeWrapper.DegreeLevelFee> degreeLevelFeeConfig() {
+
+        // 登录用户信息
+        SysUser user = sysUserFeignService.queryUserInfo();
+        if(Objects.isNull(user)||Objects.isNull(user.getId())){
+            return failed(HttpStatus.FORBIDDEN,"请登录");
+        }
+
+        // 根据用户机构ID,查询对应考级配置
+        return succeed(degreeLevelFeeService.degreeLevelFeeConfig(user.getTenantId()));
+    }
+}

+ 52 - 0
mec-student/src/main/java/com/ym/mec/student/controller/degree/DegreeNewsController.java

@@ -0,0 +1,52 @@
+package com.ym.mec.student.controller.degree;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.microsvc.toolkit.common.response.paging.PageInfo;
+import com.microsvc.toolkit.common.response.paging.QueryInfo;
+import com.ym.mec.biz.dal.entity.DegreeNews;
+import com.ym.mec.biz.dal.vo.DegreeNewsVo;
+import com.ym.mec.biz.dal.wrapper.DegreeNewsWrapper;
+import com.ym.mec.biz.service.DegreeNewsService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.entity.HttpResponseResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+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.RestController;
+
+@Slf4j
+@Validated
+@RestController
+@RequestMapping("/degreeNews")
+@Api(tags = "考级资讯表")
+public class DegreeNewsController extends BaseController {
+
+    @Autowired
+    private DegreeNewsService degreeNewsService;
+
+	@ApiOperation(value = "详情", notes = "考级资讯表-根据详情ID查询单条, 传入id")
+    @GetMapping("/detail/{id}")
+    public HttpResponseResult<DegreeNews> detail(@PathVariable("id") Long id) {
+    
+    	DegreeNews wrapper = degreeNewsService.detail(id);
+        
+        return succeed(wrapper);
+	}
+    
+    @ApiOperation(value = "查询分页", notes = "考级资讯表- 传入 DegreeNewsWrapper.DegreeNewsQuery") 
+    @PostMapping("/page")
+    public HttpResponseResult<PageInfo<DegreeNewsVo>> page(@RequestBody DegreeNewsWrapper.DegreeNewsQuery query) {
+        
+        IPage<DegreeNewsVo> pages = degreeNewsService.selectPage(QueryInfo.getPage(query), query);
+
+        return succeed(QueryInfo.pageInfo(pages));
+	}
+    
+}

+ 2 - 1
mec-web/src/main/java/com/ym/mec/web/controller/degree/DegreeLevelFeeController.java

@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.entity.DegreeLevelFeeNew;
+import com.ym.mec.biz.dal.enums.DegreeTypeEnum;
 import com.ym.mec.biz.dal.vo.DegreeLevelFeeNewVo;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
@@ -74,7 +75,7 @@ public class DegreeLevelFeeController extends BaseController {
     @PreAuthorize("@pcs.hasPermissions('degreeLevelFee/update')")
 	@PostMapping("/update")
 	public HttpResponseResult<JSONObject> update(@RequestBody DegreeLevelFeeNew degreeLevelFee) {
-        degreeLevelFeeService.updateById(degreeLevelFee);
+        degreeLevelFeeService.update(degreeLevelFee);
         return succeed();
 	}