|
@@ -11,6 +11,10 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.Date;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* app_user -- 移动端账号(只针对app端使用)
|
|
@@ -42,10 +46,24 @@ public class AppUserApiController {
|
|
|
return AjaxJson.getSuccessData(a);
|
|
|
}
|
|
|
|
|
|
- /** 获取审核状态 */
|
|
|
+ /** 获取认证状态 */
|
|
|
@RequestMapping("getAuth")
|
|
|
public AjaxJson getAuth(){
|
|
|
- return AjaxJson.getSuccessData(appUserService.getById(StpAPPUserUtil.getAPPLoginInfo().getLoginId()).getAuth());
|
|
|
+ AppUser user=appUserService.getById(StpAPPUserUtil.getAPPLoginInfo().getLoginId());
|
|
|
+ Map so=new HashMap();
|
|
|
+ so.put("auth",user.getAuth());
|
|
|
+ so.put("face",user.getFace());
|
|
|
+ return AjaxJson.getSuccessData(so);
|
|
|
+ }
|
|
|
+
|
|
|
+ /** 边民首次使用APP人脸认证 */
|
|
|
+ @PostMapping("face")
|
|
|
+ public AjaxJson face(){
|
|
|
+ AppUser user=new AppUser();
|
|
|
+ user.setId(StpAPPUserUtil.getAPPLoginInfo().getLoginId());
|
|
|
+ user.setFace(1);
|
|
|
+ user.setFaceTime(new Date());
|
|
|
+ return AjaxJson.toAjax(appUserService.updateById(user));
|
|
|
}
|
|
|
|
|
|
|