fix
Helius
2021-06-26 4e1a8c6b62ebfe4546777c55b024c33e74ac5338
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.xzx.gc.user.controller;
 
import com.xzx.gc.common.Result;
import com.xzx.gc.common.request.BaseController;
import com.xzx.gc.user.dto.JhyApplyDto;
import com.xzx.gc.user.service.JhyInfoService;
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.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
 
import javax.servlet.http.HttpServletRequest;
 
@RestController
@Api(tags = {"集物员--集物员管理"})
@Slf4j
public class ApiJhyInfoController extends BaseController {
 
    @Autowired
    private JhyInfoService jhyInfoService;
 
    @ApiOperation("申请集物员")
    @PostMapping(value = "/jhy/apply")
    public Result<String> apply(@RequestBody JhyApplyDto applyDto, HttpServletRequest request) {
        String userId = getUserId(request);
        applyDto.setUserId(userId);
        jhyInfoService.applyJhy(applyDto);
        return Result.success();
    }
 
    @ApiOperation("获取集物员审核状态")
    @PostMapping(value = "/jhy/applyStatus")
    public Result<Integer> applyStatus(HttpServletRequest request) {
        int status = jhyInfoService.applyStatus(getUserId(request));
        return Result.success(status);
    }
}