From 687dbd8e6ababc010a3da5503b95cd62cecf9f02 Mon Sep 17 00:00:00 2001 From: jiangqs <jiangqs> Date: 星期二, 23 五月 2023 18:06:45 +0800 Subject: [PATCH] 拆分订单和商品服务 --- ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/business/MerMemberController.java | 74 ++++++++++++++++++++++++++++++++++--- 1 files changed, 68 insertions(+), 6 deletions(-) diff --git a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/business/MerMemberController.java b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/business/MerMemberController.java index a08716e..ecaef7a 100644 --- a/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/business/MerMemberController.java +++ b/ruoyi-modules/ruoyi-member/src/main/java/com/ruoyi/member/controller/business/MerMemberController.java @@ -3,11 +3,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.security.utils.SecurityUtils; -import com.ruoyi.member.domain.dto.MerMemberPageDto; -import com.ruoyi.member.domain.vo.AppUserInfoVo; -import com.ruoyi.member.domain.vo.MerMemberInfoVo; -import com.ruoyi.member.domain.vo.MerMemberPageVo; +import com.ruoyi.member.domain.dto.*; +import com.ruoyi.member.domain.vo.*; import com.ruoyi.member.service.member.MemberService; +import com.ruoyi.system.api.domain.dto.MerBaseDto; +import com.ruoyi.system.api.domain.dto.MerBaseGetDto; import com.ruoyi.system.api.domain.dto.MerPageDto; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -34,6 +34,19 @@ @Autowired private MemberService memberService; + + + @RequestMapping(value = "/pageMerCashMember", method = RequestMethod.POST) + @ApiOperation(value = "分页获取收银搜索会员列表") + public R<Page<MerCashMemberPageVo>> pageMerCashMember(@RequestBody MerCashMemberPageDto merCashMemberPageDto) { + Long userId = SecurityUtils.getUserId(); + Page<MerCashMemberPageVo> page = new Page<>(); + page.setSize(merCashMemberPageDto.getPageSize()); + page.setCurrent(merCashMemberPageDto.getPageNum()); + List<MerCashMemberPageVo> merCashMemberPageVos = memberService.pageMerCashMember(page,merCashMemberPageDto); + return R.ok(page.setRecords(merCashMemberPageVos)); + } + @RequestMapping(value = "/pageMerMember", method = RequestMethod.POST) @ApiOperation(value = "分页获取商户绑定会员列表") public R<Page<MerMemberPageVo>> pageMerMember(@RequestBody MerMemberPageDto merMemberPageDto) { @@ -45,11 +58,60 @@ return R.ok(page.setRecords(merMemberPageVoList)); } + + + /** + * 未完成 + * @return + */ @RequestMapping(value = "/getMerMemberInfo", method = RequestMethod.POST) @ApiOperation(value = "获取会员信息") - public R<MerMemberInfoVo> getMerMemberInfo() { + public R<MerMemberInfoVo> getMerMemberInfo(@RequestBody MerBaseGetDto merBaseGetDto) { Long userId = SecurityUtils.getUserId(); - MerMemberInfoVo merMemberInfo = memberService.getMerMemberInfo(userId); + MerMemberInfoVo merMemberInfo = memberService.getMerMemberInfo(Long.valueOf(merBaseGetDto.getId())); return R.ok(merMemberInfo); } + + + @RequestMapping(value = "/getMerMemberBasicFile", method = RequestMethod.POST) + @ApiOperation(value = "获取会员基础档案") + public R<MerMemberBasicFileVo> getMerMemberBasicFile(@RequestBody MerBaseGetDto merBaseGetDto) { + Long userId = SecurityUtils.getUserId(); + MerMemberBasicFileVo merMemberBasicFileVo = memberService.getMerMemberBasicFile(Long.valueOf(merBaseGetDto.getId())); + return R.ok(merMemberBasicFileVo); + } + + @RequestMapping(value = "/getMerMemberTags", method = RequestMethod.POST) + @ApiOperation(value = "获取会员标签") + public R<List<MerMemberTagVo>> getMerMemberTags(@RequestBody MerBaseGetDto merBaseGetDto) { + Long userId = SecurityUtils.getUserId(); + List<MerMemberTagVo> merMemberTagVoList = memberService.getMerMemberTags(Long.valueOf(merBaseGetDto.getId())); + return R.ok(merMemberTagVoList); + } + + @RequestMapping(value = "/editMerMemberTags", method = RequestMethod.POST) + @ApiOperation(value = "编辑会员标签") + public R editMerMemberTags(@RequestBody MerMemberTagEditDto merMemberTagEditDto) { + Long userId = SecurityUtils.getUserId(); + memberService.editMerMemberTags(merMemberTagEditDto); + return R.ok(); + } + + @RequestMapping(value = "/addMerMember", method = RequestMethod.POST) + @ApiOperation(value = "新增会员") + public R addMerMember(@RequestBody MerMemberAddDto merMemberAddDto) { + Long userId = SecurityUtils.getUserId(); + merMemberAddDto.setUserId(userId); + memberService.addMerMember(merMemberAddDto); + return R.ok(); + } + + @RequestMapping(value = "/editMerMember", method = RequestMethod.POST) + @ApiOperation(value = "编辑会员") + public R editMerMember(@RequestBody MerMemberEditDto merMemberAddDto) { + Long userId = SecurityUtils.getUserId(); + merMemberAddDto.setUserId(userId); + memberService.editMerMember(merMemberAddDto); + return R.ok(); + } } -- Gitblit v1.7.1