5 Commits 5c2a31f9ee ... 4852d74c98

Autor SHA1 Mensaje Fecha
  caoliqin 4852d74c98 Merge branch 'master' of http://1.14.104.71:10880/root/ylrz_his_scrm_java hace 4 días
  caoliqin f082dffe26 feat:AI高频问题分析 hace 4 días
  caoliqin f92d0842d0 feat:鸿森堂配置 hace 6 días
  caoliqin 198fea27e0 feat:鸿森堂-app手动发课、微信登录不强制绑定手机号 hace 6 días
  caoliqin dcd374f1dc feat:企微客户添加是否下载app筛选条件 hace 6 días

+ 36 - 0
fs-company/src/main/java/com/fs/company/controller/fastGpt/FastgptChatQuestionStatisticsController.java

@@ -15,10 +15,14 @@ import com.fs.common.annotation.Log;
 import com.fs.common.core.controller.BaseController;
 import com.fs.common.core.domain.AjaxResult;
 import com.fs.common.enums.BusinessType;
+import com.fs.fastGpt.domain.FastgptChatQuestion;
 import com.fs.fastGpt.domain.FastgptChatQuestionStatistics;
+import com.fs.fastGpt.service.IFastgptChatQuestionService;
 import com.fs.fastGpt.service.IFastgptChatQuestionStatisticsService;
+import com.fs.fastGpt.vo.FastgptChatQuestionDetailVO;
 import com.fs.common.utils.poi.ExcelUtil;
 import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.BeanCopyUtils;
 
 /**
  * 高频聊天问题统计Controller
@@ -33,6 +37,9 @@ public class FastgptChatQuestionStatisticsController extends BaseController
     @Autowired
     private IFastgptChatQuestionStatisticsService fastgptChatQuestionStatisticsService;
 
+    @Autowired
+    private IFastgptChatQuestionService fastgptChatQuestionService;
+
     /**
      * 查询高频聊天问题统计列表
      */
@@ -100,4 +107,33 @@ public class FastgptChatQuestionStatisticsController extends BaseController
     {
         return toAjax(fastgptChatQuestionStatisticsService.deleteFastgptChatQuestionStatisticsByIds(ids));
     }
+
+    /**
+     * 查询高频聊天问题明细(分页)
+     */
+    @PreAuthorize("@ss.hasPermi('fastGpt:fastGptChatQuestionStatistics:query')")
+    @GetMapping("/detail/list")
+    public TableDataInfo questionDetailList(Long questionStatisticsId)
+    {
+        startPage();
+        FastgptChatQuestion q = new FastgptChatQuestion();
+        q.setQuestionStatisticsId(questionStatisticsId);
+        List<FastgptChatQuestion> list = fastgptChatQuestionService.selectFastgptChatQuestionList(q);
+        List<FastgptChatQuestionDetailVO> voList = BeanCopyUtils.copyList(list, FastgptChatQuestionDetailVO.class);
+        return getDataTable(voList);
+    }
+
+    /**
+     * 新增/修改高频聊天问题回复(实际更新明细表的销售回复内容)
+     */
+    @PreAuthorize("@ss.hasPermi('fastGpt:fastGptChatQuestionStatistics:edit')")
+    @Log(title = "高频聊天问题回复", businessType = BusinessType.UPDATE)
+    @PutMapping("/question/reply")
+    public AjaxResult saveOrUpdateQuestionReply(@RequestBody FastgptChatQuestionDetailVO param)
+    {
+        FastgptChatQuestion q = new FastgptChatQuestion();
+        q.setId(param.getId());
+        q.setCompanyUserContent(param.getCompanyUserContent());
+        return toAjax(fastgptChatQuestionService.updateFastgptChatQuestion(q));
+    }
 }

+ 1 - 1
fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java

@@ -1754,7 +1754,7 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
 
         // 判断来源是否是app,如是app,则发放积分奖励
         int sourceApp = 3;
