dongdingding
吴顺杰 12 months ago
parent 9af2cc90b4
commit 1e66a33269

@ -6,6 +6,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.zhiyuanzhe.domain.BActivity;
import com.ruoyi.zhiyuanzhe.domain.request.ActivityInviteRequest;
import com.ruoyi.zhiyuanzhe.domain.request.EventRecommendationsRequest;
import com.ruoyi.zhiyuanzhe.domain.response.ActivityResponse;
import com.ruoyi.zhiyuanzhe.service.IBActivityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -41,7 +42,7 @@ public class BActivityController extends BaseController {
*
*/
@GetMapping("/list")
@ApiOperation(value = "查询活动管理列表")
@ApiOperation(value = "查询活动管理列表", response = BActivity.class)
public TableDataInfo list(BActivity bActivity) {
startPage();
List<BActivity> list = bActivityService.selectBActivityList(bActivity);
@ -52,7 +53,7 @@ public class BActivityController extends BaseController {
/**
*
*/
@ApiOperation(value = "获取活动管理详细信息")
@ApiOperation(value = "获取活动管理详细信息", response = ActivityResponse.class)
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(bActivityService.selectBActivityById(id));
@ -107,7 +108,7 @@ public class BActivityController extends BaseController {
* @return
*/
@GetMapping("/eventRecommendations")
@ApiOperation(value = "活动推荐")
@ApiOperation(value = "活动推荐", response = BActivity.class)
public TableDataInfo eventRecommendations(EventRecommendationsRequest req) {
startPage();
List<BActivity> list = bActivityService.eventRecommendations(req);

@ -46,7 +46,7 @@ public class BCertificatesController extends BaseController {
* @param bCertificates
* @return
*/
@ApiOperation(value = "查询个性化证书列表")
@ApiOperation(value = "查询个性化证书列表", response = BCertificates.class)
@GetMapping("/list")
public TableDataInfo list(BCertificates bCertificates) {
startPage();
@ -87,7 +87,7 @@ public class BCertificatesController extends BaseController {
* @param id id
* @return
*/
@ApiOperation(value = "获取个性化证书详细信息")
@ApiOperation(value = "获取个性化证书详细信息", response = BCertificates.class)
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(bCertificatesService.selectBCertificatesById(id));

@ -7,8 +7,7 @@ import com.ruoyi.common.core.text.Convert;
import com.ruoyi.zhiyuanzhe.domain.BPersonTags;
import com.ruoyi.zhiyuanzhe.service.IBPersonTagsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired;
import io.swagger.annotations.ApiOperation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
@ -19,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
@ -32,13 +32,14 @@ import java.util.List;
@RequestMapping("/zhiyuanzhe/tags")
@Transactional(rollbackFor = Exception.class)
public class BPersonTagsController extends BaseController {
@Autowired
@Resource
private IBPersonTagsService bPersonTagsService;
/**
*
*/
@ApiModelProperty(value = "查询人标签列表")
@ApiOperation(value = "查询人标签列表", response = BPersonTags.class)
@GetMapping("/list")
public TableDataInfo list(BPersonTags bPersonTags) {
startPage();
@ -56,7 +57,7 @@ public class BPersonTagsController extends BaseController {
/**
*
*/
@ApiModelProperty(value = "获取人标签详细信息")
@ApiOperation(value = "获取人标签详细信息", response = BPersonTags.class)
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(bPersonTagsService.selectBPersonTagsById(id));
@ -65,7 +66,7 @@ public class BPersonTagsController extends BaseController {
/**
*
*/
@ApiModelProperty(value = "新增人标签")
@ApiOperation(value = "新增人标签")
@PostMapping
public AjaxResult add(@RequestBody BPersonTags bPersonTags) {
return toAjax(bPersonTagsService.insertBPersonTags(bPersonTags));
@ -74,7 +75,7 @@ public class BPersonTagsController extends BaseController {
/**
*
*/
@ApiModelProperty(value = "修改人标签")
@ApiOperation(value = "修改人标签")
@PutMapping
public AjaxResult edit(@RequestBody BPersonTags bPersonTags) {
return toAjax(bPersonTagsService.updateBPersonTags(bPersonTags));
@ -83,7 +84,7 @@ public class BPersonTagsController extends BaseController {
/**
*
*/
@ApiModelProperty(value = "删除人标签")
@ApiOperation(value = "删除人标签")
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(bPersonTagsService.deleteBPersonTagsByIds(ids));

@ -42,7 +42,7 @@ public class PointsRedemptionController extends BaseController {
* @param bCertificates
* @return
*/
@ApiOperation(value = "查询可以兑换证书列表")
@ApiOperation(value = "查询可以兑换证书列表", response = BCertificates.class)
@GetMapping("/page")
public TableDataInfo list(BCertificatesRequest bCertificates) {
startPage();
@ -82,7 +82,7 @@ public class PointsRedemptionController extends BaseController {
* @param id id
* @return
*/
@ApiOperation(value = "查看证书详情")
@ApiOperation(value = "查看证书详情", response = BCertificates.class)
@PostMapping("/findCertificatesById/{id}")
public AjaxResult findCertificatesById(@PathVariable("id") Long id) {

@ -18,12 +18,14 @@ import lombok.EqualsAndHashCode;
@ApiModel("人标签对象")
public class BPersonTags extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
String[] ages;
/**
*
*/
private Long id;
/**
* id
*/
@ -31,106 +33,92 @@ public class BPersonTags extends BaseEntity {
@Excel(name = "用户id")
private Long uId;
/**
*
*/
@ApiModelProperty(value = "用户名称")
@Excel(name = "用户名称")
private String nickName;
/**
*
*/
@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;
/**
*
*/
String[] ages;
/**
* 使
*/

@ -3,7 +3,62 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.zhiyuanzhe.mapper.ActivityUserMapper">
<resultMap type="BPersonTags" id="personTags">
<result property="id" column="id"/>
<result property="uId" column="u_id"/>
<result property="ageRange" column="age_range"/>
<result property="housingRange" column="housing_range"/>
<result property="educationRange" column="education_range"/>
<result property="interestRange" column="interest_range"/>
<result property="politicalRange" column="political_range"/>
<result property="sexRange" column="sex_range"/>
<result property="nationalityRange" column="nationality_range"/>
<result property="professionalRange" column="professional_range"/>
<result property="industryRange" column="industry_range"/>
<result property="schoolRange" column="school_range"/>
<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"/>
<result property="status" column="status"/>
<result property="degreeOfMatch" column="degree_of_match"/>
</resultMap>
<resultMap type="BActivity" id="activityResult">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="content" column="content"/>
<result property="publisher" column="publisher"/>
<result property="activityTime" column="activity_time"/>
<result property="address" column="address"/>
<result property="ageRange" column="age_range"/>
<result property="housingRange" column="housing_range"/>
<result property="educationRange" column="education_range"/>
<result property="interestRange" column="interest_range"/>
<result property="politicalRange" column="political_range"/>
<result property="sexRange" column="sex_range"/>
<result property="nationalityRange" column="nationality_range"/>
<result property="professionalRange" column="professional_range"/>
<result property="industryRange" column="industry_range"/>
<result property="schoolRange" column="school_range"/>
<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"/>
<result property="endTime" column="end_time"/>
<result property="status" column="status"/>
<result property="degreeOfMatch" column="degree_of_match"/>
</resultMap>
<insert id="add" parameterType="BActivityUser" useGeneratedKeys="true" keyProperty="id">
insert into b_activity_user
@ -45,7 +100,7 @@
from b_activity_user
where activity_id = #{activityId}
</delete>
<select id="findUserByStatusAndActivityId" resultType="BPersonTags">
<select id="findUserByStatusAndActivityId" resultMap="personTags">
select bpt.*, bau.degree_of_match,bau.status
from b_activity_user bau
left join b_person_tags bpt on bau.u_id = bpt.u_id
@ -60,7 +115,7 @@
</if>
order by bau.degree_of_match desc
</select>
<select id="eventRecommendations" resultType="BActivity">
<select id="eventRecommendations" resultMap="activityResult">
select bau.degree_of_match, bau.status, ba.*
from b_activity_user bau
left join b_activity ba on bau.activity_id = ba.id

@ -26,6 +26,7 @@
<result property="remark" column="remark"/>
<result property="userId" column="user_id"/>
<result property="deptId" column="dept_id"/>
<result property="nickName" column="nick_name"/>
</resultMap>
<sql id="selectBPersonTagsVo">
@ -54,35 +55,81 @@
</sql>
<select id="selectBPersonTagsList" parameterType="BPersonTags" resultMap="BPersonTagsResult">
<include refid="selectBPersonTagsVo"/>
select
bpt.id,
bpt.u_id,
bpt.age_range,
bpt.housing_range,
bpt.education_range,
bpt.interest_range,
bpt.political_range,
bpt.sex_range,
bpt.nationality_range,
bpt.professional_range,
bpt.industry_range,
bpt.school_range,
bpt.create_id,
bpt.create_by,
bpt.create_time,
bpt.update_id,
bpt.update_by,
bpt.update_time,
bpt.remark,
bpt.user_id,
bpt.dept_id,
u.nick_name
from b_person_tags bpt left join sys_user u on bpt.u_id = u.user_id
<where>
<if test="uId != null ">and u_id = #{uId}</if>
<if test="uId != null ">and bpt.u_id = #{uId}</if>
<if test="ages != null and ages.length>0">
and age_range in
and bpt.age_range in
<foreach item="item"
collection="ages" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="housingRange != null and housingRange != ''">and housing_range = #{housingRange}</if>
<if test="educationRange != null and educationRange != ''">and education_range = #{educationRange}</if>
<if test="interestRange != null and interestRange != ''">and interest_range = #{interestRange}</if>
<if test="politicalRange != null and politicalRange != ''">and political_range = #{politicalRange}</if>
<if test="sexRange != null and sexRange != ''">and sex_range = #{sexRange}</if>
<if test="nationalityRange != null and nationalityRange != ''">and nationality_range =
<if test="housingRange != null and housingRange != ''">and bpt.housing_range = #{housingRange}</if>
<if test="educationRange != null and educationRange != ''">and bpt.education_range = #{educationRange}</if>
<if test="interestRange != null and interestRange != ''">and bpt.interest_range = #{interestRange}</if>
<if test="politicalRange != null and politicalRange != ''">and bpt.political_range = #{politicalRange}</if>
<if test="sexRange != null and sexRange != ''">and bpt.sex_range = #{sexRange}</if>
<if test="nationalityRange != null and nationalityRange != ''">and bpt.nationality_range =
#{nationalityRange}
</if>
<if test="professionalRange != null and professionalRange != ''">and professional_range =
<if test="professionalRange != null and professionalRange != ''">and bpt.professional_range =
#{professionalRange}
</if>
<if test="industryRange != null and industryRange != ''">and industry_range = #{industryRange}</if>
<if test="schoolRange != null and schoolRange != ''">and school_range = #{schoolRange}</if>
<if test="industryRange != null and industryRange != ''">and bpt.industry_range = #{industryRange}</if>
<if test="schoolRange != null and schoolRange != ''">and bpt.school_range = #{schoolRange}</if>
</where>
</select>
<select id="selectBPersonTagsById" parameterType="Long" resultMap="BPersonTagsResult">
<include refid="selectBPersonTagsVo"/>
where id = #{id}
select bpt.id,
bpt.u_id,
bpt.age_range,
bpt.housing_range,
bpt.education_range,
bpt.interest_range,
bpt.political_range,
bpt.sex_range,
bpt.nationality_range,
bpt.professional_range,
bpt.industry_range,
bpt.school_range,
bpt.create_id,
bpt.create_by,
bpt.create_time,
bpt.update_id,
bpt.update_by,
bpt.update_time,
bpt.remark,
bpt.user_id,
bpt.dept_id,
u.nick_name
from b_person_tags bpt
left join sys_user u on bpt.u_id = u.user_id
where bpt.id = #{id}
</select>
<select id="findByTags" resultType="BActivityUser">

Loading…
Cancel
Save