动态置顶、好友、评论
parent
717d94c212
commit
741a6fb734
|
|
@ -0,0 +1,116 @@
|
|||
package com.ruoyi.app.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.app.domain.vo.AppDynamicCommentVo;
|
||||
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 com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.app.domain.AppDynamicComment;
|
||||
import com.ruoyi.app.service.IAppDynamicCommentService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 动态评论Controller
|
||||
*
|
||||
* @author wyh
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/comment")
|
||||
public class AppDynamicCommentController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAppDynamicCommentService appDynamicCommentService;
|
||||
|
||||
/**
|
||||
* 查询动态评论列表
|
||||
*/
|
||||
@RequiresPermissions("app:comment:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AppDynamicComment appDynamicComment)
|
||||
{
|
||||
startPage();
|
||||
List<AppDynamicComment> list = appDynamicCommentService.selectAppDynamicCommentList(appDynamicComment);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出动态评论列表
|
||||
*/
|
||||
@RequiresPermissions("app:comment:export")
|
||||
@Log(title = "动态评论", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AppDynamicComment appDynamicComment)
|
||||
{
|
||||
List<AppDynamicComment> list = appDynamicCommentService.selectAppDynamicCommentList(appDynamicComment);
|
||||
ExcelUtil<AppDynamicComment> util = new ExcelUtil<AppDynamicComment>(AppDynamicComment.class);
|
||||
util.exportExcel(response, list, "动态评论数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取动态评论详细信息
|
||||
*/
|
||||
@RequiresPermissions("app:comment:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(appDynamicCommentService.selectAppDynamicCommentById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增动态评论
|
||||
*/
|
||||
@RequiresPermissions("app:comment:add")
|
||||
@Log(title = "动态评论", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AppDynamicComment appDynamicComment)
|
||||
{
|
||||
return toAjax(appDynamicCommentService.insertAppDynamicComment(appDynamicComment));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改动态评论
|
||||
*/
|
||||
@RequiresPermissions("app:comment:edit")
|
||||
@Log(title = "动态评论", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AppDynamicComment appDynamicComment)
|
||||
{
|
||||
return toAjax(appDynamicCommentService.updateAppDynamicComment(appDynamicComment));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除动态评论
|
||||
*/
|
||||
@RequiresPermissions("app:comment:remove")
|
||||
@Log(title = "动态评论", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(appDynamicCommentService.deleteAppDynamicCommentByIds(ids));
|
||||
}
|
||||
|
||||
@RequiresPermissions("app:comment:list")
|
||||
@GetMapping("/treeList")
|
||||
public TableDataInfo treeList(AppDynamicComment appDynamicComment)
|
||||
{
|
||||
startPage();
|
||||
List<AppDynamicCommentVo> list = appDynamicCommentService.treeList(appDynamicComment);
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
package com.ruoyi.app.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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 com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.app.domain.AppDynamicLike;
|
||||
import com.ruoyi.app.service.IAppDynamicLikeService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 动态点赞Controller
|
||||
*
|
||||
* @author wyh
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/like")
|
||||
public class AppDynamicLikeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAppDynamicLikeService appDynamicLikeService;
|
||||
|
||||
/**
|
||||
* 查询动态点赞列表
|
||||
*/
|
||||
@RequiresPermissions("app:like:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AppDynamicLike appDynamicLike)
|
||||
{
|
||||
startPage();
|
||||
List<AppDynamicLike> list = appDynamicLikeService.selectAppDynamicLikeList(appDynamicLike);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出动态点赞列表
|
||||
*/
|
||||
@RequiresPermissions("app:like:export")
|
||||
@Log(title = "动态点赞", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AppDynamicLike appDynamicLike)
|
||||
{
|
||||
List<AppDynamicLike> list = appDynamicLikeService.selectAppDynamicLikeList(appDynamicLike);
|
||||
ExcelUtil<AppDynamicLike> util = new ExcelUtil<AppDynamicLike>(AppDynamicLike.class);
|
||||
util.exportExcel(response, list, "动态点赞数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取动态点赞详细信息
|
||||
*/
|
||||
@RequiresPermissions("app:like:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(appDynamicLikeService.selectAppDynamicLikeById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增动态点赞
|
||||
*/
|
||||
@RequiresPermissions("app:like:add")
|
||||
@Log(title = "动态点赞", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AppDynamicLike appDynamicLike)
|
||||
{
|
||||
return toAjax(appDynamicLikeService.insertAppDynamicLike(appDynamicLike));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改动态点赞
|
||||
*/
|
||||
@RequiresPermissions("app:like:edit")
|
||||
@Log(title = "动态点赞", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AppDynamicLike appDynamicLike)
|
||||
{
|
||||
return toAjax(appDynamicLikeService.updateAppDynamicLike(appDynamicLike));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除动态点赞
|
||||
*/
|
||||
@RequiresPermissions("app:like:remove")
|
||||
@Log(title = "动态点赞", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(appDynamicLikeService.deleteAppDynamicLikeByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
package com.ruoyi.app.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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 com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.app.domain.AppUserFriend;
|
||||
import com.ruoyi.app.service.IAppUserFriendService;
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 用户好友Controller
|
||||
*
|
||||
* @author wyh
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/friend")
|
||||
public class AppUserFriendController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAppUserFriendService appUserFriendService;
|
||||
|
||||
/**
|
||||
* 查询用户好友列表
|
||||
*/
|
||||
@RequiresPermissions("app:friend:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AppUserFriend appUserFriend)
|
||||
{
|
||||
startPage();
|
||||
List<AppUserFriend> list = appUserFriendService.selectAppUserFriendList(appUserFriend);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出用户好友列表
|
||||
*/
|
||||
@RequiresPermissions("app:friend:export")
|
||||
@Log(title = "用户好友", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AppUserFriend appUserFriend)
|
||||
{
|
||||
List<AppUserFriend> list = appUserFriendService.selectAppUserFriendList(appUserFriend);
|
||||
ExcelUtil<AppUserFriend> util = new ExcelUtil<AppUserFriend>(AppUserFriend.class);
|
||||
util.exportExcel(response, list, "用户好友数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户好友详细信息
|
||||
*/
|
||||
@RequiresPermissions("app:friend:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(appUserFriendService.selectAppUserFriendById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户好友
|
||||
*/
|
||||
@RequiresPermissions("app:friend:add")
|
||||
@Log(title = "用户好友", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AppUserFriend appUserFriend)
|
||||
{
|
||||
return toAjax(appUserFriendService.insertAppUserFriend(appUserFriend));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户好友
|
||||
*/
|
||||
@RequiresPermissions("app:friend:edit")
|
||||
@Log(title = "用户好友", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AppUserFriend appUserFriend)
|
||||
{
|
||||
return toAjax(appUserFriendService.updateAppUserFriend(appUserFriend));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户好友
|
||||
*/
|
||||
@RequiresPermissions("app:friend:remove")
|
||||
@Log(title = "用户好友", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(appUserFriendService.deleteAppUserFriendByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
package com.ruoyi.app.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 动态评论对象 app_dynamic_comment
|
||||
*
|
||||
* @author wyh
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
public class AppDynamicComment extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 父id */
|
||||
@Excel(name = "父id")
|
||||
private Long parentId;
|
||||
|
||||
/** 父ids */
|
||||
@Excel(name = "父ids")
|
||||
private String parentIds;
|
||||
|
||||
/** 评论用户id */
|
||||
@Excel(name = "评论用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 动态id */
|
||||
@Excel(name = "动态id")
|
||||
private Long dynamicId;
|
||||
|
||||
/** 内容 */
|
||||
@Excel(name = "内容")
|
||||
private String content;
|
||||
|
||||
@Excel(name = "用户名")
|
||||
private String username;
|
||||
|
||||
private List<AppDynamicComment> children = new ArrayList<>();
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setParentId(Long parentId)
|
||||
{
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public Long getParentId()
|
||||
{
|
||||
return parentId;
|
||||
}
|
||||
public void setParentIds(String parentIds)
|
||||
{
|
||||
this.parentIds = parentIds;
|
||||
}
|
||||
|
||||
public String getParentIds()
|
||||
{
|
||||
return parentIds;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setDynamicId(Long dynamicId)
|
||||
{
|
||||
this.dynamicId = dynamicId;
|
||||
}
|
||||
|
||||
public Long getDynamicId()
|
||||
{
|
||||
return dynamicId;
|
||||
}
|
||||
public void setContent(String content)
|
||||
{
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getContent()
|
||||
{
|
||||
return content;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("parentId", getParentId())
|
||||
.append("parentIds", getParentIds())
|
||||
.append("userId", getUserId())
|
||||
.append("dynamicId", getDynamicId())
|
||||
.append("content", getContent())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
package com.ruoyi.app.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 动态点赞对象 app_dynamic_like
|
||||
*
|
||||
* @author wyh
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
public class AppDynamicLike extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 点赞用户id */
|
||||
@Excel(name = "点赞用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 动态id */
|
||||
@Excel(name = "动态id")
|
||||
private Long dynamicId;
|
||||
|
||||
/** 状态:0好友1拉黑 */
|
||||
@Excel(name = "状态:0好友1拉黑")
|
||||
private Long status;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setDynamicId(Long dynamicId)
|
||||
{
|
||||
this.dynamicId = dynamicId;
|
||||
}
|
||||
|
||||
public Long getDynamicId()
|
||||
{
|
||||
return dynamicId;
|
||||
}
|
||||
public void setStatus(Long status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("userId", getUserId())
|
||||
.append("dynamicId", getDynamicId())
|
||||
.append("status", getStatus())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -45,6 +45,20 @@ public class AppUserDynamic extends BaseEntity
|
|||
@Excel(name = "文件地址,多个地址用逗号隔开")
|
||||
private String imgUrls;
|
||||
|
||||
/** 是否置顶:0是1否 */
|
||||
@Excel(name = "是否置顶:0是1否")
|
||||
private Long isTop;
|
||||
|
||||
public void setIsTop(Long isTop)
|
||||
{
|
||||
this.isTop = isTop;
|
||||
}
|
||||
|
||||
public Long getIsTop()
|
||||
{
|
||||
return isTop;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
|
|
@ -133,6 +147,7 @@ public class AppUserDynamic extends BaseEntity
|
|||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("imgUrls", getImgUrls())
|
||||
.toString();
|
||||
.append("isTop", getIsTop())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,84 @@
|
|||
package com.ruoyi.app.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 用户好友对象 app_user_friend
|
||||
*
|
||||
* @author wyh
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
public class AppUserFriend extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 我的id */
|
||||
@Excel(name = "我的id")
|
||||
private Long userId;
|
||||
|
||||
/** 好友id */
|
||||
@Excel(name = "好友id")
|
||||
private Long friendId;
|
||||
|
||||
/** 状态:0好友1拉黑 */
|
||||
@Excel(name = "状态:0好友1拉黑")
|
||||
private Long status;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setFriendId(Long friendId)
|
||||
{
|
||||
this.friendId = friendId;
|
||||
}
|
||||
|
||||
public Long getFriendId()
|
||||
{
|
||||
return friendId;
|
||||
}
|
||||
public void setStatus(Long status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("userId", getUserId())
|
||||
.append("friendId", getFriendId())
|
||||
.append("status", getStatus())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package com.ruoyi.app.domain.vo;
|
||||
|
||||
import com.ruoyi.app.domain.AppDynamicComment;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 动态评论对象 app_dynamic_comment
|
||||
*
|
||||
* @author wyh
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
public class AppDynamicCommentVo extends AppDynamicComment
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "用户名")
|
||||
private String username;
|
||||
|
||||
@Excel(name = "用户头像")
|
||||
private String avatarUrl;
|
||||
|
||||
private List<AppDynamicCommentVo> children = new ArrayList<>();
|
||||
|
||||
public void setChildren(List<AppDynamicCommentVo> children) {
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public List<AppDynamicCommentVo> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setAvatarUrl(String avatarUrl) {
|
||||
this.avatarUrl = avatarUrl;
|
||||
}
|
||||
|
||||
public String getAvatarUrl() {
|
||||
return avatarUrl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("parentId", getParentId())
|
||||
.append("parentIds", getParentIds())
|
||||
.append("userId", getUserId())
|
||||
.append("dynamicId", getDynamicId())
|
||||
.append("content", getContent())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("remark", getRemark())
|
||||
.append("children", getChildren())
|
||||
.append("username", getUsername())
|
||||
.append("avatarUrl", getAvatarUrl())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package com.ruoyi.app.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.app.domain.AppDynamicComment;
|
||||
import com.ruoyi.app.domain.vo.AppDynamicCommentVo;
|
||||
|
||||
/**
|
||||
* 动态评论Mapper接口
|
||||
*
|
||||
* @author wyh
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
public interface AppDynamicCommentMapper
|
||||
{
|
||||
/**
|
||||
* 查询动态评论
|
||||
*
|
||||
* @param id 动态评论主键
|
||||
* @return 动态评论
|
||||
*/
|
||||
public AppDynamicComment selectAppDynamicCommentById(Long id);
|
||||
|
||||
/**
|
||||
* 查询动态评论列表
|
||||
*
|
||||
* @param appDynamicComment 动态评论
|
||||
* @return 动态评论集合
|
||||
*/
|
||||
public List<AppDynamicComment> selectAppDynamicCommentList(AppDynamicComment appDynamicComment);
|
||||
|
||||
/**
|
||||
* 新增动态评论
|
||||
*
|
||||
* @param appDynamicComment 动态评论
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAppDynamicComment(AppDynamicComment appDynamicComment);
|
||||
|
||||
/**
|
||||
* 修改动态评论
|
||||
*
|
||||
* @param appDynamicComment 动态评论
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAppDynamicComment(AppDynamicComment appDynamicComment);
|
||||
|
||||
/**
|
||||
* 删除动态评论
|
||||
*
|
||||
* @param id 动态评论主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppDynamicCommentById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除动态评论
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppDynamicCommentByIds(Long[] ids);
|
||||
|
||||
public int deleteAppDynamicCommentByParentId(Long parentId);
|
||||
|
||||
public List<AppDynamicCommentVo> selectCommentList(AppDynamicComment appDynamicComment);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.app.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.app.domain.AppDynamicLike;
|
||||
|
||||
/**
|
||||
* 动态点赞Mapper接口
|
||||
*
|
||||
* @author wyh
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
public interface AppDynamicLikeMapper
|
||||
{
|
||||
/**
|
||||
* 查询动态点赞
|
||||
*
|
||||
* @param id 动态点赞主键
|
||||
* @return 动态点赞
|
||||
*/
|
||||
public AppDynamicLike selectAppDynamicLikeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询动态点赞列表
|
||||
*
|
||||
* @param appDynamicLike 动态点赞
|
||||
* @return 动态点赞集合
|
||||
*/
|
||||
public List<AppDynamicLike> selectAppDynamicLikeList(AppDynamicLike appDynamicLike);
|
||||
|
||||
/**
|
||||
* 新增动态点赞
|
||||
*
|
||||
* @param appDynamicLike 动态点赞
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAppDynamicLike(AppDynamicLike appDynamicLike);
|
||||
|
||||
/**
|
||||
* 修改动态点赞
|
||||
*
|
||||
* @param appDynamicLike 动态点赞
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAppDynamicLike(AppDynamicLike appDynamicLike);
|
||||
|
||||
/**
|
||||
* 删除动态点赞
|
||||
*
|
||||
* @param id 动态点赞主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppDynamicLikeById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除动态点赞
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppDynamicLikeByIds(Long[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.app.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.app.domain.AppUserFriend;
|
||||
|
||||
/**
|
||||
* 用户好友Mapper接口
|
||||
*
|
||||
* @author wyh
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
public interface AppUserFriendMapper
|
||||
{
|
||||
/**
|
||||
* 查询用户好友
|
||||
*
|
||||
* @param id 用户好友主键
|
||||
* @return 用户好友
|
||||
*/
|
||||
public AppUserFriend selectAppUserFriendById(Long id);
|
||||
|
||||
/**
|
||||
* 查询用户好友列表
|
||||
*
|
||||
* @param appUserFriend 用户好友
|
||||
* @return 用户好友集合
|
||||
*/
|
||||
public List<AppUserFriend> selectAppUserFriendList(AppUserFriend appUserFriend);
|
||||
|
||||
/**
|
||||
* 新增用户好友
|
||||
*
|
||||
* @param appUserFriend 用户好友
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAppUserFriend(AppUserFriend appUserFriend);
|
||||
|
||||
/**
|
||||
* 修改用户好友
|
||||
*
|
||||
* @param appUserFriend 用户好友
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAppUserFriend(AppUserFriend appUserFriend);
|
||||
|
||||
/**
|
||||
* 删除用户好友
|
||||
*
|
||||
* @param id 用户好友主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppUserFriendById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除用户好友
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppUserFriendByIds(Long[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
package com.ruoyi.app.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.app.domain.AppDynamicComment;
|
||||
import com.ruoyi.app.domain.vo.AppDynamicCommentVo;
|
||||
|
||||
/**
|
||||
* 动态评论Service接口
|
||||
*
|
||||
* @author wyh
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
public interface IAppDynamicCommentService
|
||||
{
|
||||
/**
|
||||
* 查询动态评论
|
||||
*
|
||||
* @param id 动态评论主键
|
||||
* @return 动态评论
|
||||
*/
|
||||
public AppDynamicComment selectAppDynamicCommentById(Long id);
|
||||
|
||||
/**
|
||||
* 查询动态评论列表
|
||||
*
|
||||
* @param appDynamicComment 动态评论
|
||||
* @return 动态评论集合
|
||||
*/
|
||||
public List<AppDynamicComment> selectAppDynamicCommentList(AppDynamicComment appDynamicComment);
|
||||
|
||||
/**
|
||||
* 新增动态评论
|
||||
*
|
||||
* @param appDynamicComment 动态评论
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAppDynamicComment(AppDynamicComment appDynamicComment);
|
||||
|
||||
/**
|
||||
* 修改动态评论
|
||||
*
|
||||
* @param appDynamicComment 动态评论
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAppDynamicComment(AppDynamicComment appDynamicComment);
|
||||
|
||||
/**
|
||||
* 批量删除动态评论
|
||||
*
|
||||
* @param ids 需要删除的动态评论主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppDynamicCommentByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除动态评论信息
|
||||
*
|
||||
* @param id 动态评论主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppDynamicCommentById(Long id);
|
||||
|
||||
public List<AppDynamicCommentVo> treeList(AppDynamicComment appDynamicComment);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.app.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.app.domain.AppDynamicLike;
|
||||
|
||||
/**
|
||||
* 动态点赞Service接口
|
||||
*
|
||||
* @author wyh
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
public interface IAppDynamicLikeService
|
||||
{
|
||||
/**
|
||||
* 查询动态点赞
|
||||
*
|
||||
* @param id 动态点赞主键
|
||||
* @return 动态点赞
|
||||
*/
|
||||
public AppDynamicLike selectAppDynamicLikeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询动态点赞列表
|
||||
*
|
||||
* @param appDynamicLike 动态点赞
|
||||
* @return 动态点赞集合
|
||||
*/
|
||||
public List<AppDynamicLike> selectAppDynamicLikeList(AppDynamicLike appDynamicLike);
|
||||
|
||||
/**
|
||||
* 新增动态点赞
|
||||
*
|
||||
* @param appDynamicLike 动态点赞
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAppDynamicLike(AppDynamicLike appDynamicLike);
|
||||
|
||||
/**
|
||||
* 修改动态点赞
|
||||
*
|
||||
* @param appDynamicLike 动态点赞
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAppDynamicLike(AppDynamicLike appDynamicLike);
|
||||
|
||||
/**
|
||||
* 批量删除动态点赞
|
||||
*
|
||||
* @param ids 需要删除的动态点赞主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppDynamicLikeByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除动态点赞信息
|
||||
*
|
||||
* @param id 动态点赞主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppDynamicLikeById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.app.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.app.domain.AppUserFriend;
|
||||
|
||||
/**
|
||||
* 用户好友Service接口
|
||||
*
|
||||
* @author wyh
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
public interface IAppUserFriendService
|
||||
{
|
||||
/**
|
||||
* 查询用户好友
|
||||
*
|
||||
* @param id 用户好友主键
|
||||
* @return 用户好友
|
||||
*/
|
||||
public AppUserFriend selectAppUserFriendById(Long id);
|
||||
|
||||
/**
|
||||
* 查询用户好友列表
|
||||
*
|
||||
* @param appUserFriend 用户好友
|
||||
* @return 用户好友集合
|
||||
*/
|
||||
public List<AppUserFriend> selectAppUserFriendList(AppUserFriend appUserFriend);
|
||||
|
||||
/**
|
||||
* 新增用户好友
|
||||
*
|
||||
* @param appUserFriend 用户好友
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAppUserFriend(AppUserFriend appUserFriend);
|
||||
|
||||
/**
|
||||
* 修改用户好友
|
||||
*
|
||||
* @param appUserFriend 用户好友
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAppUserFriend(AppUserFriend appUserFriend);
|
||||
|
||||
/**
|
||||
* 批量删除用户好友
|
||||
*
|
||||
* @param ids 需要删除的用户好友主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppUserFriendByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除用户好友信息
|
||||
*
|
||||
* @param id 用户好友主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAppUserFriendById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
package com.ruoyi.app.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.ruoyi.app.domain.AppUser;
|
||||
import com.ruoyi.app.domain.vo.AppDynamicCommentVo;
|
||||
import com.ruoyi.app.mapper.AppUserMapper;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.app.mapper.AppDynamicCommentMapper;
|
||||
import com.ruoyi.app.domain.AppDynamicComment;
|
||||
import com.ruoyi.app.service.IAppDynamicCommentService;
|
||||
|
||||
/**
|
||||
* 动态评论Service业务层处理
|
||||
*
|
||||
* @author wyh
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
@Service
|
||||
public class AppDynamicCommentServiceImpl implements IAppDynamicCommentService
|
||||
{
|
||||
@Autowired
|
||||
private AppDynamicCommentMapper appDynamicCommentMapper;
|
||||
|
||||
/**
|
||||
* 查询动态评论
|
||||
*
|
||||
* @param id 动态评论主键
|
||||
* @return 动态评论
|
||||
*/
|
||||
@Override
|
||||
public AppDynamicComment selectAppDynamicCommentById(Long id)
|
||||
{
|
||||
return appDynamicCommentMapper.selectAppDynamicCommentById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询动态评论列表
|
||||
*
|
||||
* @param appDynamicComment 动态评论
|
||||
* @return 动态评论
|
||||
*/
|
||||
@Override
|
||||
public List<AppDynamicComment> selectAppDynamicCommentList(AppDynamicComment appDynamicComment)
|
||||
{
|
||||
return appDynamicCommentMapper.selectAppDynamicCommentList(appDynamicComment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增动态评论
|
||||
*
|
||||
* @param appDynamicComment 动态评论
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAppDynamicComment(AppDynamicComment appDynamicComment)
|
||||
{
|
||||
if (appDynamicComment.getParentId() > 0) {
|
||||
AppDynamicComment entity = appDynamicCommentMapper.selectAppDynamicCommentById(appDynamicComment.getId());
|
||||
appDynamicComment.setParentIds(entity.getParentIds() + "," + appDynamicComment.getParentId());
|
||||
}
|
||||
appDynamicComment.setCreateTime(DateUtils.getNowDate());
|
||||
return appDynamicCommentMapper.insertAppDynamicComment(appDynamicComment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改动态评论
|
||||
*
|
||||
* @param appDynamicComment 动态评论
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAppDynamicComment(AppDynamicComment appDynamicComment)
|
||||
{
|
||||
appDynamicComment.setUpdateTime(DateUtils.getNowDate());
|
||||
return appDynamicCommentMapper.updateAppDynamicComment(appDynamicComment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除动态评论
|
||||
*
|
||||
* @param ids 需要删除的动态评论主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAppDynamicCommentByIds(Long[] ids)
|
||||
{
|
||||
for (Long id : ids) {
|
||||
appDynamicCommentMapper.deleteAppDynamicCommentByParentId(id);
|
||||
}
|
||||
return appDynamicCommentMapper.deleteAppDynamicCommentByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除动态评论信息
|
||||
*
|
||||
* @param id 动态评论主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAppDynamicCommentById(Long id)
|
||||
{
|
||||
appDynamicCommentMapper.deleteAppDynamicCommentByParentId(id);
|
||||
return appDynamicCommentMapper.deleteAppDynamicCommentById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AppDynamicCommentVo> treeList(AppDynamicComment appDynamicComment) {
|
||||
if (appDynamicComment.getDynamicId() == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<AppDynamicCommentVo> appDynamicComments = appDynamicCommentMapper.selectCommentList(appDynamicComment);
|
||||
List<AppDynamicCommentVo> parentList = appDynamicComments.stream().filter(entity -> entity.getParentId() == null).collect(Collectors.toList());
|
||||
List<AppDynamicCommentVo> srcList = appDynamicComments.stream().filter(entity -> entity.getParentId() != null).collect(Collectors.toList());
|
||||
return buildList(parentList,srcList);
|
||||
}
|
||||
public List<AppDynamicCommentVo> buildList(List<AppDynamicCommentVo> parentList,List<AppDynamicCommentVo> srcList){
|
||||
for (AppDynamicCommentVo appDynamicCommentVo : parentList) {
|
||||
buildTreeAppDynamicCommentVo(appDynamicCommentVo,srcList);
|
||||
}
|
||||
return parentList;
|
||||
}
|
||||
|
||||
public static AppDynamicCommentVo buildTreeAppDynamicCommentVo(AppDynamicCommentVo AppDynamicCommentVo, List<AppDynamicCommentVo> srcList) {
|
||||
//父节点
|
||||
List<AppDynamicCommentVo> children = getChildrenAppDynamicCommentVoById(AppDynamicCommentVo.getId(), srcList);
|
||||
AppDynamicCommentVo.setChildren(children);
|
||||
if (children !=null && children.size() > 0) {
|
||||
List<AppDynamicCommentVo> children2 = new ArrayList<AppDynamicCommentVo>();
|
||||
for (AppDynamicCommentVo temp : children) {
|
||||
//递归
|
||||
AppDynamicCommentVo child = buildTreeAppDynamicCommentVo(temp, srcList);
|
||||
children2.add(child);
|
||||
}
|
||||
AppDynamicCommentVo.setChildren(children2);
|
||||
}
|
||||
return AppDynamicCommentVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据节点id获取子节点
|
||||
*
|
||||
* @param parentId
|
||||
* @param AppDynamicCommentVos
|
||||
* @return
|
||||
*/
|
||||
public static List<AppDynamicCommentVo> getChildrenAppDynamicCommentVoById(Long parentId, List<AppDynamicCommentVo> AppDynamicCommentVos) {
|
||||
List<AppDynamicCommentVo> children = new ArrayList<AppDynamicCommentVo>();
|
||||
for (AppDynamicCommentVo node : AppDynamicCommentVos) {
|
||||
if (node.getParentId() == parentId) {
|
||||
//装载parentId对应的子节点
|
||||
children.add(node);
|
||||
}
|
||||
}
|
||||
return children;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
package com.ruoyi.app.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.app.mapper.AppDynamicLikeMapper;
|
||||
import com.ruoyi.app.domain.AppDynamicLike;
|
||||
import com.ruoyi.app.service.IAppDynamicLikeService;
|
||||
|
||||
/**
|
||||
* 动态点赞Service业务层处理
|
||||
*
|
||||
* @author wyh
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
@Service
|
||||
public class AppDynamicLikeServiceImpl implements IAppDynamicLikeService
|
||||
{
|
||||
@Autowired
|
||||
private AppDynamicLikeMapper appDynamicLikeMapper;
|
||||
|
||||
/**
|
||||
* 查询动态点赞
|
||||
*
|
||||
* @param id 动态点赞主键
|
||||
* @return 动态点赞
|
||||
*/
|
||||
@Override
|
||||
public AppDynamicLike selectAppDynamicLikeById(Long id)
|
||||
{
|
||||
return appDynamicLikeMapper.selectAppDynamicLikeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询动态点赞列表
|
||||
*
|
||||
* @param appDynamicLike 动态点赞
|
||||
* @return 动态点赞
|
||||
*/
|
||||
@Override
|
||||
public List<AppDynamicLike> selectAppDynamicLikeList(AppDynamicLike appDynamicLike)
|
||||
{
|
||||
return appDynamicLikeMapper.selectAppDynamicLikeList(appDynamicLike);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增动态点赞
|
||||
*
|
||||
* @param appDynamicLike 动态点赞
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAppDynamicLike(AppDynamicLike appDynamicLike)
|
||||
{
|
||||
appDynamicLike.setCreateTime(DateUtils.getNowDate());
|
||||
return appDynamicLikeMapper.insertAppDynamicLike(appDynamicLike);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改动态点赞
|
||||
*
|
||||
* @param appDynamicLike 动态点赞
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAppDynamicLike(AppDynamicLike appDynamicLike)
|
||||
{
|
||||
appDynamicLike.setUpdateTime(DateUtils.getNowDate());
|
||||
return appDynamicLikeMapper.updateAppDynamicLike(appDynamicLike);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除动态点赞
|
||||
*
|
||||
* @param ids 需要删除的动态点赞主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAppDynamicLikeByIds(Long[] ids)
|
||||
{
|
||||
return appDynamicLikeMapper.deleteAppDynamicLikeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除动态点赞信息
|
||||
*
|
||||
* @param id 动态点赞主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAppDynamicLikeById(Long id)
|
||||
{
|
||||
return appDynamicLikeMapper.deleteAppDynamicLikeById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
package com.ruoyi.app.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.app.mapper.AppUserFriendMapper;
|
||||
import com.ruoyi.app.domain.AppUserFriend;
|
||||
import com.ruoyi.app.service.IAppUserFriendService;
|
||||
|
||||
/**
|
||||
* 用户好友Service业务层处理
|
||||
*
|
||||
* @author wyh
|
||||
* @date 2024-04-24
|
||||
*/
|
||||
@Service
|
||||
public class AppUserFriendServiceImpl implements IAppUserFriendService
|
||||
{
|
||||
@Autowired
|
||||
private AppUserFriendMapper appUserFriendMapper;
|
||||
|
||||
/**
|
||||
* 查询用户好友
|
||||
*
|
||||
* @param id 用户好友主键
|
||||
* @return 用户好友
|
||||
*/
|
||||
@Override
|
||||
public AppUserFriend selectAppUserFriendById(Long id)
|
||||
{
|
||||
return appUserFriendMapper.selectAppUserFriendById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户好友列表
|
||||
*
|
||||
* @param appUserFriend 用户好友
|
||||
* @return 用户好友
|
||||
*/
|
||||
@Override
|
||||
public List<AppUserFriend> selectAppUserFriendList(AppUserFriend appUserFriend)
|
||||
{
|
||||
return appUserFriendMapper.selectAppUserFriendList(appUserFriend);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户好友
|
||||
*
|
||||
* @param appUserFriend 用户好友
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAppUserFriend(AppUserFriend appUserFriend)
|
||||
{
|
||||
appUserFriend.setCreateTime(DateUtils.getNowDate());
|
||||
return appUserFriendMapper.insertAppUserFriend(appUserFriend);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户好友
|
||||
*
|
||||
* @param appUserFriend 用户好友
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAppUserFriend(AppUserFriend appUserFriend)
|
||||
{
|
||||
appUserFriend.setUpdateTime(DateUtils.getNowDate());
|
||||
return appUserFriendMapper.updateAppUserFriend(appUserFriend);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除用户好友
|
||||
*
|
||||
* @param ids 需要删除的用户好友主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAppUserFriendByIds(Long[] ids)
|
||||
{
|
||||
return appUserFriendMapper.deleteAppUserFriendByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户好友信息
|
||||
*
|
||||
* @param id 用户好友主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAppUserFriendById(Long id)
|
||||
{
|
||||
return appUserFriendMapper.deleteAppUserFriendById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
<?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.app.mapper.AppDynamicCommentMapper">
|
||||
|
||||
<resultMap type="AppDynamicComment" id="AppDynamicCommentResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="parentIds" column="parent_ids" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="dynamicId" column="dynamic_id" />
|
||||
<result property="content" column="content" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="updateBy" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAppDynamicCommentVo">
|
||||
select id, parent_id, parent_ids, user_id, dynamic_id, content, create_time, update_time, create_by, updateBy, remark from app_dynamic_comment
|
||||
</sql>
|
||||
|
||||
<select id="selectCommentList" parameterType="AppDynamicComment" resultType="com.ruoyi.app.domain.vo.AppDynamicCommentVo">
|
||||
select
|
||||
a.id as "id",
|
||||
a.parent_id as "parentId",
|
||||
a.parent_ids as "parentIds",
|
||||
a.user_id as "userId",
|
||||
a.dynamic_id as "dynamicId",
|
||||
a.content as "content",
|
||||
a.create_time as "createTime",
|
||||
u.username as "username",
|
||||
u.avatar_url as "avatarUrl"
|
||||
from app_dynamic_comment a
|
||||
LEFT JOIN app_user u on u.id = a.user_id
|
||||
where a.dynamic_id = #{dynamicId}
|
||||
</select>
|
||||
|
||||
<select id="selectAppDynamicCommentList" parameterType="AppDynamicComment" resultMap="AppDynamicCommentResult">
|
||||
<include refid="selectAppDynamicCommentVo"/>
|
||||
<where>
|
||||
<if test="parentId != null "> and parent_id = #{parentId}</if>
|
||||
<if test="parentIds != null "> and parent_ids = #{parentIds}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="dynamicId != null "> and dynamic_id = #{dynamicId}</if>
|
||||
<if test="content != null and content != ''"> and content = #{content}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and updateBy = #{updateBy}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAppDynamicCommentById" parameterType="Long" resultMap="AppDynamicCommentResult">
|
||||
<include refid="selectAppDynamicCommentVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertAppDynamicComment" parameterType="AppDynamicComment" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into app_dynamic_comment
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="parentId != null">parent_id,</if>
|
||||
<if test="parentIds != null">parent_ids,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="dynamicId != null">dynamic_id,</if>
|
||||
<if test="content != null">content,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">updateBy,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
<if test="parentIds != null">#{parentIds},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="dynamicId != null">#{dynamicId},</if>
|
||||
<if test="content != null">#{content},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAppDynamicComment" parameterType="AppDynamicComment">
|
||||
update app_dynamic_comment
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||
<if test="parentIds != null">parent_ids = #{parentIds},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="dynamicId != null">dynamic_id = #{dynamicId},</if>
|
||||
<if test="content != null">content = #{content},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">updateBy = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAppDynamicCommentById" parameterType="Long">
|
||||
delete from app_dynamic_comment where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAppDynamicCommentByParentId" parameterType="Long">
|
||||
delete from app_dynamic_comment where parent_ids LIKE CONCAT('%',#{parentId},'%'))
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAppDynamicCommentByIds" parameterType="String">
|
||||
delete from app_dynamic_comment where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
<?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.app.mapper.AppDynamicLikeMapper">
|
||||
|
||||
<resultMap type="AppDynamicLike" id="AppDynamicLikeResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="dynamicId" column="dynamic_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="updateBy" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAppDynamicLikeVo">
|
||||
select id, user_id, dynamic_id, status, create_time, update_time, create_by, updateBy, remark from app_dynamic_like
|
||||
</sql>
|
||||
|
||||
<select id="selectAppDynamicLikeList" parameterType="AppDynamicLike" resultMap="AppDynamicLikeResult">
|
||||
<include refid="selectAppDynamicLikeVo"/>
|
||||
<where>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="dynamicId != null "> and dynamic_id = #{dynamicId}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and updateBy = #{updateBy}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAppDynamicLikeById" parameterType="Long" resultMap="AppDynamicLikeResult">
|
||||
<include refid="selectAppDynamicLikeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertAppDynamicLike" parameterType="AppDynamicLike" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into app_dynamic_like
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="dynamicId != null">dynamic_id,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">updateBy,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="dynamicId != null">#{dynamicId},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAppDynamicLike" parameterType="AppDynamicLike">
|
||||
update app_dynamic_like
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="dynamicId != null">dynamic_id = #{dynamicId},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">updateBy = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAppDynamicLikeById" parameterType="Long">
|
||||
delete from app_dynamic_like where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAppDynamicLikeByIds" parameterType="String">
|
||||
delete from app_dynamic_like where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -17,10 +17,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="updateBy" />
|
||||
<result property="isTop" column="is_top" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAppUserDynamicVo">
|
||||
select id, user_id, content, video_url, topic_id, address, privacy_status, remark, create_time, update_time, create_by, updateBy from app_user_dynamic
|
||||
select id, user_id, content, video_url, topic_id, address, privacy_status, remark, create_time, update_time, create_by, updateBy,is_top from app_user_dynamic
|
||||
</sql>
|
||||
|
||||
<select id="selectAppUserDynamicList" parameterType="AppUserDynamic" resultMap="AppUserDynamicResult">
|
||||
|
|
@ -33,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="address != null and address != ''"> and address = #{address}</if>
|
||||
<if test="privacyStatus != null "> and privacy_status = #{privacyStatus}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and updateBy = #{updateBy}</if>
|
||||
<if test="isTop != null "> and is_top = #{isTop}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
@ -55,7 +57,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">updateBy,</if>
|
||||
</trim>
|
||||
<if test="isTop != null">is_top,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="content != null">#{content},</if>
|
||||
|
|
@ -68,7 +71,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
</trim>
|
||||
<if test="isTop != null">#{isTop},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAppUserDynamic" parameterType="AppUserDynamic">
|
||||
|
|
@ -85,6 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">updateBy = #{updateBy},</if>
|
||||
<if test="isTop != null">is_top = #{isTop},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,87 @@
|
|||
<?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.app.mapper.AppUserFriendMapper">
|
||||
|
||||
<resultMap type="AppUserFriend" id="AppUserFriendResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="friendId" column="friend_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="updateBy" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAppUserFriendVo">
|
||||
select id, user_id, friend_id, status, create_time, update_time, create_by, updateBy, remark from app_user_friend
|
||||
</sql>
|
||||
|
||||
<select id="selectAppUserFriendList" parameterType="AppUserFriend" resultMap="AppUserFriendResult">
|
||||
<include refid="selectAppUserFriendVo"/>
|
||||
<where>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="friendId != null "> and friend_id = #{friendId}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and updateBy = #{updateBy}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAppUserFriendById" parameterType="Long" resultMap="AppUserFriendResult">
|
||||
<include refid="selectAppUserFriendVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertAppUserFriend" parameterType="AppUserFriend" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into app_user_friend
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="friendId != null">friend_id,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">updateBy,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="friendId != null">#{friendId},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAppUserFriend" parameterType="AppUserFriend">
|
||||
update app_user_friend
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="friendId != null">friend_id = #{friendId},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">updateBy = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAppUserFriendById" parameterType="Long">
|
||||
delete from app_user_friend where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAppUserFriendByIds" parameterType="String">
|
||||
delete from app_user_friend where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue