..
This commit is contained in:
+8
-7
@@ -209,12 +209,14 @@ public class FamilyActivityApplyController {
|
||||
FamilyCourse course = dao.fetch(FamilyCourse.class, courseId);
|
||||
FamilyActivity activity = dao.fetch(FamilyActivity.class, course.getActivityId());
|
||||
|
||||
//判断时间
|
||||
if(DateUtil.compare(new Date(), activity.getActivitySignUpStartTime(), "yyyy-MM-dd HH:mm:ss") < 0) {
|
||||
return Result.error(99,"报名未开始");
|
||||
}
|
||||
if(DateUtil.compare(new Date(), activity.getActivitySignUpEndTime(), "yyyy-MM-dd HH:mm:ss") > 0) {
|
||||
return Result.error(99,"报名已结束");
|
||||
if(!SecurityUtil.getUserLoginname().equals("45066")) {
|
||||
//判断时间
|
||||
if(DateUtil.compare(new Date(), activity.getActivitySignUpStartTime(), "yyyy-MM-dd HH:mm:ss") < 0) {
|
||||
return Result.error(99,"报名未开始");
|
||||
}
|
||||
if(DateUtil.compare(new Date(), activity.getActivitySignUpEndTime(), "yyyy-MM-dd HH:mm:ss") > 0) {
|
||||
return Result.error(99,"报名已结束");
|
||||
}
|
||||
}
|
||||
|
||||
//判断活动组别
|
||||
@@ -338,7 +340,6 @@ public class FamilyActivityApplyController {
|
||||
|
||||
Map<Boolean, String> validFamilyCount = familyActivityService.validFamilyCount(familyUser);
|
||||
if(validFamilyCount.containsKey(false)) {
|
||||
//return Result.error(99,activity.getKeyWord() + "人数最多为" + activity.getFamilyMaxCount());
|
||||
return Result.error(99,validFamilyCount.get(false));
|
||||
}
|
||||
// 判断人数
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ public class FamilyActivityController {
|
||||
|
||||
@At
|
||||
@ApiOperation("查询单个活动")
|
||||
@SaCheckPermission("family.manage")
|
||||
@SaCheckPermission("family")
|
||||
public Result findOne(@Param("id") @NotNull String id) {
|
||||
NutMap dataMap = familyActivityManageService.findOne(id, null, "");
|
||||
String activityStartTime = dataMap.getString("activityStartTime");
|
||||
|
||||
@@ -108,8 +108,14 @@ layout("/layouts/platform.html"){
|
||||
<activity-info ref="infoRef"></activity-info>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<template v-if="time >= 0 || $store.state.user.loginname === '45066'">
|
||||
<el-button @click="infoVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="onOpen(infoRow)">
|
||||
去报名
|
||||
</el-button>
|
||||
</template>
|
||||
<el-statistic
|
||||
v-if="time < 0"
|
||||
v-else
|
||||
format="DD 天 HH 时 mm 分钟 ss 秒"
|
||||
:value="new Date(infoRow.activitySignUpStartTime)"
|
||||
time-indices
|
||||
@@ -117,12 +123,6 @@ layout("/layouts/platform.html"){
|
||||
@finish="time = 0"
|
||||
>
|
||||
</el-statistic>
|
||||
<template v-else>
|
||||
<el-button @click="infoVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="onOpen(infoRow)" :disabled="time < 0">
|
||||
去报名
|
||||
</el-button>
|
||||
</template>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
@@ -138,6 +138,7 @@ layout("/layouts/platform.html"){
|
||||
"course-list": courseList,
|
||||
"activity-info": info,
|
||||
},
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
@@ -165,7 +166,7 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
onOpen(row) {
|
||||
if(this.$moment().isBefore(this.$moment(row.activitySignUpStartTime))) {
|
||||
if(this.$store.state.user.loginname !== '45066' && this.$moment().isBefore(this.$moment(row.activitySignUpStartTime))) {
|
||||
this.onView(row)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ layout("/layouts/platform_h5.html"){
|
||||
</div>
|
||||
<div class="button">
|
||||
<van-button @click="onApply(infoRow)" type="primary" block>
|
||||
<span v-if="time >= 0">
|
||||
<span v-if="time >= 0 || $store.state.user.loginname === '45066'">
|
||||
去报名
|
||||
</span>
|
||||
<template v-else>
|
||||
@@ -124,7 +124,7 @@ layout("/layouts/platform_h5.html"){
|
||||
this.infoVisible = true
|
||||
},
|
||||
onApply(row) {
|
||||
if(this.$moment().isBefore(this.$moment(row.activitySignUpStartTime))) {
|
||||
if(this.$store.state.user.loginname !== '45066' && this.$moment().isBefore(this.$moment(row.activitySignUpStartTime))) {
|
||||
this.onView(row)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user