活动增加报名用户列表

main
王宇航 2024-08-13 18:39:19 +08:00
parent d291747dde
commit a5527ad5f0
5 changed files with 157 additions and 61 deletions

View File

@ -62,6 +62,8 @@ public class AppEvents extends BaseEntity
private Long userId; private Long userId;
private List<AppEventsUser> appEventsUserList;
public void setId(Long id) public void setId(Long id)
{ {

View File

@ -8,109 +8,126 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
/** /**
* app_events_user * app_events_user
* *
* @author wyh * @author wyh
* @date 2024-07-23 * @date 2024-07-23
*/ */
@Data @Data
public class AppEventsUser extends BaseEntity public class AppEventsUser extends BaseEntity {
{
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 话题id */ /**
* id
*/
private Long id; private Long id;
/** 活动id */ /**
* id
*/
@Excel(name = "活动id") @Excel(name = "活动id")
private Long eventsId; private Long eventsId;
/** 负责人 */ /**
*
*/
@Excel(name = "负责人") @Excel(name = "负责人")
private String name; private String name;
/** 公司名称 */ /**
*
*/
@Excel(name = "公司名称") @Excel(name = "公司名称")
private String companyName; private String companyName;
/** 手机号 */ /**
*
*/
@Excel(name = "手机号") @Excel(name = "手机号")
private String phone; private String phone;
/** 微信号 */ /**
*
*/
@Excel(name = "微信号") @Excel(name = "微信号")
private String wechatId; private String wechatId;
private Long userId; private Long userId;
public void setId(Long id) private String userName;
{
private String avatarUrl;
private String nickName;
private String email;
private String company;
private Integer sex;
private String schoolName;
private String education;
public void setId(Long id) {
this.id = id; this.id = id;
} }
public Long getId() public Long getId() {
{
return id; return id;
} }
public void setEventsId(Long eventsId)
{ public void setEventsId(Long eventsId) {
this.eventsId = eventsId; this.eventsId = eventsId;
} }
public Long getEventsId() public Long getEventsId() {
{
return eventsId; return eventsId;
} }
public void setName(String name)
{ public void setName(String name) {
this.name = name; this.name = name;
} }
public String getName() public String getName() {
{
return name; return name;
} }
public void setCompanyName(String companyName)
{ public void setCompanyName(String companyName) {
this.companyName = companyName; this.companyName = companyName;
} }
public String getCompanyName() public String getCompanyName() {
{
return companyName; return companyName;
} }
public void setPhone(String phone)
{ public void setPhone(String phone) {
this.phone = phone; this.phone = phone;
} }
public String getPhone() public String getPhone() {
{
return phone; return phone;
} }
public void setWechatId(String wechatId)
{ public void setWechatId(String wechatId) {
this.wechatId = wechatId; this.wechatId = wechatId;
} }
public String getWechatId() public String getWechatId() {
{
return wechatId; return wechatId;
} }
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("eventsId", getEventsId()) .append("eventsId", getEventsId())
.append("name", getName()) .append("name", getName())
.append("companyName", getCompanyName()) .append("companyName", getCompanyName())
.append("phone", getPhone()) .append("phone", getPhone())
.append("wechatId", getWechatId()) .append("wechatId", getWechatId())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())
.append("updateBy", getUpdateBy()) .append("updateBy", getUpdateBy())
.append("remark", getRemark()) .append("remark", getRemark())
.toString(); .toString();
} }
} }

View File

@ -37,7 +37,12 @@ public class AppEventsServiceImpl implements IAppEventsService
@Override @Override
public AppEvents selectAppEventsById(Long id) public AppEvents selectAppEventsById(Long id)
{ {
return appEventsMapper.selectAppEventsById(id); AppEvents appEvents = appEventsMapper.selectAppEventsById(id);
AppEventsUser appEventsUser = new AppEventsUser();
appEventsUser.setEventsId(appEvents.getId());
List<AppEventsUser> appEventsUsers = appEventsUserMapper.selectAppEventsUserList(appEventsUser);
appEvents.setAppEventsUserList(appEventsUsers);
return appEvents;
} }
/** /**

View File

@ -24,7 +24,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<select id="selectAppEventsUserList" parameterType="AppEventsUser" resultMap="AppEventsUserResult"> <select id="selectAppEventsUserList" parameterType="AppEventsUser" resultMap="AppEventsUserResult">
<include refid="selectAppEventsUserVo"/> select aev.id,
aev.events_id,
aev.name,
aev.company_name,
aev.phone,
aev.wechat_id,
aev.create_time,
aev.update_time,
aev.create_by,
aev.updateBy,
aev.remark,
aev.user_id,
au.avatar_url as avatarUrl,
au.nickName as nickName,
au.email as email,
au.company_name as company,
au.sex as sex,
au.education as education,
au.address as address,
`as`.name as schoolName
from app_events_user aev
left join app_user au on aev.user_id = au.id
left join app_school `as` on au.school = `as`.id
<where> <where>
<if test="eventsId != null "> and events_id = #{eventsId}</if> <if test="eventsId != null "> and events_id = #{eventsId}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>

View File

@ -66,12 +66,12 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button--> <el-button
<!-- size="mini"--> size="mini"
<!-- type="text"--> type="text"
<!-- icon="el-icon-info"--> icon="el-icon-info"
<!-- @click="handleDetail(scope.row)"--> @click="handleShow(scope.row)"
<!-- >详情</el-button>--> >详情</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -150,6 +150,37 @@
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog class="table" :title="title" :visible.sync="show" width="1500px" append-to-body>
<el-table v-loading="loading" :data="userFrom">
<el-table-column label="用户名" align="center" prop="name" />
<el-table-column
prop="avatarUrl"
header-align="center"
align="center"
label="头像"
>
<template slot-scope="scope" class="demo-image__preview">
<img
:src="scope.row.avatarUrl"
width="40"
height="40"
class="head_pic"
/>
</template>
</el-table-column>
<el-table-column label="昵称" align="center" prop="nickName" />
<el-table-column label="邮箱" align="center" prop="email" />
<el-table-column label="电话" align="center" prop="phone" />
<el-table-column label="性别" align="center" prop="sex" >
<template slot-scope="scope">
{{ scope.row.sex == 0 ? '男' : scope.row.sex == 1 ? '女' : '未知' }}
</template>
</el-table-column>
<el-table-column label="公司" align="center" prop="company" />
<el-table-column label="学校" align="center" prop="schoolName" />
<el-table-column label="学历" align="center" prop="education" />
</el-table>
</el-dialog>
</div> </div>
</template> </template>
@ -179,6 +210,8 @@ export default {
title: "", title: "",
// //
open: false, open: false,
show: false,
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -197,6 +230,8 @@ export default {
form: { form: {
type: 0, type: 0,
}, },
userFrom:[],
// //
rules: { rules: {
title: [ title: [
@ -315,14 +350,26 @@ export default {
return isJPG && isLt5M; return isJPG && isLt5M;
}, },
handleDetail(row){ // handleDetail(row){
this.reset(); // this.reset();
// const id = row.id || this.ids
// this.$router.push({
// path: "/appData/events_detail",
// query: {
// id,
// },
// });
// },
handleShow(row){
this.show = true;
this.reset()
const id = row.id || this.ids const id = row.id || this.ids
this.$router.push({ getEvents(id).then(response => {
path: "/appData/events_detail", this.userFrom = response.data.appEventsUserList;
query: { console.log(this.userFrom);
id, }).catch(error => {
}, this.$message.error(error);
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
@ -389,4 +436,6 @@ export default {
height: 178px; height: 178px;
display: block; display: block;
} }
</style> </style>