humuyu 3 years ago
parent
commit
5ad0a2ff8a

+ 43 - 0
eladmin-system/src/main/java/me/zhengjie/appapi/config/TencentHumanFaceVerify.java

@@ -0,0 +1,43 @@
+package me.zhengjie.appapi.config;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+//tencent:
+//	  client:
+//	    webankAppId: TIDAeQGR
+//	    secret: Wqwpw09j9Yg4s2e1GbuiUoeRQjlKFA1oXTuVC8w1Cy1gOtnlq0xz9QrKvqCSOqJS
+//	    keyLicence: gKLyvw8NrVTuEWz3feO/QbeeE94SLjiWRN8hhn02DVDMuVeB6T/zKvSfxdfqWqLrJeFRyWeOFOuhoq52f6By4TAEDGIR6oczvFkYP4ycBeHvtnbmzNTx44mTx9h6mwUy5GMHSdsE7EKJ3K/5kZR1JrMrGBRG9Lb58U33zYyHKPeDm7nT3l8keTndTb6SOYB2Q4FY6F0uFpPEv7s/IzkxzOpfAdakQlTFwQ/y9sLF9rHw83DjdvWWXEpQ9wXYILTcjOXeKseyAzKuQq1zc7LQ9GVjpPcPx8pQkSyXeIOBYEe/oXx5w1RePHSCfLnjPaaIiN82eSIMA4GElErIjcagLA==
+//	  bank:
+//	    webankAppId: TIDAmm4i
+//	    secret: FAeFRoz5YxQkMyf1g0nSk7DVo7LQNmdAjKWxvwlxh5phMdftGt0nxdeX0FKXd7kD
+//	    keyLicence: XMKMHERS8SLw5DiM/nnFm/dRVQZ31//VbBhHXiVHgrX1ztbjUAwCrvTut3GoBFRPT5ubNc91yapZpagyIYgqKIRevdiAs4l6yML5yDP9sRwiYwaB4nOEWYILmCldg8w+Vr7t75puP7ofWkn2B5c5vE4HksFS4kqzj1zF6Kxlh+yNTCECObvKiDJdNqcXJKl0Dht9jtc5JojGPFPXYBAuN0manuUxpSwl5wq1H/OOhZ9RrklAqFxie4Z5r4PhEbiBKE6FAgwCNcE4NKNbk7Tr1VgMnOn/R4IqYbKaNA2u7OYaGBmSKuBPG5hcRl72k6XMqTYZnP85CybfQ/fEthVkvA==
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Component
+@Getter
+@Setter
+public class TencentHumanFaceVerify {
+	// 当事人appId
+	@Value("${tencent.client.webankAppId}")
+	private String clientWebankAppId;
+	//当事人secret
+	@Value("${tencent.client.secret}")
+	private String clientSecret;
+	//当事人keyLicence
+	@Value("${tencent.client.keyLicence}")
+	private String clientKeyLicence;
+
+	//银行端appId
+	@Value("${tencent.bank.webankAppId}")
+	private String bankWebankAppId;
+	// 银行端secret
+	@Value("${tencent.bank.secret}")
+	private String bankSecret;
+	// 银行端keyLicence
+	@Value("${tencent.bank.keyLicence}")
+	private String bankKeyLicence;
+
+}

+ 143 - 20
eladmin-system/src/main/java/me/zhengjie/appapi/controller/ApiBankController.java

@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
 import lombok.extern.slf4j.Slf4j;
 import me.zhengjie.annotation.rest.AnonymousGetMapping;
 import me.zhengjie.annotation.rest.AnonymousPostMapping;
+import me.zhengjie.appapi.config.TencentHumanFaceVerify;
 import me.zhengjie.appapi.dto.FileInfoDto;
 import me.zhengjie.appapi.dto.OrderDetailDto;
 import me.zhengjie.appapi.dto.OrderDto;
@@ -34,6 +35,7 @@ import java.util.*;
 
 /**
  * 银行端的登录接口
+ * 
  * @author auas
  *
  */
