Browse Source

新增身份证信息 和 解决数据超长问题

cuimengchao 3 years ago
parent
commit
020886bf9c
35 changed files with 1069 additions and 4430 deletions
  1. 2 4
      face-server-netty/src/main/java/com/yx/face/netty_server/NettyServer.java
  2. 4 0
      face-server-netty/src/main/java/com/yx/face/service/impl/PushServiceImpl.java
  3. 0 622
      fyzd-phone/logs/winxin-fyzd.log
  4. BIN
      fyzd-phone/logs/winxin-fyzd.log.2021-11-23.0.gz
  5. 149 3511
      logs/ldbAirport.log
  6. 66 0
      src/main/java/com/yx/face/controller/admin/AdminConfigController.java
  7. 9 0
      src/main/java/com/yx/face/controller/admin/AdminFaceController.java
  8. 1 0
      src/main/java/com/yx/face/dao/FaceLogDao.java
  9. 8 2
      src/main/java/com/yx/face/dao/SystemConfigDao.java
  10. 35 0
      src/main/java/com/yx/face/model/dto/SystemConfigDTO.java
  11. 36 0
      src/main/java/com/yx/face/model/dto/UpSystemConfigDTO.java
  12. 41 24
      src/main/java/com/yx/face/model/entity/FaceLog.java
  13. 3 0
      src/main/java/com/yx/face/model/entity/FaceLogFrom.java
  14. 27 23
      src/main/java/com/yx/face/model/entity/SystemConfig.java
  15. 31 0
      src/main/java/com/yx/face/model/query/FaceServerLogQu.java
  16. 30 0
      src/main/java/com/yx/face/model/query/SystemConfigQu.java
  17. 7 0
      src/main/java/com/yx/face/model/vo/AdminVO.java
  18. 49 0
      src/main/java/com/yx/face/model/vo/SystemConfigVO.java
  19. 17 10
      src/main/java/com/yx/face/service/Aspect/FaceLogDaoAspect.java
  20. 11 10
      src/main/java/com/yx/face/service/Aspect/UserBlackListDaoAspect.java
  21. 11 10
      src/main/java/com/yx/face/service/Aspect/UserFaceRecordsDaoAspect.java
  22. 11 10
      src/main/java/com/yx/face/service/Aspect/UserInfoDaoAspect.java
  23. 11 10
      src/main/java/com/yx/face/service/Aspect/UserVisitorListDaoAspect.java
  24. 11 10
      src/main/java/com/yx/face/service/Aspect/UserWhiteListDaoAspect.java
  25. 3 0
      src/main/java/com/yx/face/service/FaceService.java
  26. 16 16
      src/main/java/com/yx/face/service/SuKangMaAipService.java
  27. 29 0
      src/main/java/com/yx/face/service/SystemConfigService.java
  28. 18 0
      src/main/java/com/yx/face/service/impl/AdminServiceImpl.java
  29. 20 4
      src/main/java/com/yx/face/service/impl/FaceServiceImpl.java
  30. 102 10
      src/main/java/com/yx/face/service/impl/FaceTBServiceImpl.java
  31. 143 143
      src/main/java/com/yx/face/service/impl/SuKangMaAipServiceImpl.java
  32. 107 0
      src/main/java/com/yx/face/service/impl/SystemConfigServiceImpl.java
  33. 1 1
      src/main/resources/application-dev.yml
  34. 30 0
      src/main/resources/mapper/FaceLogDao.xml
  35. 30 10
      src/main/resources/mapper/SystemConfigDao.xml

+ 2 - 4
face-server-netty/src/main/java/com/yx/face/netty_server/NettyServer.java

@@ -2,10 +2,7 @@ package com.yx.face.netty_server;
 
 import com.yx.face.service.PushService;
 import io.netty.bootstrap.ServerBootstrap;
-import io.netty.channel.ChannelFuture;
-import io.netty.channel.ChannelInitializer;
-import io.netty.channel.ChannelOption;
-import io.netty.channel.EventLoopGroup;
+import io.netty.channel.*;
 import io.netty.channel.nio.NioEventLoopGroup;
 import io.netty.channel.socket.SocketChannel;
 import io.netty.channel.socket.nio.NioServerSocketChannel;
