提交 11a06027 authored 作者: yangqi's avatar yangqi

添加样本

上级 b81189b6
package cn.lefull.repository.mapper.face; package cn.lefull.repository.mapper.face;
import cn.lefull.repository.bo.face.CameraEquipmentBO;
import cn.lefull.repository.model.face.CameraEntity; import cn.lefull.repository.model.face.CameraEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/** /**
* @author 杨奇 * @author 杨奇
*/ */
...@@ -15,7 +11,5 @@ public interface CameraEntityMapper { ...@@ -15,7 +11,5 @@ public interface CameraEntityMapper {
CameraEntity getEntity(int apartmentId, String userName); CameraEntity getEntity(int apartmentId, String userName);
List<CameraEquipmentBO> getEquipmentList();
int addEntity(CameraEntity entity); int addEntity(CameraEntity entity);
} }
...@@ -6,11 +6,6 @@ ...@@ -6,11 +6,6 @@
SELECT camera_entity_id SELECT camera_entity_id
FROM camera_entity where apartment_id = #{apartmentId} and user_name = #{userName} and is_delete = 0 FROM camera_entity where apartment_id = #{apartmentId} and user_name = #{userName} and is_delete = 0
</select> </select>
<select id="getEquipmentList" resultType="cn.lefull.repository.bo.face.CameraEquipmentBO">
SELECT e.camera_equipment_id, e.equipment_uuid, e.equipment_name, e.apartment_id, e.position, a.apartment_name
FROM camera_equipment e left join apartment a on e.apartment_id = a.apartment_id
where e.is_delete = 0
</select>
<insert id="addEntity" keyProperty="cameraEntityId" useGeneratedKeys="true" parameterType="cn.lefull.repository.model.face.CameraEntity"> <insert id="addEntity" keyProperty="cameraEntityId" useGeneratedKeys="true" parameterType="cn.lefull.repository.model.face.CameraEntity">
INSERT INTO camera_entity (user_name, sex, apartment_id, room_number, identity, mobile, id_card, img_url, operator_employee_id) INSERT INTO camera_entity (user_name, sex, apartment_id, room_number, identity, mobile, id_card, img_url, operator_employee_id)
VALUES (#{userName}, #{sex}, #{apartmentId}, #{roomNumber}, #{identity}, #{mobile}, #{idCard}, #{imgUrl}, #{operatorEmployeeId}); VALUES (#{userName}, #{sex}, #{apartmentId}, #{roomNumber}, #{identity}, #{mobile}, #{idCard}, #{imgUrl}, #{operatorEmployeeId});
......
...@@ -46,6 +46,8 @@ public class EquipmentServiceImpl implements EquipmentService { ...@@ -46,6 +46,8 @@ public class EquipmentServiceImpl implements EquipmentService {
equipment.setPosition(position); equipment.setPosition(position);
equipment.setOperatorEmployeeId(employeeId); equipment.setOperatorEmployeeId(employeeId);
equipmentMapper.addEquipment(equipment); equipmentMapper.addEquipment(equipment);
} }
@Override @Override
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论