fix:十二分制-奖惩规则
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.enums.tp.TpFormTypeEnum;
|
||||
import com.cool.store.request.tp.TpApplyAuditRequest;
|
||||
import com.cool.store.request.tp.TpApplyQueryRequest;
|
||||
import com.cool.store.request.tp.TpApplyRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.tp.TpApplyService;
|
||||
import com.cool.store.vo.tp.TpRewardApplyDetailVO;
|
||||
import com.cool.store.vo.tp.TpRewardApplyListVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 十二分制-申请单 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2025/11/6
|
||||
*/
|
||||
@Api(tags = "十二分制-奖惩规则")
|
||||
@RestController
|
||||
@RequestMapping("/pc/tp/apply")
|
||||
@RequiredArgsConstructor
|
||||
public class TpApplyController {
|
||||
private final TpApplyService tpApplyService;
|
||||
|
||||
@ApiOperation("加分申请提交or保存")
|
||||
@PostMapping("/rewardApplySubmit")
|
||||
public ResponseResult<Boolean> rewardApplySubmit(@RequestBody @Validated TpApplyRequest request) {
|
||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
request.setSource(0);
|
||||
request.setApplyUserId(user.getUserId());
|
||||
request.setApplyUserName(user.getName());
|
||||
return ResponseResult.success(tpApplyService.rewardApplySubmit(request));
|
||||
}
|
||||
|
||||
@ApiOperation("加分申请单详情")
|
||||
@GetMapping("/rewardDetail")
|
||||
@ApiImplicitParam(name = "applyId", value = "加分申请单id", required = true, dataType = "Long", paramType = "query")
|
||||
public ResponseResult<TpRewardApplyDetailVO> rewardDetail(@NotNull(message = "加分申请单id不能为空") Long applyId) {
|
||||
return ResponseResult.success(tpApplyService.rewardDetail(applyId));
|
||||
}
|
||||
|
||||
@ApiOperation("加分申请单分页查询")
|
||||
@GetMapping("/rewardPage")
|
||||
public ResponseResult<PageInfo<TpRewardApplyListVO> > rewardPage(TpApplyQueryRequest request) {
|
||||
request.setType(TpFormTypeEnum.REWARD.getType());
|
||||
return ResponseResult.success(tpApplyService.rewardPage(request));
|
||||
}
|
||||
|
||||
@ApiOperation("加分申请审批")
|
||||
@PostMapping("/rewardAudit")
|
||||
public ResponseResult<Boolean> rewardAudit(@RequestBody @Validated TpApplyAuditRequest request) {
|
||||
request.setApplyType(TpFormTypeEnum.REWARD.getType());
|
||||
return ResponseResult.success(tpApplyService.rewardAudit(request));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user