2 Revize 3b3e72a7b6 ... e7cb774368

Autor SHA1 Zpráva Datum
  王苗苗 e7cb774368 大模型接口 如果传过来的必传参数为空,返回空,不要模糊查询返回全部 před 4 dny
  王苗苗 f62315ae87 修改请求类型 před 4 dny

+ 1 - 1
slibra-admin/src/main/java/com/slibra/web/controller/business/TCallRecordController.java

@@ -219,7 +219,7 @@ public class TCallRecordController extends BaseController
      * @return
      * @throws IOException
      */
-    @PostMapping("/downloadBatchByCondition")
+    @GetMapping("/downloadBatchByCondition")
     public ResponseEntity<Resource> downloadBatchFiles(TCallRecord tCallRecord) throws IOException {
         //查询数据
         List<TCallRecord> tCallRecords = this.tCallRecordService.selectTCallRecordList(tCallRecord);

+ 18 - 0
slibra-system/src/main/java/com/slibra/business/service/impl/FrontServiceImpl.java

@@ -64,6 +64,12 @@ public class FrontServiceImpl implements IFrontService {
         return aiChatRes;
     }
 
+    /**
+     * 通过类型,获取不同的业务数据
+     * 2024年11月24日11:16:56 如果传过来的必传参数为空,返回空,不要模糊查询返回全部
+     * @param aiChatReq
+     * @return
+     */
     private Object getBussinessDataByAiChatReq(AiChatReq aiChatReq) {
         //判断不同的业务类型,返回不同的数据
         String method = aiChatReq.getMethod();
@@ -76,6 +82,8 @@ public class FrontServiceImpl implements IFrontService {
 //            return this.cutOffWaterMapper.getCutOffWaterByUserPhone(phone);
             //通过手机号获取对应的小区的名字,一个手机号只能查询到一个
             //2024年11月18日10:21:42 因为TUserInfo存储的主要是户号相关信息,所以一个手机号是可以对应多条记录的
+            if(StringUtils.isBlank(phone))
+                return null;
             List<TUserInfo> tUserInfos = this.userInfoMapper.selectTUserInfoList(TUserInfo.builder().phone(phone).build());
             if(!CollectionUtils.isEmpty(tUserInfos)){
                 List<TCutOffWater> cutOffWaters = new ArrayList<>();
@@ -87,20 +95,28 @@ public class FrontServiceImpl implements IFrontService {
         }
         //基于用户输入的小区信息,查询停水信息
         if(BusinessEnum.AiChatReqEnum.water_loc_info.getCode().equals(method)){
+            if(StringUtils.isBlank(asrText))
+                return null;
             return this.cutOffWaterMapper.getCutOffWaterByNeighbourhoodName(asrText);
         }
         //基于userid查询用户户号信息
         if(BusinessEnum.AiChatReqEnum.user_info.getCode().equals(method)){
+            if(StringUtils.isBlank(phone))
+                return null;
             return this.userInfoMapper.selectTUserInfoList(TUserInfo.builder().phone(phone).build());
         }
         //基于用户输入手机号信息查询用户户号信息
         if(BusinessEnum.AiChatReqEnum.user_phone_info.getCode().equals(method)){
             //2024年11月07日10:44:42 逻辑调整,asrText传过来的是手机号
 //            return this.userInfoMapper.selectTUserInfoList(TUserInfo.builder().userNo(asrText).build());
+            if(StringUtils.isBlank(asrText))
+                return null;
             return this.userInfoMapper.selectTUserInfoList(TUserInfo.builder().phone(asrText).build());
         }
         //基于userId查询水费信息
         if(BusinessEnum.AiChatReqEnum.fee_info.getCode().equals(method)){
+            if(StringUtils.isBlank(phone))
+                return null;
             List<TUserInfo> tUserInfos = this.userInfoMapper.selectTUserInfoList(TUserInfo.builder().phone(phone).build());
             List<FeeInfo> feeInfos = new ArrayList<>();
             if(!CollectionUtils.isEmpty(tUserInfos)){
@@ -116,6 +132,8 @@ public class FrontServiceImpl implements IFrontService {
         if(BusinessEnum.AiChatReqEnum.fee_user_info.getCode().equals(method)){
             //2024年11月07日10:44:42 逻辑调整,asrText传过来的是用户编码
 //            List<TUserInfo> tUserInfos = this.userInfoMapper.selectTUserInfoList(TUserInfo.builder().userNo(asrText).build());
+            if(StringUtils.isBlank(asrText))
+                return null;
             List<TUserInfo> tUserInfos = this.userInfoMapper.selectTUserInfoList(TUserInfo.builder().userNo(asrText).build());
             List<FeeInfo> feeInfos = new ArrayList<>();
             if(!CollectionUtils.isEmpty(tUserInfos)){