init
This commit is contained in:
parent
e0aa0d55db
commit
3d5c2836ba
|
|
@ -0,0 +1,115 @@
|
||||||
|
package com.bonus.canteen.user.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import com.bonus.common.log.enums.OperaType;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.bonus.common.log.annotation.SysLog;
|
||||||
|
import com.bonus.canteen.user.domain.UserFace;
|
||||||
|
import com.bonus.canteen.user.service.IUserFaceService;
|
||||||
|
import com.bonus.common.core.web.controller.BaseController;
|
||||||
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
|
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||||
|
import com.bonus.common.core.web.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人员生物识别特征Controller
|
||||||
|
*
|
||||||
|
* @author xsheng
|
||||||
|
* @date 2025-04-03
|
||||||
|
*/
|
||||||
|
@Api(tags = "人员生物识别特征接口")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/sys_user_face")
|
||||||
|
public class UserFaceController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private IUserFaceService UserFaceService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询人员生物识别特征列表
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "查询人员生物识别特征列表")
|
||||||
|
//@RequiresPermissions("system:face:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(UserFace UserFace) {
|
||||||
|
startPage();
|
||||||
|
List<UserFace> list = UserFaceService.selectUserFaceList(UserFace);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出人员生物识别特征列表
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "导出人员生物识别特征列表")
|
||||||
|
//@PreventRepeatSubmit
|
||||||
|
//@RequiresPermissions("system:face:export")
|
||||||
|
@SysLog(title = "人员生物识别特征", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出人员生物识别特征")
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, UserFace UserFace) {
|
||||||
|
List<UserFace> list = UserFaceService.selectUserFaceList(UserFace);
|
||||||
|
ExcelUtil<UserFace> util = new ExcelUtil<UserFace>(UserFace.class);
|
||||||
|
util.exportExcel(response, list, "人员生物识别特征数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取人员生物识别特征详细信息
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "获取人员生物识别特征详细信息")
|
||||||
|
//@RequiresPermissions("system:face:query")
|
||||||
|
@GetMapping(value = "/{faceId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("faceId") Long faceId) {
|
||||||
|
return success(UserFaceService.selectUserFaceByFaceId(faceId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增人员生物识别特征
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "新增人员生物识别特征")
|
||||||
|
//@PreventRepeatSubmit
|
||||||
|
//@RequiresPermissions("system:face:add")
|
||||||
|
@SysLog(title = "人员生物识别特征", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增人员生物识别特征")
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody UserFace UserFace) {
|
||||||
|
try {
|
||||||
|
return toAjax(UserFaceService.insertUserFace(UserFace));
|
||||||
|
} catch (Exception e) {
|
||||||
|
return error("系统错误, " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改人员生物识别特征
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "修改人员生物识别特征")
|
||||||
|
//@PreventRepeatSubmit
|
||||||
|
//@RequiresPermissions("system:face:edit")
|
||||||
|
@SysLog(title = "人员生物识别特征", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改人员生物识别特征")
|
||||||
|
@PostMapping("/edit")
|
||||||
|
public AjaxResult edit(@RequestBody UserFace UserFace) {
|
||||||
|
try {
|
||||||
|
return toAjax(UserFaceService.updateUserFace(UserFace));
|
||||||
|
} catch (Exception e) {
|
||||||
|
return error("系统错误, " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除人员生物识别特征
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "删除人员生物识别特征")
|
||||||
|
//@PreventRepeatSubmit
|
||||||
|
//@RequiresPermissions("system:face:remove")
|
||||||
|
@SysLog(title = "人员生物识别特征", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除人员生物识别特征")
|
||||||
|
@PostMapping("/del/{faceIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] faceIds) {
|
||||||
|
return toAjax(UserFaceService.deleteUserFaceByFaceIds(faceIds));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,77 @@
|
||||||
|
package com.bonus.canteen.user.domain;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.bonus.common.core.annotation.Excel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
import com.bonus.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人员生物识别特征对象 sys_user_face
|
||||||
|
*
|
||||||
|
* @author xsheng
|
||||||
|
* @date 2025-04-03
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ToString
|
||||||
|
public class UserFace extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键自增 */
|
||||||
|
private Long faceId;
|
||||||
|
|
||||||
|
/** 人员id */
|
||||||
|
@Excel(name = "人员id")
|
||||||
|
@ApiModelProperty(value = "人员id")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/** 照片地址 */
|
||||||
|
@Excel(name = "照片地址")
|
||||||
|
@ApiModelProperty(value = "照片地址")
|
||||||
|
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;
|
||||||
|
|
||||||
|
/** 人脸算法版本 */
|
||||||
|
@Excel(name = "人脸算法版本")
|
||||||
|
@ApiModelProperty(value = "人脸算法版本")
|
||||||
|
private Long faceVer;
|
||||||
|
|
||||||
|
/** 特征码生成状态 1-未生成 2-生成成功 3-生成失败 */
|
||||||
|
@Excel(name = "特征码生成状态 1-未生成 2-生成成功 3-生成失败")
|
||||||
|
@ApiModelProperty(value = "特征码生成状态 1-未生成 2-生成成功 3-生成失败")
|
||||||
|
private Long featuresBuildStatus;
|
||||||
|
|
||||||
|
/** 特征码生成时间 */
|
||||||
|
@ApiModelProperty(value = "特征码生成时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "特征码生成时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date featuresBuildTime;
|
||||||
|
|
||||||
|
/** 状态 1-正常 2-冻结 3-销户 4-挂失 */
|
||||||
|
@Excel(name = "状态 1-正常 2-冻结 3-销户 4-挂失")
|
||||||
|
@ApiModelProperty(value = "状态 1-正常 2-冻结 3-销户 4-挂失")
|
||||||
|
private Long faceState;
|
||||||
|
|
||||||
|
/** 特征码生成失败原因 */
|
||||||
|
@Excel(name = "特征码生成失败原因")
|
||||||
|
@ApiModelProperty(value = "特征码生成失败原因")
|
||||||
|
private String errorMsg;
|
||||||
|
|
||||||
|
/** 删除标志(0代表存在 2代表删除) */
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
package com.bonus.canteen.user.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.bonus.canteen.user.domain.UserFace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人员生物识别特征Mapper接口
|
||||||
|
*
|
||||||
|
* @author xsheng
|
||||||
|
* @date 2025-04-03
|
||||||
|
*/
|
||||||
|
public interface UserFaceMapper {
|
||||||
|
/**
|
||||||
|
* 查询人员生物识别特征
|
||||||
|
*
|
||||||
|
* @param faceId 人员生物识别特征主键
|
||||||
|
* @return 人员生物识别特征
|
||||||
|
*/
|
||||||
|
public UserFace selectUserFaceByFaceId(Long faceId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询人员生物识别特征列表
|
||||||
|
*
|
||||||
|
* @param UserFace 人员生物识别特征
|
||||||
|
* @return 人员生物识别特征集合
|
||||||
|
*/
|
||||||
|
public List<UserFace> selectUserFaceList(UserFace UserFace);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增人员生物识别特征
|
||||||
|
*
|
||||||
|
* @param UserFace 人员生物识别特征
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertUserFace(UserFace UserFace);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改人员生物识别特征
|
||||||
|
*
|
||||||
|
* @param UserFace 人员生物识别特征
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateUserFace(UserFace UserFace);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除人员生物识别特征
|
||||||
|
*
|
||||||
|
* @param faceId 人员生物识别特征主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteUserFaceByFaceId(Long faceId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除人员生物识别特征
|
||||||
|
*
|
||||||
|
* @param faceIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteUserFaceByFaceIds(Long[] faceIds);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
package com.bonus.canteen.user.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.bonus.canteen.user.domain.UserFace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人员生物识别特征Service接口
|
||||||
|
*
|
||||||
|
* @author xsheng
|
||||||
|
* @date 2025-04-03
|
||||||
|
*/
|
||||||
|
public interface IUserFaceService {
|
||||||
|
/**
|
||||||
|
* 查询人员生物识别特征
|
||||||
|
*
|
||||||
|
* @param faceId 人员生物识别特征主键
|
||||||
|
* @return 人员生物识别特征
|
||||||
|
*/
|
||||||
|
public UserFace selectUserFaceByFaceId(Long faceId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询人员生物识别特征列表
|
||||||
|
*
|
||||||
|
* @param UserFace 人员生物识别特征
|
||||||
|
* @return 人员生物识别特征集合
|
||||||
|
*/
|
||||||
|
public List<UserFace> selectUserFaceList(UserFace UserFace);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增人员生物识别特征
|
||||||
|
*
|
||||||
|
* @param UserFace 人员生物识别特征
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertUserFace(UserFace UserFace);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改人员生物识别特征
|
||||||
|
*
|
||||||
|
* @param UserFace 人员生物识别特征
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateUserFace(UserFace UserFace);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除人员生物识别特征
|
||||||
|
*
|
||||||
|
* @param faceIds 需要删除的人员生物识别特征主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteUserFaceByFaceIds(Long[] faceIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除人员生物识别特征信息
|
||||||
|
*
|
||||||
|
* @param faceId 人员生物识别特征主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteUserFaceByFaceId(Long faceId);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,98 @@
|
||||||
|
package com.bonus.canteen.user.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.bonus.common.core.exception.ServiceException;
|
||||||
|
import com.bonus.common.core.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.bonus.canteen.user.mapper.UserFaceMapper;
|
||||||
|
import com.bonus.canteen.user.domain.UserFace;
|
||||||
|
import com.bonus.canteen.user.service.IUserFaceService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人员生物识别特征Service业务层处理
|
||||||
|
*
|
||||||
|
* @author xsheng
|
||||||
|
* @date 2025-04-03
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class UserFaceServiceImpl implements IUserFaceService {
|
||||||
|
@Autowired
|
||||||
|
private UserFaceMapper UserFaceMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询人员生物识别特征
|
||||||
|
*
|
||||||
|
* @param faceId 人员生物识别特征主键
|
||||||
|
* @return 人员生物识别特征
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public UserFace selectUserFaceByFaceId(Long faceId) {
|
||||||
|
return UserFaceMapper.selectUserFaceByFaceId(faceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询人员生物识别特征列表
|
||||||
|
*
|
||||||
|
* @param UserFace 人员生物识别特征
|
||||||
|
* @return 人员生物识别特征
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<UserFace> selectUserFaceList(UserFace UserFace) {
|
||||||
|
return UserFaceMapper.selectUserFaceList(UserFace);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增人员生物识别特征
|
||||||
|
*
|
||||||
|
* @param UserFace 人员生物识别特征
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertUserFace(UserFace UserFace) {
|
||||||
|
UserFace.setCreateTime(DateUtils.getNowDate());
|
||||||
|
try {
|
||||||
|
return UserFaceMapper.insertUserFace(UserFace);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServiceException("错误信息描述");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改人员生物识别特征
|
||||||
|
*
|
||||||
|
* @param UserFace 人员生物识别特征
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateUserFace(UserFace UserFace) {
|
||||||
|
UserFace.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
try {
|
||||||
|
return UserFaceMapper.updateUserFace(UserFace);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServiceException("错误信息描述");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除人员生物识别特征
|
||||||
|
*
|
||||||
|
* @param faceIds 需要删除的人员生物识别特征主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteUserFaceByFaceIds(Long[] faceIds) {
|
||||||
|
return UserFaceMapper.deleteUserFaceByFaceIds(faceIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除人员生物识别特征信息
|
||||||
|
*
|
||||||
|
* @param faceId 人员生物识别特征主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteUserFaceByFaceId(Long faceId) {
|
||||||
|
return UserFaceMapper.deleteUserFaceByFaceId(faceId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,119 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.bonus.canteen.user.mapper.UserFaceMapper">
|
||||||
|
<resultMap type="com.bonus.canteen.user.domain.UserFace" id="UserFaceResult">
|
||||||
|
<result property="faceId" column="face_id" />
|
||||||
|
<result property="userId" column="user_id" />
|
||||||
|
<result property="photoUrl" column="photo_url" />
|
||||||
|
<result property="features" column="features" />
|
||||||
|
<result property="photoType" column="photo_type" />
|
||||||
|
<result property="faceVer" column="face_ver" />
|
||||||
|
<result property="featuresBuildStatus" column="features_build_status" />
|
||||||
|
<result property="featuresBuildTime" column="features_build_time" />
|
||||||
|
<result property="faceState" column="face_state" />
|
||||||
|
<result property="errorMsg" column="error_msg" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectUserFaceVo">
|
||||||
|
select face_id, user_id, photo_url, features, photo_type, face_ver, features_build_status, features_build_time, face_state, error_msg, del_flag, create_by, create_time, update_by, update_time, remark from sys_user_face
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectUserFaceList" parameterType="com.bonus.canteen.user.domain.UserFace" resultMap="UserFaceResult">
|
||||||
|
<include refid="selectUserFaceVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="userId != null "> and user_id = #{userId}</if>
|
||||||
|
<if test="photoUrl != null and photoUrl != ''"> and photo_url = #{photoUrl}</if>
|
||||||
|
<if test="features != null and features != ''"> and features = #{features}</if>
|
||||||
|
<if test="photoType != null "> and photo_type = #{photoType}</if>
|
||||||
|
<if test="faceVer != null "> and face_ver = #{faceVer}</if>
|
||||||
|
<if test="featuresBuildStatus != null "> and features_build_status = #{featuresBuildStatus}</if>
|
||||||
|
<if test="featuresBuildTime != null "> and features_build_time = #{featuresBuildTime}</if>
|
||||||
|
<if test="faceState != null "> and face_state = #{faceState}</if>
|
||||||
|
<if test="errorMsg != null and errorMsg != ''"> and error_msg = #{errorMsg}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectUserFaceByFaceId" parameterType="Long" resultMap="UserFaceResult">
|
||||||
|
<include refid="selectUserFaceVo"/>
|
||||||
|
where face_id = #{faceId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertUserFace" parameterType="com.bonus.canteen.user.domain.UserFace" useGeneratedKeys="true" keyProperty="faceId">
|
||||||
|
insert into sys_user_face
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="userId != null">user_id,</if>
|
||||||
|
<if test="photoUrl != null and photoUrl != ''">photo_url,</if>
|
||||||
|
<if test="features != null">features,</if>
|
||||||
|
<if test="photoType != null">photo_type,</if>
|
||||||
|
<if test="faceVer != null">face_ver,</if>
|
||||||
|
<if test="featuresBuildStatus != null">features_build_status,</if>
|
||||||
|
<if test="featuresBuildTime != null">features_build_time,</if>
|
||||||
|
<if test="faceState != null">face_state,</if>
|
||||||
|
<if test="errorMsg != null">error_msg,</if>
|
||||||
|
<if test="delFlag != null">del_flag,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="userId != null">#{userId},</if>
|
||||||
|
<if test="photoUrl != null and photoUrl != ''">#{photoUrl},</if>
|
||||||
|
<if test="features != null">#{features},</if>
|
||||||
|
<if test="photoType != null">#{photoType},</if>
|
||||||
|
<if test="faceVer != null">#{faceVer},</if>
|
||||||
|
<if test="featuresBuildStatus != null">#{featuresBuildStatus},</if>
|
||||||
|
<if test="featuresBuildTime != null">#{featuresBuildTime},</if>
|
||||||
|
<if test="faceState != null">#{faceState},</if>
|
||||||
|
<if test="errorMsg != null">#{errorMsg},</if>
|
||||||
|
<if test="delFlag != null">#{delFlag},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateUserFace" parameterType="com.bonus.canteen.user.domain.UserFace">
|
||||||
|
update sys_user_face
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="userId != null">user_id = #{userId},</if>
|
||||||
|
<if test="photoUrl != null and photoUrl != ''">photo_url = #{photoUrl},</if>
|
||||||
|
<if test="features != null">features = #{features},</if>
|
||||||
|
<if test="photoType != null">photo_type = #{photoType},</if>
|
||||||
|
<if test="faceVer != null">face_ver = #{faceVer},</if>
|
||||||
|
<if test="featuresBuildStatus != null">features_build_status = #{featuresBuildStatus},</if>
|
||||||
|
<if test="featuresBuildTime != null">features_build_time = #{featuresBuildTime},</if>
|
||||||
|
<if test="faceState != null">face_state = #{faceState},</if>
|
||||||
|
<if test="errorMsg != null">error_msg = #{errorMsg},</if>
|
||||||
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
</trim>
|
||||||
|
where face_id = #{faceId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteUserFaceByFaceId" parameterType="Long">
|
||||||
|
delete from sys_user_face where face_id = #{faceId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteUserFaceByFaceIds" parameterType="String">
|
||||||
|
delete from sys_user_face where face_id in
|
||||||
|
<foreach item="faceId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{faceId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue