From 833cea5f9c4030ec5d43d73fe39dab294a321b1f Mon Sep 17 00:00:00 2001 From: 叶松 <2217086471@qq.com> Date: 星期四, 12 十月 2023 16:58:21 +0800 Subject: [PATCH] Merge branch 'master' of http://111.30.93.211:10101/r/supipe --- hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/impl/FaceDeviceServiceImpl.java | 66 +++++ hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/impl/FaceServerImpl.java | 43 +++ hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/controller/FaceController.java | 23 + hd/pipe/StaffManage/src/main/resources/mapping/FaceDeviceMapper.xml | 228 +++++++++++++++++ hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/entity/FaceResult.java | 42 +++ hd/pipe/StaffManage/src/main/java/com/thhy/staff/config/EmqxConfig.java | 43 +++ hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/FaceServer.java | 8 hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/entity/FaceUtils.java | 33 ++ /dev/null | 0 hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/controller/FaceDeviceController.java | 54 ++++ hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/entity/FaceDevice.java | 99 +++++++ hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/FaceDeviceService.java | 24 + hd/pipe/StaffManage/src/main/resources/application-dev.yml | 13 hd/pipe/StaffManage/src/main/java/com/thhy/staff/config/EmqxProperties.java | 22 + hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/mapper/FaceDeviceMapper.java | 35 ++ 15 files changed, 732 insertions(+), 1 deletions(-) diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/config/EmqxConfig.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/config/EmqxConfig.java new file mode 100644 index 0000000..9f1c34c --- /dev/null +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/config/EmqxConfig.java @@ -0,0 +1,43 @@ +package com.thhy.staff.config; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +import java.io.Serializable; + +@Data +@Configuration +@ConfigurationProperties(prefix = "emqx") +public class EmqxConfig { + + private String host; + + private String port; + + private String username; + + private String password; + + private int qos; + + private String topic; + + private String willTopic; + + private String willContent; + + @Override + public String toString() { + return "{" + + "host:'" + host + '\'' + + ", port:'" + port + '\'' + + ", username:'" + username + '\'' + + ", password:'" + password + '\'' + + ", qos:" + qos + + ", topic:'" + topic + '\'' + + ", willTopic:'" + willTopic + '\'' + + ", willContent:'" + willContent + '\'' + + '}'; + } +} diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/config/EmqxProperties.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/config/EmqxProperties.java new file mode 100644 index 0000000..a7389f5 --- /dev/null +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/config/EmqxProperties.java @@ -0,0 +1,22 @@ +package com.thhy.staff.config; + +import lombok.Data; + +@Data +public class EmqxProperties { + private String host; + + private String port; + + private String username; + + private String password; + + private int qos; + + private String topic; + + private String willTopic; + + private String willContent; +} diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/controller/FaceController.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/controller/FaceController.java new file mode 100644 index 0000000..c37c313 --- /dev/null +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/controller/FaceController.java @@ -0,0 +1,23 @@ +package com.thhy.staff.modules.biz.face.controller; + +import com.thhy.general.common.BasicResult; +import com.thhy.staff.modules.biz.face.entity.FaceResult; +import com.thhy.staff.modules.biz.face.service.FaceServer; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("face") +public class FaceController { + + @Autowired + private FaceServer faceServer; + + @RequestMapping("/device/login") + public FaceResult login(@RequestBody String mess){ + FaceResult faceResult = faceServer.login(mess); + return faceResult; + } +} diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/controller/FaceDeviceController.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/controller/FaceDeviceController.java new file mode 100644 index 0000000..097f103 --- /dev/null +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/controller/FaceDeviceController.java @@ -0,0 +1,54 @@ +package com.thhy.staff.modules.biz.face.controller; + +import com.github.pagehelper.PageInfo; +import com.thhy.general.common.BasicResult; +import com.thhy.general.utils.PagingUtils; +import com.thhy.staff.modules.biz.face.entity.FaceDevice; +import com.thhy.staff.modules.biz.face.service.FaceDeviceService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +/** + * @author zhang_xiao_bo + * @since 2023-10-12 10:27:42 + */ +@RestController +@RequestMapping("faceDevice") +public class FaceDeviceController { + + + @Autowired + private FaceDeviceService faceDeviceService; + + @RequestMapping("findList") + public BasicResult findList(@RequestBody(required = false) FaceDevice faceDevice,HttpServletRequest req){ + PagingUtils.setPageParam(req); + List<FaceDevice> faceDeviceList = faceDeviceService.findList(faceDevice); + PageInfo<FaceDevice> pageInfo = new PageInfo<>(faceDeviceList); + return BasicResult.success(pageInfo); + } + + @RequestMapping("addFaceDevice") + public BasicResult addFaceDevice(@RequestBody FaceDevice faceDevice){ + faceDeviceService.addFaceDevice(faceDevice); + return BasicResult.success(); + } + + /** + @RequestMapping("update") + public BasicResult update(@RequestBody FaceDevice faceDevice){ + faceDeviceService.update(faceDevice); + return BasicResult.success(); + }**/ + + @RequestMapping("delete") + public BasicResult delete(@RequestBody FaceDevice faceDevice){ + faceDeviceService.delete(faceDevice.getId()); + return BasicResult.success(); + } +} diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/entity/FaceDevice.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/entity/FaceDevice.java new file mode 100644 index 0000000..be11eea --- /dev/null +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/entity/FaceDevice.java @@ -0,0 +1,99 @@ +package com.thhy.staff.modules.biz.face.entity; + +import com.thhy.general.annotations.Idkey; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.io.Serializable; +/** + * + * @author zhang_xiao_bo + * @since 2023-10-12 10:27:42 + */ +@Data +@Accessors(chain = true) +public class FaceDevice implements Serializable { + + + /** + * 检测活体,close:不开启活体检测,IRAlive:IRAlive模式 + */ + + + private String detectAlive; + + /** + * 设备MAC地址 + */ + + + private String devSno; + + + @Idkey + private String id; + + + /** + * 是否首次登录。如果在中途切换其它平台账号,再次登录此参数为true + */ + + + private Integer isFirst; + + /** + * 设备管理 + */ + + + private String name; + + /** + * 是否开启IR小窗口 + */ + + + private Integer openIRWindow; + + /** + * 设备注册号 + */ + + + private String registerNo; + + /** + * 人脸识别去重时间, 单位:秒 + */ + + + private double retryInterval; + + /** + * 签名类型 + */ + + + private String signType; + + /** + * 识别阀值 + */ + + + private double threshold; + + /** + * 1出2入 + */ + + + private String throughType; + + /** + * 1门禁机 + */ + + + private Integer type; +} diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/entity/FaceResult.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/entity/FaceResult.java new file mode 100644 index 0000000..7c1f1e2 --- /dev/null +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/entity/FaceResult.java @@ -0,0 +1,42 @@ +package com.thhy.staff.modules.biz.face.entity; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.thhy.general.utils.DeepCopyUtils; +import com.thhy.general.utils.UUIDUtils; +import com.thhy.staff.config.EmqxConfig; +import com.thhy.staff.config.EmqxProperties; +import lombok.Data; + +import java.io.Serializable; + +@Data +public class FaceResult implements Serializable { + + private int code; + + private String msg; + + private boolean success; + + private String dev_sno; + + private String token; + + private JSONObject mqinfo; + + public FaceResult() { + } + + public FaceResult(boolean success,FaceDevice faceDevice,String emqxConfig){ + this.success = success; + this.code = 0; + this.msg = "登录成功"; + this.dev_sno = faceDevice.getDevSno(); + this.mqinfo = JSON.parseObject(emqxConfig); + this.mqinfo.put("topic",faceDevice.getDevSno()); + this.mqinfo.put("willTopic",faceDevice.getDevSno()+"-W"); + this.mqinfo.put("willContent",faceDevice.getDevSno()+"-offline"); + this.token = UUIDUtils.create(); + } +} diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/entity/FaceUtils.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/entity/FaceUtils.java new file mode 100644 index 0000000..7d569a5 --- /dev/null +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/entity/FaceUtils.java @@ -0,0 +1,33 @@ +package com.thhy.staff.modules.biz.face.entity; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; + +public class FaceUtils { + + public static FaceDevice toFaceDevice(String json){ + JSONObject jsonObject = JSON.parseObject(json); + FaceDevice faceDevice = JSON.toJavaObject(jsonObject,FaceDevice.class); + return faceDevice; + } + + public static void main(String[] args) { + String mess = "{\n" + + " \"detectAlive\": \"IRAlive\",\n" + + " \"dev_sno\": \"FF:0C:F4:12:67:05\",\n" + + " \"device_ip\": \"192.168.1.135\",\n" + + " \"distance\": 4,\n" + + " \"isFirst\": true,\n" + + " \"name\": \"Terminal\",\n" + + " \"openIRWindow\": false,\n" + + " \"register_no\": \"12\",\n" + + " \"retryInterval\": 2,\n" + + " \"sign_type\": \"dev_sign\",\n" + + " \"threshold\": 70,\n" + + " \"throughType\": \"2\",\n" + + " \"type\": 1\n" + + "}"; + FaceDevice faceDevice = toFaceDevice(mess); + + } +} diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/mapper/FaceDeviceMapper.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/mapper/FaceDeviceMapper.java new file mode 100644 index 0000000..8892e93 --- /dev/null +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/mapper/FaceDeviceMapper.java @@ -0,0 +1,35 @@ +package com.thhy.staff.modules.biz.face.mapper; + +import com.thhy.staff.modules.biz.face.entity.FaceDevice; +import org.springframework.stereotype.Component; + +import java.io.Serializable; +import java.util.List; + +/** + * Mapper 接口 + * @author zhang_xiao_bo + * @since 2023-10-12 10:27:42 + */ +@Component +public interface FaceDeviceMapper { + + + FaceDevice queryById(Serializable id); + + Integer queryVersionById(Serializable id); + + List<FaceDevice> findList(FaceDevice facedevice); + + List<FaceDevice> findAll(); + + int countByDevSn(String devSn); + + void insert(FaceDevice facedevice); + + void update(FaceDevice facedevice); + + void deletelogic(Serializable id); + + void deleteById(Serializable id); +} diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/FaceDeviceService.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/FaceDeviceService.java new file mode 100644 index 0000000..cc1fb5d --- /dev/null +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/FaceDeviceService.java @@ -0,0 +1,24 @@ +package com.thhy.staff.modules.biz.face.service; + +import com.thhy.staff.modules.biz.face.entity.FaceDevice; + +import java.io.Serializable; +import java.util.List; + +/** + * 服务类 + * @author zhang_xiao_bo + * @since 2023-10-12 10:27:42 + */ +public interface FaceDeviceService { + + FaceDevice get(Serializable id); + + List<FaceDevice> findList(FaceDevice faceDevice); + + void addFaceDevice(FaceDevice faceDevice); + + void update(FaceDevice faceDevice); + + void delete(Serializable id); +} diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/FaceServer.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/FaceServer.java new file mode 100644 index 0000000..0bb4b41 --- /dev/null +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/FaceServer.java @@ -0,0 +1,8 @@ +package com.thhy.staff.modules.biz.face.service; + +import com.thhy.staff.modules.biz.face.entity.FaceResult; + +public interface FaceServer { + + FaceResult login(String mess); +} diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/impl/FaceDeviceServiceImpl.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/impl/FaceDeviceServiceImpl.java new file mode 100644 index 0000000..19ae878 --- /dev/null +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/impl/FaceDeviceServiceImpl.java @@ -0,0 +1,66 @@ +package com.thhy.staff.modules.biz.face.service.impl; + +import com.thhy.staff.modules.biz.face.entity.FaceDevice; +import com.thhy.staff.modules.biz.face.mapper.FaceDeviceMapper; +import com.thhy.staff.modules.biz.face.service.FaceDeviceService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.io.Serializable; +import java.util.List; + +/** + * 服务实现类 + * @author zhang_xiao_bo + * @since 2023-10-12 10:27:42 + */ +@Service +public class FaceDeviceServiceImpl implements FaceDeviceService { + + + + @Autowired + private FaceDeviceMapper faceDeviceMapper; + + public FaceDevice get(Serializable id){ + return faceDeviceMapper.queryById(id); + } + + public List<FaceDevice> findList(FaceDevice faceDevice){ + return faceDeviceMapper.findList(faceDevice); + } + + /** + * 增加和修改 + * @param faceDevice + */ + @Transactional + public void addFaceDevice(FaceDevice faceDevice){ + if(faceDevice.getId() == null){ + //增加操作 + faceDeviceMapper.insert(faceDevice); + }else{ + //修改操作 + //faceDevice.setUpdateTime(new Date()); + faceDeviceMapper.update(faceDevice); + } + + } + + /** + * 修改 + * @param faceDevice + */ + public void update(FaceDevice faceDevice){ + faceDeviceMapper.update(faceDevice); + } + + /** + * 删除 + * @param id + */ + public void delete(Serializable id){ + faceDeviceMapper.deletelogic(id); + } +} diff --git a/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/impl/FaceServerImpl.java b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/impl/FaceServerImpl.java new file mode 100644 index 0000000..2a02292 --- /dev/null +++ b/hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/impl/FaceServerImpl.java @@ -0,0 +1,43 @@ +package com.thhy.staff.modules.biz.face.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.thhy.general.utils.DeepCopyUtils; +import com.thhy.staff.config.EmqxConfig; +import com.thhy.staff.config.EmqxProperties; +import com.thhy.staff.modules.biz.face.entity.FaceDevice; +import com.thhy.staff.modules.biz.face.entity.FaceResult; +import com.thhy.staff.modules.biz.face.mapper.FaceDeviceMapper; +import com.thhy.staff.modules.biz.face.service.FaceServer; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class FaceServerImpl implements FaceServer { + + @Autowired + private FaceDeviceMapper faceDeviceMapper; + + @Autowired + private EmqxConfig emqxConfig; + + private Logger logger = LoggerFactory.getLogger(FaceServer.class); + + @Override + public FaceResult login(String mess) { + JSONObject jsonObject = JSONObject.parseObject(mess); + FaceDevice faceDevice = JSON.toJavaObject(jsonObject,FaceDevice.class); + int devCount = faceDeviceMapper.countByDevSn(faceDevice.getDevSno()); + + if (devCount<1) { + faceDeviceMapper.insert(faceDevice); + }else{ + logger.info("设备"+faceDevice.getDevSno()+"已经存在"); + } + + FaceResult faceResult = new FaceResult(true,faceDevice,emqxConfig.toString()); + return faceResult; + } +} diff --git a/hd/pipe/StaffManage/src/main/resources/application-dev.yml b/hd/pipe/StaffManage/src/main/resources/application-dev.yml index 5ad14c2..c172a05 100644 --- a/hd/pipe/StaffManage/src/main/resources/application-dev.yml +++ b/hd/pipe/StaffManage/src/main/resources/application-dev.yml @@ -19,4 +19,15 @@ file-extension: yml group: sunacos global: - filePrefix: https://pipe.thhy-tj.com/ \ No newline at end of file + filePrefix: https://pipe.thhy-tj.com/ +emqx: + host: 111.30.93.215 + port: 1883 + username: thhy + password: thhy123 + qos: 1 + topic: FF:AA:F4:12:67:05 + willTopic: FF:AA:F4:12:67:05-W + willContent: FF:AA:F4:12:67:05-offline +netty: + port: 10001 \ No newline at end of file diff --git a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libAudioIntercom.so b/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libAudioIntercom.so deleted file mode 100644 index 49685d9..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libAudioIntercom.so +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCAlarm.so b/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCAlarm.so deleted file mode 100644 index a54dee3..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCAlarm.so +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCCoreDevCfg.so b/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCCoreDevCfg.so deleted file mode 100644 index 5ada40f..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCCoreDevCfg.so +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCDisplay.so b/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCDisplay.so deleted file mode 100644 index 9871c9e..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCDisplay.so +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCGeneralCfgMgr.so b/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCGeneralCfgMgr.so deleted file mode 100644 index 7666233..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCGeneralCfgMgr.so +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCIndustry.so b/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCIndustry.so deleted file mode 100644 index 4b11107..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCIndustry.so +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCPlayBack.so b/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCPlayBack.so deleted file mode 100644 index 6137552..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCPlayBack.so +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCPreview.so b/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCPreview.so deleted file mode 100644 index 035cd3d..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCPreview.so +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCVoiceTalk.so b/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCVoiceTalk.so deleted file mode 100644 index 6a2ab90..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libHCVoiceTalk.so +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libStreamTransClient.so b/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libStreamTransClient.so deleted file mode 100644 index 6b16337..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libStreamTransClient.so +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libSystemTransform.so b/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libSystemTransform.so deleted file mode 100644 index 086c631..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libSystemTransform.so +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libanalyzedata.so b/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libanalyzedata.so deleted file mode 100644 index fa416e9..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libanalyzedata.so +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libiconv2.so b/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libiconv2.so deleted file mode 100644 index d17b0a8..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDKCom/libiconv2.so +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDK_Log_Switch.xml b/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDK_Log_Switch.xml deleted file mode 100644 index 8b7e236..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/HCNetSDK_Log_Switch.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="GB2312"?> -<SdkLocal> - <SdkLog> - <logLevel>3</logLevel><!--req, 1-ERROR, 2-DEBUG, 3-INFO--> - <logDirectory>./SDKLOG/</logDirectory><!--the end of the string must be '/'--> - <autoDelete>true</autoDelete><!--true: There are less than 10 files in the directory, it will be auto deleted by sdk when the files are more than 10; false: No upper limit to the number of log files--> - </SdkLog> - <HeartbeatCfg> - <Interval>120</Interval> <!-- ����ʱ��������λ�룬����0��ʹ��Ĭ��ֵ120s��ȡֵ��ΧΪ[30, 120] С��30s�����Ϊ30s������120s�����Ϊ120s--> - <Count>1</Count> <!-- �����쳣�ص���Ҫ���������쳣�Ĵ���������0��ʹ��Ĭ��ֵ1��--> - </HeartbeatCfg> -</SdkLocal> \ No newline at end of file diff --git a/hd/pipe/StaffManage/src/main/resources/lib/examples.jar b/hd/pipe/StaffManage/src/main/resources/lib/examples.jar deleted file mode 100644 index 8f0b457..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/examples.jar +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/jna.jar b/hd/pipe/StaffManage/src/main/resources/lib/jna.jar deleted file mode 100644 index 33461ec..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/jna.jar +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/json.jar b/hd/pipe/StaffManage/src/main/resources/lib/json.jar deleted file mode 100644 index 2c0bf83..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/json.jar +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/libAudioRender.so b/hd/pipe/StaffManage/src/main/resources/lib/libAudioRender.so deleted file mode 100644 index f39a4a1..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/libAudioRender.so +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/libHCCore.so b/hd/pipe/StaffManage/src/main/resources/lib/libHCCore.so deleted file mode 100644 index 7846902..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/libHCCore.so +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/libNPQos.so b/hd/pipe/StaffManage/src/main/resources/lib/libNPQos.so deleted file mode 100644 index 4972715..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/libNPQos.so +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/libPlayCtrl.so b/hd/pipe/StaffManage/src/main/resources/lib/libPlayCtrl.so deleted file mode 100644 index e255c22..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/libPlayCtrl.so +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/libSuperRender.so b/hd/pipe/StaffManage/src/main/resources/lib/libSuperRender.so deleted file mode 100644 index 3f36846..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/libSuperRender.so +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/libcrypto.so.1.1 b/hd/pipe/StaffManage/src/main/resources/lib/libcrypto.so.1.1 deleted file mode 100644 index 88c3746..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/libcrypto.so.1.1 +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/libhcnetsdk.so b/hd/pipe/StaffManage/src/main/resources/lib/libhcnetsdk.so deleted file mode 100644 index 2607cee..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/libhcnetsdk.so +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/libhpr.so b/hd/pipe/StaffManage/src/main/resources/lib/libhpr.so deleted file mode 100644 index 8efcabb..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/libhpr.so +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/libopenal.so.1 b/hd/pipe/StaffManage/src/main/resources/lib/libopenal.so.1 deleted file mode 100644 index a9dcb82..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/libopenal.so.1 +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/libssl.so.1.1 b/hd/pipe/StaffManage/src/main/resources/lib/libssl.so.1.1 deleted file mode 100644 index f3e4481..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/libssl.so.1.1 +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/lib/libz.so b/hd/pipe/StaffManage/src/main/resources/lib/libz.so deleted file mode 100644 index 13b4ed9..0000000 --- a/hd/pipe/StaffManage/src/main/resources/lib/libz.so +++ /dev/null Binary files differ diff --git a/hd/pipe/StaffManage/src/main/resources/mapping/FaceDeviceMapper.xml b/hd/pipe/StaffManage/src/main/resources/mapping/FaceDeviceMapper.xml new file mode 100644 index 0000000..f503fe0 --- /dev/null +++ b/hd/pipe/StaffManage/src/main/resources/mapping/FaceDeviceMapper.xml @@ -0,0 +1,228 @@ +<?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.thhy.staff.modules.biz.face.mapper.FaceDeviceMapper"> + + <!-- 通用查询结果列 --> + <sql id="Base_Column_List"> + t.id as id, + t.detect_alive as detectAlive, + t.dev_sno as devSno, + t.is_first as isFirst, + t.name as name, + t.openIR_window as openIRWindow, + t.register_no as registerNo, + t.retry_interval as retryInterval, + t.sign_type as signType, + t.threshold as threshold, + t.through_type as throughType, + t.type as type + </sql> + + <sql id="condition_query"> + <where> + <trim suffixOverrides=" AND "> + <if test="detectAlive!=null and detectAlive!=''"> + t.detect_alive = #{detectAlive} AND + </if> + <if test="devSno!=null and devSno!=''"> + t.dev_sno = #{devSno} AND + </if> + <if test="isFirst!=null"> + t.is_first = #{isFirst} AND + </if> + <if test="name!=null and name!=''"> + t.name = #{name} AND + </if> + <if test="openIRWindow!=null"> + t.openIR_window = #{openIRWindow} AND + </if> + <if test="registerNo!=null and registerNo!=''"> + t.register_no = #{registerNo} AND + </if> + <if test="retryInterval!=null"> + t.retry_interval = #{retryInterval} AND + </if> + <if test="signType!=null and signType!=''"> + t.sign_type = #{signType} AND + </if> + <if test="threshold!=null"> + t.threshold = #{threshold} AND + </if> + <if test="throughType!=null and throughType!=''"> + t.through_type = #{throughType} AND + </if> + <if test="type!=null"> + t.type = #{type} AND + </if> + </trim> + </where> + </sql> + + <select id="queryById" resultType="com.thhy.staff.modules.biz.face.entity.FaceDevice"> + select <include refid="Base_Column_List" /> + from t_face_device t + where t.id=#{id} + </select> + + <select id="queryVersionById" resultType="integer"> + select version from t_face_device + where id=#{id} + </select> + + <!--查询列表--> + <select id="findList" resultType="com.thhy.staff.modules.biz.face.entity.FaceDevice"> + SELECT + <include refid="Base_Column_List" /> + from t_face_device t + <include refid="condition_query" /> + </select> + + <!--查询列表--> + <select id="findAll" resultType="com.thhy.staff.modules.biz.face.entity.FaceDevice"> + SELECT + <include refid="Base_Column_List" /> + from t_face_device t + </select> + + <select id="countByDevSn" resultType="int"> + select count(id) from t_face_device where dev_sno = #{devSno} + </select> + + <!--插入操作--> + <insert id="insert"> + insert into t_face_device + <trim prefix="(" suffix=")" suffixOverrides="," > + <if test="detectAlive != null"> + detect_alive, + </if> + <if test="devSno != null"> + dev_sno, + </if> + <if test="id != null"> + id, + </if> + <if test="isFirst != null"> + is_first, + </if> + <if test="name != null"> + name, + </if> + <if test="openIRWindow != null"> + openIR_window, + </if> + <if test="registerNo != null"> + register_no, + </if> + <if test="retryInterval != null"> + retry_interval, + </if> + <if test="signType != null"> + sign_type, + </if> + <if test="threshold != null"> + threshold, + </if> + <if test="throughType != null"> + through_type, + </if> + <if test="type != null"> + type, + </if> + </trim> + + <trim prefix="values (" suffix=")" suffixOverrides="," > + <if test="detectAlive != null"> + #{detectAlive}, + </if> + <if test="devSno != null"> + #{devSno}, + </if> + <if test="id != null"> + #{id}, + </if> + <if test="isFirst != null"> + #{isFirst}, + </if> + <if test="name != null"> + #{name}, + </if> + <if test="openIRWindow != null"> + #{openIRWindow}, + </if> + <if test="registerNo != null"> + #{registerNo}, + </if> + <if test="retryInterval != null"> + #{retryInterval}, + </if> + <if test="signType != null"> + #{signType}, + </if> + <if test="threshold != null"> + #{threshold}, + </if> + <if test="throughType != null"> + #{throughType}, + </if> + <if test="type != null"> + #{type}, + </if> + </trim> + </insert> + + + <!--更新操作--> + <update id="update"> + update t_face_device + <set> + <if test="detectAlive != null"> + detect_alive=#{detectAlive}, + </if> + <if test="devSno != null"> + dev_sno=#{devSno}, + </if> + <if test="isFirst != null"> + is_first=#{isFirst}, + </if> + <if test="name != null"> + name=#{name}, + </if> + <if test="openIRWindow != null"> + openIR_window=#{openIRWindow}, + </if> + <if test="registerNo != null"> + register_no=#{registerNo}, + </if> + <if test="retryInterval != null"> + retry_interval=#{retryInterval}, + </if> + <if test="signType != null"> + sign_type=#{signType}, + </if> + <if test="threshold != null"> + threshold=#{threshold}, + </if> + <if test="throughType != null"> + through_type=#{throughType}, + </if> + <if test="type != null"> + type=#{type}, + </if> + </set> + where id=#{id} + </update> + + <!--逻辑删除--> + <update id="deletelogic"> + update t_face_device + SET is_use = 0 + where id=#{id} + </update> + + <!--根据ID删除--> + <delete id="deleteById"> + delete from t_face_device + where id=#{id} + </delete> + +</mapper> -- Gitblit v1.9.3