diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppDynamicCommentController.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppDynamicCommentController.java new file mode 100644 index 0000000..f5034af --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppDynamicCommentController.java @@ -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 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 list = appDynamicCommentService.selectAppDynamicCommentList(appDynamicComment); + ExcelUtil util = new ExcelUtil(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 list = appDynamicCommentService.treeList(appDynamicComment); + return getDataTable(list); + } +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppDynamicLikeController.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppDynamicLikeController.java new file mode 100644 index 0000000..c361667 --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppDynamicLikeController.java @@ -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 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 list = appDynamicLikeService.selectAppDynamicLikeList(appDynamicLike); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppUserFriendController.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppUserFriendController.java new file mode 100644 index 0000000..aad215f --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppUserFriendController.java @@ -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 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 list = appUserFriendService.selectAppUserFriendList(appUserFriend); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppDynamicComment.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppDynamicComment.java new file mode 100644 index 0000000..21a3287 --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppDynamicComment.java @@ -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 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(); + } +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppDynamicLike.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppDynamicLike.java new file mode 100644 index 0000000..109f867 --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppDynamicLike.java @@ -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(); + } +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppUserDynamic.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppUserDynamic.java index ff5b579..a3cba1d 100644 --- a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppUserDynamic.java +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppUserDynamic.java @@ -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(); } } diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppUserFriend.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppUserFriend.java new file mode 100644 index 0000000..bd78364 --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppUserFriend.java @@ -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(); + } +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/vo/AppDynamicCommentVo.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/vo/AppDynamicCommentVo.java new file mode 100644 index 0000000..6ffe5c5 --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/vo/AppDynamicCommentVo.java @@ -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 children = new ArrayList<>(); + + public void setChildren(List children) { + this.children = children; + } + + public List 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(); + } +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppDynamicCommentMapper.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppDynamicCommentMapper.java new file mode 100644 index 0000000..a410a4a --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppDynamicCommentMapper.java @@ -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 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 selectCommentList(AppDynamicComment appDynamicComment); +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppDynamicLikeMapper.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppDynamicLikeMapper.java new file mode 100644 index 0000000..8e2a254 --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppDynamicLikeMapper.java @@ -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 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); +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppUserFriendMapper.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppUserFriendMapper.java new file mode 100644 index 0000000..c9f89a0 --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppUserFriendMapper.java @@ -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 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); +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppDynamicCommentService.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppDynamicCommentService.java new file mode 100644 index 0000000..b536192 --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppDynamicCommentService.java @@ -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 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 treeList(AppDynamicComment appDynamicComment); + +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppDynamicLikeService.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppDynamicLikeService.java new file mode 100644 index 0000000..a4a5ee0 --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppDynamicLikeService.java @@ -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 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); +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppUserFriendService.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppUserFriendService.java new file mode 100644 index 0000000..7c2c105 --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppUserFriendService.java @@ -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 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); +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppDynamicCommentServiceImpl.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppDynamicCommentServiceImpl.java new file mode 100644 index 0000000..3cc5126 --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppDynamicCommentServiceImpl.java @@ -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 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 treeList(AppDynamicComment appDynamicComment) { + if (appDynamicComment.getDynamicId() == null) { + return new ArrayList<>(); + } + List appDynamicComments = appDynamicCommentMapper.selectCommentList(appDynamicComment); + List parentList = appDynamicComments.stream().filter(entity -> entity.getParentId() == null).collect(Collectors.toList()); + List srcList = appDynamicComments.stream().filter(entity -> entity.getParentId() != null).collect(Collectors.toList()); + return buildList(parentList,srcList); + } + public List buildList(List parentList,List srcList){ + for (AppDynamicCommentVo appDynamicCommentVo : parentList) { + buildTreeAppDynamicCommentVo(appDynamicCommentVo,srcList); + } + return parentList; + } + + public static AppDynamicCommentVo buildTreeAppDynamicCommentVo(AppDynamicCommentVo AppDynamicCommentVo, List srcList) { + //父节点 + List children = getChildrenAppDynamicCommentVoById(AppDynamicCommentVo.getId(), srcList); + AppDynamicCommentVo.setChildren(children); + if (children !=null && children.size() > 0) { + List children2 = new ArrayList(); + 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 getChildrenAppDynamicCommentVoById(Long parentId, List AppDynamicCommentVos) { + List children = new ArrayList(); + for (AppDynamicCommentVo node : AppDynamicCommentVos) { + if (node.getParentId() == parentId) { + //装载parentId对应的子节点 + children.add(node); + } + } + return children; + } +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppDynamicLikeServiceImpl.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppDynamicLikeServiceImpl.java new file mode 100644 index 0000000..25aa57a --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppDynamicLikeServiceImpl.java @@ -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 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); + } +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppUserFriendServiceImpl.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppUserFriendServiceImpl.java new file mode 100644 index 0000000..09540dc --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppUserFriendServiceImpl.java @@ -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 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); + } +} diff --git a/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppDynamicCommentMapper.xml b/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppDynamicCommentMapper.xml new file mode 100644 index 0000000..b65ab9f --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppDynamicCommentMapper.xml @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + select id, parent_id, parent_ids, user_id, dynamic_id, content, create_time, update_time, create_by, updateBy, remark from app_dynamic_comment + + + + + + + + + + insert into app_dynamic_comment + + parent_id, + parent_ids, + user_id, + dynamic_id, + content, + create_time, + update_time, + create_by, + updateBy, + remark, + + + #{parentId}, + #{parentIds}, + #{userId}, + #{dynamicId}, + #{content}, + #{createTime}, + #{updateTime}, + #{createBy}, + #{updateBy}, + #{remark}, + + + + + update app_dynamic_comment + + parent_id = #{parentId}, + parent_ids = #{parentIds}, + user_id = #{userId}, + dynamic_id = #{dynamicId}, + content = #{content}, + create_time = #{createTime}, + update_time = #{updateTime}, + create_by = #{createBy}, + updateBy = #{updateBy}, + remark = #{remark}, + + where id = #{id} + + + + delete from app_dynamic_comment where id = #{id} + + + + delete from app_dynamic_comment where parent_ids LIKE CONCAT('%',#{parentId},'%')) + + + + delete from app_dynamic_comment where id in + + #{id} + + + \ No newline at end of file diff --git a/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppDynamicLikeMapper.xml b/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppDynamicLikeMapper.xml new file mode 100644 index 0000000..1119887 --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppDynamicLikeMapper.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + select id, user_id, dynamic_id, status, create_time, update_time, create_by, updateBy, remark from app_dynamic_like + + + + + + + + insert into app_dynamic_like + + user_id, + dynamic_id, + status, + create_time, + update_time, + create_by, + updateBy, + remark, + + + #{userId}, + #{dynamicId}, + #{status}, + #{createTime}, + #{updateTime}, + #{createBy}, + #{updateBy}, + #{remark}, + + + + + update app_dynamic_like + + user_id = #{userId}, + dynamic_id = #{dynamicId}, + status = #{status}, + create_time = #{createTime}, + update_time = #{updateTime}, + create_by = #{createBy}, + updateBy = #{updateBy}, + remark = #{remark}, + + where id = #{id} + + + + delete from app_dynamic_like where id = #{id} + + + + delete from app_dynamic_like where id in + + #{id} + + + \ No newline at end of file diff --git a/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppUserDynamicMapper.xml b/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppUserDynamicMapper.xml index 4986a9d..2cbeeaa 100644 --- a/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppUserDynamicMapper.xml +++ b/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppUserDynamicMapper.xml @@ -17,10 +17,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + - 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 @@ -55,7 +57,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_time, create_by, updateBy, - + is_top, + #{userId}, #{content}, @@ -68,7 +71,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{updateTime}, #{createBy}, #{updateBy}, - + #{isTop}, + @@ -85,6 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_time = #{updateTime}, create_by = #{createBy}, updateBy = #{updateBy}, + is_top = #{isTop}, where id = #{id} diff --git a/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppUserFriendMapper.xml b/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppUserFriendMapper.xml new file mode 100644 index 0000000..996ea91 --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppUserFriendMapper.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + select id, user_id, friend_id, status, create_time, update_time, create_by, updateBy, remark from app_user_friend + + + + + + + + insert into app_user_friend + + user_id, + friend_id, + status, + create_time, + update_time, + create_by, + updateBy, + remark, + + + #{userId}, + #{friendId}, + #{status}, + #{createTime}, + #{updateTime}, + #{createBy}, + #{updateBy}, + #{remark}, + + + + + update app_user_friend + + user_id = #{userId}, + friend_id = #{friendId}, + status = #{status}, + create_time = #{createTime}, + update_time = #{updateTime}, + create_by = #{createBy}, + updateBy = #{updateBy}, + remark = #{remark}, + + where id = #{id} + + + + delete from app_user_friend where id = #{id} + + + + delete from app_user_friend where id in + + #{id} + + + \ No newline at end of file