@@ -58,8 +60,14 @@ public class ApiBankController extends BaseController {
 	OrderService orderService;
 	@Autowired
 	OrderFileRepository orderFileRepository;
+
+	@Autowired
+	TencentHumanFaceVerify faceVerify;
+	@Autowired
+	UserAXQInfoService userAXQInfoService;
 	/**
 	 * 登录接口
+	 * 
 	 * @param loginVo
 	 * @return
 	 */
@@ -146,9 +154,9 @@ public class ApiBankController extends BaseController {
 			return ResponseDTO.error(ResultCode.PARAM_IS_BLANK);
 		}
 		Map<String, String> map = new HashMap<String, String>();
-		map.put("id",id);
+		map.put("id", id);
 		BaseResponse response = mortgageService.mortgageInfo(map);
-		OrderDetailDto detailDto = (OrderDetailDto)response.getData().getResult();
+		OrderDetailDto detailDto = (OrderDetailDto) response.getData().getResult();
 		return ResponseDTO.success(detailDto);
 	}
 
@@ -165,14 +173,15 @@ public class ApiBankController extends BaseController {
 			return ResponseDTO.error(ResultCode.PARAM_IS_BLANK);
 		}
 		Map<String, String> map = new HashMap<String, String>();
-		map.put("id",id);
+		map.put("id", id);
 		BaseResponse response = guaranteeService.guaranteeInfo(map);
-		OrderDetailDto detailDto = (OrderDetailDto)response.getData().getResult();
+		OrderDetailDto detailDto = (OrderDetailDto) response.getData().getResult();
 		return ResponseDTO.success(detailDto);
 	}
 
 	/**
 	 * 提交订单
+	 * 
 	 * @param json
 	 * @return
 	 */
@@ -219,21 +228,10 @@ public class ApiBankController extends BaseController {
 		log.info("文件上传结果返回:" + fileDtos);
 		return ResponseDTO.success(fileDtos);
 	}
-	//人脸核身
-	@RequestMapping("/order/getFaceId")
-	public ResponseDTO<?> getFaceId(@RequestBody String json) throws Exception {
 
-		JSONObject jsonObj = JSONObject.parseObject(json);
-		String orderId = jsonObj.getString("orderId");
-		if (StringUtils.isEmpty(orderId)) {
-			return ResponseDTO.error(ResultCode.PARAM_IS_BLANK);
-		}
-		OrderDto order = this.apiService.getOrderDetail(orderId);
-		JSONObject str = SdkTest.getFaceId(order.getUsername(), order.getIdCard(), orderId);
-		return ResponseDTO.success(str);
-	}
 	/**
 	 * 获取借款人信息
+	 * 
 	 * @param json
 	 * @return
 	 */
@@ -245,9 +243,9 @@ public class ApiBankController extends BaseController {
 			return ResponseDTO.error(ResultCode.PARAM_IS_BLANK);
 		}
 		Map<String, String> map = new HashMap<String, String>();
-		map.put("id",id);
+		map.put("id", id);
 		BaseResponse response = borrowerService.borrowerInfo(map);
-		OrderDetailDto detailDto = (OrderDetailDto)response.getData().getResult();
+		OrderDetailDto detailDto = (OrderDetailDto) response.getData().getResult();
 		return ResponseDTO.success(detailDto);
 	}
 
@@ -275,6 +273,12 @@ public class ApiBankController extends BaseController {
 		return ResponseDTO.success(json);
 	}
 
