diff --git a/hyp-admin/src/main/java/com/hyp/web/controller/manager/ScoreInfoManager.java b/hyp-admin/src/main/java/com/hyp/web/controller/manager/ScoreInfoManager.java index 150481c..9cbf825 100644 --- a/hyp-admin/src/main/java/com/hyp/web/controller/manager/ScoreInfoManager.java +++ b/hyp-admin/src/main/java/com/hyp/web/controller/manager/ScoreInfoManager.java @@ -3,10 +3,13 @@ package com.hyp.web.controller.manager; import cn.hutool.core.convert.Convert; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.hyp.common.core.domain.model.LoginUser; +import com.hyp.common.enums.ApplyStatusEnum; import com.hyp.common.utils.SecurityUtils; import com.hyp.common.utils.StringUtils; +import com.hyp.system.domain.RewApplyInfoList; import com.hyp.system.domain.RewScoreInfo; import com.hyp.system.domain.dto.ScoreInfoSaveDTO; +import com.hyp.system.service.RewApplyInfoListService; import com.hyp.system.service.RewScoreInfoService; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -32,6 +35,10 @@ public class ScoreInfoManager { @Resource private RewScoreInfoService scoreInfoService; + + @Resource + private RewApplyInfoListService applyInfoListService; + /** * * 保存 @@ -70,4 +77,19 @@ public class ScoreInfoManager { } + /** + * + * 评分提交 + * @param applyId + * @return boolean + */ + public boolean submit(String applyId){ + return applyInfoListService.lambdaUpdate() + .eq(RewApplyInfoList::getApplyId, applyId) + .set(RewApplyInfoList::getApplyStatus, ApplyStatusEnum.END.getType()) + .set(RewApplyInfoList::getUpdateTime, new Date()) + .update(); + } + + } diff --git a/hyp-admin/src/main/java/com/hyp/web/controller/reward/ScoreInfoController.java b/hyp-admin/src/main/java/com/hyp/web/controller/reward/ScoreInfoController.java index c2ca383..109c0fe 100644 --- a/hyp-admin/src/main/java/com/hyp/web/controller/reward/ScoreInfoController.java +++ b/hyp-admin/src/main/java/com/hyp/web/controller/reward/ScoreInfoController.java @@ -65,6 +65,12 @@ public class ScoreInfoController extends BaseController { return success(scoreInfoManager.getScoreInfo(applyId,createId)); } + @ApiOperation("评分提交") + @GetMapping(value = "/submit/{applyId}") + public AjaxResult submit(@PathVariable String applyId) { + return toAjax(scoreInfoManager.submit(applyId)); + } + diff --git a/hyp-common/src/main/java/com/hyp/common/enums/ApplyStatusEnum.java b/hyp-common/src/main/java/com/hyp/common/enums/ApplyStatusEnum.java index 7cce6f8..c2b0cb7 100644 --- a/hyp-common/src/main/java/com/hyp/common/enums/ApplyStatusEnum.java +++ b/hyp-common/src/main/java/com/hyp/common/enums/ApplyStatusEnum.java @@ -17,7 +17,9 @@ public enum ApplyStatusEnum { AUDIT(2, "待评分"), - BACK(3, "退回"); + BACK(3, "退回"), + + END(4, "结束"); private Integer type;