diff --git a/yudao-admin-vue3/src/api/mall/promotion/circle/index.ts b/yudao-admin-vue3/src/api/mall/promotion/circle/index.ts index 63106f4..1dd16c1 100644 --- a/yudao-admin-vue3/src/api/mall/promotion/circle/index.ts +++ b/yudao-admin-vue3/src/api/mall/promotion/circle/index.ts @@ -4,6 +4,7 @@ import request from '@/config/axios' export interface CircleVO { id: number // 编号 userId: number // 用户编号 + nickname: string //用户昵称 content: string // 发表内容 picUrl: string // 图片地址 likeCount: number // 点赞量 diff --git a/yudao-admin-vue3/src/api/member/user/index.ts b/yudao-admin-vue3/src/api/member/user/index.ts index e38206a..9da784f 100644 --- a/yudao-admin-vue3/src/api/member/user/index.ts +++ b/yudao-admin-vue3/src/api/member/user/index.ts @@ -51,3 +51,8 @@ export const updateUserPoint = async (data: any) => { export const updateUserBalance = async (data: any) => { return await request.put({ url: `/member/user/update-balance`, data }) } + +// 获得用户下拉列表 +export const getMemeberUserList = async () => { + return await request.get({ url: `/member/user/member-list`}) +} diff --git a/yudao-admin-vue3/src/views/mall/promotion/circle/CircleForm.vue b/yudao-admin-vue3/src/views/mall/promotion/circle/CircleForm.vue index 2941115..6497717 100644 --- a/yudao-admin-vue3/src/views/mall/promotion/circle/CircleForm.vue +++ b/yudao-admin-vue3/src/views/mall/promotion/circle/CircleForm.vue @@ -7,8 +7,16 @@ label-width="100px" v-loading="formLoading" > + + + + + - + @@ -25,9 +33,6 @@ - \ No newline at end of file diff --git a/yudao-admin-vue3/src/views/mall/promotion/circle/index.vue b/yudao-admin-vue3/src/views/mall/promotion/circle/index.vue index eff1806..3360036 100644 --- a/yudao-admin-vue3/src/views/mall/promotion/circle/index.vue +++ b/yudao-admin-vue3/src/views/mall/promotion/circle/index.vue @@ -93,12 +93,16 @@ + - + + + - createCircle(@RequestBody CircleSaveReqVO createReqVO){ + String nickname = memberUserApi.getUser(getLoginUserId()).getNickname(); + createReqVO.setUserId(getLoginUserId()); + createReqVO.setNickname(nickname); + circleService.createCircle(createReqVO); + return success(true); + } + + @PutMapping("/doCircleUpdate") + @Operation(summary = "编辑社区动态") + @PreAuthenticated + public CommonResult updateCircle(@RequestBody CircleSaveReqVO updateReqVO){ + circleService.updateCircle(updateReqVO); + return success(true); + } + + @PutMapping("/doBrowse") @Operation(summary = "浏览量叠加") @PreAuthenticated public CommonResult doBrowse(@RequestParam("id") Long lookId){ @@ -70,7 +90,7 @@ public class AppCircleController { return success(true); } - @GetMapping("/doLike") + @PutMapping("/doLike") @Operation(summary = "点赞/取消点赞") @PreAuthenticated public CommonResult doLike(@RequestParam("id") Long lookId){ @@ -87,7 +107,7 @@ public class AppCircleController { return success(true); } - @GetMapping("/doReviewDelete") + @DeleteMapping("/doReviewDelete") @Operation(summary = "删除评论") @PreAuthenticated public CommonResult doReviewDelete(@RequestParam("id") Long lookId){ @@ -95,7 +115,7 @@ public class AppCircleController { return success(true); } - @GetMapping("/doCircleDelete") + @DeleteMapping("/doCircleDelete") @Operation(summary = "删除动态") @PreAuthenticated public CommonResult doCircleDelete(@RequestParam("id") Long lookId){ diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/circle/CircleDO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/circle/CircleDO.java index db137cc..9709dd8 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/circle/CircleDO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/circle/CircleDO.java @@ -31,6 +31,10 @@ public class CircleDO extends BaseDO { * 用户编号 */ private Long userId; + /** + * 用户编号 + */ + private String nickname; /** * 发表内容 */ diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/MemberUserController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/MemberUserController.java index f91cf41..f509f00 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/MemberUserController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/MemberUserController.java @@ -169,4 +169,13 @@ public class MemberUserController { memberCodeMapper.insert(memberCodeDo); return success(uuid); } + + @GetMapping("/member-list") + @Operation(summary = "获得会员用户下拉列表") + @PreAuthorize("@ss.hasPermission('member:user:query')") + public CommonResult> getMemberUserList(){ + List userDOList = memberUserService.getMemberUserList(); + return success(userDOList); + } + } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/MemberUserService.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/MemberUserService.java index dee546e..3907509 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/MemberUserService.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/MemberUserService.java @@ -191,4 +191,5 @@ public interface MemberUserService { void updateActivate(String cardName,Long userId); + List getMemberUserList(); } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/MemberUserServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/MemberUserServiceImpl.java index 5d0d65d..55a4385 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/MemberUserServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/user/MemberUserServiceImpl.java @@ -340,4 +340,10 @@ public class MemberUserServiceImpl implements MemberUserService { memberUserMapper.updateById(memberUserDO); } + @Override + public List getMemberUserList() { + List list = memberUserMapper.selectList(); + return list; + } + }