|
|
@@ -185,5 +185,28 @@ public class NewsRepositoryImpl extends AbstractRepository<String, NewsPo,News>
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ public List<String> getScopeUserIdsByNewsId(String newsId) {
|
|
|
+ List<String> userIds = new ArrayList<>();
|
|
|
+ String safeNewsID = "'" + newsId + "'";
|
|
|
+ try {
|
|
|
+ String sql = "SELECT gong_gao_mu_biao_ FROM t_ggfwb WHERE gong_gao_id_ = " + safeNewsID;
|
|
|
+
|
|
|
+ List<Map<String, Object>> resultList = (List<Map<String, Object>>) commonDao.query(sql, new Object[]{newsId});
|
|
|
+
|
|
|
+ if (resultList != null && !resultList.isEmpty()) {
|
|
|
+ for (Map<String, Object> row : resultList) {
|
|
|
+ // 从 Map 中获取 "gong_gao_mu_biao_" 字段的值
|
|
|
+ Object val = row.get("gong_gao_mu_biao_");
|
|
|
+ if (val != null) {
|
|
|
+ userIds.add(String.valueOf(val));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ return userIds;
|
|
|
+ }
|
|
|
}
|