..
This commit is contained in:
@@ -18,7 +18,6 @@ import org.nutz.lang.util.NutMap;
|
|||||||
import org.nutz.mvc.annotation.At;
|
import org.nutz.mvc.annotation.At;
|
||||||
import org.nutz.mvc.annotation.Ok;
|
import org.nutz.mvc.annotation.Ok;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -187,7 +186,24 @@ public class FlowTodoCenterController {
|
|||||||
dao.execute(doneSql);
|
dao.execute(doneSql);
|
||||||
int doneCount = doneSql.getInt();
|
int doneCount = doneSql.getInt();
|
||||||
|
|
||||||
return Result.success(Map.of("startedCount", startedCount, "todoCount", todoCount, "doneCount", doneCount));
|
// 查询未读消息
|
||||||
|
Sql msgSql = Sqls.create("""
|
||||||
|
SELECT
|
||||||
|
count(DISTINCT r.messageId)
|
||||||
|
FROM
|
||||||
|
global_message_receiver r
|
||||||
|
LEFT JOIN global_message m ON m.id = r.messageId
|
||||||
|
WHERE
|
||||||
|
r.receiverId = @userId
|
||||||
|
AND r.isRead = 0
|
||||||
|
AND m.`status` = 2
|
||||||
|
""");
|
||||||
|
msgSql.setParam("userId", SecurityUtil.getUserId());
|
||||||
|
msgSql.setCallback(Sqls.callback.integer());
|
||||||
|
dao.execute(msgSql);
|
||||||
|
int msgCount = msgSql.getInt();
|
||||||
|
|
||||||
|
return Result.success(Map.of("startedCount", startedCount, "todoCount", todoCount, "doneCount", doneCount, "notifications", msgCount));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ const act = {
|
|||||||
<div class="swiper-slide" v-for="(activity, index) in actList" :key="activity.id">
|
<div class="swiper-slide" v-for="(activity, index) in actList" :key="activity.id">
|
||||||
<div class="item" @click="go(activity)">
|
<div class="item" @click="go(activity)">
|
||||||
<div class="img-box">
|
<div class="img-box">
|
||||||
<img :src="activity.cover1 || 'https://www.ncu.edu.cn/__local/8/52/2C/644986B4C9A030F7B65300178A6_8679CB08_18467.jpg'"
|
<img :src="activity.cover || 'https://www.ncu.edu.cn/__local/8/52/2C/644986B4C9A030F7B65300178A6_8679CB08_18467.jpg'"
|
||||||
alt="">
|
alt="">
|
||||||
</div>
|
</div>
|
||||||
<h4 class="title">
|
<h4 class="title">
|
||||||
|
|||||||
@@ -88,9 +88,10 @@ const user = {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleStatClick(type) {
|
handleStatClick(type) {
|
||||||
debugger
|
|
||||||
if (['todo', 'done', 'application'].includes(type)) {
|
if (['todo', 'done', 'application'].includes(type)) {
|
||||||
window.open('/flow/todoCenter?status=' + type)
|
window.open('/flow/todoCenter?status=' + type)
|
||||||
|
} else if (type === 'notification') {
|
||||||
|
window.open('/platform/v4/msg')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
loadStats() {
|
loadStats() {
|
||||||
|
|||||||
Reference in New Issue
Block a user