修改用户同步人脸特征
This commit is contained in:
parent
75a449db83
commit
4234d37e6c
|
|
@ -80,6 +80,11 @@ public class SysUser extends BaseEntity {
|
||||||
*/
|
*/
|
||||||
private String avatar;
|
private String avatar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人脸照片地址
|
||||||
|
*/
|
||||||
|
private String photoUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 密码
|
* 密码
|
||||||
*/
|
*/
|
||||||
|
|
@ -250,6 +255,14 @@ public class SysUser extends BaseEntity {
|
||||||
this.avatar = avatar;
|
this.avatar = avatar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getPhotoUrl() {
|
||||||
|
return photoUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhotoUrl(String photoUrl) {
|
||||||
|
this.photoUrl = photoUrl;
|
||||||
|
}
|
||||||
|
|
||||||
public String getPassword() {
|
public String getPassword() {
|
||||||
return password;
|
return password;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,67 +0,0 @@
|
||||||
package com.bonus.system.api.domain;
|
|
||||||
|
|
||||||
import com.bonus.common.core.annotation.Excel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.ToString;
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@ToString
|
|
||||||
public class UserFace implements Serializable {
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 主键自增 */
|
|
||||||
private Long faceId;
|
|
||||||
|
|
||||||
/** 人员id */
|
|
||||||
@ApiModelProperty(value = "人员id")
|
|
||||||
@NotBlank(message = "人员id必填")
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
/** 照片地址 */
|
|
||||||
@ApiModelProperty(value = "照片地址")
|
|
||||||
@NotBlank(message = "照片地址必填")
|
|
||||||
private String photoUrl;
|
|
||||||
|
|
||||||
/** 特征码 */
|
|
||||||
@Excel(name = "特征码")
|
|
||||||
@ApiModelProperty(value = "特征码")
|
|
||||||
private String features;
|
|
||||||
|
|
||||||
/** 类型 1-照片 2-指纹 3-掌纹 4-掌静脉 5-指静脉 6-虹膜 */
|
|
||||||
@Excel(name = "类型 1-照片 2-指纹 3-掌纹 4-掌静脉 5-指静脉 6-虹膜")
|
|
||||||
@ApiModelProperty(value = "类型 1-照片 2-指纹 3-掌纹 4-掌静脉 5-指静脉 6-虹膜")
|
|
||||||
private Long photoType = 1L;
|
|
||||||
|
|
||||||
/** 特征码生成状态 1-未生成 2-生成成功 3-生成失败 */
|
|
||||||
@Excel(name = "特征码生成状态 1-未生成 2-生成成功 3-生成失败")
|
|
||||||
@ApiModelProperty(value = "特征码生成状态 1-未生成 2-生成成功 3-生成失败")
|
|
||||||
private Long featuresBuildStatus;
|
|
||||||
|
|
||||||
/** 特征码生成时间 */
|
|
||||||
@ApiModelProperty(value = "特征码生成时间")
|
|
||||||
private Date featuresBuildTime;
|
|
||||||
|
|
||||||
/** 状态 1-正常 2-冻结 3-销户 4-挂失 */
|
|
||||||
@ApiModelProperty(value = "状态 1-正常 2-冻结 3-销户 4-挂失")
|
|
||||||
private String faceState;
|
|
||||||
|
|
||||||
/** 特征码生成失败原因 */
|
|
||||||
@Excel(name = "特征码生成失败原因")
|
|
||||||
@ApiModelProperty(value = "特征码生成失败原因")
|
|
||||||
private String errorMsg;
|
|
||||||
|
|
||||||
/** 删除标志(0代表存在 2代表删除) */
|
|
||||||
private String delFlag;
|
|
||||||
|
|
||||||
private String createBy;
|
|
||||||
|
|
||||||
private String createTime;
|
|
||||||
|
|
||||||
private String updateBy;
|
|
||||||
|
|
||||||
private String updateTime;
|
|
||||||
}
|
|
||||||
|
|
@ -2,7 +2,6 @@ package com.bonus.system.feign;
|
||||||
|
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.system.api.domain.SysUser;
|
import com.bonus.system.api.domain.SysUser;
|
||||||
import com.bonus.system.api.domain.UserFace;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
@ -29,5 +28,5 @@ public interface SmartCanteenClient {
|
||||||
|
|
||||||
@ApiOperation(value = "上传人脸特征")
|
@ApiOperation(value = "上传人脸特征")
|
||||||
@RequestMapping(value = "/userFace/uploadPhotoForApp",method = RequestMethod.POST)
|
@RequestMapping(value = "/userFace/uploadPhotoForApp",method = RequestMethod.POST)
|
||||||
AjaxResult uploadPhotoGenCodeForApp(UserFace userFace);
|
AjaxResult uploadPhotoGenCodeForApp(SysUser user);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -368,10 +368,7 @@ public class SysUserServiceImpl implements ISysUserService {
|
||||||
// 新增用户与岗位管理
|
// 新增用户与岗位管理
|
||||||
insertUserPost(user);
|
insertUserPost(user);
|
||||||
// 同步更新user face数据
|
// 同步更新user face数据
|
||||||
UserFace userFace = new UserFace();
|
smartCanteenClient.uploadPhotoGenCodeForApp(user);
|
||||||
userFace.setUserId(user.getUserId());
|
|
||||||
userFace.setPhotoUrl(user.getAvatar());
|
|
||||||
smartCanteenClient.uploadPhotoGenCodeForApp(userFace);
|
|
||||||
// 更新用户
|
// 更新用户
|
||||||
return userMapper.updateUser(user);
|
return userMapper.updateUser(user);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
<result property="phonenumber" column="phonenumber"/>
|
<result property="phonenumber" column="phonenumber"/>
|
||||||
<result property="sex" column="sex"/>
|
<result property="sex" column="sex"/>
|
||||||
<result property="avatar" column="avatar"/>
|
<result property="avatar" column="avatar"/>
|
||||||
|
<result property="photoUrl" column="photo_url"/>
|
||||||
<result property="password" column="password"/>
|
<result property="password" column="password"/>
|
||||||
<result property="status" column="status"/>
|
<result property="status" column="status"/>
|
||||||
<result property="delFlag" column="del_flag"/>
|
<result property="delFlag" column="del_flag"/>
|
||||||
|
|
@ -65,6 +66,7 @@
|
||||||
u.nick_name,
|
u.nick_name,
|
||||||
u.email,
|
u.email,
|
||||||
u.avatar,
|
u.avatar,
|
||||||
|
u.photo_url,
|
||||||
u.phonenumber,
|
u.phonenumber,
|
||||||
u.password,
|
u.password,
|
||||||
u.sex,
|
u.sex,
|
||||||
|
|
@ -308,6 +310,7 @@
|
||||||
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
|
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
|
||||||
<if test="sex != null and sex != ''">sex = #{sex},</if>
|
<if test="sex != null and sex != ''">sex = #{sex},</if>
|
||||||
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
|
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
|
||||||
|
<if test="photoUrl != null and photoUrl != ''">photo_url = #{photoUrl},</if>
|
||||||
<if test="password != null and password != ''">password = #{password},</if>
|
<if test="password != null and password != ''">password = #{password},</if>
|
||||||
<if test="status != null and status != ''">status = #{status},</if>
|
<if test="status != null and status != ''">status = #{status},</if>
|
||||||
<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
|
<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue