智慧厨房
This commit is contained in:
parent
4169cf7d3a
commit
cf67aeaabf
|
|
@ -3,6 +3,8 @@ package com.bonus.canteen.core.kitchen.mapper;
|
|||
import com.bonus.canteen.core.kitchen.domain.KitchenStaffFace;
|
||||
import com.bonus.canteen.core.kitchen.domain.KitchenStaffInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 人员生物识别特征Mapper接口
|
||||
*
|
||||
|
|
@ -17,4 +19,6 @@ public interface KitchenStaffFaceMapper {
|
|||
int deleteStaffFaces(Long[] staffIds);
|
||||
|
||||
int updateStaffFaceState(KitchenStaffInfo kitchenStaffInfo);
|
||||
|
||||
KitchenStaffFace selectStaffFaceByStaffId(Long staffId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -195,6 +195,10 @@ public class KitchenStaffInfoServiceImpl implements IKitchenStaffInfoService {
|
|||
if(!StaffFaceStateEnum.isValidFaceState(kitchenStaffInfo.getFaceState())) {
|
||||
throw new ServiceException("无效的人脸状态");
|
||||
}
|
||||
KitchenStaffFace kitchenStaffFace = kitchenStaffFaceMapper.selectStaffFaceByStaffId(kitchenStaffInfo.getStaffId());
|
||||
if(Objects.isNull(kitchenStaffFace)) {
|
||||
throw new ServiceException("该员工没有人脸信息");
|
||||
}
|
||||
return kitchenStaffFaceMapper.updateStaffFaceState(kitchenStaffInfo);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,12 @@
|
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.canteen.core.kitchen.mapper.KitchenStaffFaceMapper">
|
||||
<select id="selectStaffFaceByStaffId" resultType="com.bonus.canteen.core.kitchen.domain.KitchenStaffFace">
|
||||
select staff_id,photo_url,features,create_by,error_msg,create_time,update_by,update_time
|
||||
from kitchen_staff_face
|
||||
where staff_id = #{staffId}
|
||||
</select>
|
||||
|
||||
<insert id="insertStaffFace" parameterType="com.bonus.canteen.core.kitchen.domain.KitchenStaffFace">
|
||||
insert into kitchen_staff_face(staff_id,photo_url,features,create_by,error_msg,create_time,update_by,update_time)
|
||||
values(#{staffId},#{photoUrl},#{features},#{createBy},#{errorMsg},#{createTime},#{updateBy},#{updateTime})
|
||||
|
|
|
|||
Loading…
Reference in New Issue