mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package com.chuangongzhijia.huacheng_union_applets.api;
 
import com.panzhihua.common.model.dtos.equipment.UnionUserDto;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.service.community.CommunityUnionService;
import com.panzhihua.common.service.user.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.ApiImplicitParam;
 
import javax.annotation.Resource;
 
@Slf4j
@Api(tags = {"用户相关"})
@RestController
@RequestMapping("/unionUser")
public class UnionUserApi {
 
    @Resource
    private CommunityUnionService communityUnionService;
 
 
//    @Resource
//    private UserService userService;
    /**
     * 总工会户外劳登录
     *
     *
     * @return 总工会户外劳共用户
     */
    @ApiOperation(value = "总工会户外劳登录(H5)")
    @GetMapping("/login")
    public R login(@RequestParam(value = "phone") String phone){
        return  communityUnionService.unionUserLoginH5(phone);
    }
 
    /**
     * 总工会户外劳工站用户认证
     *
     * @param unionUserDto
     * @return 总工会户外劳共用户
     */
 
    @ApiOperation(value = "总工会户外劳工站用户认证")
    @PostMapping("/authentication")
    public R authentication(@RequestBody UnionUserDto unionUserDto){
        unionUserDto.setIsApplets(3);
        return  communityUnionService.unionUserAuthentication(unionUserDto);
    }
 
 
    /**
     * 用户开门
     * @param qRCode 二维码字符串
     * @return 总工会户外劳共用户
     */
    @ApiOperation(value = "用户开门")
    @GetMapping("/openDoor")
    public R openDoor(@RequestParam(value = "qRCode")  String qRCode){
        return  communityUnionService.openDoor(qRCode);
    }
 
}