commit
This commit is contained in:
+9
-5
@@ -144,7 +144,8 @@ public class ActivityUnionApplyUserController {
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions(value = {"activity.club.applyUser", "activity.union.applyUser", "activity.school.applyUser"}, logical = Logical.OR)
|
||||
public Object selfUnionUsers(String groupId) {
|
||||
public Object selfUnionUsers(String groupId,String tissueId) {
|
||||
ActivityTissue tissue = baseService.dao().fetch(ActivityTissue.class, Cnd.where("id", "=", tissueId));
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
u.id,
|
||||
@@ -160,7 +161,9 @@ public class ActivityUnionApplyUserController {
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||
if (tissue.getSignUpMethod() != 3 && tissue.getType() != 40003) {
|
||||
cnd.and("u.unionId", "=", Vi.getUnionId());
|
||||
}
|
||||
cnd.and("aus.groupId", "=", groupId);
|
||||
cnd.groupBy("u.id");
|
||||
cnd.asc("u.unitname").asc("u.unionname");
|
||||
@@ -173,7 +176,6 @@ public class ActivityUnionApplyUserController {
|
||||
@ViReturn
|
||||
@RequiresPermissions(value = {"activity.club.applyUser", "activity.union.applyUser", "activity.school.applyUser"}, logical = Logical.OR)
|
||||
public Object getReportedUser(String tissueId) {
|
||||
ActivityTissue tissue = baseService.dao().fetch(ActivityTissue.class, Cnd.where("id", "=", tissueId));
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
atp.userId
|
||||
@@ -184,9 +186,11 @@ public class ActivityUnionApplyUserController {
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("atp.tissueId", "=", tissueId);
|
||||
if (tissue.getSignUpMethod() != 3 && tissue.getType() != 40003) {
|
||||
cnd.and("atp.applyUserId", "=", ShiroUtil.getUserId());
|
||||
/* if (tissue.getSignUpMethod() != 3 && tissue.getType() != 40003) {
|
||||
cnd.and("u.unionid", "=", Vi.getUnionId());
|
||||
}
|
||||
}*/
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> list = baseService.listMap(sql);
|
||||
List<String> userIds = list.stream().map(v -> v.getString("userId")).collect(Collectors.toList());
|
||||
return userIds;
|
||||
|
||||
@@ -67,4 +67,4 @@ window.activity = {
|
||||
return false
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ layout("/layouts/platform.html"){
|
||||
<template
|
||||
scope="{row:{close,applyStartTime,applyEndTime,startTime,endTime,isSave}}"
|
||||
v-else-if="column.prop=='state'">
|
||||
<div v-html="activity.school.getStatus(close,applyStartTime,applyEndTime,startTime,endTime,isSave)"></div>
|
||||
<div v-html="getStatus(close,applyStartTime,applyEndTime,startTime,endTime,isSave)"></div>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
@@ -215,7 +215,6 @@ layout("/layouts/platform.html"){
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let E = window.wangEditor
|
||||
const editors = {}
|
||||
@@ -280,6 +279,25 @@ layout("/layouts/platform.html"){
|
||||
'open-qr-code': httpVueLoader('/components/plugins/OpenQRCode.vue'),
|
||||
},
|
||||
methods: {
|
||||
getStatus(close, applyStartTime, applyEndTime, startTime, endTime) {
|
||||
if (close) {
|
||||
return `<span class="text-danger">活动已关闭</span>`
|
||||
}
|
||||
const now = moment().valueOf()
|
||||
const dateNow = moment(moment(moment().format('YYYY-MM-DD')).valueOf()).valueOf()
|
||||
|
||||
if (now < moment(applyStartTime).valueOf()) {
|
||||
return `<span class="text-info">未开始报名</span>`
|
||||
} else if (moment(applyStartTime).valueOf() <= now && now <= moment(applyEndTime).valueOf()) {
|
||||
return `<span class="text-success">活动报名中</span>`
|
||||
} else if (moment(applyEndTime).valueOf() < now && now < moment(startTime).valueOf()) {
|
||||
return `<span class="text-info">报名已结束</span>`
|
||||
} else if (moment(startTime).valueOf() < now && now < moment(endTime).valueOf()) {
|
||||
return `<span class="text-primary">活动进行中</span>`
|
||||
} else if (moment(endTime).valueOf() < now) {
|
||||
return `<span class="text-danger">活动已结束</span>`
|
||||
}
|
||||
},
|
||||
async activityStatusChange(row, val) {
|
||||
const resp = await $.get('/platform/activity/school/info/mange/activityStatusChange', {
|
||||
id: row.id,
|
||||
|
||||
@@ -273,7 +273,8 @@
|
||||
this.tableLoading = true
|
||||
this.$refs.guava.edit()
|
||||
const { data } = await $.get("/platform/activity/applyUser/selfUnionUsers", {
|
||||
groupId: row.groupId
|
||||
groupId: row.groupId,
|
||||
tissueId: row.id
|
||||
})
|
||||
this.leftData = data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user