Compare commits

..

No commits in common. "f848bf9e2a464eb2703d7d0cbb2ca9a8aeb1bca8" and "99a6866c29f5234641274446e9ed6f1948e877c5" have entirely different histories.

12 changed files with 38 additions and 121 deletions

View File

@ -51,27 +51,16 @@ public class AppLoginController {
public R<?> register(@RequestBody RegisterForm registerForm) { public R<?> register(@RequestBody RegisterForm registerForm) {
AppUser appUser = appUserService.selectAppUserByPhone(registerForm.getPhoneNumber()); AppUser appUser = appUserService.selectAppUserByPhone(registerForm.getPhoneNumber());
AppRegister register = appRegisterService.selectAppRegisterByphone(registerForm.getPhoneNumber()); AppRegister register = appRegisterService.selectAppRegisterByphone(registerForm.getPhoneNumber());
Assert.notNull(registerForm.getSchoolId(), "学校id不能为空"); Assert.notNull(registerForm.getSchoolId(), "学校id不能为空");
Assert.isNull(appUser, "手机号已注册"); Assert.isNull(appUser, "手机号已注册");
Assert.isNull(register, "手机号已提交审核,请勿多次提交");
if (register != null && register.getStatus() != null) { // if (StringUtils.isNotEmpty(registerForm.getEmail())) {
//
// }
switch (register.getStatus()) {
case 0:
return R.fail(201, "注册失败,您的账号正在审核中!");
case 1:
return R.fail(201, "您的账号已通过");
case 2:
return R.fail(201, "注册失败,您的账号已被驳回!");
}
}
AppRegister appRegister = setAppRegister(registerForm); AppRegister appRegister = setAppRegister(registerForm);
appRegister.setInvitationCode(registerForm.getInvitationCode()); appRegister.setInvitationCode(registerForm.getInvitationCode());
int i = appRegisterService.insertAppRegister(appRegister); int i = appRegisterService.insertAppRegister(appRegister);
// redisService.deleteObject(registerForm.getPhoneNumber());
Assert.isTrue(i > 0, "注册失败"); Assert.isTrue(i > 0, "注册失败");
return R.ok(null,"注册成功,请等待审核结果!"); return R.ok(null,"注册成功,请等待审核结果!");
} }

View File

@ -96,10 +96,10 @@ public class AppRegisterController extends BaseController
return toAjax(appRegisterService.passAppRegister(id)); return toAjax(appRegisterService.passAppRegister(id));
} }
@PostMapping("/reject") @GetMapping("/reject")
public AjaxResult reject(@RequestBody AppRegister appRegister) public AjaxResult reject(@RequestParam("id") Long id)
{ {
return toAjax(appRegisterService.rejectAppRegister(appRegister)); return toAjax(appRegisterService.rejectAppRegister(id));
} }
} }

View File

@ -41,6 +41,4 @@ public class AppUserDataVo
@Excel(name = "粉丝数量") @Excel(name = "粉丝数量")
private long fansNum; private long fansNum;
private Long userId;
} }

View File

@ -1,6 +1,5 @@
package com.ruoyi.app.form; package com.ruoyi.app.form;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -35,7 +34,4 @@ public class RegisterForm {
@ApiModelProperty("学校证明") @ApiModelProperty("学校证明")
private String prove; private String prove;
@JsonIgnore
private Integer status;
} }

View File

@ -62,7 +62,7 @@ public interface IAppRegisterService
int passAppRegister(Long id); int passAppRegister(Long id);
int rejectAppRegister( AppRegister appRegister); int rejectAppRegister(Long id);
AppRegister selectAppRegisterByphone(String phoneNumber); AppRegister selectAppRegisterByphone(String phoneNumber);

View File

@ -10,7 +10,6 @@ import com.ruoyi.app.domain.vo.AppRegisterVo;
import com.ruoyi.app.mapper.AppSchoolMapper; import com.ruoyi.app.mapper.AppSchoolMapper;
import com.ruoyi.app.mapper.AppUserMapper; import com.ruoyi.app.mapper.AppUserMapper;
import com.ruoyi.common.core.utils.DateUtils; import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.core.utils.bean.BeanUtils; import com.ruoyi.common.core.utils.bean.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -138,15 +137,12 @@ public class AppRegisterServiceImpl implements IAppRegisterService
} }
@Override @Override
public int rejectAppRegister(AppRegister appRegister) { public int rejectAppRegister(Long id) {
AppRegister register = appRegisterMapper.selectAppRegisterById(appRegister.getId()); AppRegister appRegister = appRegisterMapper.selectAppRegisterById(id);
Assert.isTrue(register != null, "该申请不存在"); Assert.isTrue(appRegister != null, "该申请不存在");
assert register != null; assert appRegister != null;
Assert.isTrue(appRegister.getStatus() == 0, "该申请已驳回"); Assert.isTrue(appRegister.getStatus() == 0, "该申请已驳回");
if (StringUtils.isNotEmpty(appRegister.getRemark())) { appRegister.setStatus(2);
register.setStatus(appRegister.getStatus());
register.setRemark(appRegister.getRemark());
}
appRegister.setUpdateTime(DateUtils.getNowDate()); appRegister.setUpdateTime(DateUtils.getNowDate());
return appRegisterMapper.updateAppRegister(appRegister); return appRegisterMapper.updateAppRegister(appRegister);
} }

View File

