Parcourir la Source

增加短信登录

wwh il y a 3 semaines
Parent
commit
52e2189e26

+ 0 - 9
huimv-employment/fe-api/src/main/java/com/huimv/employment/controller/mp/EnterpriseController.java

@@ -8,12 +8,10 @@ import com.huimv.employment.security.LoginUserHolder;
8 8
 import com.huimv.employment.service.enterprise.EnterpriseService;
9 9
 import com.huimv.employment.service.enterprise.dto.EnterpriseRegisterRequest;
10 10
 import com.huimv.employment.service.enterprise.dto.EnterpriseRegisterResponse;
11
-import com.huimv.employment.service.enterprise.dto.EnterpriseStatusResponse;
12 11
 import io.swagger.v3.oas.annotations.Operation;
13 12
 import io.swagger.v3.oas.annotations.security.SecurityRequirement;
14 13
 import io.swagger.v3.oas.annotations.tags.Tag;
15 14
 import org.springframework.validation.annotation.Validated;
16
-import org.springframework.web.bind.annotation.GetMapping;
17 15
 import org.springframework.web.bind.annotation.PostMapping;
18 16
 import org.springframework.web.bind.annotation.RequestBody;
19 17
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -37,13 +35,6 @@ public class EnterpriseController {
37 35
         this.enterpriseService = enterpriseService;
38 36
     }
39 37
 
40
-    @GetMapping
41
-    @Operation(summary = "查询登记状态")
42
-    public R<EnterpriseStatusResponse> getStatus() {
43
-        LoginUser loginUser = requireEnterprise();
44
-        return R.ok(enterpriseService.getStatus(loginUser.getUserId()));
45
-    }
46
-
47 38
     @PostMapping("/register")
48 39
     @Operation(summary = "提交企业登记")
49 40
     public R<EnterpriseRegisterResponse> register(@Validated @RequestBody EnterpriseRegisterRequest request) {

+ 36 - 0
huimv-employment/fe-api/src/main/java/com/huimv/employment/controller/mp/ProfileController.java

@@ -0,0 +1,36 @@
1
+package com.huimv.employment.controller.mp;
2
+
3
+import com.huimv.employment.common.web.R;
4
+import com.huimv.employment.security.LoginUser;
5
+import com.huimv.employment.security.LoginUserHolder;
6
+import com.huimv.employment.service.auth.ProfileService;
7
+import com.huimv.employment.service.auth.dto.MpUserInfoResponse;
8
+import io.swagger.v3.oas.annotations.Operation;
9
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
10
+import io.swagger.v3.oas.annotations.tags.Tag;
11
+import org.springframework.web.bind.annotation.GetMapping;
12
+import org.springframework.web.bind.annotation.RequestMapping;
13
+import org.springframework.web.bind.annotation.RestController;
14
+
15
+/**
16
+ * 小程序通用接口。
17
+ */
18
+@RestController
19
+@RequestMapping("/api/v1/mp")
20
+@Tag(name = "小程序", description = "用户信息等")
21
+@SecurityRequirement(name = "Authorization")
22
+public class ProfileController {
23
+
24
+    private final ProfileService profileService;
25
+
26
+    public ProfileController(ProfileService profileService) {
27
+        this.profileService = profileService;
28
+    }
29
+
30
+    @GetMapping("/getInfo")
31
+    @Operation(summary = "查询当前用户登记状态与详情")
32
+    public R<MpUserInfoResponse> getInfo() {
33
+        LoginUser loginUser = LoginUserHolder.require();
34
+        return R.ok(profileService.getInfo(loginUser.getUserId(), loginUser.getUserType()));
35
+    }
36
+}

+ 0 - 9
huimv-employment/fe-api/src/main/java/com/huimv/employment/controller/mp/WorkerController.java

@@ -8,12 +8,10 @@ import com.huimv.employment.security.LoginUserHolder;
8 8
 import com.huimv.employment.service.worker.WorkerService;
9 9
 import com.huimv.employment.service.worker.dto.WorkerRegisterRequest;
10 10
 import com.huimv.employment.service.worker.dto.WorkerRegisterResponse;
11
-import com.huimv.employment.service.worker.dto.WorkerStatusResponse;
12 11
 import io.swagger.v3.oas.annotations.Operation;
13 12
 import io.swagger.v3.oas.annotations.security.SecurityRequirement;
14 13
 import io.swagger.v3.oas.annotations.tags.Tag;
15 14
 import org.springframework.validation.annotation.Validated;
16
-import org.springframework.web.bind.annotation.GetMapping;
17 15
 import org.springframework.web.bind.annotation.PostMapping;
18 16
 import org.springframework.web.bind.annotation.RequestBody;
19 17
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -39,13 +37,6 @@ public class WorkerController {
39 37
         this.workerService = workerService;
40 38
     }
41 39
 
42
-    @GetMapping
43
-    @Operation(summary = "查询登记状态")
44
-    public R<WorkerStatusResponse> getStatus() {
45
-        LoginUser loginUser = requireWorker();
46
-        return R.ok(workerService.getStatus(loginUser.getUserId()));
47
-    }
48
-
49 40
     @PostMapping("/register")
50 41
     @Operation(summary = "提交登记")
51 42
     public R<WorkerRegisterResponse> register(@Validated @RequestBody WorkerRegisterRequest request,

+ 96 - 0
huimv-employment/fe-service/src/main/java/com/huimv/employment/service/auth/ProfileService.java

@@ -0,0 +1,96 @@
1
+package com.huimv.employment.service.auth;
2
+
3
+import com.huimv.employment.common.exception.BizException;
4
+import com.huimv.employment.common.exception.ErrorCode;
5
+import com.huimv.employment.dao.entity.FeEnterprise;
6
+import com.huimv.employment.dao.entity.FeUser;
7
+import com.huimv.employment.dao.entity.FeWorker;
8
+import com.huimv.employment.dao.mapper.FeUserMapper;
9
+import com.huimv.employment.service.auth.dto.MpUserInfoResponse;
10
+import com.huimv.employment.service.enterprise.EnterpriseService;
11
+import com.huimv.employment.service.worker.WorkerService;
12
+import org.springframework.stereotype.Service;
13
+
14
+/**
15
+ * 小程序用户综合信息查询。
16
+ */
17
+@Service
18
+public class ProfileService {
19
+
20
+    private static final String USER_TYPE_ENTERPRISE = "enterprise";
21
+    private static final String USER_TYPE_WORKER = "worker";
22
+
23
+    private final FeUserMapper feUserMapper;
24
+    private final EnterpriseService enterpriseService;
25
+    private final WorkerService workerService;
26
+
27
+    public ProfileService(FeUserMapper feUserMapper,
28
+                          EnterpriseService enterpriseService,
29
+                          WorkerService workerService) {
30
+        this.feUserMapper = feUserMapper;
31
+        this.enterpriseService = enterpriseService;
32
+        this.workerService = workerService;
33
+    }
34
+
35
+    public MpUserInfoResponse getInfo(Long userId, String userType) {
36
+        FeUser user = feUserMapper.selectById(userId);
37
+        if (user == null) {
38
+            throw new BizException(ErrorCode.UNAUTHORIZED);
39
+        }
40
+
41
+        MpUserInfoResponse response = new MpUserInfoResponse();
42
+        response.setUserType(userType);
43
+        response.setMobileMask(user.getMobileMask());
44
+
45
+        if (USER_TYPE_ENTERPRISE.equals(userType)) {
46
+            enterpriseService.requireEnterpriseUser(userId);
47
+            FeEnterprise enterprise = enterpriseService.findEnterpriseByUserId(userId);
48
+            if (enterprise == null) {
49
+                response.setRegistered(false);
50
+            } else {
51
+                response.setRegistered(true);
52
+                response.setEnterprise(toEnterpriseInfo(enterprise));
53
+            }
54
+        } else if (USER_TYPE_WORKER.equals(userType)) {
55
+            workerService.requireWorkerUser(userId);
56
+            FeWorker worker = workerService.findWorkerByUserId(userId);
57
+            if (worker == null) {
58
+                response.setRegistered(false);
59
+            } else {
60
+                response.setRegistered(true);
61
+                response.setWorker(toWorkerInfo(worker));
62
+            }
63
+        } else {
64
+            throw new BizException(ErrorCode.BAD_REQUEST, "不支持的用户类型");
65
+        }
66
+        return response;
67
+    }
68
+
69
+    private static MpUserInfoResponse.EnterpriseInfo toEnterpriseInfo(FeEnterprise enterprise) {
70
+        MpUserInfoResponse.EnterpriseInfo info = new MpUserInfoResponse.EnterpriseInfo();
71
+        info.setEnterpriseId(enterprise.getId());
72
+        info.setEnterpriseCode(enterprise.getEnterpriseCode());
73
+        info.setName(enterprise.getName());
74
+        info.setCreditCode(enterprise.getCreditCode());
75
+        info.setLegalPerson(enterprise.getLegalPerson());
76
+        info.setRegisteredAddress(enterprise.getRegisteredAddress());
77
+        info.setContactName(enterprise.getContactName());
78
+        info.setContactMobileMask(enterprise.getContactMobileMask());
79
+        info.setAuthStatus(enterprise.getAuthStatus());
80
+        return info;
81
+    }
82
+
83
+    private static MpUserInfoResponse.WorkerInfo toWorkerInfo(FeWorker worker) {
84
+        MpUserInfoResponse.WorkerInfo info = new MpUserInfoResponse.WorkerInfo();
85
+        info.setWorkerId(worker.getId());
86
+        info.setWorkerNo(worker.getWorkerNo());
87
+        info.setRealName(worker.getRealName());
88
+        info.setMobileMask(worker.getMobileMask());
89
+        info.setIdCardNoMask(worker.getIdCardNoMask());
90
+        info.setBankAccountMask(worker.getBankAccountMask());
91
+        info.setBankName(worker.getBankName());
92
+        info.setBankBranch(worker.getBankBranch());
93
+        info.setVerifyStatus(worker.getVerifyStatus());
94
+        return info;
95
+    }
96
+}

+ 248 - 0
huimv-employment/fe-service/src/main/java/com/huimv/employment/service/auth/dto/MpUserInfoResponse.java

@@ -0,0 +1,248 @@
1
+package com.huimv.employment.service.auth.dto;
2
+
3
+/**
4
+ * 小程序当前用户信息,含登记状态及企业/临时工详情。
5
+ */
6
+public class MpUserInfoResponse {
7
+
8
+    /** 用户类型:enterprise / worker */
9
+    private String userType;
10
+
11
+    /** 是否已完成登记 */
12
+    private boolean registered;
13
+
14
+    /** 登录账号手机号脱敏 */
15
+    private String mobileMask;
16
+
17
+    private EnterpriseInfo enterprise;
18
+
19
+    private WorkerInfo worker;
20
+
21
+    public String getUserType() {
22
+        return userType;
23
+    }
24
+
25
+    public void setUserType(String userType) {
26
+        this.userType = userType;
27
+    }
28
+
29
+    public boolean isRegistered() {
30
+        return registered;
31
+    }
32
+
33
+    public void setRegistered(boolean registered) {
34
+        this.registered = registered;
35
+    }
36
+
37
+    public String getMobileMask() {
38
+        return mobileMask;
39
+    }
40
+
41
+    public void setMobileMask(String mobileMask) {
42
+        this.mobileMask = mobileMask;
43
+    }
44
+
45
+    public EnterpriseInfo getEnterprise() {
46
+        return enterprise;
47
+    }
48
+
49
+    public void setEnterprise(EnterpriseInfo enterprise) {
50
+        this.enterprise = enterprise;
51
+    }
52
+
53
+    public WorkerInfo getWorker() {
54
+        return worker;
55
+    }
56
+
57
+    public void setWorker(WorkerInfo worker) {
58
+        this.worker = worker;
59
+    }
60
+
61
+    /** 企业登记信息 */
62
+    public static class EnterpriseInfo {
63
+
64
+        private Long enterpriseId;
65
+
66
+        private String enterpriseCode;
67
+
68
+        private String name;
69
+
70
+        private String creditCode;
71
+
72
+        private String legalPerson;
73
+
74
+        private String registeredAddress;
75
+
76
+        private String contactName;
77
+
78
+        private String contactMobileMask;
79
+
80
+        private String authStatus;
81
+
82
+        public Long getEnterpriseId() {
83
+            return enterpriseId;
84
+        }
85
+
86
+        public void setEnterpriseId(Long enterpriseId) {
87
+            this.enterpriseId = enterpriseId;
88
+        }
89
+
90
+        public String getEnterpriseCode() {
91
+            return enterpriseCode;
92
+        }
93
+
94
+        public void setEnterpriseCode(String enterpriseCode) {
95
+            this.enterpriseCode = enterpriseCode;
96
+        }
97
+
98
+        public String getName() {
99
+            return name;
100
+        }
101
+
102
+        public void setName(String name) {
103
+            this.name = name;
104
+        }
105
+
106
+        public String getCreditCode() {
107
+            return creditCode;
108
+        }
109
+
110
+        public void setCreditCode(String creditCode) {
111
+            this.creditCode = creditCode;
112
+        }
113
+
114
+        public String getLegalPerson() {
115
+            return legalPerson;
116
+        }
117
+
118
+        public void setLegalPerson(String legalPerson) {
119
+            this.legalPerson = legalPerson;
120
+        }
121
+
122
+        public String getRegisteredAddress() {
123
+            return registeredAddress;
124
+        }
125
+
126
+        public void setRegisteredAddress(String registeredAddress) {
127
+            this.registeredAddress = registeredAddress;
128
+        }
129
+
130
+        public String getContactName() {
131
+            return contactName;
132
+        }
133
+
134
+        public void setContactName(String contactName) {
135
+            this.contactName = contactName;
136
+        }
137
+
138
+        public String getContactMobileMask() {
139
+            return contactMobileMask;
140
+        }
141
+
142
+        public void setContactMobileMask(String contactMobileMask) {
143
+            this.contactMobileMask = contactMobileMask;
144
+        }
145
+
146
+        public String getAuthStatus() {
147
+            return authStatus;
148
+        }
149
+
150
+        public void setAuthStatus(String authStatus) {
151
+            this.authStatus = authStatus;
152
+        }
153
+    }
154
+
155
+    /** 临时工登记信息 */
156
+    public static class WorkerInfo {
157
+
158
+        private Long workerId;
159
+
160
+        private String workerNo;
161
+
162
+        private String realName;
163
+
164
+        private String mobileMask;
165
+
166
+        private String idCardNoMask;
167
+
168
+        private String bankAccountMask;
169
+
170
+        private String bankName;
171
+
172
+        private String bankBranch;
173
+
174
+        private String verifyStatus;
175
+
176
+        public Long getWorkerId() {
177
+            return workerId;
178
+        }
179
+
180
+        public void setWorkerId(Long workerId) {
181
+            this.workerId = workerId;
182
+        }
183
+
184
+        public String getWorkerNo() {
185
+            return workerNo;
186
+        }
187
+
188
+        public void setWorkerNo(String workerNo) {
189
+            this.workerNo = workerNo;
190
+        }
191
+
192
+        public String getRealName() {
193
+            return realName;
194
+        }
195
+
196
+        public void setRealName(String realName) {
197
+            this.realName = realName;
198
+        }
199
+
200
+        public String getMobileMask() {
201
+            return mobileMask;
202
+        }
203
+
204
+        public void setMobileMask(String mobileMask) {
205
+            this.mobileMask = mobileMask;
206
+        }
207
+
208
+        public String getIdCardNoMask() {
209
+            return idCardNoMask;
210
+        }
211
+
212
+        public void setIdCardNoMask(String idCardNoMask) {
213
+            this.idCardNoMask = idCardNoMask;
214
+        }
215
+
216
+        public String getBankAccountMask() {
217
+            return bankAccountMask;
218
+        }
219
+
220
+        public void setBankAccountMask(String bankAccountMask) {
221
+            this.bankAccountMask = bankAccountMask;
222
+        }
223
+
224
+        public String getBankName() {
225
+            return bankName;
226
+        }
227
+
228
+        public void setBankName(String bankName) {
229
+            this.bankName = bankName;
230
+        }
231
+
232
+        public String getBankBranch() {
233
+            return bankBranch;
234
+        }
235
+
236
+        public void setBankBranch(String bankBranch) {
237
+            this.bankBranch = bankBranch;
238
+        }
239
+
240
+        public String getVerifyStatus() {
241
+            return verifyStatus;
242
+        }
243
+
244
+        public void setVerifyStatus(String verifyStatus) {
245
+            this.verifyStatus = verifyStatus;
246
+        }
247
+    }
248
+}

+ 12 - 30
huimv-employment/fe-service/src/main/java/com/huimv/employment/service/enterprise/EnterpriseService.java

@@ -15,7 +15,6 @@ import com.huimv.employment.dao.mapper.FeUserMapper;
15 15
 import com.huimv.employment.service.config.SecurityProperties;
16 16
 import com.huimv.employment.service.enterprise.dto.EnterpriseRegisterRequest;
17 17
 import com.huimv.employment.service.enterprise.dto.EnterpriseRegisterResponse;
18
-import com.huimv.employment.service.enterprise.dto.EnterpriseStatusResponse;
19 18
 import org.springframework.stereotype.Service;
20 19
 import org.springframework.transaction.annotation.Transactional;
21 20
 
@@ -46,29 +45,23 @@ public class EnterpriseService {
46 45
         this.securityProperties = securityProperties;
47 46
     }
48 47
 
49
-    public EnterpriseStatusResponse getStatus(Long userId) {
50
-        requireEnterpriseUser(userId);
51
-
48
+    public FeEnterprise findEnterpriseByUserId(Long userId) {
52 49
         FeEnterpriseUser binding = findBindingByUserId(userId);
53
-        EnterpriseStatusResponse response = new EnterpriseStatusResponse();
54 50
         if (binding == null) {
55
-            response.setRegistered(false);
56
-            return response;
51
+            return null;
57 52
         }
53
+        return feEnterpriseMapper.selectById(binding.getEnterpriseId());
54
+    }
58 55
 
59
-        FeEnterprise enterprise = feEnterpriseMapper.selectById(binding.getEnterpriseId());
60
-        if (enterprise == null) {
61
-            response.setRegistered(false);
62
-            return response;
56
+    public FeUser requireEnterpriseUser(Long userId) {
57
+        FeUser user = feUserMapper.selectById(userId);
58
+        if (user == null) {
59
+            throw new BizException(ErrorCode.UNAUTHORIZED);
63 60
         }
64
-
65
-        response.setRegistered(true);
66
-        response.setEnterpriseId(enterprise.getId());
67
-        response.setName(enterprise.getName());
68
-        response.setCreditCode(enterprise.getCreditCode());
69
-        response.setContactMobileMask(enterprise.getContactMobileMask());
70
-        response.setAuthStatus(enterprise.getAuthStatus());
71
-        return response;
61
+        if (!USER_TYPE_ENTERPRISE.equals(user.getUserType())) {
62
+            throw new BizException(ErrorCode.ENTERPRISE_ONLY);
63
+        }
64
+        return user;
72 65
     }
73 66
 
74 67
     @Transactional(rollbackFor = Exception.class)
@@ -120,17 +113,6 @@ public class EnterpriseService {
120 113
         return toRegisterResponse(enterprise);
121 114
     }
122 115
 
123
-    private FeUser requireEnterpriseUser(Long userId) {
124
-        FeUser user = feUserMapper.selectById(userId);
125
-        if (user == null) {
126
-            throw new BizException(ErrorCode.UNAUTHORIZED);
127
-        }
128
-        if (!USER_TYPE_ENTERPRISE.equals(user.getUserType())) {
129
-            throw new BizException(ErrorCode.ENTERPRISE_ONLY);
130
-        }
131
-        return user;
132
-    }
133
-
134 116
     private FeEnterpriseUser findBindingByUserId(Long userId) {
135 117
         return feEnterpriseUserMapper.selectOne(new LambdaQueryWrapper<FeEnterpriseUser>()
136 118
                 .eq(FeEnterpriseUser::getUserId, userId)

+ 0 - 67
huimv-employment/fe-service/src/main/java/com/huimv/employment/service/enterprise/dto/EnterpriseStatusResponse.java

@@ -1,67 +0,0 @@
1
-package com.huimv.employment.service.enterprise.dto;
2
-
3
-/**
4
- * 企业登记状态,供前端判断是否跳转登记页。
5
- */
6
-public class EnterpriseStatusResponse {
7
-
8
-    private boolean registered;
9
-
10
-    private Long enterpriseId;
11
-
12
-    private String name;
13
-
14
-    private String creditCode;
15
-
16
-    private String contactMobileMask;
17
-
18
-    private String authStatus;
19
-
20
-    public boolean isRegistered() {
21
-        return registered;
22
-    }
23
-
24
-    public void setRegistered(boolean registered) {
25
-        this.registered = registered;
26
-    }
27
-
28
-    public Long getEnterpriseId() {
29
-        return enterpriseId;
30
-    }
31
-
32
-    public void setEnterpriseId(Long enterpriseId) {
33
-        this.enterpriseId = enterpriseId;
34
-    }
35
-
36
-    public String getName() {
37
-        return name;
38
-    }
39
-
40
-    public void setName(String name) {
41
-        this.name = name;
42
-    }
43
-
44
-    public String getCreditCode() {
45
-        return creditCode;
46
-    }
47
-
48
-    public void setCreditCode(String creditCode) {
49
-        this.creditCode = creditCode;
50
-    }
51
-
52
-    public String getContactMobileMask() {
53
-        return contactMobileMask;
54
-    }
55
-
56
-    public void setContactMobileMask(String contactMobileMask) {
57
-        this.contactMobileMask = contactMobileMask;
58
-    }
59
-
60
-    public String getAuthStatus() {
61
-        return authStatus;
62
-    }
63
-
64
-    public void setAuthStatus(String authStatus) {
65
-        this.authStatus = authStatus;
66
-    }
67
-}

+ 13 - 33
huimv-employment/fe-service/src/main/java/com/huimv/employment/service/worker/WorkerService.java

@@ -16,7 +16,6 @@ import com.huimv.employment.dao.mapper.FeWorkerMapper;
16 16
 import com.huimv.employment.service.config.SecurityProperties;
17 17
 import com.huimv.employment.service.worker.dto.WorkerRegisterRequest;
18 18
 import com.huimv.employment.service.worker.dto.WorkerRegisterResponse;
19
-import com.huimv.employment.service.worker.dto.WorkerStatusResponse;
20 19
 import org.springframework.stereotype.Service;
21 20
 import org.springframework.transaction.annotation.Transactional;
22 21
 import org.springframework.util.StringUtils;
@@ -48,23 +47,21 @@ public class WorkerService {
48 47
         this.securityProperties = securityProperties;
49 48
     }
50 49
 
51
-    public WorkerStatusResponse getStatus(Long userId) {
52
-        FeUser user = requireWorkerUser(userId);
53
-        FeWorker worker = findWorkerByUserId(userId);
50
+    public FeWorker findWorkerByUserId(Long userId) {
51
+        return feWorkerMapper.selectOne(new LambdaQueryWrapper<FeWorker>()
52
+                .eq(FeWorker::getUserId, userId)
53
+                .last("LIMIT 1"));
54
+    }
54 55
 
55
-        WorkerStatusResponse response = new WorkerStatusResponse();
56
-        if (worker == null) {
57
-            response.setRegistered(false);
58
-            response.setMobileMask(user.getMobileMask());
59
-            return response;
56
+    public FeUser requireWorkerUser(Long userId) {
57
+        FeUser user = feUserMapper.selectById(userId);
58
+        if (user == null) {
59
+            throw new BizException(ErrorCode.UNAUTHORIZED);
60 60
         }
61
-
62
-        response.setRegistered(true);
63
-        response.setWorkerId(worker.getId());
64
-        response.setRealName(worker.getRealName());
65
-        response.setMobileMask(worker.getMobileMask());
66
-        response.setVerifyStatus(worker.getVerifyStatus());
67
-        return response;
61
+        if (!USER_TYPE_WORKER.equals(user.getUserType())) {
62
+            throw new BizException(ErrorCode.WORKER_ONLY);
63
+        }
64
+        return user;
68 65
     }
69 66
 
70 67
     @Transactional(rollbackFor = Exception.class)
@@ -115,23 +112,6 @@ public class WorkerService {
115 112
         return toRegisterResponse(worker);
116 113
     }
117 114
 
118
-    private FeUser requireWorkerUser(Long userId) {
119
-        FeUser user = feUserMapper.selectById(userId);
120
-        if (user == null) {
121
-            throw new BizException(ErrorCode.UNAUTHORIZED);
122
-        }
123
-        if (!USER_TYPE_WORKER.equals(user.getUserType())) {
124
-            throw new BizException(ErrorCode.WORKER_ONLY);
125
-        }
126
-        return user;
127
-    }
128
-
129
-    private FeWorker findWorkerByUserId(Long userId) {
130
-        return feWorkerMapper.selectOne(new LambdaQueryWrapper<FeWorker>()
131
-                .eq(FeWorker::getUserId, userId)
132
-                .last("LIMIT 1"));
133
-    }
134
-
135 115
     private void ensureIdCardNotUsed(String idCardNoEnc, Long currentUserId) {
136 116
         FeWorker existing = feWorkerMapper.selectOne(new LambdaQueryWrapper<FeWorker>()
137 117
                 .eq(FeWorker::getIdCardNoEnc, idCardNoEnc)

+ 0 - 58
huimv-employment/fe-service/src/main/java/com/huimv/employment/service/worker/dto/WorkerStatusResponse.java

@@ -1,58 +0,0 @@
1
-package com.huimv.employment.service.worker.dto;
2
-
3
-/**
4
- * 临时工登记状态,供前端判断是否跳转登记页。
5
- */
6
-public class WorkerStatusResponse {
7
-
8
-    /** 是否已完成登记 */
9
-    private boolean registered;
10
-
11
-    private Long workerId;
12
-
13
-    private String realName;
14
-
15
-    private String mobileMask;
16
-
17
-    private String verifyStatus;
18
-
19
-    public boolean isRegistered() {
20
-        return registered;
21
-    }
22
-
23
-    public void setRegistered(boolean registered) {
24
-        this.registered = registered;
25
-    }
26
-
27
-    public Long getWorkerId() {
28
-        return workerId;
29
-    }
30
-
31
-    public void setWorkerId(Long workerId) {
32
-        this.workerId = workerId;
33
-    }
34
-
35
-    public String getRealName() {
36
-        return realName;
37
-    }
38
-
39
-    public void setRealName(String realName) {
40
-        this.realName = realName;
41
-    }
42
-
43
-    public String getMobileMask() {
44
-        return mobileMask;
45
-    }
46
-
47
-    public void setMobileMask(String mobileMask) {
48
-        this.mobileMask = mobileMask;
49
-    }
50
-
51
-    public String getVerifyStatus() {
52
-        return verifyStatus;
53
-    }
54
-
55
-    public void setVerifyStatus(String verifyStatus) {
56
-        this.verifyStatus = verifyStatus;
57
-    }
58
-}