This commit is contained in:
PQZ 2025-03-22 11:35:26 +08:00
parent e6ffb3d733
commit 2a7865f308
12 changed files with 143 additions and 15 deletions

View File

@ -45,7 +45,7 @@ public class BusiNoticeSign extends DlBaseEntity
/** 是否超级报名 */ /** 是否超级报名 */
@Excel(name = "是否超级报名") @Excel(name = "是否超级报名")
private Integer isSuper; private String isSuper;
/** 联系方式 */ /** 联系方式 */
@Excel(name = "联系方式") @Excel(name = "联系方式")

View File

@ -1,9 +1,11 @@
package com.ruoyi.busi.mapper; package com.ruoyi.busi.mapper;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.busi.domain.BusiNotice; import com.ruoyi.busi.domain.BusiNotice;
import com.ruoyi.busi.vo.BusiNoticeVo;
import com.ruoyi.query.BusiNoticeQuery; import com.ruoyi.query.BusiNoticeQuery;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -16,7 +18,16 @@ import org.apache.ibatis.annotations.Mapper;
* @date 2025-03-17 * @date 2025-03-17
*/ */
@Mapper @Mapper
public interface BusiNoticeMapper extends BaseMapper<BusiNotice> public interface BusiNoticeMapper extends BaseMapper<BusiNotice> {
{
IPage<BusiNotice> queryListPage(@Param("entity") BusiNoticeQuery query, Page<BusiNotice> page); IPage<BusiNotice> queryListPage(@Param("entity") BusiNoticeQuery query, Page<BusiNotice> page);
/**
* 查询博主报名的通告
*
* @param userId 博主user表id
* @return java.util.List<com.ruoyi.busi.vo.BusiNoticeVo>
* @author PQZ
* @date 11:04 2025/3/22
**/
List<BusiNoticeVo> queryListByUserId(@Param("userId") Long userId);
} }

View File

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.busi.domain.BusiNotice; import com.ruoyi.busi.domain.BusiNotice;
import com.ruoyi.busi.vo.BusiNoticeVo;
import com.ruoyi.query.BusiNoticeQuery; import com.ruoyi.query.BusiNoticeQuery;
/** /**
@ -24,6 +25,16 @@ public interface IBusiNoticeService extends IService<BusiNotice>
* @return java.util.List<com.ruoyi.busi.domain.BusiNotice> * @return java.util.List<com.ruoyi.busi.domain.BusiNotice>
**/ **/
List<BusiNotice> listByUserId(Long userId); List<BusiNotice> listByUserId(Long userId);
/**
* 查询博主报名的通告
* @author PQZ
* @date 11:05 2025/3/22
* @param userId 博主id
* @return java.util.List<com.ruoyi.busi.vo.BusiNoticeVo>
**/
List<BusiNoticeVo> queryListByUserId(Long userId);
IPage<BusiNotice> queryListPage(BusiNoticeQuery query, Page<BusiNotice> page); IPage<BusiNotice> queryListPage(BusiNoticeQuery query, Page<BusiNotice> page);
void saveVo(BusiNotice data); void saveVo(BusiNotice data);
} }

View File

@ -4,6 +4,7 @@ import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.ruoyi.busi.vo.BusiNoticeVo;
import com.ruoyi.common.core.domain.DlBaseEntity; import com.ruoyi.common.core.domain.DlBaseEntity;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
@ -57,4 +58,17 @@ public class BusiNoticeServiceImpl extends ServiceImpl<BusiNoticeMapper,BusiNoti
.eq(BusiNotice::getUserId,userId); .eq(BusiNotice::getUserId,userId);
return list(lambdaQueryWrapper); return list(lambdaQueryWrapper);
} }
/**
* 查询博主报名的通告
*
* @param userId 博主id
* @return java.util.List<com.ruoyi.busi.vo.BusiNoticeVo>
* @author PQZ
* @date 11:05 2025/3/22
**/
@Override
public List<BusiNoticeVo> queryListByUserId(Long userId) {
return busiNoticeMapper.queryListByUserId(userId);
}
} }

View File

@ -10,4 +10,8 @@ public class BusiNoticeVo extends BusiNotice {
private String userNickName; private String userNickName;
/** 平台名称 */ /** 平台名称 */
private String platformName; private String platformName;
/** 是否超级报名*/
private String isSuper;
/**通告合作状态*/
private String signStatus;
} }

View File

