Преглед изворни кода

Merge branch 'master' into pre

zoujiajian пре 2 година
родитељ
комит
5d376eb9dc

+ 6 - 0
netflix-dao/src/main/java/com/cyksj/model/manage/views/UserView.java

@@ -187,4 +187,10 @@ public class UserView {
 
     @DbField("u.is_google")
     private Boolean isGoogle;
+
+    /**
+     * 是否实名
+     */
+    @DbIgnore
+    private Boolean isCert;
 }

+ 4 - 1
netflix-service/src/main/java/com/cyksj/service/chatgpt/impl/ChatGptAccountServiceImpl.java

@@ -3,6 +3,7 @@ package com.cyksj.service.chatgpt.impl;
 import cn.hutool.core.date.DateTime;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.lang.UUID;
+import cn.hutool.core.util.RandomUtil;
 import cn.hutool.http.HttpRequest;
 import cn.hutool.http.HttpResponse;
 import cn.hutool.http.HttpUtil;
@@ -240,7 +241,9 @@ public class ChatGptAccountServiceImpl implements ChatGptAccountService {
         GoodsDonSku goodsDonSku = skuMapper.selectById(groupsTrips.getSkuId());
         if (goodsDonSku != null && goodsDonSku.getIsMirror() && goodsDonSku.getIsCar()) {
             ChatgptUser chatgptUser = getChatgptCarUser(userId, relationId, groupsRelation, goodsDonSku);
-            return CAR_GPT_DOMAIN + "/auth/logintoken?carid=" + carId + "&usertoken=" + chatgptUser.getUserToken();
+            String DOMAIN = "https://chat.galaxydvd.com";
+            log.info("domain:{},用户:{},所在车次:{},座位id:{},在{}获取跳转GPT镜像的登录url", DOMAIN, userId, groupsTrips.getId(), relationId, DateTime.now());
+            return DOMAIN + "/auth/logintoken?carid=" + carId + "&usertoken=" + chatgptUser.getUserToken();
         } else {
             throw BusinessRuntimeException.getInstance("服务器出了点问题");
         }

+ 5 - 0
netflix-service/src/main/java/com/cyksj/service/corp/impl/CorpEventActionServiceImpl.java

@@ -575,6 +575,11 @@ public class CorpEventActionServiceImpl implements CorpEventActionService {
 		//外部联系人id
 		String externalUserId = message.getExternalUserId();
 		log.info("监听微信客户:{}发起会话事件", externalUserId);
+		try {
+			//等待3s
+			Thread.sleep(3000);
+		} catch (InterruptedException e) {
+		}
 		//获客链接id
 		String linkId = message.getLinkId();
 		CorpUserAuth corpUserAuth = corpUserAuthMapper.selectOne(Wrappers.lambdaQuery(CorpUserAuth.class)

+ 15 - 4
netflix-web/src/main/java/com/cyksj/web/controller/manage/CmsUserController.java

@@ -82,10 +82,12 @@ public class CmsUserController{
 
     private final CmsUserMapper cmsUserMapper;
 
+    private final UserCertRecordMapper userCertRecordMapper;
+
     private final UserDoubleVerifyCodeChangeRecordMapper userDoubleVerifyCodeChangeRecordMapper;
 
     @GetMapping("/get")
-    public Result<SearchResult<UserView>> get(Long id, String otherPhone, Long sharedId, String userid, Long businessId, String sort, String order) {
+    public Result<SearchResult<UserView>> get(Long id, String otherPhone, Long sharedId, String userid, Long businessId, String sort, String order, Boolean isCert) {
         MapBuilder builder = MapUtils.flatBuilder(request.getParameterMap());
         String otherSql = StrUtil.EMPTY;
         if (StrUtil.isNotBlank(otherPhone)) {
@@ -103,24 +105,33 @@ public class CmsUserController{
                 builder.field(UserView::getId, relationUserIdList).op(Operator.InList);
             }
         }
+        if (isCert != null) {
+            if (StrUtil.isNotBlank(otherSql)) {
+                otherSql += " and ";
+            }
+            otherSql += "exists (select 1 from user_cert_record where user_id = u.id)";
+        }
         if (StrUtil.isNotBlank(otherSql)) {
             builder.put("otherConditionSql", otherSql);
         }
         SearchResult<UserView> search = beanSearcher.search(UserView.class, builder.build());
-        search.getDataList().forEach(data->{
+        search.getDataList().forEach(data -> {
             Long userId = data.getId();
             UserBindDetail userBindDetail = beanSearcher.searchFirst(UserBindDetail.class, MapUtils.builder().field(UserBindDetail::getUserId, userId).onlySelect(UserBindDetail::getPhone, UserBindDetail::getEmail).build());
-            Optional.ofNullable(userBindDetail).ifPresent(bind->{
+            Optional.ofNullable(userBindDetail).ifPresent(bind -> {
                 data.setBindEmail(bind.getEmail());
                 data.setBindPhone(bind.getPhone());
             });
             if (data.getSharedId() != null) {
                 UserDistributeBusinessInfoView userDistributeBusinessInfoView = beanSearcher.searchFirst(UserDistributeBusinessInfoView.class, MapUtils.builder().field(UserDistributeBusinessInfoView::getUserId, data.getSharedId()).build());
-                Optional.ofNullable(userDistributeBusinessInfoView).ifPresent(info->{
+                Optional.ofNullable(userDistributeBusinessInfoView).ifPresent(info -> {
                     data.setDistributeName(info.getDistributeName());
                     data.setBusinessName(info.getBusinessName());
                 });
             }
+            Integer selectCount = userCertRecordMapper.selectCount(Wrappers.lambdaQuery(UserCertRecord.class)
+                    .eq(UserCertRecord::getUserId, userId));
+            data.setIsCert(selectCount > 0 ? true : false);
         });
         return GatewayResponse.SUCCESS.newBuilder().toResult(search);
     }