记得上下班打卡 | git大法好,push需谨慎

Commit 475a7fb5 authored by jiangxiulong's avatar jiangxiulong

Merge branch 'dev' into test

parents ac5d4ab4 82ee3f0b
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
function getPerformanceTitle() { function getPerformanceTitle() {
var testBsSuggest = $("#suggest-demo-2").bsSuggest({ var testBsSuggest = $("#suggest-demo-2").bsSuggest({
url: prefix + "/performance/status?status=(3,6,7)&title=" + document.getElementById("suggest-demo-2").value, url: prefix + "/performance/status?status=(3,6,7,9,10)&title=" + document.getElementById("suggest-demo-2").value,
showBtn: false, showBtn: false,
idField: "performancesId", idField: "performancesId",
keyField: "title" keyField: "title"
...@@ -59,4 +59,4 @@ ...@@ -59,4 +59,4 @@
} }
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -45,16 +45,16 @@ ...@@ -45,16 +45,16 @@
function getPerformanceTitle() { function getPerformanceTitle() {
var testBsSuggest = $("#suggest-demo-2").bsSuggest({ var testBsSuggest = $("#suggest-demo-2").bsSuggest({
url: prefix + "/performance/status?status=(3,6,7)&title=" + document.getElementById("suggest-demo-2").value, url: prefix + "/performance/status?status=(3,6,7,9,10)&title=" + document.getElementById("suggest-demo-2").value,
showBtn: false, showBtn: false,
idField: "performancesId", idField: "performancesId",
keyField: "title" keyField: "title"
}).on('onDataRequestSuccess', function (e, result) { }).on('onDataRequestSuccess', function (e, result) {
}).on('onSetSelectValue', function (e, keyword) { }).on('onSetSelectValue', function (e, keyword) {
document.getElementsByName("ids")[0].value=keyword.id; document.getElementsByName("ids")[0].value = keyword.id;
}).on('onUnsetSelectValue', function (e) { }).on('onUnsetSelectValue', function (e) {
}); });
} }
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -25,6 +25,7 @@ import org.springframework.data.mongodb.core.query.BasicQuery; ...@@ -25,6 +25,7 @@ import org.springframework.data.mongodb.core.query.BasicQuery;
import org.springframework.data.mongodb.core.query.Criteria; import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query; import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
...@@ -81,23 +82,31 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM ...@@ -81,23 +82,31 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
} }
} }
// List<String> ids = Arrays.asList("");
// 推荐 // 推荐
int is_native = 1; int is_native = 1;
int recommend = performancesListNew.size(); int recommend = performancesListNew.size();
List<KylinPerformanceVo> performancesListNewUnqui = new ArrayList<>();
performancesListNewUnqui.addAll(performancesListNew);
if (recommend <= 2) { if (recommend <= 2) {
List<KylinPerformanceVo> performancesListRecommend = dataUtils.getPerformancesListIsSystemRecommend(); List<KylinPerformanceVo> performancesListRecommend = dataUtils.getPerformancesListIsSystemRecommend();
if (performancesListRecommend.size() > 0) {
/*List<KylinPerformanceVo> collect = performancesListRecommend.stream().filter(r -> !ids.contains(r.getPerformancesId())).collect(Collectors.toList());
performancesListNew.addAll(collect);*/
if (CollectionUtils.isEmpty(performancesListRecommend)) {
is_native = 0; is_native = 0;
if(recommend > 0) {// 去重 if(recommend > 0) {// 去重
for(KylinPerformanceVo recommendInfo : performancesListRecommend) { for(KylinPerformanceVo recommendInfo : performancesListRecommend) {
for(KylinPerformanceVo info : performancesListNew) { for(KylinPerformanceVo info : performancesListNew) {
if (!recommendInfo.getPerformancesId().equalsIgnoreCase(info.getPerformancesId())) { if (!recommendInfo.getPerformancesId().equals(info.getPerformancesId())) {
performancesListNew.add(recommendInfo); performancesListNewUnqui.add(recommendInfo);
} }
} }
} }
} else { } else {
performancesListNew.addAll(performancesListRecommend); performancesListNewUnqui.addAll(performancesListRecommend);
} }
} }
} }
...@@ -107,7 +116,7 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM ...@@ -107,7 +116,7 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
info.put("is_native", is_native); // 本地演出少是否推荐了其他演出 0有推荐 1没有 info.put("is_native", is_native); // 本地演出少是否推荐了其他演出 0有推荐 1没有
info.put("recommend", recommend); // 从第几个开始是其他推荐演出 后台设置的那个推荐 info.put("recommend", recommend); // 从第几个开始是其他推荐演出 后台设置的那个推荐
info.put("total", 0); info.put("total", 0);
info.put("list", performancesListNew); info.put("list", performancesListNewUnqui);
return info; return info;
} }
......
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