@ -177,9 +177,8 @@ public class AppUserDynamicServiceImpl implements IAppUserDynamicService
AppUserCollect appUserCollect = new AppUserCollect(); AppUserCollect appUserCollect = new AppUserCollect();
appUserCollect.setDynamicId(id); appUserCollect.setDynamicId(id);
appUserCollect.setUserId(appUserDynamic.getAppId());
List<AppUserCollect> appUserCollects = appUserCollectMapper.selectAppUserCollectList(appUserCollect); List<AppUserCollect> appUserCollects = appUserCollectMapper.selectAppUserCollectList(appUserCollect);
if (CollectionUtils.isEmpty(appUserCollects)) { if (CollectionUtils.isNotEmpty(appUserCollects)){
appUserDynamicVo.setIsCollect(1); appUserDynamicVo.setIsCollect(1);
} }

View File

@ -1,14 +1,5 @@
import request from '@/utils/request' import request from '@/utils/request'
// 查询App用户动态列表
export function treeDynamic(query) {
return request({
url: '/app/comment/treeList',
method: 'get',
params: query
})
}
// 查询App用户动态列表 // 查询App用户动态列表
export function listDynamic(query) { export function listDynamic(query) {
return request({ return request({

View File

@ -17,11 +17,11 @@ export function passRegister(id) {
}) })
} }
export function rejectRegister(data) { export function rejectRegister(id) {
return request({ return request({
url: '/app/register/reject', url: '/app/register/reject',
data: data, params: { id: id },
method: 'post' method: 'get'
}) })
} }

View File

@ -1,6 +0,0 @@
<!-- 动态详情 -->
<template>
<div>
这是动态详情页面
</div>
</template>

View File

@ -72,36 +72,20 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="dynamicList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="dynamicList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="" align="center" prop="id" />
<el-table-column label="用户名" align="center" prop="username" /> <el-table-column label="用户名" align="center" prop="username" />
<el-table-column label="关联话题" align="center"> <!-- <el-table-column label="内容" align="center" prop="content" />-->
<template slot-scope="scope"> <el-table-column label="视频地址" align="center" prop="videoUrl" />
<el-tag v-for="(topic, index) in scope.row.appTopicList" :key="index"> <el-table-column label="关联话题" align="center" prop="topicId" />
{{ topic.name }} <el-table-column label="地区" align="center" prop="address" />
</el-tag> <el-table-column label="隐私状态" align="center" prop="privacyStatus" />
</template> <el-table-column label="备注" align="center" prop="remark" />
</el-table-column> <el-table-column label="更新人" align="center" prop="updateBy" />
<el-table-column label="地区" align="center" prop="cityName" /> <el-table-column label="是否置顶" align="center" prop="isTop" />
<el-table-column label="置顶" align="center" key="isTop" prop="isTop">
<template slot-scope="scope">
<el-switch
v-model="scope.row.isTop"
active-value="0"
active-color="#13ce66"
inactive-color="#ff4949"
inactive-value="1"
></el-switch>
</template>
</el-table-column>
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleDetail(scope.row)"
>详情</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -162,7 +146,7 @@
</template> </template>
<script> <script>
import { listDynamic, getDynamic, delDynamic, addDynamic, updateDynamic , treeDynamic } from "@/api/app/dynamic"; import { listDynamic, getDynamic, delDynamic, addDynamic, updateDynamic } from "@/api/app/dynamic";
export default { export default {
name: "Dynamic", name: "Dynamic",
@ -199,9 +183,6 @@ export default {
updateBy: null, updateBy: null,
isTop: null isTop: null
}, },
treeParam: {
dynamicId:''
},
// //
form: {}, form: {},
// //
@ -262,22 +243,6 @@ export default {
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 详情按钮操作 跳转到新页面*/
handleDetail(row) {
const id = row.id || row.ids;
this.$router.push({path: '/app/dynamic/detail'});
this.queryParams.dynamicId = id;
treeDynamic(this.queryParams).then(response => {
this.form = response.data;
this.open = true;
this.title = "App用户动态详情";
});
},
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();

View File

@ -139,7 +139,7 @@
<el-table-column label="地址" align="center" prop="address"/> <el-table-column label="地址" align="center" prop="address"/>
<el-table-column label="学校" align="center" prop="schoolName"/> <el-table-column label="学校" align="center" prop="schoolName"/>
<el-table-column label="邮箱" align="center" prop="email"/> <el-table-column label="邮箱" align="center" prop="email"/>
<el-table-column label="操作" align="center" prop="status" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 状态为0时显示 为1时显示已通过为2时显示已驳回并且不可点击--> <!-- 状态为0时显示 为1时显示已通过为2时显示已驳回并且不可点击-->
<el-button <el-button
@ -171,25 +171,18 @@
size="mini" size="mini"
type="error" type="error"
icon="el-icon-finished" icon="el-icon-finished"
@click="handleUpdate(scope.row)" @click="handleReject(scope.row)"
>驳回 >驳回
</el-button> </el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="error"-->
<!-- icon="el-icon-finished"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- >删除</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="驳回原因" prop="remark">
<el-input v-model="form.remark" placeholder="请输入驳回原因" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<pagination <pagination
v-show="total>0" v-show="total>0"
@ -249,11 +242,8 @@ export default {
}, },
// //
form: {}, form: {},
//
rejectForm: {},
// //
rules: {}, rules: {},
showDialog: false,
schoolOptions: [] schoolOptions: []
}; };
}, },
@ -335,9 +325,8 @@ export default {
const id = row.id || this.ids const id = row.id || this.ids
getRegister(id).then(response => { getRegister(id).then(response => {
this.form = response.data; this.form = response.data;
this.form.status = 2;
this.open = true; this.open = true;
this.title = "驳回审核"; this.title = "修改注册审核";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */