|
@@ -215,7 +215,7 @@ public class WxGzhServiceImpl implements IWxGzhService {
|
|
|
//查询该用户的上级
|
|
|
UserInfo upUserInfo = userInfoService.getUpUserInfo(fromUserName);
|
|
|
//当用户销售类型为 普通用户(含驾校分成) 并且他的父级不是代理商(含驾校分成)时,且未填写驾校信息时则需要填写驾校信息
|
|
|
- if (userInfo.getSaleType() ==1 && upUserInfo.getSaleType()!=3 && userInfo.getSchoolName() == null ){
|
|
|
+ if (userInfo.getSaleType() ==1 && upUserInfo.getSaleType()!=3 && StringUtils.isEmpty(userInfo.getSchoolName()) ){
|
|
|
return choseSchoolName(userInfo,fromUserName,toUserName);
|
|
|
}
|
|
|
String mediaId = wxMessageEvenService.gainTicketEvent(fromUserName, this.getGzhToken(), false, wxForeverCode);
|
|
@@ -280,7 +280,7 @@ public class WxGzhServiceImpl implements IWxGzhService {
|
|
|
|
|
|
private String choseSchoolName(UserInfo userInfo,String fromUserName,String toUserName) throws Exception {
|
|
|
//城市未填写
|
|
|
- if (userInfo.getCityName() == null){
|
|
|
+ if (StringUtils.isEmpty(userInfo.getCityName())){
|
|
|
QueryParams queryParams = new QueryParams();
|
|
|
queryParams.setChoseColumName("city_name");
|
|
|
List<String> cities = schoolInfoMapper.queryNames(queryParams);
|
|
@@ -292,7 +292,7 @@ public class WxGzhServiceImpl implements IWxGzhService {
|
|
|
return MessageUtil.initText(fromUserName, toUserName, buffer.toString());
|
|
|
}
|
|
|
return MessageUtil.initText(fromUserName, toUserName, buffer.toString());
|
|
|
- }else if (userInfo.getAreaName() == null) {
|
|
|
+ }else if (StringUtils.isEmpty(userInfo.getAreaName())) {
|
|
|
QueryParams queryParamsArea = new QueryParams();
|
|
|
queryParamsArea.setChoseColumName("area_name");
|
|
|
queryParamsArea.setConditionColumName1("city_name");
|
|
@@ -307,7 +307,7 @@ public class WxGzhServiceImpl implements IWxGzhService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- else if (userInfo.getSchoolName() == null) {
|
|
|
+ else if (StringUtils.isEmpty(userInfo.getSchoolName())) {
|
|
|
QueryParams queryParamsArea = new QueryParams();
|
|
|
queryParamsArea.setChoseColumName("school_name");
|
|
|
queryParamsArea.setConditionColumName1("city_name");
|