|
|
@@ -17,6 +17,7 @@ import com.fs.gtPush.service.uniPush2Service;
|
|
|
import com.fs.im.service.OpenIMService;
|
|
|
import com.fs.system.domain.SysConfig;
|
|
|
import com.fs.system.service.ISysConfigService;
|
|
|
+import com.qiniu.util.Json;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import com.fs.gtPush.utils.PushUtils;
|
|
|
import com.fs.his.domain.FsUser;
|
|
|
@@ -47,6 +48,10 @@ public class uniPush2ServiceImpl implements uniPush2Service {
|
|
|
@Override
|
|
|
public PushResult pushMessage(PushReqBean push) {
|
|
|
SysConfig config = iSysConfigService.selectConfigByConfigKey("his.config");
|
|
|
+ if (config == null || StringUtils.isBlank(config.getConfigValue())) {
|
|
|
+ throw new RuntimeException("his.config 配置不存在");
|
|
|
+ }
|
|
|
+
|
|
|
JSONObject json = JSON.parseObject(config.getConfigValue());
|
|
|
String url = json.getString("appPushUrl");
|
|
|
if (StringUtils.isBlank(url)) {
|
|
|
@@ -56,6 +61,7 @@ public class uniPush2ServiceImpl implements uniPush2Service {
|
|
|
String result = HttpUtil.post(url, push.toString());
|
|
|
PushResult pushResult = JSONUtil.toBean(result, PushResult.class);
|
|
|
return pushResult;
|
|
|
+
|
|
|
}
|
|
|
@Override
|
|
|
public void pushSopAppLinkMsgByExternalIM(String cropId, String linkTile, String linkDescribe,String linkImageUrl, String link, Long companyUserId,Long fsUserId) throws JsonProcessingException {
|