+	/**
+	 * 订单列表
+	 * 
+	 * @param json
+	 * @return
+	 */
 	@RequestMapping("/order/list")
 	public ResponseDTO<?> getOrderList(@RequestBody String json) {
 
@@ -285,11 +289,17 @@ public class ApiBankController extends BaseController {
 
 		Integer size = Integer.MAX_VALUE;
 
-		List<OrderEntity> list = borrowerService.getOrderList(phone,status, startIndex, size);
+		List<OrderEntity> list = borrowerService.getOrderList(phone, status, startIndex, size);
 
 		return ResponseDTO.success(list);
 	}
 
+	/**
+	 * 得到抵押人,借款人,担保人订单
+	 * 
+	 * @param json
+	 * @return
+	 */
 	@RequestMapping("/sub/order/list")
 	public ResponseDTO<?> getSubOrderList(@RequestBody String json) {
 
@@ -298,11 +308,12 @@ public class ApiBankController extends BaseController {
 		String status = jsonObj.getString("status");
 		Integer startIndex = 1;
 		Integer size = Integer.MAX_VALUE;
-		List<OrderDto> list = borrowerService.getSubOrderList(phone,status, startIndex, size);
+		List<OrderDto> list = borrowerService.getSubOrderList(phone, status, startIndex, size);
 
 		return ResponseDTO.success(list);
 	}
 
+	// 得到公证书
 	@RequestMapping("/getNotarization")
 	public ResponseDTO<?> getNotarization(@RequestBody String json) {
 		JSONObject jsonObj = JSONObject.parseObject(json);
@@ -311,6 +322,7 @@ public class ApiBankController extends BaseController {
 		return ResponseDTO.success(orderFile.getSignedPdfUrl());
 	}
 
+	// ocr解析
 	@RequestMapping("/orderOCRParser")
 	public ResponseDTO<?> orderOCRParser(@RequestBody String json) {
 		JSONObject jsonObj = JSONObject.parseObject(json);
@@ -322,4 +334,115 @@ public class ApiBankController extends BaseController {
 		}
 		return ResponseDTO.success(object);
 	}
+
+	@RequestMapping("/axqRegister")
+	public ResponseDTO<?> axqRegister(@RequestBody String json) {
+		JSONObject jsonObj = JSONObject.parseObject(json);
+		String idCard = jsonObj.getString("idCard");
+		String phone = jsonObj.getString("phone");
+		String name = jsonObj.getString("name");
+		if (StringUtils.isEmpty(idCard) || StringUtils.isEmpty(phone) || StringUtils.isEmpty(name)) {
+			return ResponseDTO.error(ResultCode.PARAM_IS_BLANK);
+		}
+		return userAXQInfoService.registAXQUser(idCard, phone, name);
+	}
+	// 人脸核身
+	@RequestMapping("/order/getFaceId")
+	public ResponseDTO<?> getFaceId(@RequestBody String json) throws Exception {
+
+		JSONObject jsonObj = JSONObject.parseObject(json);
+		String orderId = jsonObj.getString("orderId");
+		if (StringUtils.isEmpty(orderId)) {
+			return ResponseDTO.error(ResultCode.PARAM_IS_BLANK);
+		}
+		OrderDto order = this.apiBankService.getOrderDetail(orderId);
+		JSONObject str = SdkTest.getFaceId(faceVerify.getBankWebankAppId(), faceVerify.getBankSecret(),
+				faceVerify.getBankKeyLicence(), order.getUsername(), order.getIdCard(), orderId);
+		return ResponseDTO.success(str);
+	}
+	@AnonymousPostMapping("/video/call")
+	public ResponseDTO<?> videoCall(@RequestBody String json) {
+		return this.apiBankService.videoCall(json);
+	}
+	
+	@RequestMapping("/order/pdf")
+	public ResponseDTO<?> getOrderPDF(@RequestBody String json) {
+
+		JSONObject jsonObj = JSONObject.parseObject(json);
+		String orderId = jsonObj.getString("orderId");
+		if (StringUtils.isEmpty(orderId)) {
+			return ResponseDTO.error(ResultCode.PARAM_IS_BLANK);
+		}
+		ResponseDTO<?> order = this.apiBankService.getOrderPDF(orderId);
+
+		return order;
+	}
+	@AnonymousPostMapping("/order/note")
+	public ResponseDTO<?> note(@RequestBody String json) {
+
+		JSONObject jsonObj = JSONObject.parseObject(json);
+		String orderId = jsonObj.getString("orderId");
+		if (StringUtils.isEmpty(orderId)) {
+			return ResponseDTO.error(ResultCode.PARAM_IS_BLANK);
+		}
+		//
+		OrderFileEntity orderFile = orderFileRepository.getOrderNote(orderId);
+		// pdf的地址预览
+		String noteUrl = FileUploadUtil.getPreviewUrl(orderFile.getHtmlUrl());
+
+		return ResponseDTO.success(noteUrl);
+	}
+	@RequestMapping("/sendAuthMessage")
+	public ResponseDTO<?> sendAuthMessage(@RequestBody String json) {
+		JSONObject jsonObj = JSONObject.parseObject(json);
+		String idCard = jsonObj.getString("idCard");
+		if (StringUtils.isEmpty(idCard)) {
+			return ResponseDTO.error(ResultCode.PARAM_IS_BLANK);
+		}
+		return userAXQInfoService.sendAuthMessage(idCard);
+	}
+
+	@RequestMapping("/verifyAuthMessage")
+	public ResponseDTO<?> verifyAuthMessage(@RequestBody String json) {
+		JSONObject jsonObj = JSONObject.parseObject(json);
+		String idCard = jsonObj.getString("idCard");
+		String checkCode = jsonObj.getString("checkCode");
+		if (StringUtils.isEmpty(idCard) || StringUtils.isEmpty(checkCode)) {
+			return ResponseDTO.error(ResultCode.PARAM_IS_BLANK);
+		}
+		return userAXQInfoService.verifyAuthMessage(idCard, checkCode);
+	}
+	@RequestMapping("/order/updateStatus")
+	public ResponseDTO<?> updateOrderStatus(@RequestBody String json) throws Exception {
+
+		JSONObject jsonObj = JSONObject.parseObject(json);
+		String orderId = jsonObj.getString("orderId");
+		if (StringUtils.isEmpty(orderId)) {
+			return ResponseDTO.error(ResultCode.PARAM_IS_BLANK);
+		}
+		orderService.updateOrderStatus(orderId);
+
+		return ResponseDTO.success();
+	}
+	
+	@RequestMapping("/getAuthStatus")
+	public ResponseDTO<?> getAuthStatus(@RequestBody String json) {
+		JSONObject jsonObj = JSONObject.parseObject(json);
+		String idCard = jsonObj.getString("idCard");
+		if (StringUtils.isEmpty(idCard)) {
+			return ResponseDTO.error(ResultCode.PARAM_IS_BLANK);
+		}
+		return userAXQInfoService.getAuthStatus(idCard);
+	}
+	@AnonymousPostMapping("/uploadSeal")
+	public ResponseDTO<?> uploadSeal(@RequestBody String json) {
+		JSONObject jsonObj = JSONObject.parseObject(json);
+		String idCard = jsonObj.getString("idCard");
+		String contractId = jsonObj.getString("contractId");
+		String content = jsonObj.getString("content");
+		if (StringUtils.isEmpty(idCard) || StringUtils.isEmpty(contractId) || StringUtils.isEmpty(content)) {
+			return ResponseDTO.error(ResultCode.PARAM_IS_BLANK);
+		}
+		return userAXQInfoService.uploadSeal(idCard, contractId, content);
+	}
 }

+ 10 - 4
eladmin-system/src/main/java/me/zhengjie/appapi/controller/ApiController.java

@@ -2,6 +2,7 @@ package me.zhengjie.appapi.controller;
 
 import com.alibaba.fastjson.JSONObject;
 import me.zhengjie.annotation.rest.AnonymousPostMapping;
+import me.zhengjie.appapi.config.TencentHumanFaceVerify;
 import me.zhengjie.appapi.dto.OrderDto;
 import me.zhengjie.appapi.service.*;
 import me.zhengjie.appapi.tencent.h5face.SdkTest;
@@ -50,6 +51,9 @@ public class ApiController {
 	@Autowired
 	private RedisTemplate<String, String> redisTemplate;
 
+	@Autowired
+	TencentHumanFaceVerify faceVerify;
+
 	/**
 	 * 
 	 * @param request
@@ -126,7 +130,7 @@ public class ApiController {
 
 	@AnonymousPostMapping("/order/note")
 	public ResponseDTO<?> note(@RequestBody String json) {
-		
+
 		JSONObject jsonObj = JSONObject.parseObject(json);
 		String orderId = jsonObj.getString("orderId");
 		if (StringUtils.isEmpty(orderId)) {
@@ -136,7 +140,7 @@ public class ApiController {
 		OrderFileEntity orderFile = orderFileRepository.getOrderNote(orderId);
 		// pdf的地址预览
 		String noteUrl = FileUploadUtil.getPreviewUrl(orderFile.getHtmlUrl());
-		
+
 		return ResponseDTO.success(noteUrl);
 	}
 
@@ -169,7 +173,8 @@ public class ApiController {
 		}
 		return signService.sigin(file, orderId);
 	}
-	//人脸核身
+
+	// 人脸核身
 	@RequestMapping("/order/getFaceId")
 	public ResponseDTO<?> getFaceId(@RequestBody String json) throws Exception {
 
@@ -179,7 +184,8 @@ public class ApiController {
 			return ResponseDTO.error(ResultCode.PARAM_IS_BLANK);
 		}
 		OrderDto order = this.apiService.getOrderDetail(orderId);
-		JSONObject str = SdkTest.getFaceId(order.getUsername(), order.getIdCard(), orderId);
+		JSONObject str = SdkTest.getFaceId(faceVerify.getClientWebankAppId(), faceVerify.getClientSecret(),
+				faceVerify.getClientKeyLicence(), order.getUsername(), order.getIdCard(), orderId);
 		return ResponseDTO.success(str);
 	}
 

+ 3 - 3
eladmin-system/src/main/java/me/zhengjie/appapi/controller/MiniProgramController.java

@@ -179,9 +179,9 @@ public class MiniProgramController {
 		if (StringUtils.isEmpty(orderId)) {
 			return ResponseDTO.error(ResultCode.PARAM_IS_BLANK);
 		}
-		OrderDto order = this.apiService.getOrderDetail(orderId);
-		JSONObject str = SdkTest.getFaceId(order.getUsername(), order.getIdCard(), orderId);
-		return ResponseDTO.success(str);
+//		OrderDto order = this.apiService.getOrderDetail(orderId);
+//		JSONObject str = SdkTest.getFaceId(order.getUsername(), order.getIdCard(), orderId);
+		return ResponseDTO.success();
 	}
 
 	@RequestMapping("/order/updateStatus")

+ 7 - 0
eladmin-system/src/main/java/me/zhengjie/appapi/service/ApiBankService.java

@@ -1,6 +1,7 @@
 package me.zhengjie.appapi.service;
 
 
+import me.zhengjie.appapi.dto.OrderDto;
 import me.zhengjie.appapi.entity.SysUserEntity;
 import me.zhengjie.appapi.vo.BankLoginVo;
 import me.zhengjie.base.ResponseDTO;
@@ -14,4 +15,10 @@ import me.zhengjie.base.ResponseDTO;
 public interface ApiBankService {
 
 	ResponseDTO<String> login(BankLoginVo sms);
+	
+	public OrderDto getOrderDetail(String orderId);
+	
+	public ResponseDTO<?> videoCall(String json) ;
+	
+	public ResponseDTO<?> getOrderPDF(String orderId) ;
 }

+ 2 - 0
eladmin-system/src/main/java/me/zhengjie/appapi/service/OrderService.java

@@ -43,4 +43,6 @@ public interface OrderService extends IService<NotaryOrderEntity> {
 	public void updateOrderStatus(String orderId) ;
 
 	public Object parseOrder(String orderType, String content, SysUserEntity user);
+	
+	public ResponseDTO<?> videoCall(String json) ;
 }

+ 35 - 2
eladmin-system/src/main/java/me/zhengjie/appapi/service/impl/ApiBankServiceImpl.java

@@ -1,16 +1,26 @@
 package me.zhengjie.appapi.service.impl;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import com.alibaba.fastjson.JSONObject;
 
+import lombok.extern.slf4j.Slf4j;
+import me.zhengjie.appapi.dto.FileInfoDto;
+import me.zhengjie.appapi.dto.OrderDto;
 import me.zhengjie.appapi.entity.SysUserEntity;
 import me.zhengjie.appapi.service.ApiBankService;
+import me.zhengjie.appapi.service.OrderService;
 import me.zhengjie.appapi.service.SysUserService;
+import me.zhengjie.appapi.util.FileUploadUtil;
 import me.zhengjie.appapi.vo.BankLoginVo;
 import me.zhengjie.base.ResponseDTO;
 import me.zhengjie.base.ResultCode;
+import me.zhengjie.dao.OrderFileRepository;
+import me.zhengjie.dao.entity.OrderFileEntity;
 import me.zhengjie.modules.security.security.TokenProvider;
 
 /**
@@ -20,13 +30,17 @@ import me.zhengjie.modules.security.security.TokenProvider;
  *
  */
 @Service
+@Slf4j
 public class ApiBankServiceImpl implements ApiBankService {
+	@Autowired
+	OrderFileRepository orderFileRepository;
 
 	@Autowired
 	SysUserService userService;
 	@Autowired
 	TokenProvider tokenProvider;
-
+	@Autowired
+	OrderService orderService;
 	public ResponseDTO<String> login(BankLoginVo loginVo) {
 		SysUserEntity sysUser = new SysUserEntity();
 		sysUser.setPhone(loginVo.getPhone());
@@ -39,5 +53,24 @@ public class ApiBankServiceImpl implements ApiBankService {
 		}
 		return ResponseDTO.error(ResultCode.USER_LOGIN_ERROR);
 	}
-
+	@Override
+	public OrderDto getOrderDetail(String orderId) {
+		// 判断id的前两位数据看是那个表的
+		return orderService.getOrderById(orderId);
+	}
+	public ResponseDTO<?> videoCall(String json) {
+		return orderService.videoCall(json);
+	}
+	@Override
+	public ResponseDTO<?> getOrderPDF(String orderId) {
+		List<OrderFileEntity> orderFileList = orderFileRepository.getOrderFileListByCodes(orderId, "1,2,3,4,5".split(","));
+		List<FileInfoDto> infos = new ArrayList<>();
+		for (OrderFileEntity orderFile : orderFileList) {
+			FileInfoDto info = new FileInfoDto();
+			info.setUrl(FileUploadUtil.getPreviewUrl(orderFile.getHtmlUrl()));
+			infos.add(info);
+		}
+		log.info("方法getOrderPDF的url地址返回参数: " + infos);
+		return ResponseDTO.success(infos);
+	}
 }

+ 44 - 0
eladmin-system/src/main/java/me/zhengjie/appapi/service/impl/OrderServiceImpl.java

@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+import lombok.extern.slf4j.Slf4j;
 import me.zhengjie.domain.order.OrderBizCodeMessage;
 import me.zhengjie.appapi.dao.OrderDao;
 import me.zhengjie.appapi.dto.OrderDetailDto;
@@ -16,6 +18,7 @@ import me.zhengjie.appapi.util.DateFormatUtils;
 import me.zhengjie.appapi.util.FileUploadUtil;
 import me.zhengjie.appapi.util.StatusEnum;
 import me.zhengjie.appapi.util.StatusEnum.NotaryStatusEnum;
+import me.zhengjie.base.ResponseDTO;
 import me.zhengjie.base.ResultCode;
 import me.zhengjie.dao.ModelRepository;
 import me.zhengjie.dao.OrderRepository;
@@ -56,6 +59,7 @@ import static me.zhengjie.appapi.util.DateFormatUtils.format;
  * @since 2022-03-10
  */
 @Service
+@Slf4j
 public class OrderServiceImpl extends ServiceImpl<NotaryOrderMapper, NotaryOrderEntity> implements OrderService {
 
 	@Autowired
@@ -86,6 +90,8 @@ public class OrderServiceImpl extends ServiceImpl<NotaryOrderMapper, NotaryOrder
 	OrderRepository orderRepository;
 	@Autowired
 	private BankMapper bankMapper;
+	@Autowired
+	OrderRoomIdService orderRoomIdService;
 
 	@Override
 	public int checkOrder(Sms sms) {
@@ -454,6 +460,44 @@ public class OrderServiceImpl extends ServiceImpl<NotaryOrderMapper, NotaryOrder
 		orderDetail.setFileMap(returnMap);
 		return orderDetail;
 	}
+	@Override
+	public ResponseDTO<?> videoCall(String json) {
+
+		// 可能多个机器部署,需要发送消息,确定是在哪台机器上面,广播给所有人
+		// 这里打印他的roomId程序,
+		log.info("推送的参数: " + json);
+		// 保存数据
+		JSONObject jsonObject = JSONObject.parseObject(json);
+		String orderId = jsonObject.getString("orderId");
+		String businessNo = jsonObject.getString("businessNo");
+		String roomId = jsonObject.getString("roomId");
+
+		OrderRoomIdEntity orderRoomId = new OrderRoomIdEntity();
+		orderRoomId.setOrderId(orderId);
+		// 业务流水
+		orderRoomId.setBusinessNo(businessNo);
+		// 房间号
+		orderRoomId.setRoomId(roomId);
+		// 创建时间
+		orderRoomId.setCreateTime(LocalDateTime.now());
+		// 修改时间
+		orderRoomId.setUpdateTime(LocalDateTime.now());
+		// 这里先判断是否存在,不存在就插入数据
+		OrderRoomIdEntity orderQuery = new OrderRoomIdEntity();
+		orderQuery.setOrderId(orderId);
+		orderQuery.setRoomId(roomId);
+		// 业务流水
+		orderQuery.setBusinessNo(businessNo);
+		long orderSize = orderRoomIdService.count(orderQuery);
+		if (orderSize == 0) {
+			orderRoomIdService.save(orderRoomId);
+		}
+		// 这里保存推送的数据
+		redisTemplate.convertAndSend(RedisCacheConfig.CHANNEL_WEB_SOCKET, json);
+
+		return ResponseDTO.success();
+
+	}
 
 	/**
 	 * 通过前面两位判断是属于哪个流程的 10表示借款人 11表示抵押人, 12表示担保人, 三个都是待审核,更新主订单状态

+ 5 - 5
eladmin-system/src/main/java/me/zhengjie/appapi/tencent/h5face/SdkTest.java

@@ -19,9 +19,9 @@ public class SdkTest {
 	final static String url = "https://www.baidu.com";
 	final static String resultType = "2";
 
-	public static JSONObject getFaceId(String name, String idNo, String orderNo) throws Exception {
-		String webankAppId = AppConfigInfo.WEBANKAPPID;//"TIDAdW8e";
-		String secret = AppConfigInfo.SECRET;//"34mhXRkury4DCFZpXCQ9E1fr7KUAPTiXTVac6H6e4pvxYMo5jl1m7sehQUqsmwsQ";
+	public static JSONObject getFaceId(String webankAppId,String secret, String keyLicence,  String name, String idNo, String orderNo) throws Exception {
+//		String webankAppId = AppConfigInfo.WEBANKAPPID;//"TIDAdW8e";
+//		String secret = AppConfigInfo.SECRET;//"34mhXRkury4DCFZpXCQ9E1fr7KUAPTiXTVac6H6e4pvxYMo5jl1m7sehQUqsmwsQ";
 		// 第一步先得到access_token
 		// 获得access_token
 		String accessToken = access_token.getToken(webankAppId, secret);
@@ -91,7 +91,7 @@ public class SdkTest {
 
 		String openApiNonce = nonce;
 		String openApiUserId = userId;
-		String keyLicence =AppConfigInfo.KEYLICENCE;// "ZNjSJAs5nqb0OJR7SXGj8b8Jr8GZuhkIiLceBA1rp/UZ/X8nHbYzfNGkyhXLuTG82QzHIiNxixrzc7zWFcRyxiIIhglIxi0zZDD9nSQsXrHlMJMC3EUXarN9tp5QX0X2dS38gsi+F1TIigfHqxj39iX43wAO4KOfZekBIPNPA2Vb/AjlWnsTbOZCVwANXXwcKsCYiZJrbQlxGlxF9bfXEuhJgILJGQ2iT74wJ/Qn4qRraiyaYzi0Un44C24Y44pbYX4kEokvVQaPnClnAnMH98l8w0VIxPc2lH5io0ATpoPMoZGWKtICVPzrvpaMwjaPlyBzZ/qWwc5jeS+ySxwJyA==";
+//		String keyLicence =AppConfigInfo.KEYLICENCE;// "ZNjSJAs5nqb0OJR7SXGj8b8Jr8GZuhkIiLceBA1rp/UZ/X8nHbYzfNGkyhXLuTG82QzHIiNxixrzc7zWFcRyxiIIhglIxi0zZDD9nSQsXrHlMJMC3EUXarN9tp5QX0X2dS38gsi+F1TIigfHqxj39iX43wAO4KOfZekBIPNPA2Vb/AjlWnsTbOZCVwANXXwcKsCYiZJrbQlxGlxF9bfXEuhJgILJGQ2iT74wJ/Qn4qRraiyaYzi0Un44C24Y44pbYX4kEokvVQaPnClnAnMH98l8w0VIxPc2lH5io0ATpoPMoZGWKtICVPzrvpaMwjaPlyBzZ/qWwc5jeS+ySxwJyA==";
 
 		openApi.put("openApiSign", openApiSign);
 
@@ -111,7 +111,7 @@ public class SdkTest {
 		String name = "杜婧闻";
 		String idNo = "420503198207231844";
 		String orderNo = "101648715083886";
-		System.err.println(getFaceId(name, idNo, orderNo)); // getFaceId(name, idNo, orderNo);
+//		System.err.println(getFaceId(name, idNo, orderNo)); // getFaceId(name, idNo, orderNo);
 		String str = "{\"code\":\"0\",\"msg\":\"请求成功\",\"bizSeqNo\":\"22040610001184432417073637629165\",\"result\":{\"bizSeqNo\":\"22040610001184432417073637629165\",\"transactionTime\":\"20220406170736\",\"orderNo\":\"101648715083886\",\"faceId\":\"tx0e0c771ae8700887fd9e60193cdd7b\",\"success\":false},\"transactionTime\":\"20220406170736\"}";
 
 		/*

+ 9 - 5
eladmin-system/src/main/resources/config/application-test.yml

@@ -163,18 +163,22 @@ app:
     domain: https://www.flowbb.top/
   push:
     port: 8082
-  tencent:
-    webankAppId: TIDAmm4i
-    secret: FAeFRoz5YxQkMyf1g0nSk7DVo7LQNmdAjKWxvwlxh5phMdftGt0nxdeX0FKXd7kD
-    keyLicence: CXBS6ZUHLqfjMWlJ8gK5qI9s/RCe+PTtWueoddT7VJol717t0cHdeKhRaocOw+bpzZUZmIcCCIJ/Vtjo0mSn20YalgSlhbw4y1sunC903hFewJfs1fd3EP3+5trx7gicdvUdCfXTbxRizh1wtTDN04W4pJx62g1sO98XyAWF5mWNTCECObvKiDJdNqcXJKl0Dht9jtc5JojGPFPXYBAuN0manuUxpSwl5wq1H/OOhZ9RrklAqFxie4Z5r4PhEbiBKE6FAgwCNcE4NKNbk7Tr1VgMnOn/R4IqYbKaNA2u7OYaGBmSKuBPG5hcRl72k6XMqTYZnP85CybfQ/fEthVkvA==
   minio:
     accesskey: minioadmin
     secretkey: minioadmin
     url: http://124.222.192.60:9000
     bucketName: mytest      
     preview: https://flowbb.show.xjrkj.com
-
     
+tencent:
+  client:
+    webankAppId: TIDAeQGR
+    secret: Wqwpw09j9Yg4s2e1GbuiUoeRQjlKFA1oXTuVC8w1Cy1gOtnlq0xz9QrKvqCSOqJS
+    keyLicence: gKLyvw8NrVTuEWz3feO/QbeeE94SLjiWRN8hhn02DVDMuVeB6T/zKvSfxdfqWqLrJeFRyWeOFOuhoq52f6By4TAEDGIR6oczvFkYP4ycBeHvtnbmzNTx44mTx9h6mwUy5GMHSdsE7EKJ3K/5kZR1JrMrGBRG9Lb58U33zYyHKPeDm7nT3l8keTndTb6SOYB2Q4FY6F0uFpPEv7s/IzkxzOpfAdakQlTFwQ/y9sLF9rHw83DjdvWWXEpQ9wXYILTcjOXeKseyAzKuQq1zc7LQ9GVjpPcPx8pQkSyXeIOBYEe/oXx5w1RePHSCfLnjPaaIiN82eSIMA4GElErIjcagLA==
+  bank:
+    webankAppId: TIDAmm4i
+    secret: FAeFRoz5YxQkMyf1g0nSk7DVo7LQNmdAjKWxvwlxh5phMdftGt0nxdeX0FKXd7kD
+    keyLicence: XMKMHERS8SLw5DiM/nnFm/dRVQZ31//VbBhHXiVHgrX1ztbjUAwCrvTut3GoBFRPT5ubNc91yapZpagyIYgqKIRevdiAs4l6yML5yDP9sRwiYwaB4nOEWYILmCldg8w+Vr7t75puP7ofWkn2B5c5vE4HksFS4kqzj1zF6Kxlh+yNTCECObvKiDJdNqcXJKl0Dht9jtc5JojGPFPXYBAuN0manuUxpSwl5wq1H/OOhZ9RrklAqFxie4Z5r4PhEbiBKE6FAgwCNcE4NKNbk7Tr1VgMnOn/R4IqYbKaNA2u7OYaGBmSKuBPG5hcRl72k6XMqTYZnP85CybfQ/fEthVkvA==
 xxl:
   job:
     accessToken: Easd123%&$@#kllsdfPO[JasdfF