-        if (sourceApp == param.getSource() && !CloudHostUtils.hasCloudHostName("中康")) {
+        if (sourceApp == param.getSource() && !CloudHostUtils.hasCloudHostName("中康", "鸿森堂")) {
             return sendIntegralReward(param, user, log, config);
         }
 

+ 2 - 0
fs-service/src/main/java/com/fs/fastGpt/mapper/FastgptChatQuestionStatisticsMapper.java

@@ -65,4 +65,6 @@ public interface FastgptChatQuestionStatisticsMapper extends BaseMapper<FastgptC
                                                          @Param("threshold") Integer threshold);
 
     int incrementFrequencyById(@Param("id") Long id, @Param("updateTime") Date updateTime);
+
+    FastgptChatQuestionStatistics selectFirstByQuestionCategory(@Param("questionCategory") Integer questionCategory);
 }

+ 3 - 0
fs-service/src/main/java/com/fs/fastGpt/param/FastgptKnowledgeMissCollectParam.java

@@ -8,6 +8,9 @@ public class FastgptKnowledgeMissCollectParam {
     private String aiUserContent;
     private String contentEmj;
 
+    /** 调用 CrmCustomerAiTagUtil.callAiService 的 appKey,与 AI Hook 中 config.getAPPKey() 一致 */
+    private String appKey;
+
     private Long sessionId;
     private Long msgId;
     private String extId;

+ 1 - 0
fs-service/src/main/java/com/fs/fastGpt/service/impl/AiHookServiceImpl.java

@@ -614,6 +614,7 @@ public class AiHookServiceImpl implements AiHookService {
                     p.setRoleId(role.getRoleId());
                     p.setNickName(qwExternalContacts.getName());
                     p.setUserType(fastGptChatSession.getUserType());
+                    p.setAppKey(config.getAPPKey());
                     fastgptChatQuestionCollectServiceImpl.collectAsync(p);
                 }
             }else{

+ 176 - 29
fs-service/src/main/java/com/fs/fastGpt/service/impl/FastgptChatQuestionCollectServiceImpl.java

@@ -1,7 +1,12 @@
 package com.fs.fastGpt.service.impl;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fs.common.BeanCopyUtils;
+import com.fs.common.core.domain.R;
 import com.fs.common.utils.DateUtils;
+import com.fs.crm.utils.CrmCustomerAiTagUtil;
 import com.fs.fastGpt.domain.FastgptChatQuestion;
 import com.fs.fastGpt.domain.FastgptChatQuestionStatistics;
 import com.fs.fastGpt.mapper.FastgptChatQuestionMapper;
@@ -9,6 +14,7 @@ import com.fs.fastGpt.mapper.FastgptChatQuestionStatisticsMapper;
 import com.fs.fastGpt.param.FastgptKnowledgeMissCollectParam;
 import com.fs.fastGpt.service.IFastgptChatQuestionService;
 import com.fs.fastGpt.util.FastgptQuestionNormalizeUtil;
+import cn.hutool.json.JSONUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -17,9 +23,13 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
- * 知识库未命中:异步写入明细,按 content_summary 归并统计并回填 question_statistics_id
+ * 知识库未命中:异步写入明细。
+ * 顺序:① SimHash+Jaccard 本地匹配已有统计;
+ * ② 未命中再调 AI 按 contentType(question_category)归并;③ 仍失败则新建统计行(含 SimHash 兜底插入)。</p>
  */
 @Slf4j
 @Service
@@ -28,6 +38,9 @@ public class FastgptChatQuestionCollectServiceImpl {
     private static final int SIMHASH_THRESHOLD = 14;
     private static final double JACCARD_THRESHOLD = 0.55d;
 
+    private static final String MODEL_TYPE_HIGH_FREQ = "高频问题类别";
+
+    private static final ObjectMapper objectMapper = new ObjectMapper();
 
     @Autowired
     private IFastgptChatQuestionService fastgptChatQuestionService;
@@ -63,37 +76,39 @@ public class FastgptChatQuestionCollectServiceImpl {
 
             Date now = DateUtils.getNowDate();
             long sh = FastgptQuestionNormalizeUtil.simhash64(display);
-            FastgptChatQuestionStatistics best = fastgptChatQuestionStatisticsMapper.selectBestMatchBySimhash(sh, SIMHASH_THRESHOLD);
-            Long statId;
-            if (best != null && best.getId() != null) {
-                double jac = FastgptQuestionNormalizeUtil.jaccard(
-                        FastgptQuestionNormalizeUtil.ngramTokens(display),
-                        FastgptQuestionNormalizeUtil.ngramTokens(best.getContentSummary())
-                );
-                if (jac < JACCARD_THRESHOLD) {
-                    best = null;
+
+            // 本地匹配已有统计,获取数据id
+            Long statId = tryMergeByLocalTextMatch(display, sh, now);
+
+            if (statId == null) {
+                // 如果没有匹配,就调用 AI
+                Integer aiCategory = getHighFreqCategoryByAi(param);
+                if (aiCategory != null) {
+                    FastgptChatQuestionStatistics questionStatistics =
+                            fastgptChatQuestionStatisticsMapper.selectFirstByQuestionCategory(aiCategory);
+                    if (questionStatistics != null && questionStatistics.getId() != null) {
+                        statId = questionStatistics.getId();
+                        fastgptChatQuestionStatisticsMapper.incrementFrequencyById(statId, now);
+                    } else {
+                        FastgptChatQuestionStatistics row = new FastgptChatQuestionStatistics();
+                        row.setQuestionCategory(aiCategory);
+                        row.setContentSummary(display.length() > 200 ? display.substring(0, 200) : display);
+                        row.setSimhash(sh);
+                        row.setIsResolve(0);
+                        row.setQuestionId(detailId);
+                        row.setFrequency(1);
+                        row.setCreateTime(now);
+                        row.setUpdateTime(now);
+                        fastgptChatQuestionStatisticsMapper.insertFastgptChatQuestionStatistics(row);
+                        statId = row.getId();
+                    }
                 }
             }
-            if (best != null && best.getId() != null) {
-                statId = best.getId();
-                fastgptChatQuestionStatisticsMapper.incrementFrequencyById(statId, now);
-            } else {
-                FastgptChatQuestionStatistics row = new FastgptChatQuestionStatistics();
-                row.setQuestionCategory(0);
-                row.setContentSummary(display.length() > 200 ? display.substring(0, 200) : display);
-                row.setSimhash(sh);
-                row.setIsResolve(0);
-                row.setQuestionId(detailId);
-                row.setFrequency(1);
-                row.setCreateTime(now);
-                row.setUpdateTime(now);
-                fastgptChatQuestionStatisticsMapper.insertFastgptChatQuestionStatistics(row);
-                statId = row.getId();
-                if (statId == null) {
-                    FastgptChatQuestionStatistics insertedBest = fastgptChatQuestionStatisticsMapper.selectBestMatchBySimhash(sh, SIMHASH_THRESHOLD);
-                    statId = insertedBest != null ? insertedBest.getId() : null;
-                }
+
+            if (statId == null) {
+                statId = mergeBySimhashFallback(display, sh, detailId, now);
             }
+
             if (statId != null) {
                 fastgptChatQuestionMapper.updateQuestionStatisticsIdById(detailId, statId);
             }
@@ -102,6 +117,138 @@ public class FastgptChatQuestionCollectServiceImpl {
         }
     }
 
+    private Integer getHighFreqCategoryByAi(FastgptKnowledgeMissCollectParam param) {
+        if (param.getSessionId() == null || StringUtils.isBlank(param.getAppKey())) {
+            return null;
+        }
+        try {
+            Map<String, Object> requestParam = new HashMap<>();
+
+            requestParam.put("history", StringUtils.defaultString(param.getAiUserContent(), ""));
+            requestParam.put("aiContent", "");
+            requestParam.put("userContent", "");
+            requestParam.put("isRepository", "");
+            requestParam.put("contentType", "");
+            requestParam.put("modelType", MODEL_TYPE_HIGH_FREQ);
+
+            R aiResponse = CrmCustomerAiTagUtil.callAiService(requestParam, param.getSessionId(), param.getAppKey());
+
+            // 处理返回结果
+            JsonNode userInfo = parseUserInfoFromAiResponse(aiResponse);
+            if (userInfo == null || userInfo.isMissingNode() || !userInfo.isObject()) {
+                return null;
+            }
+            if (userInfo.has("contentType") && !userInfo.get("contentType").isNull()) {
+                return parseIntNode(userInfo.get("contentType"));
+            }
+            if (userInfo.has(MODEL_TYPE_HIGH_FREQ) && !userInfo.get(MODEL_TYPE_HIGH_FREQ).isNull()) {
+                return parseIntNode(userInfo.get(MODEL_TYPE_HIGH_FREQ));
+            }
+        } catch (Exception e) {
+            log.warn("高频问题类别 AI 解析失败 sessionId={}", param.getSessionId(), e);
+        }
+        return null;
+    }
+
+    private static Integer parseIntNode(JsonNode n) {
+        if (n == null || n.isNull() || n.isMissingNode()) {
+            return null;
+        }
+        if (n.isIntegralNumber() || n.isNumber()) {
+            return n.intValue();
+        }
+        return parseIntLoose(n.asText());
+    }
+
+    // 文本转int
+    private static Integer parseIntLoose(String s) {
+        if (StringUtils.isBlank(s)) {
+            return null;
+        }
+        try {
+            return Integer.parseInt(s.trim());
+        } catch (NumberFormatException e) {
+            return null;
+        }
+    }
+
+    private JsonNode parseUserInfoFromAiResponse(R aiResponse) throws JsonProcessingException {
+        if (aiResponse == null || !Integer.valueOf(200).equals(aiResponse.get("code"))) {
+            return null;
+        }
+        JsonNode rootS = objectMapper.readTree(JSONUtil.toJsonStr(aiResponse));
+        JsonNode choices = rootS.path("data").path("choices");
+        if (!choices.isArray() || choices.size() <= 0) {
+            return null;
+        }
+        JsonNode contentNode = choices.get(0).path("message").path("content");
+        if (!contentNode.isTextual()) {
+            return null;
+        }
+        String contentStr = contentNode.asText();
+        JsonNode contentArray = objectMapper.readTree(contentStr);
+        if (!contentArray.isArray() || contentArray.size() <= 1) {
+            return null;
+        }
+        JsonNode secondElement = contentArray.get(1);
+        JsonNode textNode = secondElement.path("text");
+        if (textNode.isMissingNode()) {
+            return null;
+        }
+        JsonNode contentInnerNode = textNode.path("content");
+        if (!contentInnerNode.isTextual()) {
+            return null;
+        }
+        String innerJsonStr = contentInnerNode.asText();
+        JsonNode innerJson = objectMapper.readTree(innerJsonStr);
+        return innerJson.path("userInfo");
+    }
+
+    /**
+     * 本地 SimHash + Jaccard 与已有统计行比对,命中则频次+1 并返回该统计 id;不插入新行。
+     */
+    private Long tryMergeByLocalTextMatch(String display, long sh, Date now) {
+        FastgptChatQuestionStatistics best = fastgptChatQuestionStatisticsMapper.selectBestMatchBySimhash(sh, SIMHASH_THRESHOLD);
+        if (best != null && best.getId() != null) {
+            double jac = FastgptQuestionNormalizeUtil.jaccard(
+                    FastgptQuestionNormalizeUtil.ngramTokens(display),
+                    FastgptQuestionNormalizeUtil.ngramTokens(best.getContentSummary())
+            );
+            if (jac < JACCARD_THRESHOLD) {
+                best = null;
+            }
+        }
+        if (best != null && best.getId() != null) {
+            fastgptChatQuestionStatisticsMapper.incrementFrequencyById(best.getId(), now);
+            return best.getId();
+        }
+        return null;
+    }
+
+    /** AI 也未归类时:再按 SimHash 找一遍(与本地逻辑一致),仍无则插入 question_category=0 的新统计行 */
+    private Long mergeBySimhashFallback(String display, long sh, Long detailId, Date now) {
+        Long localId = tryMergeByLocalTextMatch(display, sh, now);
+        if (localId != null) {
+            return localId;
+        }
+        FastgptChatQuestionStatistics row = new FastgptChatQuestionStatistics();
+        row.setQuestionCategory(0);
+        row.setContentSummary(display.length() > 200 ? display.substring(0, 200) : display);
+        row.setSimhash(sh);
+        row.setIsResolve(0);
+        row.setQuestionId(detailId);
+        row.setFrequency(1);
+        row.setCreateTime(now);
+        row.setUpdateTime(now);
+        fastgptChatQuestionStatisticsMapper.insertFastgptChatQuestionStatistics(row);
+        Long statId = row.getId();
+        if (statId == null) {
+            FastgptChatQuestionStatistics insertedBest = fastgptChatQuestionStatisticsMapper.selectBestMatchBySimhash(sh, SIMHASH_THRESHOLD);
+            statId = insertedBest != null ? insertedBest.getId() : null;
+        }
+        return statId;
+    }
+
     private static FastgptChatQuestion buildQuestion(FastgptKnowledgeMissCollectParam param, String userContent) {
         FastgptChatQuestion q = new FastgptChatQuestion();
         BeanCopyUtils.copy(param, q);

+ 53 - 0
fs-service/src/main/java/com/fs/fastGpt/vo/FastgptChatQuestionDetailVO.java

@@ -0,0 +1,53 @@
+package com.fs.fastGpt.vo;
+
+import com.fs.common.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 高频聊天问题明细 VO(对应 fastgpt_chat_question 全字段返回)
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class FastgptChatQuestionDetailVO extends BaseEntity {
+
+    /** 主键id */
+    private Long id;
+
+    /** 会话id */
+    private Long sessionId;
+
+    /** 消息id */
+    private Long msgId;
+
+    /** 外部ID */
+    private String extId;
+
+    /** 用户id */
+    private String userId;
+
+    /** 公司ID */
+    private Long companyId;
+
+    /** 销售ID */
+    private Long companyUserId;
+
+    /** 角色ID */
+    private Long roleId;
+
+    /** 昵称 */
+    private String nickName;
+
+    /** 用户类型 1微信用户 2小程序用户 3销售用户 */
+    private Integer userType;
+
+    /** 客户内容 */
+    private String userContent;
+
+    /** 销售回复内容 */
+    private String companyUserContent;
+
+    /** 高频问题统计id,关联高频聊天问题统计表 */
+    private Long questionStatisticsId;
+}
+

+ 11 - 3
fs-service/src/main/java/com/fs/qw/mapper/QwExternalContactMapper.java

@@ -1,8 +1,6 @@
 package com.fs.qw.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.fs.common.annotation.DataSource;
-import com.fs.common.enums.DataSourceType;
 import com.fs.fastGpt.domain.FastgptChatArtificialWords;
 import com.fs.hisStore.vo.FsStoreOrderScrmSidebarVO;
 import com.fs.qw.domain.QwExternalContact;
@@ -15,7 +13,6 @@ import com.fs.qw.result.QwExternalContactVo;
 import com.fs.qw.vo.*;
 import com.fs.qw.vo.newvo.ExternalContactListVO;
 import com.fs.qw.vo.newvo.ExternalContactNumVO;
-import com.fs.qw.vo.sidebar.ExternalContactQwUserVO;
 import com.fs.qwApi.param.QwExternalContactHParam;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
@@ -241,6 +238,7 @@ public interface QwExternalContactMapper extends BaseMapper<QwExternalContact> {
             "select c.id from qw_external_ai_analyze c " +
             "where c.qw_user_id = ec.user_id and c.external_user_id = ec.external_user_id and c.corp_id = ec.corp_id " +
             "order by c.create_time desc limit 1) " +
+            " <if test=\"isDownloadApp != null\"> left join fs_user fapp on fapp.user_id = ec.fs_user_id and fapp.is_del = 0 </if> " +
             "<where>  \n" +
             "            <if test=\"id != null  and id != ''\"> and ec.id   like concat( #{id}, '%') </if>\n" +
             "            <if test=\"userId != null  and userId != ''\"> and ec.user_id   like concat( #{userId}, '%') </if>\n" +
@@ -307,6 +305,16 @@ public interface QwExternalContactMapper extends BaseMapper<QwExternalContact> {
             "<if test ='companyUser!=null'> " +
                 "and (cu.nick_name like concat('%', #{companyUser}, '%') or cu.phonenumber= #{companyUser})"+
             "</if> " +
+            "            <if test=\"isDownloadApp != null\"> \n" +
+            "                <choose> \n" +
+            "                    <when test=\"isDownloadApp == 1\"> \n" +
+            "                        and ec.fs_user_id is not null and fapp.user_id is not null and (fapp.source is not null or fapp.login_device is not null) \n" +
+            "                    </when> \n" +
+            "                    <when test=\"isDownloadApp == 0\"> \n" +
+            "                        and (ec.fs_user_id is null or fapp.user_id is null or (fapp.source is null and fapp.login_device is null)) \n" +
+            "                    </when> \n" +
+            "                </choose> \n" +
+            "            </if> \n" +
             "        </where>"+
             "order by ec.create_time desc,ec.id desc"+
             "</script>"})

+ 6 - 0
fs-service/src/main/java/com/fs/qw/param/QwExternalContactParam.java

@@ -155,4 +155,10 @@ public class QwExternalContactParam {
      */
     private Integer isReply;
 
+    /**
+     * 是否已下载/使用 app:1-是 0-否;
+     */
+    @TableField(exist = false)
+    private Integer isDownloadApp;
+
 }

+ 1 - 1
fs-service/src/main/resources/application-config-druid-hst.yml

@@ -92,7 +92,7 @@ cloud_host:
 headerImg:
   imgUrl:
 ipad:
-  ipadUrl: http://ipad.schstyl.cn
+  ipadUrl: http://159.75.170.85:8667
   aiApi: http://49.232.181.28:3000/api
   voiceApi: http://123.207.48.104:8009
   commonApi: http://123.207.48.104:7771

+ 4 - 0
fs-service/src/main/resources/application-druid-hst.yml

@@ -138,6 +138,10 @@ rocketmq:
     group: test-group
     access-key: ak1vjak37reb7b19a2b09d1 # 替换为实际的 accessKey
     secret-key: sk3987beb638e3414f # 替换为实际的 secretKey
+#看课授权时显示的头像
+headerImg:
+  imgUrl:
+  download_poster_url:
 openIM:
   secret: openIM123
   userID: imAdmin

+ 7 - 0
fs-service/src/main/resources/mapper/fastGpt/FastgptChatQuestionStatisticsMapper.xml

@@ -107,4 +107,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             update_time = #{updateTime}
         where id = #{id}
     </update>
+
+    <select id="selectFirstByQuestionCategory" resultMap="FastgptChatQuestionStatisticsResult">
+        <include refid="selectFastgptChatQuestionStatisticsVo"/>
+        where question_category = #{questionCategory}
+        order by id asc
+        limit 1
+    </select>
 </mapper>

+ 10 - 6
fs-user-app/src/main/java/com/fs/app/controller/AppLoginController.java

@@ -317,9 +317,11 @@ public class AppLoginController extends AppBaseController{
                 String ipAddr = IpUtils.getIpAddr(ServletUtils.getRequest());
                 user.setLastIp(ipAddr);
                 userService.insertFsUser(user);
-                map.put("isNew", true);
-                map.put("unionid",unionid);
-                return R.ok(map);
+                if(!CloudHostUtils.hasCloudHostName("鸿森堂")){
+                    map.put("isNew", true);
+                    map.put("unionid",unionid);
+                    return R.ok(map);
+                }
             } else {
                 // 老用户 - 检查并添加appId(不重复添加)
                 String updatedAppId = addAppIdIfNotExists(user.getAppId(), appId);
@@ -337,9 +339,11 @@ public class AppLoginController extends AppBaseController{
                     updateExistingUserJpushId(user, param.getJpushId());
                 }
                 if (StringUtils.isEmpty(user.getPhone())) {
-                    map.put("isNew", true);
-                    map.put("unionid",user.getUnionId());
-                    return R.ok(map);
+                    if(!CloudHostUtils.hasCloudHostName("鸿森堂")) {
+                        map.put("isNew", true);
+                        map.put("unionid", user.getUnionId());
+                        return R.ok(map);
+                    }
                 }
             }