@@ -63,6 +60,7 @@ public class NettyServer {
                 .localAddress(new InetSocketAddress(port))
                 //服务端可连接队列数,对应TCP/IP协议listen函数中backlog参数
                 .option(ChannelOption.SO_BACKLOG, 1024)
+                .childOption(ChannelOption.RCVBUF_ALLOCATOR, new AdaptiveRecvByteBufAllocator(32, 65535, 65535))
                 //设置TCP长连接,一般如果两个小时内没有数据的通信时,TCP会自动发送一个活动探测数据报文
                 // .childOption(ChannelOption.SO_KEEPALIVE, true)
                 //将小的数据包包装成更大的帧进行传送,提高网络的负载,即TCP延迟传输

+ 4 - 0
face-server-netty/src/main/java/com/yx/face/service/impl/PushServiceImpl.java

@@ -42,9 +42,13 @@ public class PushServiceImpl implements PushService {
         JSONObject jsonObject = JSONObject.parseObject(faceLog);
         String photo = jsonObject.getString("photo");
         String imgBase64 = getImgBase64(photo);
+        String sfzPhoto = jsonObject.getString("sfzPhoto");
+        String sfzImgBase64 = getImgBase64(sfzPhoto);
         Integer adminId = jsonObject.getInteger("adminId");
         jsonObject.put("photo", imgBase64);
+        jsonObject.put("sfzPhoto", sfzImgBase64);
         jsonObject.remove("adminId");
+        jsonObject.remove("userId");
         log.info("数据推送前;{}", jsonObject);
         JSONObject json = new JSONObject();
         json.put("data", jsonObject.toJSONString());

File diff suppressed because it is too large
+ 0 - 622
fyzd-phone/logs/winxin-fyzd.log


BIN
fyzd-phone/logs/winxin-fyzd.log.2021-11-23.0.gz


File diff suppressed because it is too large
+ 149 - 3511
logs/ldbAirport.log


+ 66 - 0
src/main/java/com/yx/face/controller/admin/AdminConfigController.java

@@ -0,0 +1,66 @@
+package com.yx.face.controller.admin;
+
+
+import com.github.pagehelper.PageInfo;
+import com.yx.face.boot.component.security.Authority;
+import com.yx.face.boot.core.BaseController;
+import com.yx.face.boot.restful.RestDTO;
+import com.yx.face.boot.restful.RestResponse;
+import com.yx.face.boot.restful.RestResult;
+import com.yx.face.boot.restful.ServiceException;
+import com.yx.face.model.dto.SystemConfigDTO;
+import com.yx.face.model.query.SystemConfigQu;
+import com.yx.face.model.vo.SystemConfigVO;
+import com.yx.face.service.SystemConfigService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @description: 系统配置表(SystemConfig)表控制层 <br>
+ * @author: PWB <br>
+ * @since: 1.0 <br>
+ * @date: 2021-06-26 14:03:04 <br>
+ */
+
+@RequiredArgsConstructor(onConstructor = @__(@Autowired))
+@Api(tags = "B 系统相关配置 API")
+@Authority({1, 2})
+@RestController
+@RequestMapping("admin/sysInquire")
+public class AdminConfigController extends BaseController {
+
+    /**
+     * 服务对象
+     */
+    private final SystemConfigService systemConfigService;
+
+
+    @ApiOperation(value = "添加")
+    @PostMapping("/addOrUpdate")
+    public RestResult<Boolean> add(@RequestBody SystemConfigDTO dto) {
+        return RestResponse.ok(systemConfigService.add(dto, getUserId()));
+    }
+
+
+    @ApiOperation(value = "删除")
+    @DeleteMapping("/delete")
+    public RestResult<Boolean> delete(Integer id) {
+        if (id == null) {
+            throw new ServiceException("参数不全");
+        }
+        return RestResponse.ok(systemConfigService.delete(id));
+    }
+
+
+    @ApiOperation(value = "列表")
+    @PostMapping("/getList")
+    public RestResult<PageInfo<SystemConfigVO>> getList(@RequestBody RestDTO<SystemConfigQu> dto) {
+        PageInfo<SystemConfigVO> list = systemConfigService.getList(dto, getUserId());
+        return RestResponse.ok(list);
+    }
+
+}
+

+ 9 - 0
src/main/java/com/yx/face/controller/admin/AdminFaceController.java

@@ -13,6 +13,7 @@ import com.yx.face.boot.restful.RestResult;
 import com.yx.face.boot.restful.ServiceException;
 import com.yx.face.model.dto.FaceDeviceDTO;
 import com.yx.face.model.excel.FaceLogVoExcel;
+import com.yx.face.model.query.FaceServerLogQu;
 import com.yx.face.model.query.QueryUser;
 import com.yx.face.model.search.FaceDeviceSearch;
 import com.yx.face.model.search.FaceServerLogSearch;
@@ -142,6 +143,14 @@ public class AdminFaceController extends BaseController {
         return RestResponse.ok(faceService.getFaceLogs(dto));
     }
 
+    @ApiOperation("获取通行记录详情")
+    @PostMapping("/getDetails")
+    public RestResult<FaceLogVO> getDetails(@RequestBody FaceServerLogQu qu) {
+        if (qu.getId() == null) {
+            throw new ServiceException("缺少参数哦~");
+        }
+        return RestResponse.ok(faceService.getDetails(qu, getUserId()));
+    }
 
     @ApiOperation("导出人脸日志Excel")
     @PostMapping("doGetFaceServerLogExcel")

+ 1 - 0
src/main/java/com/yx/face/dao/FaceLogDao.java

@@ -25,6 +25,7 @@ public interface FaceLogDao extends TKMapper<FaceLog> {
     Date getRecent(@Param("userId") Long userId, @Param("sn") String sn);
 
     List<FaceLogVoExcel> getFaceLogsExcel(@Param("query") QueryUserVo query);
+    FaceLogVO getDetails(@Param("id") Integer id);
 
     List<FaceLogVO> getYellow(@Param("adminId")Integer adminId,@Param("faceTime")String faceTime,@Param("jkm")String jkm);
 

+ 8 - 2
src/main/java/com/yx/face/dao/SystemConfigDao.java

@@ -1,8 +1,12 @@
 package com.yx.face.dao;
+
+
 import com.yx.face.boot.component.tk.TKMapper;
 import com.yx.face.model.entity.SystemConfig;
+import com.yx.face.model.vo.SystemConfigVO;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
 
 /**
  * @description: 系统配置表(SystemConfig)表数据库访问层 <br>
@@ -13,8 +17,10 @@ import org.apache.ibatis.annotations.Param;
 
 public interface SystemConfigDao extends TKMapper<SystemConfig> {
 
-    String getConfigByKeyValue(@Param("skmAesKey") String skmAesKey);
+    List<SystemConfigVO> selectList(@Param("accountId") Integer accountId, @Param("status") Integer status, @Param("type") Integer type, @Param("adminId") Integer adminId);
+
+    SystemConfigVO sysConfiguration(@Param("adminId") Integer adminId);
 
-    String getSkmKey(@Param("key") String key);
+    Integer selectByPrimaryOen(@Param("adminId") Integer adminId);
 }
 

+ 35 - 0
src/main/java/com/yx/face/model/dto/SystemConfigDTO.java

@@ -0,0 +1,35 @@
+package com.yx.face.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @description: 系统配置表(SystemConfig)DTO <br>
+ * @author: PWB <br>
+ * @since: 1.0 <br>
+ * @date: 2021-06-26 14:03:07 <br>
+ */
+
+@ApiModel("系统配置表DTO model")
+@Data
+public class SystemConfigDTO {
+
+    @ApiModelProperty(value = "数据id")
+    private Integer id;
+
+    @ApiModelProperty(value = "账号Id")
+    private Integer adminId;
+
+    @ApiModelProperty(value = "密码")
+    private String password;
+
+    @ApiModelProperty(value = "停用-0|启用-1")
+    private Integer status;
+
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+}
+

+ 36 - 0
src/main/java/com/yx/face/model/dto/UpSystemConfigDTO.java

@@ -0,0 +1,36 @@
+package com.yx.face.model.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @description: 系统配置表(SystemConfig)DTO <br>
+ * @author: PWB <br>
+ * @since: 1.0 <br>
+ * @date: 2021-06-26 14:03:07 <br>
+ */
+
+@ApiModel("系统配置表DTO model")
+@Data
+public class UpSystemConfigDTO {
+
+
+    @ApiModelProperty(value = "数据id")
+    private Integer id;
+
+    @ApiModelProperty(value = "账号Id")
+    private Integer adminId;
+
+    @ApiModelProperty(value = "密码")
+    private String password;
+
+    @ApiModelProperty(value = "停用-0|启用-1")
+    private Integer status;
+
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+}
+

+ 41 - 24
src/main/java/com/yx/face/model/entity/FaceLog.java

@@ -138,31 +138,47 @@ public class FaceLog {
      * 2出门
      */
 
-
     @Column(name = "out_type")
     private Integer outType;
-
-    /**
-     * 身份证信息JSON串
-     * name 姓名
-     * sex 性别
-     * nation民族
-     * born出生年月
-     * address地址
-     * apartment签发机关
-     * period有效期限
-     * no身份证号
-     * country国籍
-     * cn_name中文名
-     * Idcard_version证件版本
-     * card_type身份证类型
-     * photo 身份证照片
-     */
-
-
-    @Column(name = "id_card")
-    private String idCard;
-
+    // * name 姓名
+    @Column(name = "sfz_name")
+    private String sfzName;
+    //sex 性别
+    @Column(name = "sfz_sex")
+    private String sfzSex;
+    //nation民族
+    @Column(name = "sfz_nation")
+    private String sfzNation;
+    //born出生年月
+    @Column(name = "sfz_born")
+    private String sfzBorn;
+    //address地址
+    @Column(name = "sfz_address")
+    private String sfzAddress;
+    //apartment签发机关
+    @Column(name = "sfz_apartment")
+    private String sfzApartment;
+    //period有效期限
+    @Column(name = "sfz_period")
+    private String sfzPeriod;
+    //no身份证号
+    @Column(name = "sfz_no")
+    private String sfzNo;
+    //country国籍
+    @Column(name = "sfz_country")
+    private String sfzCountry;
+    //cn_name中文名
+    @Column(name = "sfz_cn_name")
+    private String sfzCnName;
+    //Idcard_version证件版本
+    @Column(name = "sfz_idcard_version")
+    private String sfzIdcardVersion;
+    //card_type身份证类型
+    @Column(name = "sfz_card_type")
+    private String sfzCardType;
+    //photo 身份证照片
+    @Column(name = "sfz_photo")
+    private String sfzPhoto;
     /**
      * 体温测量度数
      */
@@ -198,7 +214,8 @@ public class FaceLog {
      */
     @Column(name = "jkm_status")
     private String jkmStatus;
-    /**.
+    /**
+     * .
      * 健康码状态 0 健康码 1 国康码
      */
     @Column(name = "jkm_type")

+ 3 - 0
src/main/java/com/yx/face/model/entity/FaceLogFrom.java

@@ -19,4 +19,7 @@ public class FaceLogFrom implements Serializable {
 
     @Column(name = "img_base")
     private byte[] imgBase;
+
+    @Column(name = "sfz_img_base")
+    private byte[] sfzImgBase;
 }

+ 27 - 23
src/main/java/com/yx/face/model/entity/SystemConfig.java

@@ -23,62 +23,66 @@ public class SystemConfig {
     private Integer id;
 
     /**
-     * 设置名称
+     * 扩充字段
      */
-
-
-    private String name;
-
+    private String expansion1;
     /**
-     * 系统设置Key
+     *
      */
-
-
-    @Column(name = "config_name")
-    private String configName;
-
+    private String expansion2;
     /**
-     * 系统设置Value
+     *
      */
+    private String expansion3;
 
+    /**
+     * 账号
+     */
+    private String account;
 
-    @Column(name = "config_value")
-    private String configValue;
+    /**
+     * 账号id
+     */
+    @Column(name = "account_id")
+    private Integer accountId;
 
     /**
      * 备注
      */
 
-
     private String remark;
 
     /**
      * 停用-0|启用-1
      */
+    private Integer status;
 
 
-    private Integer status;
+    /**
+     * 数据脱敏-type1
+     */
+    private Integer type;
 
     /**
-     * 系统内部配置-0|平台同步数据配置-1
+     * 密码
      */
+    private String password;
 
+    /**
+     * 创建者
+     */
+    @Column(name = "admin_id")
+    private Integer adminId;
 
-    private Integer type;
 
     /**
      * 更新时间
      */
-
-
     @Column(name = "update_time")
     private Date updateTime;
-
     /**
      * 创建时间
      */
-
-
     @Column(name = "create_time")
     private Date createTime;
 

+ 31 - 0
src/main/java/com/yx/face/model/query/FaceServerLogQu.java

@@ -0,0 +1,31 @@
+package com.yx.face.model.query;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @description: 系统配置表(SystemConfig)DTO <br>
+ * @author: PWB <br>
+ * @since: 1.0 <br>
+ * @date: 2021-06-26 14:03:07 <br>
+ */
+
+@ApiModel("系统配置表查询 model")
+@Data
+public class FaceServerLogQu {
+
+
+    @ApiModelProperty(value = "数据id")
+    private Integer id;
+
+
+
+    /**
+     * 密码
+     */
+    @ApiModelProperty(value = "密码")
+    private String password;
+
+}
+

+ 30 - 0
src/main/java/com/yx/face/model/query/SystemConfigQu.java

@@ -0,0 +1,30 @@
+package com.yx.face.model.query;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @description: 系统配置表(SystemConfig)DTO <br>
+ * @author: PWB <br>
+ * @since: 1.0 <br>
+ * @date: 2021-06-26 14:03:07 <br>
+ */
+
+@ApiModel("系统配置表查询 model")
+@Data
+public class SystemConfigQu {
+
+
+    @ApiModelProperty(value = "账号Id")
+    private Integer adminId;
+
+
+    @ApiModelProperty(value = "停用-0|启用-1")
+    private Integer status;
+
+    @ApiModelProperty(value = "类型 (数据脱敏-type -1, 后面扩充以此类推 )")
+    private Integer type;
+
+}
+

+ 7 - 0
src/main/java/com/yx/face/model/vo/AdminVO.java

@@ -99,5 +99,12 @@ public class AdminVO {
 
     @ApiModelProperty(value = "是否脱敏重要信息 1.脱敏 2.不脱敏")
     private Integer isHideImportant;
+
+
+    @ApiModelProperty("脱敏数据查询是否配置 0-未配置 1 -配置")
+    private Integer sysQueryConfiguration;
+
+    @ApiModelProperty("脱敏数据查询配置是否开启 0-未开启 1 -开启")
+    private Integer sysQueryConfigurationStatus;
 }
 

+ 49 - 0
src/main/java/com/yx/face/model/vo/SystemConfigVO.java

@@ -0,0 +1,49 @@
+package com.yx.face.model.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @description: 系统配置表(SystemConfig)VO <br>
+ * @author: PWB <br>
+ * @since: 1.0 <br>
+ * @date: 2021-06-26 14:03:06 <br>
+ */
+
+@ApiModel("系统配置表VO model")
+@Data
+public class SystemConfigVO {
+
+    @ApiModelProperty(value = "id")
+    private Integer id;
+
+//    @ApiModelProperty(value = "密码")
+//    private String password;
+
+    @ApiModelProperty(value = "类型 (数据脱敏-type -1, 后面扩充以此类推 )")
+    private String type;
+
+    @ApiModelProperty(value = "停用-0|启用-1")
+    private Integer status;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ApiModelProperty(value = "账号名称")
+    private String account;
+
+    @ApiModelProperty(value = "账号Id")
+    private Integer adminId;
+
+
+    @ApiModelProperty(value = "创建时间")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+
+}
+

+ 17 - 10
src/main/java/com/yx/face/service/Aspect/FaceLogDaoAspect.java

@@ -25,38 +25,45 @@ public class FaceLogDaoAspect {
     FaceLogFromDao faceLogFromDao;
 
     @After("execution( public * com.yx.face.dao.FaceLogDao.delete*(*))")
-    public void deleteAfter(JoinPoint joinPoint){
+    public void deleteAfter(JoinPoint joinPoint) {
         String name = joinPoint.getSignature().getName();
         Object[] args = joinPoint.getArgs();
-        if(name.equals("deleteByPrimaryKey")){
+        if (name.equals("deleteByPrimaryKey")) {
             faceLogFromDao.delteByForgeinId((Long) args[0]);
         }
     }
 
     @After("execution( public * com.yx.face.dao.FaceLogDao.insert*(*))")
-    public void insertAfter(JoinPoint joinPoint){
+    public void insertAfter(JoinPoint joinPoint) {
         String name = joinPoint.getSignature().getName();
         Object[] args = joinPoint.getArgs();
         FaceLogFrom ublf = new FaceLogFrom();
-        if(name.equals("insert")||name.equals("insertSelective")){
-            FaceLog ubl = (FaceLog)args[0];
-            if(ubl.getPhoto() != null && !ubl.getPhoto().equals("")&& ubl.getPhoto().indexOf("请求失败")==-1&&ubl.getId()!=null){
+        if (name.equals("insert") || name.equals("insertSelective")) {
+            FaceLog ubl = (FaceLog) args[0];
+            boolean photo = ubl.getPhoto() != null && !ubl.getPhoto().equals("") && ubl.getPhoto().indexOf("请求失败") == -1 && ubl.getId() != null;
+            boolean sfzPhoto = ubl.getSfzPhoto() != null && !ubl.getSfzPhoto().equals("") && ubl.getSfzPhoto().indexOf("请求失败") == -1 && ubl.getId() != null;
+            if (photo && sfzPhoto) {
                 ublf.setFaceLogId(ubl.getId());
                 ublf.setImgBase(Base64Util.getByteArrayFromUrl(ubl.getPhoto()));
+                ublf.setSfzImgBase(Base64Util.getByteArrayFromUrl(ubl.getSfzPhoto()));
                 faceLogFromDao.insertSelective(ublf);
             }
         }
     }
+
     @After("execution( public * com.yx.face.dao.FaceLogDao.update*(*))")
-    public void updateAfter(JoinPoint joinPoint){
+    public void updateAfter(JoinPoint joinPoint) {
         String name = joinPoint.getSignature().getName();
         Object[] args = joinPoint.getArgs();
         FaceLogFrom ublf = new FaceLogFrom();
-        if(name.equals("updateByPrimaryKey")||name.equals("updateByPrimaryKeySelective")){
-            FaceLog ubl = (FaceLog)args[0];
-            if(ubl.getPhoto() != null && !ubl.getPhoto().equals("")){
+        if (name.equals("updateByPrimaryKey") || name.equals("updateByPrimaryKeySelective")) {
+            FaceLog ubl = (FaceLog) args[0];
+            boolean photo = ubl.getPhoto() != null && !ubl.getPhoto().equals("") && ubl.getPhoto().indexOf("请求失败") == -1 && ubl.getId() != null;
+            boolean sfzPhoto = ubl.getSfzPhoto() != null && !ubl.getSfzPhoto().equals("") && ubl.getSfzPhoto().indexOf("请求失败") == -1 && ubl.getId() != null;
+            if (photo && sfzPhoto) {
                 ublf.setFaceLogId(ubl.getId());
                 ublf.setImgBase(Base64Util.getByteArrayFromUrl(ubl.getPhoto()));
+                ublf.setSfzImgBase(Base64Util.getByteArrayFromUrl(ubl.getSfzPhoto()));
                 faceLogFromDao.updateByForgeinId(ublf);
             }
         }

+ 11 - 10
src/main/java/com/yx/face/service/Aspect/UserBlackListDaoAspect.java

@@ -27,36 +27,37 @@ public class UserBlackListDaoAspect {
     UserBlackListFromDao userBlackListFromDao;
 
     @After("execution( public * com.yx.face.dao.UserBlackListDao.delete*(*))")
-    public void deleteAfter(JoinPoint joinPoint){
+    public void deleteAfter(JoinPoint joinPoint) {
         String name = joinPoint.getSignature().getName();
         Object[] args = joinPoint.getArgs();
-        if(name.equals("deleteByPrimaryKey")){
+        if (name.equals("deleteByPrimaryKey")) {
             userBlackListFromDao.delteByForgeinId((Integer) args[0]);
         }
     }
 
     @After("execution( public * com.yx.face.dao.UserBlackListDao.insert*(*))")
-    public void insertAfter(JoinPoint joinPoint){
+    public void insertAfter(JoinPoint joinPoint) {
         String name = joinPoint.getSignature().getName();
         Object[] args = joinPoint.getArgs();
         UserBlackListFrom ublf = new UserBlackListFrom();
-        if(name.equals("insert")||name.equals("insertSelective")){
-            UserBlackList ubl = (UserBlackList)args[0];
-            if(ubl.getAvatar() != null && !ubl.getAvatar().equals("")&&ubl.getId()!=null){
+        if (name.equals("insert") || name.equals("insertSelective")) {
+            UserBlackList ubl = (UserBlackList) args[0];
+            if (ubl.getAvatar() != null && !ubl.getAvatar().equals("") && ubl.getId() != null) {
                 ublf.setUserBlackListId(ubl.getId());
                 ublf.setImgBase(Base64Util.getByteArrayFromUrl(ubl.getAvatar()));
                 userBlackListFromDao.insertSelective(ublf);
             }
         }
     }
+
     @After("execution( public * com.yx.face.dao.UserBlackListDao.update*(*))")
-    public void updateAfter(JoinPoint joinPoint){
+    public void updateAfter(JoinPoint joinPoint) {
         String name = joinPoint.getSignature().getName();
         Object[] args = joinPoint.getArgs();
         UserBlackListFrom ublf = new UserBlackListFrom();
-        if(name.equals("updateByPrimaryKey")||name.equals("updateByPrimaryKeySelective")){
-            UserBlackList ubl = (UserBlackList)args[0];
-            if(ubl.getAvatar() != null && !ubl.getAvatar().equals("")){
+        if (name.equals("updateByPrimaryKey") || name.equals("updateByPrimaryKeySelective")) {
+            UserBlackList ubl = (UserBlackList) args[0];
+            if (ubl.getAvatar() != null && !ubl.getAvatar().equals("")) {
                 ublf.setUserBlackListId(ubl.getId());
                 ublf.setImgBase(Base64Util.getByteArrayFromUrl(ubl.getAvatar()));
                 userBlackListFromDao.updateByForgeinId(ublf);

+ 11 - 10
src/main/java/com/yx/face/service/Aspect/UserFaceRecordsDaoAspect.java

@@ -27,36 +27,37 @@ public class UserFaceRecordsDaoAspect {
     UserFaceRecordsFromDao userFaceRecordsFromDao;
 
     @After("execution( public * com.yx.face.dao.UserFaceRecordsDao.delete*(*))")
-    public void deleteAfter(JoinPoint joinPoint){
+    public void deleteAfter(JoinPoint joinPoint) {
         String name = joinPoint.getSignature().getName();
         Object[] args = joinPoint.getArgs();
-        if(name.equals("deleteByPrimaryKey")){
+        if (name.equals("deleteByPrimaryKey")) {
             userFaceRecordsFromDao.delteByForgeinId((Long) args[0]);
         }
     }
 
     @After("execution( public * com.yx.face.dao.UserFaceRecordsDao.insert*(*))")
-    public void insertAfter(JoinPoint joinPoint){
+    public void insertAfter(JoinPoint joinPoint) {
         String name = joinPoint.getSignature().getName();
         Object[] args = joinPoint.getArgs();
         UserFaceRecordsFrom obj = new UserFaceRecordsFrom();
-        if(name.equals("insert")||name.equals("insertSelective")){
-            UserFaceRecords userFaceRecords = (UserFaceRecords)args[0];
-            if(userFaceRecords.getPhoto() != null && !userFaceRecords.getPhoto().equals("")&&userFaceRecords.getId()!=null){
+        if (name.equals("insert") || name.equals("insertSelective")) {
+            UserFaceRecords userFaceRecords = (UserFaceRecords) args[0];
+            if (userFaceRecords.getPhoto() != null && !userFaceRecords.getPhoto().equals("") && userFaceRecords.getId() != null) {
                 obj.setUserFaceRecordsId(userFaceRecords.getId());
                 obj.setImgBase(Base64Util.getByteArrayFromUrl(userFaceRecords.getPhoto()));
                 userFaceRecordsFromDao.insertSelective(obj);
             }
         }
     }
+
     @After("execution( public * com.yx.face.dao.UserFaceRecordsDao.update*(*))")
-    public void updateAfter(JoinPoint joinPoint){
+    public void updateAfter(JoinPoint joinPoint) {
         String name = joinPoint.getSignature().getName();
         Object[] args = joinPoint.getArgs();
         UserFaceRecordsFrom obj = new UserFaceRecordsFrom();
-        if(name.equals("updateByPrimaryKey")||name.equals("updateByPrimaryKeySelective")){
-            UserFaceRecords ubl = (UserFaceRecords)args[0];
-            if(ubl.getPhoto() != null && !ubl.getPhoto().equals("")){
+        if (name.equals("updateByPrimaryKey") || name.equals("updateByPrimaryKeySelective")) {
+            UserFaceRecords ubl = (UserFaceRecords) args[0];
+            if (ubl.getPhoto() != null && !ubl.getPhoto().equals("")) {
                 obj.setUserFaceRecordsId(ubl.getId());
                 obj.setImgBase(Base64Util.getByteArrayFromUrl(ubl.getPhoto()));
                 userFaceRecordsFromDao.updateByForgeinId(obj);

+ 11 - 10
src/main/java/com/yx/face/service/Aspect/UserInfoDaoAspect.java

@@ -27,36 +27,37 @@ public class UserInfoDaoAspect {
     UserInfoFromDao userInfoFromDao;
 
     @After("execution( public * com.yx.face.dao.UserInfoDao.delete*(*))")
-    public void deleteAfter(JoinPoint joinPoint){
+    public void deleteAfter(JoinPoint joinPoint) {
         String name = joinPoint.getSignature().getName();
         Object[] args = joinPoint.getArgs();
-        if(name.equals("deleteByPrimaryKey")){
+        if (name.equals("deleteByPrimaryKey")) {
             userInfoFromDao.delteByForgeinId((Long) args[0]);
         }
     }
 
     @After("execution( public * com.yx.face.dao.UserInfoDao.insert*(*))")
-    public void insertAfter(JoinPoint joinPoint){
+    public void insertAfter(JoinPoint joinPoint) {
         String name = joinPoint.getSignature().getName();
         Object[] args = joinPoint.getArgs();
         UserInfoFrom obj = new UserInfoFrom();
-        if(name.equals("insert")||name.equals("insertSelective")){
-            UserInfo ui = (UserInfo)args[0];
-            if(ui.getAvatar() != null && !ui.getAvatar().equals("")&&ui.getId()!=null){
+        if (name.equals("insert") || name.equals("insertSelective")) {
+            UserInfo ui = (UserInfo) args[0];
+            if (ui.getAvatar() != null && !ui.getAvatar().equals("") && ui.getId() != null) {
                 obj.setUserInfoId(ui.getId());
                 obj.setImgBase(Base64Util.getByteArrayFromUrl(ui.getAvatar()));
                 userInfoFromDao.insertSelective(obj);
             }
         }
     }
+
     @After("execution( public * com.yx.face.dao.UserInfoDao.update*(*))")
-    public void updateAfter(JoinPoint joinPoint){
+    public void updateAfter(JoinPoint joinPoint) {
         String name = joinPoint.getSignature().getName();
         Object[] args = joinPoint.getArgs();
         UserInfoFrom obj = new UserInfoFrom();
-        if(name.equals("updateByPrimaryKey")||name.equals("updateByPrimaryKeySelective")){
-            UserInfo ui = (UserInfo)args[0];
-            if(ui.getAvatar() != null && !ui.getAvatar().equals("")){
+        if (name.equals("updateByPrimaryKey") || name.equals("updateByPrimaryKeySelective")) {
+            UserInfo ui = (UserInfo) args[0];
+            if (ui.getAvatar() != null && !ui.getAvatar().equals("")) {
                 obj.setUserInfoId(ui.getId());
                 obj.setImgBase(Base64Util.getByteArrayFromUrl(ui.getAvatar()));
                 userInfoFromDao.updateByForgeinId(obj);

+ 11 - 10
src/main/java/com/yx/face/service/Aspect/UserVisitorListDaoAspect.java

@@ -26,36 +26,37 @@ public class UserVisitorListDaoAspect {
     UserVisitorListFromDao userVisitorListFromDao;
 
     @After("execution( public * com.yx.face.dao.UserVisitorListDao.delete*(*))")
-    public void deleteAfter(JoinPoint joinPoint){
+    public void deleteAfter(JoinPoint joinPoint) {
         String name = joinPoint.getSignature().getName();
         Object[] args = joinPoint.getArgs();
-        if(name.equals("deleteByPrimaryKey")){
+        if (name.equals("deleteByPrimaryKey")) {
             userVisitorListFromDao.delteByForgeinId((Integer) args[0]);
         }
     }
 
     @After("execution( public * com.yx.face.dao.UserVisitorListDao.insert*(*))")
-    public void insertAfter(JoinPoint joinPoint){
+    public void insertAfter(JoinPoint joinPoint) {
         String name = joinPoint.getSignature().getName();
         Object[] args = joinPoint.getArgs();
         UserVisitorListFrom obj = new UserVisitorListFrom();
-        if(name.equals("insert")||name.equals("insertSelective")){
-            UserVisitorList userVisitorList = (UserVisitorList)args[0];
-            if(userVisitorList.getAvatar() != null && !userVisitorList.getAvatar().equals("")&&userVisitorList.getId()!=null){
+        if (name.equals("insert") || name.equals("insertSelective")) {
+            UserVisitorList userVisitorList = (UserVisitorList) args[0];
+            if (userVisitorList.getAvatar() != null && !userVisitorList.getAvatar().equals("") && userVisitorList.getId() != null) {
                 obj.setUserVisitorListId(userVisitorList.getId());
                 obj.setImgBase(Base64Util.getByteArrayFromUrl(userVisitorList.getAvatar()));
                 userVisitorListFromDao.insertSelective(obj);
             }
         }
     }
+
     @After("execution( public * com.yx.face.dao.UserVisitorListDao.update*(*))")
-    public void updateAfter(JoinPoint joinPoint){
+    public void updateAfter(JoinPoint joinPoint) {
         String name = joinPoint.getSignature().getName();
         Object[] args = joinPoint.getArgs();
         UserVisitorListFrom obj = new UserVisitorListFrom();
-        if(name.equals("updateByPrimaryKey")||name.equals("updateByPrimaryKeySelective")){
-            UserVisitorList ubl = (UserVisitorList)args[0];
-            if(ubl.getAvatar() != null && !ubl.getAvatar().equals("")){
+        if (name.equals("updateByPrimaryKey") || name.equals("updateByPrimaryKeySelective")) {
+            UserVisitorList ubl = (UserVisitorList) args[0];
+            if (ubl.getAvatar() != null && !ubl.getAvatar().equals("")) {
                 obj.setUserVisitorListId(ubl.getId());
                 obj.setImgBase(Base64Util.getByteArrayFromUrl(ubl.getAvatar()));
                 userVisitorListFromDao.updateByForgeinId(obj);

+ 11 - 10
src/main/java/com/yx/face/service/Aspect/UserWhiteListDaoAspect.java

@@ -25,36 +25,37 @@ public class UserWhiteListDaoAspect {
     UserWhiteListFromDao userWhiteListFromDao;
 
     @After("execution( public * com.yx.face.dao.UserWhitelistDao.delete*(*))")
-    public void deleteAfter(JoinPoint joinPoint){
+    public void deleteAfter(JoinPoint joinPoint) {
         String name = joinPoint.getSignature().getName();
         Object[] args = joinPoint.getArgs();
-        if(name.equals("deleteByPrimaryKey")){
+        if (name.equals("deleteByPrimaryKey")) {
             userWhiteListFromDao.delteByForgeinId((Integer) args[0]);
         }
     }
 
     @After("execution( public * com.yx.face.dao.UserWhitelistDao.insert*(*))")
-    public void insertAfter(JoinPoint joinPoint){
+    public void insertAfter(JoinPoint joinPoint) {
         String name = joinPoint.getSignature().getName();
         Object[] args = joinPoint.getArgs();
         UserWhitelistFrom obj = new UserWhitelistFrom();
-        if(name.equals("insert")||name.equals("insertSelective")){
-            UserWhitelist userWhiteList = (UserWhitelist)args[0];
-            if(userWhiteList.getAvatar() != null && !userWhiteList.getAvatar().equals("")&&userWhiteList.getId()!=null){
+        if (name.equals("insert") || name.equals("insertSelective")) {
+            UserWhitelist userWhiteList = (UserWhitelist) args[0];
+            if (userWhiteList.getAvatar() != null && !userWhiteList.getAvatar().equals("") && userWhiteList.getId() != null) {
                 obj.setUserWhitelistId(userWhiteList.getId());
                 obj.setImgBase(Base64Util.getByteArrayFromUrl(userWhiteList.getAvatar()));
                 userWhiteListFromDao.insertSelective(obj);
             }
         }
     }
+
     @After("execution( public * com.yx.face.dao.UserWhitelistDao.update*(*))")
-    public void updateAfter(JoinPoint joinPoint){
+    public void updateAfter(JoinPoint joinPoint) {
         String name = joinPoint.getSignature().getName();
         Object[] args = joinPoint.getArgs();
         UserWhitelistFrom obj = new UserWhitelistFrom();
-        if(name.equals("updateByPrimaryKey")||name.equals("updateByPrimaryKeySelective")){
-            UserWhitelist ubl = (UserWhitelist)args[0];
-            if(ubl.getAvatar() != null && !ubl.getAvatar().equals("")){
+        if (name.equals("updateByPrimaryKey") || name.equals("updateByPrimaryKeySelective")) {
+            UserWhitelist ubl = (UserWhitelist) args[0];
+            if (ubl.getAvatar() != null && !ubl.getAvatar().equals("")) {
                 obj.setUserWhitelistId(ubl.getId());
                 obj.setImgBase(Base64Util.getByteArrayFromUrl(ubl.getAvatar()));
                 userWhiteListFromDao.updateByForgeinId(obj);

+ 3 - 0
src/main/java/com/yx/face/service/FaceService.java

@@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo;
 import com.yx.face.boot.restful.RestDTO;
 import com.yx.face.model.dto.FaceDeviceDTO;
 import com.yx.face.model.excel.FaceLogVoExcel;
+import com.yx.face.model.query.FaceServerLogQu;
 import com.yx.face.model.query.QueryUser;
 import com.yx.face.model.search.FaceDeviceSearch;
 import com.yx.face.model.search.FaceServerLogSearch;
@@ -57,4 +58,6 @@ public interface FaceService {
     String getLogo(Integer userId);
 
     Boolean doReboot(String sn);
+
+    FaceLogVO getDetails(FaceServerLogQu id, Integer userId);
 }

+ 16 - 16
src/main/java/com/yx/face/service/SuKangMaAipService.java

@@ -1,16 +1,16 @@
-package com.yx.face.service;
-
-
-/**
- * @ProjectName: airport-review-smoke
- * @Package: com.yixin.review.service
- * @ClassName: SuKangMaAipService
- * @Author: 崔哥
- * @Description: 苏康码扫码接口 SuKangMaAipServiceImpl
- * @Date: 2021/9/3 16:19
- * @Version: 1.0
- */
-public interface SuKangMaAipService {
-
-    void getLocalSkmInfo(String name, String idCard, String sn, Long id, String extend3);
-}
+//package com.yx.face.service;
+//
+//
+///**
+// * @ProjectName: airport-review-smoke
+// * @Package: com.yixin.review.service
+// * @ClassName: SuKangMaAipService
+// * @Author: 崔哥
+// * @Description: 苏康码扫码接口 SuKangMaAipServiceImpl
+// * @Date: 2021/9/3 16:19
+// * @Version: 1.0
+// */
+//public interface SuKangMaAipService {
+//
+//    void getLocalSkmInfo(String name, String idCard, String sn, Long id, String extend3);
+//}

+ 29 - 0
src/main/java/com/yx/face/service/SystemConfigService.java

@@ -0,0 +1,29 @@
+package com.yx.face.service;
+
+
+import com.github.pagehelper.PageInfo;
+import com.yx.face.boot.restful.RestDTO;
+import com.yx.face.model.dto.SystemConfigDTO;
+import com.yx.face.model.query.SystemConfigQu;
+import com.yx.face.model.vo.SystemConfigVO;
+
+
+/**
+ * @description: 系统配置表(SystemConfig)表服务接口 <br>
+ * @author: PWB <br>
+ * @since: 1.0 <br>
+ * @date: 2021-06-26 14:03:07 <br>
+ */
+
+public interface SystemConfigService {
+
+
+    Boolean add(SystemConfigDTO dto, Integer userId);
+
+
+    Boolean delete(Integer id);
+
+
+    PageInfo<SystemConfigVO> getList(RestDTO<SystemConfigQu> dto, Integer userId);
+}
+

+ 18 - 0
src/main/java/com/yx/face/service/impl/AdminServiceImpl.java

@@ -9,6 +9,7 @@ import com.yx.face.boot.uitls.*;
 import com.yx.face.dao.AdminDao;
 import com.yx.face.dao.AdminTagDao;
 import com.yx.face.dao.AreaCodeDao;
+import com.yx.face.dao.SystemConfigDao;
 import com.yx.face.model.dto.AdminDTO;
 import com.yx.face.model.entity.Admin;
 import com.yx.face.model.entity.AdminTag;
@@ -17,6 +18,7 @@ import com.yx.face.model.excel.AdminInfoExcel;
 import com.yx.face.model.search.AdminSearch;
 import com.yx.face.model.update.AdminUpdate;
 import com.yx.face.model.vo.AdminVO;
+import com.yx.face.model.vo.SystemConfigVO;
 import com.yx.face.service.AdminService;
 import com.yx.face.service.AreaCodeService;
 import com.yx.face.service.PoliceStationService;
@@ -52,6 +54,8 @@ public class AdminServiceImpl implements AdminService {
     private PoliceStationService policeStationService;
     @Resource
     private AdminTagDao adminTagDao;
+    @Resource
+    private SystemConfigDao systemConfigDao;
     @Value("${web.address}")
     private String address;
 
@@ -117,6 +121,13 @@ public class AdminServiceImpl implements AdminService {
         if (adminInfo.getTagId() != null) {
             adminLoginVO.setTagName(adminTagDao.selectByPrimaryKey(adminInfo.getTagId()).getName());
         }
+        SystemConfigVO vo = systemConfigDao.sysConfiguration(adminLoginVO.getAdminId());
+        if (vo != null) {
+            adminLoginVO.setSysQueryConfiguration(1);
+            adminLoginVO.setSysQueryConfiguration(vo.getStatus());
+        } else {
+            adminLoginVO.setSysQueryConfiguration(0);
+        }
         /*wxg 2021-11-4 增加省市区详细地址 结束*/
         return adminLoginVO;
     }
@@ -161,6 +172,13 @@ public class AdminServiceImpl implements AdminService {
         adminLoginVO.setPoliceStationCode(adminInfo.getPoliceStationCode());
         adminLoginVO.setPoliceStationName(adminInfo.getPoliceStationName());
         /*wxg 2021-11-4 增加省市区详细地址 结束*/
+        SystemConfigVO vo = systemConfigDao.sysConfiguration(adminLoginVO.getAdminId());
+        if (vo != null) {
+            adminLoginVO.setSysQueryConfiguration(1);
+            adminLoginVO.setSysQueryConfiguration(vo.getStatus());
+        } else {
+            adminLoginVO.setSysQueryConfiguration(0);
+        }
         return adminLoginVO;
     }
 

+ 20 - 4
src/main/java/com/yx/face/service/impl/FaceServiceImpl.java

@@ -14,13 +14,11 @@ import com.yx.face.model.entity.FaceDevice;
 import com.yx.face.model.entity.FaceDeviceLogo;
 import com.yx.face.model.entity.FaceRequestLog;
 import com.yx.face.model.excel.FaceLogVoExcel;
+import com.yx.face.model.query.FaceServerLogQu;
 import com.yx.face.model.query.QueryUser;
 import com.yx.face.model.search.FaceDeviceSearch;
 import com.yx.face.model.search.FaceServerLogSearch;
-import com.yx.face.model.vo.AdminVO;
-import com.yx.face.model.vo.FaceDeviceVO;
-import com.yx.face.model.vo.FaceLogVO;
-import com.yx.face.model.vo.FacePassVO;
+import com.yx.face.model.vo.*;
 import com.yx.face.service.AdminService;
 import com.yx.face.service.FaceService;
 import com.yx.face.service.feign.TBDeviceFaceService;
@@ -68,6 +66,8 @@ public class FaceServiceImpl implements FaceService {
     private AdminService adminService;
     @Resource
     private FaceDeviceLogoDao faceDeviceLogoDao;
+    @Resource
+    private SystemConfigDao systemConfigDao;
 
     @Override
     public Boolean authFaceDevice(Integer deviceId) {
@@ -562,6 +562,22 @@ public class FaceServiceImpl implements FaceService {
         }
         return true;
     }
+    @Override
+    public FaceLogVO getDetails(FaceServerLogQu qu, Integer adminId) {
+        String pwd = PasswordUtils.buildPw(qu.getPassword());
+        if (StringUtils.equals(qu.getPassword(), pwd)) {
+            throw new ServiceException("密码有误哦~");
+        }
+        SystemConfigVO vo = systemConfigDao.sysConfiguration(adminId);
+        if (vo == null) {
+            throw new ServiceException("未配置此权限哦~");
+        }
+        if (vo.getStatus() != 1) {
+            throw new ServiceException("此权限未开启哦~");
+        }
+        return faceLogDao.getDetails(qu.getId());
+    }
+
 
     //发送失败重试三次
 

+ 102 - 10
src/main/java/com/yx/face/service/impl/FaceTBServiceImpl.java

@@ -8,13 +8,14 @@ import com.yx.face.boot.config.TaskPoolConfig;
 import com.yx.face.boot.core.SnowflakeIdWorker;
 import com.yx.face.boot.uitls.DateUtils;
 import com.yx.face.boot.uitls.FileUploadUtil;
+import com.yx.face.boot.uitls.JsonUtils;
 import com.yx.face.boot.uitls.RedisUtil;
 import com.yx.face.dao.*;
 import com.yx.face.model.dto.FacePassDTO;
 import com.yx.face.model.entity.*;
 import com.yx.face.netty_client.NettyClient;
 import com.yx.face.service.FaceTBService;
-import com.yx.face.service.SuKangMaAipService;
+//import com.yx.face.service.SuKangMaAipService;
 import com.yx.face.service.feign.TBDeviceFaceService;
 import lombok.SneakyThrows;
 import lombok.extern.slf4j.Slf4j;
@@ -25,6 +26,7 @@ import org.springframework.util.CollectionUtils;
 import org.springframework.util.StringUtils;
 
 import javax.annotation.Resource;
+import javax.persistence.Column;
 import java.util.*;
 
 /**
@@ -48,8 +50,8 @@ public class FaceTBServiceImpl implements FaceTBService {
 
     @Resource
     private SystemConfigDao systemConfigDao;
-    @Autowired
-    private SuKangMaAipService suKangMaAipService;
+//    @Autowired
+//    private SuKangMaAipService suKangMaAipService;
 
     @Autowired
     private RedisUtil redisUtil;
@@ -384,12 +386,13 @@ public class FaceTBServiceImpl implements FaceTBService {
         if (dto.get("SN") != null) {
             sn = dto.get("SN").toString();
         }
-        if (!StringUtils.hasText(sn)) {
-            String snId = faceDeviceDao.getFaceDeviceOne(sn);
-            //判断设备是否在线 和是否授权
-            if (org.apache.commons.lang3.StringUtils.isNotBlank(snId)) {
-                return result;
-            }
+        //判断是否为空
+        if (org.apache.commons.lang3.StringUtils.isBlank(sn)) {
+            return result;
+        }
+        String snId = faceDeviceDao.getFaceDeviceOne(sn);
+        //sn是否存在
+        if (org.apache.commons.lang3.StringUtils.isBlank(snId)) {
             return result;
         }
         Integer action = null;
@@ -400,6 +403,7 @@ public class FaceTBServiceImpl implements FaceTBService {
         if (dto.get("orgid") != null) {
             orgid = dto.get("orgid").toString();
         }
+
         List<Map<String, Object>> dataList = (List) dto.get("data");
         log.info("人脸返回内容;=" + dataList + "数据");
 
@@ -436,6 +440,33 @@ public class FaceTBServiceImpl implements FaceTBService {
         //行程信息
         String xcInfo = "";
 
+        // * name 姓名
+        String sfzName = "";
+        //sex 性别
+        String sfzSex = "";
+        //nation民族
+        String sfzNation = "";
+        //born出生年月
+        String sfzBorn = "";
+        //address地址
+        String sfzAddress = "";
+        //apartment签发机关
+        String sfzApartment = "";
+        //period有效期限
+        String sfzPeriod = "";
+        //no身份证号
+        String sfzNo = "";
+        //country国籍
+        String sfzCountry = "";
+        //cn_name中文名
+        String sfzCnName = "";
+        //Idcard_version证件版本
+        String sfzIdcardVersion = "";
+        //card_type身份证类型
+        String sfzCardType = "";
+        //photo 身份证照片
+        String sfzPhoto = "";
+
         String verify_score = null;
         FaceLog faceLog;
         Long userId;
@@ -517,6 +548,54 @@ public class FaceTBServiceImpl implements FaceTBService {
                 xcInfo = data.get("xcInfo").toString();
             }
 
+            if (verifytype == 2) {
+                log.info("verifytype==2 代表刷身份证解析身份证 ;{}", data.get("idCard"));
+                //身份证信息
+                Map<String, Object> map = (Map<String, Object>) data.get("idCard");
+                if (map.get("address") != null) {
+                    sfzAddress = map.get("address").toString();
+                }
+                if (map.get("apartment") != null) {
+                    sfzApartment = map.get("apartment").toString();
+                }
+                if (map.get("born") != null) {
+                    sfzBorn = map.get("born").toString();
+                }
+                if (map.get("card_type") != null) {
+                    sfzCardType = map.get("card_type").toString();
+                }
+                if (map.get("cn_name") != null) {
+                    sfzCnName = map.get("cn_name").toString();
+                }
+                if (map.get("country") != null) {
+                    sfzCountry = map.get("country").toString();
+                }
+                if (map.get("idCard_version") != null) {
+                    sfzIdcardVersion = map.get("idCard_version").toString();
+                }
+                if (map.get("name") != null) {
+                    sfzName = map.get("name").toString();
+                }
+                if (map.get("nation") != null) {
+                    sfzNation = map.get("nation").toString();
+                }
+                if (map.get("no") != null) {
+                    sfzNo = map.get("no").toString();
+                }
+                if (map.get("period") != null) {
+                    sfzPeriod = map.get("period").toString();
+                }
+                if (map.get("photo") != null) {
+                    sfzPhoto = map.get("photo").toString();
+                    if (StringUtils.hasText(sfzPhoto)) {
+                        sfzPhoto = buildImage(sfzPhoto, sn + pin);
+                    }
+                }
+                if (map.get("sex") != null) {
+                    sfzSex = map.get("sex").toString();
+                }
+            }
+
             if (StringUtils.hasText(photo)) {
                 photo = buildImage(photo, sn + pin);
             }
@@ -546,7 +625,6 @@ public class FaceTBServiceImpl implements FaceTBService {
             faceLog.setOutType(outtype);
             faceLog.setFaceTime(faceTime);
             faceLog.setOrgid(orgid);
-            faceLog.setIdCard(idCard);
             faceLog.setPhone(phone);
             faceLog.setExtend3(extend3);
             faceLog.setExtend1(extend1);
@@ -557,6 +635,20 @@ public class FaceTBServiceImpl implements FaceTBService {
             faceLog.setHsStatus(hsStatus);
             faceLog.setYmStatus(ymStatus);
             faceLog.setXcInfo(xcInfo);
+            //身份证模块数据
+            faceLog.setSfzSex(sfzSex);
+            faceLog.setSfzPhoto(sfzPhoto);
+            faceLog.setSfzPeriod(sfzPeriod);
+            faceLog.setSfzNo(sfzNo);
+            faceLog.setSfzNation(sfzNation);
+            faceLog.setSfzName(sfzName);
+            faceLog.setSfzIdcardVersion(sfzIdcardVersion);
+            faceLog.setSfzCountry(sfzCountry);
+            faceLog.setSfzCnName(sfzCnName);
+            faceLog.setSfzCardType(sfzCardType);
+            faceLog.setSfzBorn(sfzBorn);
+            faceLog.setSfzApartment(sfzApartment);
+            faceLog.setSfzAddress(sfzAddress);
             faceLog.setAdminId(faceDeviceDao.getAdminIdBySn(sn));
             faceLog.setVerifyScore(verify_score);
             faceLog.setCreateTime(now);

+ 143 - 143
src/main/java/com/yx/face/service/impl/SuKangMaAipServiceImpl.java

@@ -1,144 +1,144 @@
-package com.yx.face.service.impl;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.yx.face.boot.uitls.ForeignAesUtil;
-import com.yx.face.boot.uitls.OkHttpUtils;
-import com.yx.face.dao.SystemConfigDao;
-import com.yx.face.service.SuKangMaAipService;
-import lombok.SneakyThrows;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-import com.yx.face.boot.core.Constants;
-
-import javax.annotation.Resource;
-import java.util.ArrayList;
-import java.util.TreeMap;
-
-
-/**
- * @ProjectName: airport-review-smoke
- * @Package: com.yixin.review.service.impl
- * @ClassName: SuKangMaAipServiceImpl
- * @Author: 崔哥
- * @Description: 苏康码扫码接口 SuKangMaAipServiceImpl
- * @Date: 2021/9/3 16:19
- * @Version: 1.0
- */
-@Slf4j
-@Service
-public class SuKangMaAipServiceImpl implements SuKangMaAipService {
-
-    @Resource
-    private SystemConfigDao systemConfigDao;
-
-
-    @SneakyThrows
-    @Override
-    public void getLocalSkmInfo(String name, String IdCard, String sn, Long id, String extend3) {
-        //签名秘钥
-        String superAppKey = systemConfigDao.getConfigByKeyValue(Constants.SUPER_APP_KEY);
-        //签名信息
-        String superSign = systemConfigDao.getConfigByKeyValue(Constants.SUPER_SIGN);
-        //三方接口url
-        String skmUrl = systemConfigDao.getConfigByKeyValue(Constants.SKM_API_URL);
-
-        String tbUrl = systemConfigDao.getConfigByKeyValue(Constants.TB_API_URL);
-        //去除空格
-        String xm = name.replaceAll(" ", "");
-        //日志
-        log.info("加密前; name {} , IdCard {} ", xm, IdCard);
-
-        ForeignAesUtil foreignAesUtil = new ForeignAesUtil();
-        // 加密方法
-        String encryptByHexName = foreignAesUtil.encryptByHex(xm);
-        String encryptByHexCode = foreignAesUtil.encryptByHex(IdCard);
-        log.info("加密后的内容:姓名 {}  身份证 {}", encryptByHexName, encryptByHexCode);
-        //解密
-        String decryptByHexName = foreignAesUtil.decryptByHex(encryptByHexName);
-        String decryptByHexCode = foreignAesUtil.decryptByHex(encryptByHexCode);
-        log.info("解密后的内容:姓名 {}  身份证 {}", decryptByHexName, decryptByHexCode);
-        // post请求,分为两种,一种是普通表单提交,一种是json提交
-        log.info("请求苏康码内容;cardCode {} userName{} super_app_key{} super_sign{} super_time{}", encryptByHexCode, encryptByHexName, superAppKey, superSign, System.currentTimeMillis());
-
-        TreeMap<String, String> map = new TreeMap<>();
-        map.put("super_time", String.valueOf(System.currentTimeMillis() / 1000));
-        map.put("userName", encryptByHexName);
-        map.put("cardCode", encryptByHexCode);
-        map.put("super_app_key", superAppKey);
-        String sign = foreignAesUtil.getMD5BySort(map, superSign);
-        log.info("加密后 sign {}", sign);
-        String sync = OkHttpUtils.builder().url(skmUrl)
-                // 有参数的话添加参数,可多个
-                .addParam("cardCode", encryptByHexCode)
-                .addParam("userName", encryptByHexName)
-                .addParam("super_app_key", superAppKey)
-                .addParam("super_sign", sign)
-                .addParam("super_time", String.valueOf(System.currentTimeMillis() / 1000))
-                // 也可以添加多个
-//                .addHeader("Content-Type", "application/x-www-form-urlencoded")
-                // 如果是true的话,会类似于postman中post提交方式的raw,用json的方式提交,不是表单
-                // 如果是false的话传统的表单提交
-                .post(true)
-                .sync();
-        log.info("苏康码返回值;{}", sync);
-
-
-//        if (StringUtils.isNotBlank(extend3)) {
-//            extend3 = extend3 + "度";
+//package com.yx.face.service.impl;
+//
+//import com.alibaba.fastjson.JSON;
+//import com.alibaba.fastjson.JSONObject;
+//import com.yx.face.boot.uitls.ForeignAesUtil;
+//import com.yx.face.boot.uitls.OkHttpUtils;
+//import com.yx.face.dao.SystemConfigDao;
+////import com.yx.face.service.SuKangMaAipService;
+//import lombok.SneakyThrows;
+//import lombok.extern.slf4j.Slf4j;
+//import org.springframework.stereotype.Service;
+//import com.yx.face.boot.core.Constants;
+//
+//import javax.annotation.Resource;
+//import java.util.ArrayList;
+//import java.util.TreeMap;
+//
+//
+///**
+// * @ProjectName: airport-review-smoke
+// * @Package: com.yixin.review.service.impl
+// * @ClassName: SuKangMaAipServiceImpl
+// * @Author: 崔哥
+// * @Description: 苏康码扫码接口 SuKangMaAipServiceImpl
+// * @Date: 2021/9/3 16:19
+// * @Version: 1.0
+// */
+//@Slf4j
+//@Service
+//public class SuKangMaAipServiceImpl implements SuKangMaAipService {
+//
+//    @Resource
+//    private SystemConfigDao systemConfigDao;
+//
+//
+//    @SneakyThrows
+//    @Override
+//    public void getLocalSkmInfo(String name, String IdCard, String sn, Long id, String extend3) {
+//        //签名秘钥
+//        String superAppKey = systemConfigDao.getConfigByKeyValue(Constants.SUPER_APP_KEY);
+//        //签名信息
+//        String superSign = systemConfigDao.getConfigByKeyValue(Constants.SUPER_SIGN);
+//        //三方接口url
+//        String skmUrl = systemConfigDao.getConfigByKeyValue(Constants.SKM_API_URL);
+//
+//        String tbUrl = systemConfigDao.getConfigByKeyValue(Constants.TB_API_URL);
+//        //去除空格
+//        String xm = name.replaceAll(" ", "");
+//        //日志
+//        log.info("加密前; name {} , IdCard {} ", xm, IdCard);
+//
+//        ForeignAesUtil foreignAesUtil = new ForeignAesUtil();
+//        // 加密方法
+//        String encryptByHexName = foreignAesUtil.encryptByHex(xm);
+//        String encryptByHexCode = foreignAesUtil.encryptByHex(IdCard);
+//        log.info("加密后的内容:姓名 {}  身份证 {}", encryptByHexName, encryptByHexCode);
+//        //解密
+//        String decryptByHexName = foreignAesUtil.decryptByHex(encryptByHexName);
+//        String decryptByHexCode = foreignAesUtil.decryptByHex(encryptByHexCode);
+//        log.info("解密后的内容:姓名 {}  身份证 {}", decryptByHexName, decryptByHexCode);
+//        // post请求,分为两种,一种是普通表单提交,一种是json提交
+//        log.info("请求苏康码内容;cardCode {} userName{} super_app_key{} super_sign{} super_time{}", encryptByHexCode, encryptByHexName, superAppKey, superSign, System.currentTimeMillis());
+//
+//        TreeMap<String, String> map = new TreeMap<>();
+//        map.put("super_time", String.valueOf(System.currentTimeMillis() / 1000));
+//        map.put("userName", encryptByHexName);
+//        map.put("cardCode", encryptByHexCode);
+//        map.put("super_app_key", superAppKey);
+//        String sign = foreignAesUtil.getMD5BySort(map, superSign);
+//        log.info("加密后 sign {}", sign);
+//        String sync = OkHttpUtils.builder().url(skmUrl)
+//                // 有参数的话添加参数,可多个
+//                .addParam("cardCode", encryptByHexCode)
+//                .addParam("userName", encryptByHexName)
+//                .addParam("super_app_key", superAppKey)
+//                .addParam("super_sign", sign)
+//                .addParam("super_time", String.valueOf(System.currentTimeMillis() / 1000))
+//                // 也可以添加多个
+////                .addHeader("Content-Type", "application/x-www-form-urlencoded")
+//                // 如果是true的话,会类似于postman中post提交方式的raw,用json的方式提交,不是表单
+//                // 如果是false的话传统的表单提交
+//                .post(true)
+//                .sync();
+//        log.info("苏康码返回值;{}", sync);
+//
+//
+////        if (StringUtils.isNotBlank(extend3)) {
+////            extend3 = extend3 + "度";
+////        }
+//        //请求参数
+//        ArrayList<String> snList = new ArrayList<String>();
+//        snList.add(sn);
+//        JSONObject param = new JSONObject();
+//        param.put("SN", snList);
+//        param.put("type", "doorControl");
+//        param.put("taskId", id);
+//        //Data
+//        JSONObject Data = new JSONObject();
+//        JSONObject jsonObject = JSON.parseObject(sync);
+//        Integer code = jsonObject.getInteger("code");
+//        String data = jsonObject.getString("data");
+//        //下发指令开关门
+//        OkHttpUtils url = OkHttpUtils.builder().url(tbUrl);
+//        if (code == 200 && code != null) {
+//            String decryptSync = foreignAesUtil.decryptByHex(data);
+//            log.info("苏康码返回值 解密;{}", decryptSync);
+//            JSONObject jsonObject1 = JSONObject.parseObject(decryptSync);
+//            String levelData = jsonObject1.getString("levelData");
+//            // 有参数的话添加参数,可多个
+//            if ("1".equals(levelData)) {
+//                Data.put("tts", extend3 + "绿码,请通行");
+//                Data.put("displayType", 1);
+//                Data.put("doorControl", "1,1");
+//                param.put("Data", Data);
+//                String paramJson = param.toJSONString();
+//                String sync1 = url.localPost(paramJson)
+//                        .sync();
+//                log.info("开门返回;{} ", sync1);
+//                log.info("paramJson;{} ", paramJson);
+//            } else {
+//                Data.put("tts", extend3 + "禁止通行请联系管理员");
+//                Data.put("displayType", 2);
+//                Data.put("doorControl", "1,0");
+//                param.put("Data", Data);
+//                String paramJson = param.toJSONString();
+//                String sync1 = url.localPost(paramJson)
+//                        .sync();
+//                log.info("开门返回;{}", sync1);
+//                log.info("paramJson;{} ", paramJson);
+//            }
+//        } else {
+//            Data.put("tts", extend3 + "未获取到健康码");
+//            Data.put("displayType", 0);
+//            Data.put("doorControl", "1,0");
+//            param.put("Data", Data);
+//            String paramJson = param.toJSONString();
+//            String sync1 = url.localPost(paramJson)
+//                    .sync();
+//            log.info("开门返回;{}", sync1);
+//            log.info("paramJson;{} ", paramJson);
 //        }
-        //请求参数
-        ArrayList<String> snList = new ArrayList<String>();
-        snList.add(sn);
-        JSONObject param = new JSONObject();
-        param.put("SN", snList);
-        param.put("type", "doorControl");
-        param.put("taskId", id);
-        //Data
-        JSONObject Data = new JSONObject();
-        JSONObject jsonObject = JSON.parseObject(sync);
-        Integer code = jsonObject.getInteger("code");
-        String data = jsonObject.getString("data");
-        //下发指令开关门
-        OkHttpUtils url = OkHttpUtils.builder().url(tbUrl);
-        if (code == 200 && code != null) {
-            String decryptSync = foreignAesUtil.decryptByHex(data);
-            log.info("苏康码返回值 解密;{}", decryptSync);
-            JSONObject jsonObject1 = JSONObject.parseObject(decryptSync);
-            String levelData = jsonObject1.getString("levelData");
-            // 有参数的话添加参数,可多个
-            if ("1".equals(levelData)) {
-                Data.put("tts", extend3 + "绿码,请通行");
-                Data.put("displayType", 1);
-                Data.put("doorControl", "1,1");
-                param.put("Data", Data);
-                String paramJson = param.toJSONString();
-                String sync1 = url.localPost(paramJson)
-                        .sync();
-                log.info("开门返回;{} ", sync1);
-                log.info("paramJson;{} ", paramJson);
-            } else {
-                Data.put("tts", extend3 + "禁止通行请联系管理员");
-                Data.put("displayType", 2);
-                Data.put("doorControl", "1,0");
-                param.put("Data", Data);
-                String paramJson = param.toJSONString();
-                String sync1 = url.localPost(paramJson)
-                        .sync();
-                log.info("开门返回;{}", sync1);
-                log.info("paramJson;{} ", paramJson);
-            }
-        } else {
-            Data.put("tts", extend3 + "未获取到健康码");
-            Data.put("displayType", 0);
-            Data.put("doorControl", "1,0");
-            param.put("Data", Data);
-            String paramJson = param.toJSONString();
-            String sync1 = url.localPost(paramJson)
-                    .sync();
-            log.info("开门返回;{}", sync1);
-            log.info("paramJson;{} ", paramJson);
-        }
-
-    }
-}
+//
+//    }
+//}

+ 107 - 0
src/main/java/com/yx/face/service/impl/SystemConfigServiceImpl.java

@@ -0,0 +1,107 @@
+package com.yx.face.service.impl;
+
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.yx.face.boot.restful.RestDTO;
+import com.yx.face.boot.restful.ServiceException;
+import com.yx.face.boot.uitls.PasswordUtils;
+import com.yx.face.dao.AdminDao;
+import com.yx.face.dao.SystemConfigDao;
+import com.yx.face.model.dto.SystemConfigDTO;
+import com.yx.face.model.entity.Admin;
+import com.yx.face.model.entity.SystemConfig;
+import com.yx.face.model.query.SystemConfigQu;
+import com.yx.face.model.vo.SystemConfigVO;
+import com.yx.face.service.SystemConfigService;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+
+
+/**
+ * @description: 系统配置表(SystemConfig)表服务实现类 <br>
+ * @author: PWB <br>
+ * @since: 1.0 <br>
+ * @date: 2021-06-26 14:03:07 <br>
+ */
+
+@Service
+public class SystemConfigServiceImpl implements SystemConfigService {
+    @Resource
+    private SystemConfigDao systemConfigDao;
+    @Resource
+    private AdminDao adminDao;
+
+
+    @Override
+    public Boolean add(SystemConfigDTO dto, Integer userId) {
+        Admin admin = adminDao.selectByPrimaryKey(userId);
+        if (admin == null) {
+            throw new ServiceException("此账号无权限操作");
+        }
+        if (admin.getType() > 2) {
+            throw new ServiceException("此账号无权限操作");
+        }
+        Admin primary = adminDao.selectByPrimaryKey(dto.getAdminId());
+        if (primary == null) {
+            throw new ServiceException("推送账号不存在");
+        }
+        SystemConfig config = new SystemConfig();
+        dto.setPassword(PasswordUtils.buildPw(dto.getPassword()));
+        Date date = new Date();
+        config.setRemark(dto.getRemark());
+        config.setStatus(dto.getStatus());
+        config.setPassword(dto.getPassword());
+        config.setAccount(primary.getUsername());
+        config.setAccountId(primary.getId());
+        config.setType(1);
+        config.setAdminId(userId);
+        if (dto.getId() != null) {
+            config.setUpdateTime(date);
+            config.setId(dto.getId());
+            return systemConfigDao.updateByPrimaryKeySelective(config) == 1;
+        }
+        config.setCreateTime(date);
+        config.setUpdateTime(date);
+
+        Integer count = systemConfigDao.selectByPrimaryOen(primary.getId());
+        if (count >= 1) {
+            throw new ServiceException("所选账号已存在哦~");
+        }
+        return systemConfigDao.insert(config) == 1;
+    }
+
+
+    @Override
+    public Boolean delete(Integer id) {
+        return systemConfigDao.deleteByPrimaryKey(id) == 1;
+    }
+
+    @Override
+    public PageInfo<SystemConfigVO> getList(RestDTO<SystemConfigQu> dto, Integer adminId) {
+
+        if (adminId == 1) {
+            adminId = null;
+        }
+        SystemConfigQu data = dto.getData();
+        if (data.getType() == null) {
+            data.setType(1);
+        }
+        if (data.getStatus() == null) {
+            data.setStatus(99);
+        }
+        Integer accountId = 0;
+        if (data.getAdminId() == null) {
+            accountId = 0;
+        } else {
+            accountId = data.getAdminId();
+        }
+        PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
+        List<SystemConfigVO> vo = systemConfigDao.selectList(accountId, data.getStatus(), data.getType(), adminId);
+        return new PageInfo<>(vo);
+    }
+}
+

+ 1 - 1
src/main/resources/application-dev.yml

@@ -19,7 +19,7 @@ spring:
     time-zone: GMT+8
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://127.0.0.1:3356/fyzd?characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
+    url: jdbc:mysql://127.0.0.1:3356/ldb_jc?characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
     username: root
     password: 1314
     hikari:

+ 30 - 0
src/main/resources/mapper/FaceLogDao.xml

@@ -222,5 +222,35 @@
           and jkm_status=#{jkm}
           and admin_id = #{adminId}
     </select>
+    <select id="getDetails" resultType="com.yx.face.model.vo.FaceLogVO">
+        SELECT log.id       AS logId,
+               log.recordid AS recordid,
+               log.action AS action,
+        log.device_sn AS deviceSn,
+        fd.name AS deviceName,
+        log.user_id AS userId,
+        replace(log.`name`,' ','') AS name,
+        ui.phone AS phone,
+        log.photo AS photo,
+        log.cardid AS cardid,
+        log.cardidex AS cardidex,
+        log.verify_type AS verifyType,
+        log.rightno AS rightno,
+        log.tw_status AS twStatus,
+        log.jkm_status AS jkmStatus,
+        log.hs_status AS hsStatus,
+        log.ym_status AS ymStatus,
+        log.xc_info AS xcInfo,
+        log.extend3 AS extend3,
+        fd.pass AS outType,
+        log.face_time AS faceTime,
+        log.create_time AS createTime
+        FROM face_log AS log
+            LEFT JOIN user_info ui
+        on log.user_id = ui.id
+            LEFT JOIN face_device fd on log.device_sn = fd.sn
+            left join admin a on a.id =log.admin_id
+        where log.id = #{id}
+    </select>
 </mapper>
 

+ 30 - 10
src/main/resources/mapper/SystemConfigDao.xml

@@ -3,18 +3,38 @@
 <mapper namespace="com.yx.face.dao.SystemConfigDao">
 
 
-
-    <select id="getConfigByKeyValue" resultType="java.lang.String">
-        SELECT config_value AS configValue
-        FROM system_config
-        WHERE config_name = #{skmAesKey}
-          AND status = 0
-          AND type = 0
+    <select id="selectList" resultType="com.yx.face.model.vo.SystemConfigVO">
+        SELECT id, password , remark, status, account , account_id as adminId , create_time as createTime,
+        type FROM system_config
+        <where>
+            <if test="accountId != 0">
+                AND account_id = #{accountId}
+            </if>
+            <if test="status != 99">
+                AND status = #{status}
+            </if>
+            <if test="adminId != null">
+                AND admin_id =#{adminId}
+            </if>
+            AND type = #{type}
+            AND account_id != '1'
+        </where>
+        ORDER BY account_id
     </select>
-    <select id="getSkmKey" resultType="java.lang.String">
-        SELECT config_value
+    <select id="sysConfiguration" resultType="com.yx.face.model.vo.SystemConfigVO">
+        SELECT id,
+               password,
+               remark,
+               status,
+               account,
+               account_id  as adminId,
+               create_time as createTime,
+               type
         FROM system_config
-        WHERE  config_value = #{key}
+        where account_id = #{adminId}
+    </select>
+    <select id="selectByPrimaryOen" resultType="java.lang.Integer">
+        SELECT count(id) FROM  system_config WHERE account_id = #{adminId}
     </select>
 
 </mapper>

Some files were not shown because too many files changed in this diff