@ -59,17 +59,28 @@ public class MemberUserController extends BaseController {
* @author PQZ * @author PQZ
* @date 11:36 2025/3/21 * @date 11:36 2025/3/21
**/ **/
@PreAuthorize("@ss.hasPermi('member:member:query')")
@GetMapping(value = "/announcerDetail/{userId}") @GetMapping(value = "/announcerDetail/{userId}")
public AjaxResult getInfo(@PathVariable("userId") Long userId) { public AjaxResult announcerDetail(@PathVariable("userId") Long userId) {
return success(memberUserService.announcerDetail(userId)); return success(memberUserService.announcerDetail(userId));
} }
/**
* 获取博主详细信息
*
* @param userId 用户表id
* @return com.ruoyi.common.core.domain.AjaxResult
* @author PQZ
* @date 10:40 2025/3/22
**/
@GetMapping(value = "/bloggerDetail/{userId}")
public AjaxResult bloggerDetail(@PathVariable("userId") Long userId) {
return success(memberUserService.bloggerDetail(userId));
}
/** /**
* 导出会员列表 * 导出会员列表
*/ */
@PreAuthorize("@ss.hasPermi('member:member:export')")
@Log(title = "会员", businessType = BusinessType.EXPORT) @Log(title = "会员", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, MemberUser memberUser) { public void export(HttpServletResponse response, MemberUser memberUser) {
@ -82,7 +93,6 @@ public class MemberUserController extends BaseController {
/** /**
* 新增会员 * 新增会员
*/ */
@PreAuthorize("@ss.hasPermi('member:member:add')")
@Log(title = "会员", businessType = BusinessType.INSERT) @Log(title = "会员", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody MemberUser memberUser) { public AjaxResult add(@RequestBody MemberUser memberUser) {
@ -92,7 +102,6 @@ public class MemberUserController extends BaseController {
/** /**
* 修改会员 * 修改会员
*/ */
@PreAuthorize("@ss.hasPermi('member:member:edit')")
@Log(title = "会员", businessType = BusinessType.UPDATE) @Log(title = "会员", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody MemberUser memberUser) { public AjaxResult edit(@RequestBody MemberUser memberUser) {
@ -102,7 +111,6 @@ public class MemberUserController extends BaseController {
/** /**
* 删除会员 * 删除会员
*/ */
@PreAuthorize("@ss.hasPermi('member:member:remove')")
@Log(title = "会员", businessType = BusinessType.DELETE) @Log(title = "会员", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids) { public AjaxResult remove(@PathVariable String[] ids) {

View File

@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.member.domain.MemberBusiCard; import com.ruoyi.member.domain.MemberBusiCard;
import com.ruoyi.member.vo.MemberBusiCardVO; import com.ruoyi.member.vo.MemberBusiCardVO;
import java.util.List;
/** /**
* 博主名片Service接口 * 博主名片Service接口
* *
@ -35,6 +37,16 @@ public interface IMemberBusiCardService extends IService<MemberBusiCard> {
**/ **/
MemberBusiCardVO queryById(String id); MemberBusiCardVO queryById(String id);
/**
* 通过用户id查询名片
*
* @param userId 用户表id
* @return java.util.List<com.ruoyi.member.domain.MemberBusiCard>
* @author PQZ
* @date 10:49 2025/3/22
**/
List<MemberBusiCard> queryListByUserId(Long userId);
/** /**
* 审核博主名片信息 * 审核博主名片信息
* *

View File

@ -37,4 +37,14 @@ public interface IMemberUserService extends IService<MemberUser> {
**/ **/
MemberUserVO announcerDetail(Long userId); MemberUserVO announcerDetail(Long userId);
/**
* 获取博主详情
*
* @param userId 用户表id
* @return com.ruoyi.member.vo.MemberUserVO
* @author PQZ
* @date 10:41 2025/3/22
**/
MemberUserVO bloggerDetail(Long userId);
} }

View File

@ -1,8 +1,10 @@
package com.ruoyi.member.service.impl; package com.ruoyi.member.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.DlBaseEntity;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.member.domain.MemberBusiCard; import com.ruoyi.member.domain.MemberBusiCard;
import com.ruoyi.member.mapper.MemberBusiCardMapper; import com.ruoyi.member.mapper.MemberBusiCardMapper;
@ -12,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* 博主名片Service业务层处理 * 博主名片Service业务层处理
@ -51,6 +54,23 @@ public class MemberBusiCardServiceImpl extends ServiceImpl<MemberBusiCardMapper,
return memberBusiCardMapper.queryById(id); return memberBusiCardMapper.queryById(id);
} }
/**
* 通过用户id查询名片
*
* @param userId 用户表id
* @return java.util.List<com.ruoyi.member.domain.MemberBusiCard>
* @author PQZ
* @date 10:49 2025/3/22
**/
@Override
public List<MemberBusiCard> queryListByUserId(Long userId) {
LambdaQueryWrapper<MemberBusiCard> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(DlBaseEntity::getDelFlag,0)
.eq(MemberBusiCard::getApprovalStatus,"1")
.eq(MemberBusiCard::getUserId,userId);
return list(lambdaQueryWrapper);
}
/** /**
* 审核博主名片信息 * 审核博主名片信息
* *

View File

@ -7,6 +7,7 @@ import com.ruoyi.busi.service.IBusiEvaluateService;
import com.ruoyi.busi.service.IBusiNoticeService; import com.ruoyi.busi.service.IBusiNoticeService;
import com.ruoyi.member.domain.MemberUser; import com.ruoyi.member.domain.MemberUser;
import com.ruoyi.member.mapper.MemberUserMapper; import com.ruoyi.member.mapper.MemberUserMapper;
import com.ruoyi.member.service.IMemberBusiCardService;
import com.ruoyi.member.service.IMemberCardService; import com.ruoyi.member.service.IMemberCardService;
import com.ruoyi.member.service.IMemberUserService; import com.ruoyi.member.service.IMemberUserService;
import com.ruoyi.member.vo.MemberUserVO; import com.ruoyi.member.vo.MemberUserVO;
@ -17,13 +18,12 @@ import javax.annotation.Resource;
/** /**
* 会员Service业务层处理 * 会员Service业务层处理
* *
* @author pqz * @author pqz
* @date 2025-03-17 * @date 2025-03-17
*/ */
@Service @Service
public class MemberUserServiceImpl extends ServiceImpl<MemberUserMapper,MemberUser> implements IMemberUserService public class MemberUserServiceImpl extends ServiceImpl<MemberUserMapper, MemberUser> implements IMemberUserService {
{
@Autowired @Autowired
private MemberUserMapper memberUserMapper; private MemberUserMapper memberUserMapper;
@Resource @Resource
@ -32,6 +32,8 @@ public class MemberUserServiceImpl extends ServiceImpl<MemberUserMapper,MemberUs
private IMemberCardService cardService; private IMemberCardService cardService;
@Resource @Resource
private IBusiNoticeService noticeService; private IBusiNoticeService noticeService;
@Resource
private IMemberBusiCardService busiCardService;
/** /**
@ -59,13 +61,32 @@ public class MemberUserServiceImpl extends ServiceImpl<MemberUserMapper,MemberUs
@Override @Override
public MemberUserVO announcerDetail(Long userId) { public MemberUserVO announcerDetail(Long userId) {
//查询通告主基本信息 //查询通告主基本信息
MemberUserVO result = memberUserMapper.queryByUserId(userId,"01"); MemberUserVO result = memberUserMapper.queryByUserId(userId, "01");
//评价信息 //评价信息
result.setEvaluates(evaluateService.listByToUserId(userId)); result.setEvaluates(evaluateService.listByToUserId(userId));
//会员开通记录 //会员开通记录
result.setCards(cardService.listByUserId(userId,"01")); result.setCards(cardService.listByUserId(userId, "01"));
//会员发布通告 //会员发布通告
result.setNotices(noticeService.listByUserId(userId)); result.setNotices(noticeService.listByUserId(userId));
return result; return result;
} }
/**
* 获取博主详情
*
* @param userId 用户表id
* @return com.ruoyi.member.vo.MemberUserVO
* @author PQZ
* @date 10:41 2025/3/22
**/
@Override
public MemberUserVO bloggerDetail(Long userId) {
//博主基本信息
MemberUserVO result = memberUserMapper.queryByUserId(userId, "01");
//名片信息
result.setBusiCards(busiCardService.queryListByUserId(userId));
//报名的通告
result.setNoticeVos(noticeService.queryListByUserId(userId));
return result;
}
} }

View File

@ -3,6 +3,8 @@ package com.ruoyi.member.vo;
import com.ruoyi.busi.domain.BusiEvaluate; import com.ruoyi.busi.domain.BusiEvaluate;
import com.ruoyi.busi.domain.BusiNotice; import com.ruoyi.busi.domain.BusiNotice;
import com.ruoyi.busi.vo.BusiEvaluateVO; import com.ruoyi.busi.vo.BusiEvaluateVO;
import com.ruoyi.busi.vo.BusiNoticeVo;
import com.ruoyi.member.domain.MemberBusiCard;
import com.ruoyi.member.domain.MemberCard; import com.ruoyi.member.domain.MemberCard;
import com.ruoyi.member.domain.MemberUser; import com.ruoyi.member.domain.MemberUser;
import lombok.Data; import lombok.Data;
@ -25,6 +27,10 @@ public class MemberUserVO extends MemberUser {
List<BusiEvaluateVO> evaluates; List<BusiEvaluateVO> evaluates;
/**开卡记录*/ /**开卡记录*/
List<MemberCard> cards; List<MemberCard> cards;
/**通告列表*/ /**通告主发布的通告列表*/
List<BusiNotice> notices; List<BusiNotice> notices;
/**博主报名的通告列表*/
List<BusiNoticeVo> noticeVos;
/**名片信息*/
List<MemberBusiCard> busiCards;
} }

View File

@ -45,5 +45,16 @@
<if test="entity.params.beginCreateTime != null and entity.params.beginCreateTime != '' and entity.params.endCreateTime != null and entity.params.endCreateTime != ''"> and main.create_time between #{entity.params.beginCreateTime} and #{entity.params.endCreateTime}</if> <if test="entity.params.beginCreateTime != null and entity.params.beginCreateTime != '' and entity.params.endCreateTime != null and entity.params.endCreateTime != ''"> and main.create_time between #{entity.params.beginCreateTime} and #{entity.params.endCreateTime}</if>
</where> </where>
</select> </select>
<select id="queryListByUserId" resultType="com.ruoyi.busi.vo.BusiNoticeVo">
SELECT
main.*,
dbns.status,
dbns.is_super
FROM
dl_busi_notice main
LEFT JOIN dl_busi_notice_sign dbns ON main.id = dbns.notice_id AND dbns.del_flag = 0
WHERE
dbns.user_id = #{userId}
</select>
</mapper> </mapper>