|
|
@@ -18,6 +18,7 @@ import com.fs.gtPush.domain.PushResult;
|
|
|
import com.fs.gtPush.domain.UniPushLog;
|
|
|
import com.fs.gtPush.service.UniPushLogService;
|
|
|
import com.fs.gtPush.service.uniPush2Service;
|
|
|
+import com.fs.his.enums.PushLogTypeEnum;
|
|
|
import com.fs.his.mapper.FsUserMapper;
|
|
|
import com.fs.im.config.IMConfig;
|
|
|
import com.fs.im.dto.OpenImResponseDTO;
|
|
|
@@ -35,6 +36,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
@Service
|
|
|
@Slf4j
|
|
|
@@ -71,6 +73,9 @@ public class uniPush2ServiceImpl implements uniPush2Service {
|
|
|
throw new RuntimeException("his.config 中未配置 appPushUrl");
|
|
|
}
|
|
|
String result = HttpUtil.post(url, JSON.toJSONString(push));
|
|
|
+ log.info("推送地址{}",url);
|
|
|
+ log.info("推送请求体{}",JSON.toJSONString(push));
|
|
|
+ log.info("推送返回结果{}",result);
|
|
|
return JSONUtil.toBean(result, PushResult.class);
|
|
|
}
|
|
|
@Override
|
|
|
@@ -314,14 +319,14 @@ public class uniPush2ServiceImpl implements uniPush2Service {
|
|
|
Float type, Integer desType, String imJsonString) {
|
|
|
if (userId == null) return null;
|
|
|
String jpushId = "";
|
|
|
- FsUser fsUser = userService.selectFsUserByUserId(userId);
|
|
|
- if (fsUser == null){
|
|
|
+ if (Objects.equals(type, PushLogTypeEnum.UTOC.getValue())){
|
|
|
CompanyUser companyUser = companyUserMapper.selectCompanyUserById(userId);
|
|
|
if (companyUser == null){
|
|
|
return null;
|
|
|
}
|
|
|
jpushId = companyUser.getJpushId();
|
|
|
} else {
|
|
|
+ FsUser fsUser = userService.selectFsUserByUserId(userId);
|
|
|
jpushId = fsUser.getJpushId();
|
|
|
}
|
|
|
|