Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
cde077cf73
@ -58,6 +58,25 @@ public class BusiNoticeController extends BaseController
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询博主报名的通告
|
||||
* @author PQZ
|
||||
* @date 11:13 2025/3/29
|
||||
* @param userId 用户id
|
||||
* @param pageNum 分页参数
|
||||
* @param pageSize 分页参数
|
||||
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||
**/
|
||||
@GetMapping("/queryListByUserId")
|
||||
public AjaxResult queryListByUserId(@RequestParam(name = "userId") Long userId,
|
||||
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize)
|
||||
{
|
||||
Page<BusiNotice> page = new Page<>(pageNum, pageSize);
|
||||
IPage<BusiNoticeVo> list = busiNoticeService.queryListByUserId(userId,page);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出通告列表
|
||||
*/
|
||||
|
@ -30,7 +30,7 @@ public interface BusiNoticeMapper extends BaseMapper<BusiNotice> {
|
||||
* @author PQZ
|
||||
* @date 11:04 2025/3/22
|
||||
**/
|
||||
List<BusiNoticeVo> queryListByUserId(@Param("userId") Long userId);
|
||||
IPage<BusiNoticeVo> queryListByUserId(@Param("userId") Long userId,Page<BusiNotice> page);
|
||||
|
||||
/**
|
||||
* 小程序端查询通告列表
|
||||
|
@ -32,6 +32,8 @@ public class BusiNoticeQuery {
|
||||
private Integer isUseCoupon;
|
||||
/** 审核状态 */
|
||||
private String approvalStatus;
|
||||
/**用户id*/
|
||||
private Long userId;
|
||||
//审核备注
|
||||
private String approvalRemark;
|
||||
private String bloggerTypes;
|
||||
|
@ -20,14 +20,6 @@ import java.util.List;
|
||||
public interface IBusiNoticeService extends IService<BusiNotice>
|
||||
{
|
||||
|
||||
/**
|
||||
* 通过用户id查询通告发布记录
|
||||
* @author PQZ
|
||||
* @date 14:35 2025/3/21
|
||||
* @param userId 用户id
|
||||
* @return java.util.List<com.ruoyi.busi.domain.BusiNotice>
|
||||
**/
|
||||
List<BusiNotice> listByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 查询博主报名的通告
|
||||
@ -36,7 +28,7 @@ public interface IBusiNoticeService extends IService<BusiNotice>
|
||||
* @param userId 博主id
|
||||
* @return java.util.List<com.ruoyi.busi.vo.BusiNoticeVo>
|
||||
**/
|
||||
List<BusiNoticeVo> queryListByUserId(Long userId);
|
||||
IPage<BusiNoticeVo> queryListByUserId(Long userId,Page<BusiNotice> page);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
|
@ -109,22 +109,6 @@ public class BusiNoticeServiceImpl extends ServiceImpl<BusiNoticeMapper,BusiNoti
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过用户id查询通告发布记录
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @return java.util.List<com.ruoyi.busi.domain.BusiNotice>
|
||||
* @author PQZ
|
||||
* @date 14:35 2025/3/21
|
||||
**/
|
||||
@Override
|
||||
public List<BusiNotice> listByUserId(Long userId) {
|
||||
LambdaQueryWrapper<BusiNotice> lambdaQueryWrapper = new LambdaQueryWrapper();
|
||||
lambdaQueryWrapper
|
||||
.eq(DlBaseEntity::getDelFlag,0)
|
||||
.eq(BusiNotice::getUserId,userId);
|
||||
return list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询博主报名的通告
|
||||
@ -135,8 +119,8 @@ public class BusiNoticeServiceImpl extends ServiceImpl<BusiNoticeMapper,BusiNoti
|
||||
* @date 11:05 2025/3/22
|
||||
**/
|
||||
@Override
|
||||
public List<BusiNoticeVo> queryListByUserId(Long userId) {
|
||||
return busiNoticeMapper.queryListByUserId(userId);
|
||||
public IPage<BusiNoticeVo> queryListByUserId(Long userId,Page<BusiNotice> page) {
|
||||
return busiNoticeMapper.queryListByUserId(userId,page);
|
||||
}
|
||||
/**
|
||||
* 发布或者下架
|
||||
|
@ -4,16 +4,10 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
@ -31,76 +25,75 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/member/address")
|
||||
public class MemberAddressController extends BaseController
|
||||
{
|
||||
public class MemberAddressController extends BaseController {
|
||||
@Autowired
|
||||
private IMemberAddressService memberAddressService;
|
||||
|
||||
/**
|
||||
* 查询博主收货地址列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('member:address:list')")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(MemberAddress memberAddress)
|
||||
{
|
||||
|
||||
List<MemberAddress> list = memberAddressService.list();
|
||||
return success(list);
|
||||
* 根据用户id查询博主地址列表(不分页)
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||
* @author PQZ
|
||||
* @date 10:39 2025/3/29
|
||||
**/
|
||||
@GetMapping("/listByUserId")
|
||||
public AjaxResult listByUserId(@RequestParam("userId") Long userId) {
|
||||
return success(memberAddressService.listByUserId(userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出博主收货地址列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('member:address:export')")
|
||||
@Log(title = "博主收货地址", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MemberAddress memberAddress)
|
||||
{
|
||||
List<MemberAddress> list = memberAddressService.list();
|
||||
ExcelUtil<MemberAddress> util = new ExcelUtil<MemberAddress>(MemberAddress.class);
|
||||
util.exportExcel(response, list, "博主收货地址数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取博主收货地址详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('member:address:query')")
|
||||
* 根据地址id查询博主地址详细信息
|
||||
*
|
||||
* @param id 地址id
|
||||
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||
* @author PQZ
|
||||
* @date 10:43 2025/3/29
|
||||
**/
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
public AjaxResult getInfo(@PathVariable("id") String id) {
|
||||
return success(memberAddressService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增博主收货地址
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('member:address:add')")
|
||||
*
|
||||
* @param memberAddress {@link MemberAddress}
|
||||
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||
* @author PQZ
|
||||
* @date 10:43 2025/3/29
|
||||
**/
|
||||
@Log(title = "博主收货地址", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MemberAddress memberAddress)
|
||||
{
|
||||
public AjaxResult add(@RequestBody MemberAddress memberAddress) {
|
||||
return toAjax(memberAddressService.save(memberAddress));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改博主收货地址
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('member:address:edit')")
|
||||
*
|
||||
* @param memberAddress {@link MemberAddress}
|
||||
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||
* @author PQZ
|
||||
* @date 10:44 2025/3/29
|
||||
**/
|
||||
@Log(title = "博主收货地址", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MemberAddress memberAddress)
|
||||
{
|
||||
public AjaxResult edit(@RequestBody MemberAddress memberAddress) {
|
||||
return toAjax(memberAddressService.updateById(memberAddress));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除博主收货地址
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('member:address:remove')")
|
||||
*
|
||||
* @param ids id
|
||||
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||
* @author PQZ
|
||||
* @date 10:45 2025/3/29
|
||||
**/
|
||||
@Log(title = "博主收货地址", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids) {
|
||||
List<String> list = new ArrayList<>(Arrays.asList(ids));
|
||||
return toAjax(memberAddressService.removeByIds(list));
|
||||
}
|
||||
|
@ -48,6 +48,22 @@ public class MemberApplyController extends BaseController {
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 手机端发起通告主认证申请
|
||||
*
|
||||
* @param memberApply {@link MemberApply}
|
||||
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||
* @author PQZ
|
||||
* @date 10:29 2025/3/29
|
||||
**/
|
||||
@Log(title = "手机端发起通告主认证申请", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/toApply")
|
||||
public AjaxResult toApply(@RequestBody MemberApply memberApply) {
|
||||
memberApplyService.save(memberApply);
|
||||
return success();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出通告主认证申请列表
|
||||
*/
|
||||
@ -85,7 +101,7 @@ public class MemberApplyController extends BaseController {
|
||||
@PutMapping
|
||||
public AjaxResult checkMemberApply(@RequestBody MemberApplyVO memberApply) {
|
||||
memberApplyService.checkMemberApply(memberApply);
|
||||
return toAjax(true);
|
||||
return success();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -77,12 +77,17 @@ public class MemberBusiCardController extends BaseController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增博主名片
|
||||
*/
|
||||
* 手机端新增博主名片,提交审核
|
||||
* @author PQZ
|
||||
* @date 10:35 2025/3/29
|
||||
* @param memberBusiCard {@link MemberBusiCard}
|
||||
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||
**/
|
||||
@Log(title = "博主名片", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@PostMapping("/toApply")
|
||||
public AjaxResult add(@RequestBody MemberBusiCard memberBusiCard) {
|
||||
return toAjax(memberBusiCardService.save(memberBusiCard));
|
||||
memberBusiCardService.save(memberBusiCard);
|
||||
return success();
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,16 +1,26 @@
|
||||
package com.ruoyi.member.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.member.domain.MemberAddress;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 博主收货地址Service接口
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-03-17
|
||||
*/
|
||||
public interface IMemberAddressService extends IService<MemberAddress>
|
||||
{
|
||||
public interface IMemberAddressService extends IService<MemberAddress> {
|
||||
|
||||
/**
|
||||
* 根据用户id查询
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @return java.util.List<com.ruoyi.member.domain.MemberAddress>
|
||||
* @author PQZ
|
||||
* @date 10:40 2025/3/29
|
||||
**/
|
||||
List<MemberAddress> listByUserId(Long userId);
|
||||
|
||||
}
|
||||
|
@ -1,13 +1,15 @@
|
||||
package com.ruoyi.member.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.common.core.domain.DlBaseEntity;
|
||||
import com.ruoyi.member.domain.MemberAddress;
|
||||
import com.ruoyi.member.mapper.MemberAddressMapper;
|
||||
import com.ruoyi.member.service.IMemberAddressService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.member.mapper.MemberAddressMapper;
|
||||
import com.ruoyi.member.domain.MemberAddress;
|
||||
import com.ruoyi.member.service.IMemberAddressService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 博主收货地址Service业务层处理
|
||||
@ -22,4 +24,18 @@ public class MemberAddressServiceImpl extends ServiceImpl<MemberAddressMapper,Me
|
||||
private MemberAddressMapper memberAddressMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 根据用户id查询
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @return java.util.List<com.ruoyi.member.domain.MemberAddress>
|
||||
* @author PQZ
|
||||
* @date 10:40 2025/3/29
|
||||
**/
|
||||
@Override
|
||||
public List<MemberAddress> listByUserId(Long userId) {
|
||||
LambdaQueryWrapper<MemberAddress> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(DlBaseEntity::getDelFlag,0).eq(MemberAddress::getUserId,userId);
|
||||
return list(lambdaQueryWrapper);
|
||||
}
|
||||
}
|
||||
|
@ -83,8 +83,8 @@ public class MemberUserServiceImpl extends ServiceImpl<MemberUserMapper, MemberU
|
||||
result.setEvaluates(evaluateService.listByToUserId(userId));
|
||||
//会员开通记录
|
||||
result.setCards(cardService.listByUserId(userId, "01"));
|
||||
//会员发布通告
|
||||
result.setNotices(noticeService.listByUserId(userId));
|
||||
// //会员发布通告
|
||||
// result.setNotices(noticeService.listByUserId(userId));
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ public class MemberUserServiceImpl extends ServiceImpl<MemberUserMapper, MemberU
|
||||
//名片信息
|
||||
result.setBusiCards(busiCardService.queryListByUserId(userId));
|
||||
//报名的通告
|
||||
result.setNoticeVos(noticeService.queryListByUserId(userId));
|
||||
// result.setNoticeVos(noticeService.queryListByUserId(userId));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
<where>
|
||||
main.del_flag = '0' and main.approval_status != 8
|
||||
<if test="entity.userNickName != null "> and uTable.nick_name like concat('%', #{entity.userNickName}, '%')</if>
|
||||
<if test="entity.userId != null "> and main.user_id = #{entity.userId}</if>
|
||||
<if test="entity.province != null "> and main.province = #{entity.province}</if>
|
||||
<if test="entity.city != null "> and main.city = #{entity.city}</if>
|
||||
<if test="entity.title != null and entity.title != ''"> and main.title like concat('%', #{entity.title}, '%')</if>
|
||||
@ -58,6 +59,7 @@
|
||||
LEFT JOIN dl_busi_notice_sign dbns ON main.id = dbns.notice_id AND dbns.del_flag = 0
|
||||
WHERE
|
||||
dbns.user_id = #{userId}
|
||||
order by dbns.create_time desc
|
||||
</select>
|
||||
<select id="queryAppListPage" resultType="com.ruoyi.busi.vo.BusiNoticeVo">
|
||||
SELECT
|
||||
|
Loading…
Reference in New Issue
Block a user