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