Commit ead2a8f5 authored by 刘基明's avatar 刘基明

Merge branch 'bugfix_1115' into dev

parents 60e11444 e12a4449
package com.tanpu.community.feign.activity; package com.tanpu.community.feign.activity;
import com.alibaba.fastjson.JSONObject;
import com.tanpu.common.api.CommonResp; import com.tanpu.common.api.CommonResp;
import com.tanpu.community.api.beans.req.page.Page;
import com.tanpu.community.api.beans.vo.feign.activity.OfflineActivitySimpleResp; import com.tanpu.community.api.beans.vo.feign.activity.OfflineActivitySimpleResp;
import feign.hystrix.FallbackFactory; import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -32,7 +30,7 @@ public class FeignBackClientForActivity implements FallbackFactory<FeignClientFo ...@@ -32,7 +30,7 @@ public class FeignBackClientForActivity implements FallbackFactory<FeignClientFo
} }
@Override @Override
public CommonResp<List<OfflineActivitySimpleResp>> queryCorpHomeActivityList(String orgId) { public CommonResp<List<OfflineActivitySimpleResp>> queryCorpHomeActivityList(String orgId,String userId) {
log.error("请求信息", throwable); log.error("请求信息", throwable);
log.error("FeignClientForActivity.offlineActivityDetail-查询活动orgId:{}", orgId); log.error("FeignClientForActivity.offlineActivityDetail-查询活动orgId:{}", orgId);
return CommonResp.error(); return CommonResp.error();
......
...@@ -24,5 +24,6 @@ public interface FeignClientForActivity { ...@@ -24,5 +24,6 @@ public interface FeignClientForActivity {
@ApiOperation("线下活动列表-查询机构首页线下活动列表") @ApiOperation("线下活动列表-查询机构首页线下活动列表")
@GetMapping(value = "/offlineActivity/inter/queryCorpHomeActivityList") @GetMapping(value = "/offlineActivity/inter/queryCorpHomeActivityList")
CommonResp<List<OfflineActivitySimpleResp>> queryCorpHomeActivityList(@ApiParam("活动id") @RequestParam(value = "corpId") String corpId); CommonResp<List<OfflineActivitySimpleResp>> queryCorpHomeActivityList(@ApiParam("活动id") @RequestParam(value = "corpId") String corpId,
@ApiParam("用户id") @RequestParam(value = "userId") String userId);
} }
...@@ -184,7 +184,8 @@ public class HomePageManager { ...@@ -184,7 +184,8 @@ public class HomePageManager {
userInfoNew.setUserInfoOrgList(userInfoOrgs); userInfoNew.setUserInfoOrgList(userInfoOrgs);
} }
// 家办活动 // 家办活动
CommonResp<List<OfflineActivitySimpleResp>> activitySimpleResps = feignClientForActivity.queryCorpHomeActivityList(userInfoNew.getUserInfoNewOrg().getCorpId()); CommonResp<List<OfflineActivitySimpleResp>> activitySimpleResps = feignClientForActivity.queryCorpHomeActivityList(
userInfoNew.getUserInfoNewOrg().getCorpId(), userId);
if (activitySimpleResps.isSuccess() && CollectionUtils.isNotEmpty(activitySimpleResps.getData())) { if (activitySimpleResps.isSuccess() && CollectionUtils.isNotEmpty(activitySimpleResps.getData())) {
List<OfflineActivitySimpleResp> activities = activitySimpleResps.getData(); List<OfflineActivitySimpleResp> activities = activitySimpleResps.getData();
if (CollectionUtils.isNotEmpty(activities)) { if (CollectionUtils.isNotEmpty(activities)) {
......
...@@ -105,7 +105,7 @@ public class OSSFileService { ...@@ -105,7 +105,7 @@ public class OSSFileService {
try { try {
bi = ImageIO.read(bins); bi = ImageIO.read(bins);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); log.error("{}", e.getMessage(), e);
} }
HashMap<String, Integer> attr = new HashMap<>(); HashMap<String, Integer> attr = new HashMap<>();
if (bi != null) { if (bi != null) {
......
...@@ -164,7 +164,7 @@ public class ESHelper { ...@@ -164,7 +164,7 @@ public class ESHelper {
System.out.println(hit.getFields()); System.out.println(hit.getFields());
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} }
System.out.println("done"); System.out.println("done");
......
...@@ -47,9 +47,12 @@ public class ConvertUtil { ...@@ -47,9 +47,12 @@ public class ConvertUtil {
themeQO.setCreateTime(TimeUtils.getTimestampOfDateTime(themeEntity.getCreateTime())); themeQO.setCreateTime(TimeUtils.getTimestampOfDateTime(themeEntity.getCreateTime()));
themeQO.setUpToNowTime(TimeUtils.calUpToNowTime(themeEntity.getCreateTime())); themeQO.setUpToNowTime(TimeUtils.calUpToNowTime(themeEntity.getCreateTime()));
themeQO.setFormatTime(TimeUtils.format(themeEntity.getCreateTime())); themeQO.setFormatTime(TimeUtils.format(themeEntity.getCreateTime()));
// 屏蔽手机号和邮箱
List<ThemeContentQo> themeContentQos = JsonUtil.toBean(OtherUtil.blockPhoneAndEmail(themeEntity.getContent()), new TypeReference<List<ThemeContentQo>>() { List<ThemeContentQo> themeContentQos = JsonUtil.toBean(themeEntity.getContent(), new TypeReference<List<ThemeContentQo>>() {
}); });
// 屏蔽手机号和邮箱
themeContentQos.stream().filter(o->RelTypeEnum.TEXT.type.equals(o.getType())).forEach(o->o.setValue(OtherUtil.blockPhoneAndEmail(o.getValue())));
themeQO.setContent(themeContentQos); themeQO.setContent(themeContentQos);
return themeQO; return themeQO;
} }
......
...@@ -91,7 +91,6 @@ public class TencentcloudUtils { ...@@ -91,7 +91,6 @@ public class TencentcloudUtils {
} }
} catch (TencentCloudSDKException e) { } catch (TencentCloudSDKException e) {
log.error("调用腾文本内容安全异常"); log.error("调用腾文本内容安全异常");
e.printStackTrace();
//调用失败时,不影响用户发布主题 //调用失败时,不影响用户发布主题
return ""; return "";
} }
...@@ -115,7 +114,6 @@ public class TencentcloudUtils { ...@@ -115,7 +114,6 @@ public class TencentcloudUtils {
} }
} catch (TencentCloudSDKException e) { } catch (TencentCloudSDKException e) {
log.error("调用腾讯图片内容检测异常"); log.error("调用腾讯图片内容检测异常");
e.printStackTrace();
return CommonResp.failed("图片检查异常"); return CommonResp.failed("图片检查异常");
} }
return CommonResp.success(); return CommonResp.success();
...@@ -138,7 +136,7 @@ public class TencentcloudUtils { ...@@ -138,7 +136,7 @@ public class TencentcloudUtils {
System.out.println(Arrays.toString(res.getKeywords())); System.out.println(Arrays.toString(res.getKeywords()));
System.out.println(imgRes.getData()); System.out.println(imgRes.getData());
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment