parent
cf373589a5
commit
19fe7a6665
@ -0,0 +1,91 @@
|
||||
package com.ruoyi.zhiyuanzhe.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.zhiyuanzhe.domain.BReport;
|
||||
|
||||
import com.ruoyi.zhiyuanzhe.domain.request.BReportPageRequest;
|
||||
import com.ruoyi.zhiyuanzhe.domain.response.BReportPageResponse;
|
||||
import com.ruoyi.zhiyuanzhe.service.IBReportService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报名Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-09-21
|
||||
*/
|
||||
@Api(tags = "报名")
|
||||
@RestController
|
||||
@RequestMapping("/zhiyuanzhe/zyzreport")
|
||||
public class BReportController extends BaseController {
|
||||
@Autowired
|
||||
private IBReportService bReportService;
|
||||
|
||||
/**
|
||||
* 分页查询查询报名列表
|
||||
*/
|
||||
@ApiOperation(value = "分页查询查询报名列表",response = BReportPageResponse.class)
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BReportPageRequest req) {
|
||||
startPage();
|
||||
List<BReportPageResponse> list = bReportService.selecAll(req);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出报名列表
|
||||
*/
|
||||
@ApiOperation(value = "导出报名列表")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BReport bReport) {
|
||||
List<BReport> list = bReportService.selectBReportList(bReport);
|
||||
ExcelUtil<BReport> util = new ExcelUtil<BReport>(BReport.class);
|
||||
util.exportExcel(response, list, "报名数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取报名详细信息
|
||||
*/
|
||||
@ApiOperation(value = "获取报名详细信息")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(bReportService.selectBReportById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增报名
|
||||
*/
|
||||
@ApiOperation(value = "新增报名")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BReport bReport) {
|
||||
bReport.setUId(getUserId());
|
||||
return toAjax(bReportService.insertBReport(bReport));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改报名
|
||||
*/
|
||||
@ApiOperation(value = "修改报名")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BReport bReport) {
|
||||
return toAjax(bReportService.updateBReport(bReport));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除报名
|
||||
*/
|
||||
@ApiOperation(value = "删除报名")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(bReportService.deleteBReportByIds(ids));
|
||||
}
|
||||
}
|
@ -1,252 +1,132 @@
|
||||
package com.ruoyi.zhiyuanzhe.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 人标签对象 b_person_tags
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-09-18
|
||||
*/
|
||||
public class BPersonTags extends BaseEntity
|
||||
{
|
||||
@Data
|
||||
@ApiModel("人标签对象")
|
||||
public class BPersonTags extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 编号 */
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/** 用户id */
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ApiModelProperty(value = "用户id")
|
||||
@Excel(name = "用户id")
|
||||
private Long uId;
|
||||
|
||||
/** 年龄 */
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
@ApiModelProperty(value = "年龄")
|
||||
@Excel(name = "年龄")
|
||||
private String ageRange;
|
||||
|
||||
/** 小区 */
|
||||
/**
|
||||
* 小区
|
||||
*/
|
||||
@ApiModelProperty(value = "小区")
|
||||
@Excel(name = "小区")
|
||||
private String housingRange;
|
||||
|
||||
/** 文化程度 */
|
||||
/**
|
||||
* 文化程度
|
||||
*/
|
||||
@ApiModelProperty(value = "文化程度")
|
||||
@Excel(name = "文化程度")
|
||||
private String educationRange;
|
||||
|
||||
/** 兴趣爱好 */
|
||||
/**
|
||||
* 兴趣爱好
|
||||
*/
|
||||
@ApiModelProperty(value = "兴趣爱好")
|
||||
@Excel(name = "兴趣爱好")
|
||||
private String interestRange;
|
||||
|
||||
/** 政治面貌 */
|
||||
/**
|
||||
* 政治面貌
|
||||
*/
|
||||
@ApiModelProperty(value = "政治面貌")
|
||||
@Excel(name = "政治面貌")
|
||||
private String politicalRange;
|
||||
|
||||
/** 性别 */
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
@ApiModelProperty(value = "性别")
|
||||
@Excel(name = "性别")
|
||||
private String sexRange;
|
||||
|
||||
/** 国籍 */
|
||||
/**
|
||||
* 国籍
|
||||
*/
|
||||
@ApiModelProperty(value = "国籍")
|
||||
@Excel(name = "国籍")
|
||||
private String nationalityRange;
|
||||
|
||||
/** 专业类型 */
|
||||
/**
|
||||
* 专业类型
|
||||
*/
|
||||
@ApiModelProperty(value = "专业类型")
|
||||
@Excel(name = "专业类型")
|
||||
private String professionalRange;
|
||||
|
||||
/** 行业类型 */
|
||||
/**
|
||||
* 行业类型
|
||||
*/
|
||||
@ApiModelProperty(value = "行业类型")
|
||||
@Excel(name = "行业类型")
|
||||
private String industryRange;
|
||||
|
||||
/** 院校 */
|
||||
/**
|
||||
* 院校
|
||||
*/
|
||||
@ApiModelProperty(value = "院校")
|
||||
@Excel(name = "院校")
|
||||
private String schoolRange;
|
||||
|
||||
/** 创建者ID */
|
||||
/**
|
||||
* 创建者ID
|
||||
*/
|
||||
@Excel(name = "创建者ID")
|
||||
private Long createId;
|
||||
|
||||
/** 更新者ID */
|
||||
/**
|
||||
* 更新者ID
|
||||
*/
|
||||
@Excel(name = "更新者ID")
|
||||
private Long updateId;
|
||||
|
||||
/** 用户权限id */
|
||||
/**
|
||||
* 用户权限id
|
||||
*/
|
||||
@Excel(name = "用户权限id")
|
||||
private Long userId;
|
||||
|
||||
/** 部门权限id */
|
||||
/**
|
||||
* 部门权限id
|
||||
*/
|
||||
@Excel(name = "部门权限id")
|
||||
private Long deptId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setuId(Long uId)
|
||||
{
|
||||
this.uId = uId;
|
||||
}
|
||||
|
||||
public Long getuId()
|
||||
{
|
||||
return uId;
|
||||
}
|
||||
public void setAgeRange(String ageRange)
|
||||
{
|
||||
this.ageRange = ageRange;
|
||||
}
|
||||
|
||||
public String getAgeRange()
|
||||
{
|
||||
return ageRange;
|
||||
}
|
||||
public void setHousingRange(String housingRange)
|
||||
{
|
||||
this.housingRange = housingRange;
|
||||
}
|
||||
|
||||
public String getHousingRange()
|
||||
{
|
||||
return housingRange;
|
||||
}
|
||||
public void setEducationRange(String educationRange)
|
||||
{
|
||||
this.educationRange = educationRange;
|
||||
}
|
||||
|
||||
public String getEducationRange()
|
||||
{
|
||||
return educationRange;
|
||||
}
|
||||
public void setInterestRange(String interestRange)
|
||||
{
|
||||
this.interestRange = interestRange;
|
||||
}
|
||||
|
||||
public String getInterestRange()
|
||||
{
|
||||
return interestRange;
|
||||
}
|
||||
public void setPoliticalRange(String politicalRange)
|
||||
{
|
||||
this.politicalRange = politicalRange;
|
||||
}
|
||||
|
||||
public String getPoliticalRange()
|
||||
{
|
||||
return politicalRange;
|
||||
}
|
||||
public void setSexRange(String sexRange)
|
||||
{
|
||||
this.sexRange = sexRange;
|
||||
}
|
||||
|
||||
public String getSexRange()
|
||||
{
|
||||
return sexRange;
|
||||
}
|
||||
public void setNationalityRange(String nationalityRange)
|
||||
{
|
||||
this.nationalityRange = nationalityRange;
|
||||
}
|
||||
|
||||
public String getNationalityRange()
|
||||
{
|
||||
return nationalityRange;
|
||||
}
|
||||
public void setProfessionalRange(String professionalRange)
|
||||
{
|
||||
this.professionalRange = professionalRange;
|
||||
}
|
||||
|
||||
public String getProfessionalRange()
|
||||
{
|
||||
return professionalRange;
|
||||
}
|
||||
public void setIndustryRange(String industryRange)
|
||||
{
|
||||
this.industryRange = industryRange;
|
||||
}
|
||||
|
||||
public String getIndustryRange()
|
||||
{
|
||||
return industryRange;
|
||||
}
|
||||
public void setSchoolRange(String schoolRange)
|
||||
{
|
||||
this.schoolRange = schoolRange;
|
||||
}
|
||||
|
||||
public String getSchoolRange()
|
||||
{
|
||||
return schoolRange;
|
||||
}
|
||||
public void setCreateId(Long createId)
|
||||
{
|
||||
this.createId = createId;
|
||||
}
|
||||
|
||||
public Long getCreateId()
|
||||
{
|
||||
return createId;
|
||||
}
|
||||
public void setUpdateId(Long updateId)
|
||||
{
|
||||
this.updateId = updateId;
|
||||
}
|
||||
|
||||
public Long getUpdateId()
|
||||
{
|
||||
return updateId;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setDeptId(Long deptId)
|
||||
{
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public Long getDeptId()
|
||||
{
|
||||
return deptId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("uId", getuId())
|
||||
.append("ageRange", getAgeRange())
|
||||
.append("housingRange", getHousingRange())
|
||||
.append("educationRange", getEducationRange())
|
||||
.append("interestRange", getInterestRange())
|
||||
.append("politicalRange", getPoliticalRange())
|
||||
.append("sexRange", getSexRange())
|
||||
.append("nationalityRange", getNationalityRange())
|
||||
.append("professionalRange", getProfessionalRange())
|
||||
.append("industryRange", getIndustryRange())
|
||||
.append("schoolRange", getSchoolRange())
|
||||
.append("createId", getCreateId())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateId", getUpdateId())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("userId", getUserId())
|
||||
.append("deptId", getDeptId())
|
||||
.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
String[] ages;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,60 @@
|
||||
package com.ruoyi.zhiyuanzhe.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 报名对象 b_report
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-09-21
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("报名对象")
|
||||
public class BReport extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@Excel(name = "用户id")
|
||||
private Long uId;
|
||||
|
||||
/**
|
||||
* 活动id
|
||||
*/
|
||||
@Excel(name = "活动id")
|
||||
private Long activityId;
|
||||
|
||||
/**
|
||||
* 创建者ID
|
||||
*/
|
||||
@Excel(name = "创建者ID")
|
||||
private Long createId;
|
||||
|
||||
/**
|
||||
* 更新者ID
|
||||
*/
|
||||
@Excel(name = "更新者ID")
|
||||
private Long updateId;
|
||||
|
||||
/**
|
||||
* 用户权限id
|
||||
*/
|
||||
@Excel(name = "用户权限id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 部门权限id
|
||||
*/
|
||||
@Excel(name = "部门权限id")
|
||||
private Long deptId;
|
||||
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.ruoyi.zhiyuanzhe.domain.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 分页查询积分获取请求类
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("分页查询积分获取请求类")
|
||||
public class BActivityPointsRequest {
|
||||
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
|
||||
|
||||
/**
|
||||
* 活动名称
|
||||
*/
|
||||
@ApiModelProperty("活动名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* size
|
||||
*/
|
||||
@ApiModelProperty("size")
|
||||
private int pageSize;
|
||||
|
||||
|
||||
/**
|
||||
* num
|
||||
*/
|
||||
@ApiModelProperty("num")
|
||||
private int pageNum;
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.ruoyi.zhiyuanzhe.domain.request;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 一次性活动证书发放管理列表请求类
|
||||
*/
|
||||
@Data
|
||||
public class BCertificatesRequest {
|
||||
|
||||
/**
|
||||
* 活动名称
|
||||
*/
|
||||
@ApiModelProperty(value = "活动名称")
|
||||
private String name;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* size
|
||||
*/
|
||||
@ApiModelProperty("size")
|
||||
private int pageSize;
|
||||
|
||||
|
||||
/**
|
||||
* num
|
||||
*/
|
||||
@ApiModelProperty("num")
|
||||
private int pageNum;
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.ruoyi.zhiyuanzhe.domain.request;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 报名分页请求类
|
||||
*/
|
||||
@Data
|
||||
public class BReportPageRequest {
|
||||
|
||||
|
||||
/**
|
||||
* 活动id
|
||||
*/
|
||||
@ApiModelProperty(value = "活动id")
|
||||
private Long activityId;
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.ruoyi.zhiyuanzhe.domain.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 证书发放请求类
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("证书发放请求类")
|
||||
public class SubmitRequest {
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private Long uId;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 活动id
|
||||
*/
|
||||
|
||||
@ApiModelProperty(value = "活动id")
|
||||
private String activityId;
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
package com.ruoyi.zhiyuanzhe.domain.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 分页查询积分获取响应类
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("分页查询积分获取响应类")
|
||||
public class BActivityPointsPageresponse {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
|
||||
|
||||
/**
|
||||
* 活动名称
|
||||
*/
|
||||
@ApiModelProperty("活动名称")
|
||||
private String name;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 活动名称
|
||||
*/
|
||||
@ApiModelProperty("活动id")
|
||||
private Integer activityId;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ApiModelProperty("用户id")
|
||||
private Long uId;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 积分
|
||||
*/
|
||||
@ApiModelProperty("积分")
|
||||
private String points;
|
||||
|
||||
|
||||
/**
|
||||
* 活动举办方
|
||||
*/
|
||||
@ApiModelProperty("活动举办方")
|
||||
private String publisher;
|
||||
|
||||
|
||||
/**
|
||||
* 活动时间
|
||||
*/
|
||||
@ApiModelProperty(value = "活动时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "活动时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date activityTime;
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,123 @@
|
||||
package com.ruoyi.zhiyuanzhe.domain.response;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 报名分页响应类
|
||||
*/
|
||||
@Data
|
||||
public class BReportPageResponse {
|
||||
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ApiModelProperty(value = "用户id")
|
||||
@Excel(name = "用户id")
|
||||
private Long uId;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
@ApiModelProperty(value = "年龄")
|
||||
@Excel(name = "年龄")
|
||||
private String ageRange;
|
||||
|
||||
/**
|
||||
* 小区
|
||||
*/
|
||||
@ApiModelProperty(value = "小区")
|
||||
@Excel(name = "小区")
|
||||
private String housingRange;
|
||||
|
||||
/**
|
||||
* 文化程度
|
||||
*/
|
||||
@ApiModelProperty(value = "文化程度")
|
||||
@Excel(name = "文化程度")
|
||||
private String educationRange;
|
||||
|
||||
/**
|
||||
* 兴趣爱好
|
||||
*/
|
||||
@ApiModelProperty(value = "兴趣爱好")
|
||||
@Excel(name = "兴趣爱好")
|
||||
private String interestRange;
|
||||
|
||||
/**
|
||||
* 政治面貌
|
||||
*/
|
||||
@ApiModelProperty(value = "政治面貌")
|
||||
@Excel(name = "政治面貌")
|
||||
private String politicalRange;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
@ApiModelProperty(value = "性别")
|
||||
@Excel(name = "性别")
|
||||
private String sexRange;
|
||||
|
||||
/**
|
||||
* 国籍
|
||||
*/
|
||||
@ApiModelProperty(value = "国籍")
|
||||
@Excel(name = "国籍")
|
||||
private String nationalityRange;
|
||||
|
||||
/**
|
||||
* 专业类型
|
||||
*/
|
||||
@ApiModelProperty(value = "专业类型")
|
||||
@Excel(name = "专业类型")
|
||||
private String professionalRange;
|
||||
|
||||
/**
|
||||
* 行业类型
|
||||
*/
|
||||
@ApiModelProperty(value = "行业类型")
|
||||
@Excel(name = "行业类型")
|
||||
private String industryRange;
|
||||
|
||||
/**
|
||||
* 院校
|
||||
*/
|
||||
@ApiModelProperty(value = "院校")
|
||||
@Excel(name = "院校")
|
||||
private String schoolRange;
|
||||
|
||||
/**
|
||||
* 创建者ID
|
||||
*/
|
||||
@Excel(name = "创建者ID")
|
||||
private Long createId;
|
||||
|
||||
/**
|
||||
* 更新者ID
|
||||
*/
|
||||
@Excel(name = "更新者ID")
|
||||
private Long updateId;
|
||||
|
||||
/**
|
||||
* 用户权限id
|
||||
*/
|
||||
@Excel(name = "用户权限id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 部门权限id
|
||||
*/
|
||||
@Excel(name = "部门权限id")
|
||||
private Long deptId;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package com.ruoyi.zhiyuanzhe.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.zhiyuanzhe.domain.BReport;
|
||||
import com.ruoyi.zhiyuanzhe.domain.request.BReportPageRequest;
|
||||
import com.ruoyi.zhiyuanzhe.domain.response.BReportPageResponse;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 报名Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-09-21
|
||||
*/
|
||||
public interface BReportMapper
|
||||
{
|
||||
/**
|
||||
* 查询报名
|
||||
*
|
||||
* @param id 报名主键
|
||||
* @return 报名
|
||||
*/
|
||||
public BReport selectBReportById(Long id);
|
||||
|
||||
/**
|
||||
* 查询报名列表
|
||||
*
|
||||
* @param bReport 报名
|
||||
* @return 报名集合
|
||||
*/
|
||||
public List<BReport> selectBReportList(BReport bReport);
|
||||
|
||||
/**
|
||||
* 新增报名
|
||||
*
|
||||
* @param bReport 报名
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBReport(BReport bReport);
|
||||
|
||||
/**
|
||||
* 修改报名
|
||||
*
|
||||
* @param bReport 报名
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBReport(BReport bReport);
|
||||
|
||||
/**
|
||||
* 删除报名
|
||||
*
|
||||
* @param id 报名主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBReportById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除报名
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBReportByIds(Long[] ids);
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询查询报名列表
|
||||
*
|
||||
* @param req 报名
|
||||
* @return 报名集合
|
||||
*/
|
||||
public List<BReportPageResponse> selecAll(@Param("req") BReportPageRequest req);
|
||||
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package com.ruoyi.zhiyuanzhe.service;
|
||||
|
||||
import com.ruoyi.zhiyuanzhe.domain.BReport;
|
||||
import com.ruoyi.zhiyuanzhe.domain.request.BReportPageRequest;
|
||||
import com.ruoyi.zhiyuanzhe.domain.response.BReportPageResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报名Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-09-21
|
||||
*/
|
||||
public interface IBReportService {
|
||||
/**
|
||||
* 查询报名
|
||||
*
|
||||
* @param id 报名主键
|
||||
* @return 报名
|
||||
*/
|
||||
public BReport selectBReportById(Long id);
|
||||
|
||||
/**
|
||||
* 查询报名列表
|
||||
*
|
||||
* @param req 报名
|
||||
* @return 报名集合
|
||||
*/
|
||||
public List<BReport> selectBReportList(BReport req);
|
||||
|
||||
/**
|
||||
* 新增报名
|
||||
*
|
||||
* @param bReport 报名
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBReport(BReport bReport);
|
||||
|
||||
/**
|
||||
* 修改报名
|
||||
*
|
||||
* @param bReport 报名
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBReport(BReport bReport);
|
||||
|
||||
/**
|
||||
* 批量删除报名
|
||||
*
|
||||
* @param ids 需要删除的报名主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBReportByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除报名信息
|
||||
*
|
||||
* @param id 报名主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBReportById(Long id);
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询查询报名列表
|
||||
*
|
||||
* @param req 报名
|
||||
* @return 报名集合
|
||||
*/
|
||||
public List<BReportPageResponse> selecAll(BReportPageRequest req);
|
||||
|
||||
|
||||
}
|
@ -1,96 +1,113 @@
|
||||
package com.ruoyi.zhiyuanzhe.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.zhiyuanzhe.domain.BActivity;
|
||||
import com.ruoyi.zhiyuanzhe.domain.BReport;
|
||||
import com.ruoyi.zhiyuanzhe.mapper.BActivityMapper;
|
||||
import com.ruoyi.zhiyuanzhe.mapper.BReportMapper;
|
||||
import com.ruoyi.zhiyuanzhe.service.IBActivityService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.ruoyi.common.utils.SecurityUtils.getUserId;
|
||||
|
||||
/**
|
||||
* 活动管理Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-09-18
|
||||
*/
|
||||
@Service("bActivityService")
|
||||
public class BActivityServiceImpl implements IBActivityService
|
||||
{
|
||||
public class BActivityServiceImpl implements IBActivityService {
|
||||
@Autowired
|
||||
private BActivityMapper bActivityMapper;
|
||||
|
||||
|
||||
@Autowired
|
||||
private BReportMapper bReportMapper;
|
||||
|
||||
/**
|
||||
* 查询活动管理
|
||||
*
|
||||
*
|
||||
* @param id 活动管理主键
|
||||
* @return 活动管理
|
||||
*/
|
||||
@Override
|
||||
public BActivity selectBActivityById(Long id)
|
||||
{
|
||||
public BActivity selectBActivityById(Long id) {
|
||||
return bActivityMapper.selectBActivityById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询活动管理列表
|
||||
*
|
||||
*
|
||||
* @param bActivity 活动管理
|
||||
* @return 活动管理
|
||||
*/
|
||||
@Override
|
||||
public List<BActivity> selectBActivityList(BActivity bActivity)
|
||||
{
|
||||
return bActivityMapper.selectBActivityList(bActivity);
|
||||
public List<BActivity> selectBActivityList(BActivity bActivity) {
|
||||
List<BActivity> list = bActivityMapper.selectBActivityList(bActivity);
|
||||
List newList=new ArrayList<>();
|
||||
BReport bReport = new BReport();
|
||||
for (BActivity a : list) {
|
||||
bReport.setUId(getUserId());
|
||||
bReport.setActivityId(a.getId());
|
||||
List<BReport> reportList = bReportMapper.selectBReportList(bReport);
|
||||
if (!reportList.isEmpty()){
|
||||
a.setInvolveStaus(1);
|
||||
}else {
|
||||
a.setInvolveStaus(2);
|
||||
}
|
||||
newList.add(a);
|
||||
}
|
||||
return newList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增活动管理
|
||||
*
|
||||
*
|
||||
* @param bActivity 活动管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBActivity(BActivity bActivity)
|
||||
{
|
||||
public int insertBActivity(BActivity bActivity) {
|
||||
bActivity.setCreateTime(DateUtils.getNowDate());
|
||||
return bActivityMapper.insertBActivity(bActivity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改活动管理
|
||||
*
|
||||
*
|
||||
* @param bActivity 活动管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBActivity(BActivity bActivity)
|
||||
{
|
||||
public int updateBActivity(BActivity bActivity) {
|
||||
bActivity.setUpdateTime(DateUtils.getNowDate());
|
||||
return bActivityMapper.updateBActivity(bActivity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除活动管理
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的活动管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBActivityByIds(Long[] ids)
|
||||
{
|
||||
public int deleteBActivityByIds(Long[] ids) {
|
||||
return bActivityMapper.deleteBActivityByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除活动管理信息
|
||||
*
|
||||
*
|
||||
* @param id 活动管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBActivityById(Long id)
|
||||
{
|
||||
public int deleteBActivityById(Long id) {
|
||||
return bActivityMapper.deleteBActivityById(id);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,103 @@
|
||||
package com.ruoyi.zhiyuanzhe.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.zhiyuanzhe.domain.request.BReportPageRequest;
|
||||
import com.ruoyi.zhiyuanzhe.domain.response.BReportPageResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.zhiyuanzhe.mapper.BReportMapper;
|
||||
import com.ruoyi.zhiyuanzhe.domain.BReport;
|
||||
import com.ruoyi.zhiyuanzhe.service.IBReportService;
|
||||
|
||||
/**
|
||||
* 报名Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-09-21
|
||||
*/
|
||||
@Service
|
||||
public class BReportServiceImpl implements IBReportService
|
||||
{
|
||||
@Autowired
|
||||
private BReportMapper bReportMapper;
|
||||
|
||||
/**
|
||||
* 查询报名
|
||||
*
|
||||
* @param id 报名主键
|
||||
* @return 报名
|
||||
*/
|
||||
@Override
|
||||
public BReport selectBReportById(Long id)
|
||||
{
|
||||
return bReportMapper.selectBReportById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询报名列表
|
||||
*
|
||||
* @param bReport 报名
|
||||
* @return 报名
|
||||
*/
|
||||
@Override
|
||||
public List<BReport> selectBReportList(BReport bReport)
|
||||
{
|
||||
return bReportMapper.selectBReportList(bReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增报名
|
||||
*
|
||||
* @param bReport 报名
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBReport(BReport bReport)
|
||||
{
|
||||
bReport.setCreateTime(DateUtils.getNowDate());
|
||||
return bReportMapper.insertBReport(bReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改报名
|
||||
*
|
||||
* @param bReport 报名
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBReport(BReport bReport)
|
||||
{
|
||||
bReport.setUpdateTime(DateUtils.getNowDate());
|
||||
return bReportMapper.updateBReport(bReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除报名
|
||||
*
|
||||
* @param ids 需要删除的报名主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBReportByIds(Long[] ids)
|
||||
{
|
||||
return bReportMapper.deleteBReportByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除报名信息
|
||||
*
|
||||
* @param id 报名主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBReportById(Long id)
|
||||
{
|
||||
return bReportMapper.deleteBReportById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BReportPageResponse> selecAll(BReportPageRequest req) {
|
||||
return bReportMapper.selecAll(req);
|
||||
}
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.zhiyuanzhe.mapper.BReportMapper">
|
||||
|
||||
<resultMap type="BReport" id="BReportResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="uId" column="u_id" />
|
||||
<result property="activityId" column="activity_id" />
|
||||
<result property="createId" column="create_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateId" column="update_id" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBReportVo">
|
||||
select id, u_id, activity_id, create_id, create_by, create_time, update_id, update_by, update_time, remark, user_id, dept_id from b_report
|
||||
</sql>
|
||||
|
||||
<select id="selectBReportList" parameterType="BReport" resultMap="BReportResult">
|
||||
<include refid="selectBReportVo"/>
|
||||
<where>
|
||||
<if test="uId != null "> and u_id = #{uId}</if>
|
||||
<if test="activityId != null "> and activity_id = #{activityId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBReportById" parameterType="Long" resultMap="BReportResult">
|
||||
<include refid="selectBReportVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="selecAll" resultType="com.ruoyi.zhiyuanzhe.domain.response.BReportPageResponse">
|
||||
select a.id,
|
||||
b.age_range as ageRange,
|
||||
b.housing_range as housingRange,
|
||||
b.education_range as educationRange,
|
||||
b.interest_range as interestRange,
|
||||
b.political_range as politicalRange,
|
||||
b.sex_range as sexRange,
|
||||
b.nationality_range as nationalityRange,
|
||||
b.professional_range as professionalRange,
|
||||
b.industry_range as industryRange,
|
||||
b.school_range as schoolRange,
|
||||
b.u_id as uid
|
||||
from b_report a
|
||||
left join b_person_tags b on a.u_id = b.u_id
|
||||
where a.activity_id = #{req.activityId}
|
||||
|
||||
</select>
|
||||
|
||||
<insert id="insertBReport" parameterType="BReport" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into b_report
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="uId != null">u_id,</if>
|
||||
<if test="activityId != null">activity_id,</if>
|
||||
<if test="createId != null">create_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateId != null">update_id,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="uId != null">#{uId},</if>
|
||||
<if test="activityId != null">#{activityId},</if>
|
||||
<if test="createId != null">#{createId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateId != null">#{updateId},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBReport" parameterType="BReport">
|
||||
update b_report
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="uId != null">u_id = #{uId},</if>
|
||||
<if test="activityId != null">activity_id = #{activityId},</if>
|
||||
<if test="createId != null">create_id = #{createId},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateId != null">update_id = #{updateId},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBReportById" parameterType="Long">
|
||||
delete from b_report where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBReportByIds" parameterType="String">
|
||||
delete from b_report where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in new issue