|
@@ -3,6 +3,7 @@ package com.ruoyi.app.controller;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.ruoyi.app.controller.base.AppBaseController;
|
|
import com.ruoyi.app.controller.base.AppBaseController;
|
|
|
|
+import com.ruoyi.app.domain.TbAppUser;
|
|
import com.ruoyi.app.domain.TbMyPublish;
|
|
import com.ruoyi.app.domain.TbMyPublish;
|
|
import com.ruoyi.app.service.ITbAppUserService;
|
|
import com.ruoyi.app.service.ITbAppUserService;
|
|
import com.ruoyi.app.service.ITbMyPublishService;
|
|
import com.ruoyi.app.service.ITbMyPublishService;
|
|
@@ -13,6 +14,7 @@ import io.swagger.annotations.ApiImplicitParam;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
@@ -20,36 +22,61 @@ import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 会员管理
|
|
|
|
|
|
+ * 我的近况
|
|
*
|
|
*
|
|
* @author Alex
|
|
* @author Alex
|
|
* @date 2020-10-09
|
|
* @date 2020-10-09
|
|
*/
|
|
*/
|
|
-@Api(value = "会员管理",tags = "会员管理")
|
|
|
|
|
|
+@Api(value = "我的近况",tags = "我的近况")
|
|
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
|
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
|
@RestController
|
|
@RestController
|
|
-@RequestMapping("/app/user" )
|
|
|
|
-public class AppUserController extends AppBaseController {
|
|
|
|
|
|
+@RequestMapping("/app/publish" )
|
|
|
|
+public class MyPublishController extends AppBaseController {
|
|
|
|
|
|
private final ITbMyPublishService publishService;
|
|
private final ITbMyPublishService publishService;
|
|
-
|
|
|
|
private final ITbAppUserService userService;
|
|
private final ITbAppUserService userService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 查询家族朋友圈
|
|
* 查询家族朋友圈
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- @ApiOperation(value = "查询家族朋友圈", notes = "查询家族朋友圈")
|
|
|
|
|
|
+ @ApiOperation("族友圈 分页列表")
|
|
@ApiImplicitParam(name = "userId", value = "会员ID",paramType="Long")
|
|
@ApiImplicitParam(name = "userId", value = "会员ID",paramType="Long")
|
|
@GetMapping("/selectCircle")
|
|
@GetMapping("/selectCircle")
|
|
public TableDataInfo selectCircle(Long userId){
|
|
public TableDataInfo selectCircle(Long userId){
|
|
- LambdaQueryWrapper<TbMyPublish> lqw = new LambdaQueryWrapper();
|
|
|
|
if (userId == null) {
|
|
if (userId == null) {
|
|
return new TableDataInfo();
|
|
return new TableDataInfo();
|
|
}
|
|
}
|
|
- lqw.eq(TbMyPublish::getAppUserId,userId);
|
|
|
|
- List<TbMyPublish> list = publishService.selectPublish(lqw);
|
|
|
|
|
|
+ List<TbMyPublish> list = publishService.selectPublish(new LambdaQueryWrapper<TbMyPublish>()
|
|
|
|
+ .eq(TbMyPublish::getAppUserId,userId)
|
|
|
|
+ );
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 查询我的近况 列表
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation("我的近况 分页列表")
|
|
|
|
+ @ApiImplicitParam(name = "userId", value = "会员ID",paramType="Long")
|
|
|
|
+ @GetMapping("/myList")
|
|
|
|
+ public TableDataInfo pageList(Long userId) {
|
|
|
|
+ if (userId == null) {
|
|
|
|
+ return new TableDataInfo();
|
|
|
|
+ }
|
|
|
|
+ TbMyPublish tbMyPublish = new TbMyPublish();
|
|
|
|
+ tbMyPublish.setAppUserId(userId);
|
|
|
|
+ tbMyPublish.setDeleted("N");
|
|
|
|
+ return publishService.pageList(tbMyPublish);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @ApiOperation("登录信息")
|
|
|
|
+ @GetMapping("/loginUser")
|
|
|
|
+ public AjaxResult loginUser(){
|
|
|
|
+
|
|
|
|
+ TbAppUser user = getLoginUser().getUser();
|
|
|
|
+ return AjaxResult.success(user);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|