diff --git a/pom.xml b/pom.xml index d892b1a13..f1efd9d25 100644 --- a/pom.xml +++ b/pom.xml @@ -16,11 +16,11 @@ yudao-module-member yudao-module-system yudao-module-infra - - - - - + yudao-module-pay + yudao-module-bpm + yudao-module-report + yudao-module-mp + yudao-module-mall yudao-example diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/point/MemberPointConfigController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/point/MemberPointConfigController.java index 3d68aa88f..1e55cee0b 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/point/MemberPointConfigController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/point/MemberPointConfigController.java @@ -29,16 +29,16 @@ public class MemberPointConfigController { @PutMapping("/save") @Operation(summary = "保存会员积分配置") @PreAuthorize("@ss.hasPermission('point:config:save')") - public CommonResult updateConfig(@Valid @RequestBody MemberPointConfigSaveReqVO saveReqVO) { - memberPointConfigService.saveConfig(saveReqVO); + public CommonResult savePointConfig(@Valid @RequestBody MemberPointConfigSaveReqVO saveReqVO) { + memberPointConfigService.savePointConfig(saveReqVO); return success(true); } @GetMapping("/get") @Operation(summary = "获得会员积分配置") @PreAuthorize("@ss.hasPermission('point:config:query')") - public CommonResult getConfig() { - MemberPointConfigDO config = memberPointConfigService.getConfig(); + public CommonResult getPointConfig() { + MemberPointConfigDO config = memberPointConfigService.getPointConfig(); return success(MemberPointConfigConvert.INSTANCE.convert(config)); } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/point/MemberPointRecordController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/point/MemberPointRecordController.java index c73d1b2d0..4d6ec352b 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/point/MemberPointRecordController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/point/MemberPointRecordController.java @@ -25,6 +25,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; +@Tag(name = "管理后台 - 签到记录") @RestController @RequestMapping("/member/point/record") @Validated @@ -39,9 +40,9 @@ public class MemberPointRecordController { @GetMapping("/page") @Operation(summary = "获得用户积分记录分页") @PreAuthorize("@ss.hasPermission('point:record:query')") - public CommonResult> getRecordPage(@Valid MemberPointRecordPageReqVO pageVO) { + public CommonResult> getPointRecordPage(@Valid MemberPointRecordPageReqVO pageVO) { // 执行分页查询 - PageResult pageResult = pointRecordService.getRecordPage(pageVO); + PageResult pageResult = pointRecordService.getPointRecordPage(pageVO); if (CollectionUtils.isEmpty(pageResult.getList())) { return success(PageResult.empty(pageResult.getTotal())); } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/MemberSignInConfigController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/MemberSignInConfigController.java index ccb279e90..65bfe44c2 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/MemberSignInConfigController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/MemberSignInConfigController.java @@ -20,9 +20,10 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +// TODO 芋艿:url @Tag(name = "管理后台 - 签到规则") @RestController -@RequestMapping("/member/point/sign-in-config") +@RequestMapping("/member/sign-in/config") @Validated public class MemberSignInConfigController { @@ -66,8 +67,8 @@ public class MemberSignInConfigController { @Operation(summary = "获得签到规则列表") @PreAuthorize("@ss.hasPermission('point:sign-in-config:query')") public CommonResult> getSignInConfigList() { - List pageResult = signInConfigService.getSignInConfigList(); - return success(MemberSignInConfigConvert.INSTANCE.convertList(pageResult)); + List list = signInConfigService.getSignInConfigList(); + return success(MemberSignInConfigConvert.INSTANCE.convertList(list)); } } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/MemberSignInRecordController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/MemberSignInRecordController.java index fe30a4ab2..83b8f9b3f 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/MemberSignInRecordController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/MemberSignInRecordController.java @@ -27,7 +27,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. @Tag(name = "管理后台 - 签到记录") @RestController -@RequestMapping("/member/point/sign-in-record") +@RequestMapping("/member/sign-in/record") @Validated public class MemberSignInRecordController { diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/point/AppMemberPointRecordController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/point/AppMemberPointRecordController.java new file mode 100644 index 000000000..1d8bd75a2 --- /dev/null +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/point/AppMemberPointRecordController.java @@ -0,0 +1,39 @@ +package cn.iocoder.yudao.module.member.controller.app.point; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.member.controller.app.point.vo.AppMemberPointRecordRespVO; +import cn.iocoder.yudao.module.member.convert.point.MemberPointRecordConvert; +import cn.iocoder.yudao.module.member.dal.dataobject.point.MemberPointRecordDO; +import cn.iocoder.yudao.module.member.service.point.MemberPointRecordService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import javax.validation.Valid; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; + +@Tag(name = "用户 App - 签到记录") +@RestController +@RequestMapping("/member/point/record") +@Validated +public class AppMemberPointRecordController { + + @Resource + private MemberPointRecordService pointRecordService; + + @GetMapping("/page") + @Operation(summary = "获得用户积分记录分页") + public CommonResult> getPointRecordPage(@Valid PageParam pageVO) { + PageResult pageResult = pointRecordService.getPointRecordPage(getLoginUserId(), pageVO); + return success(MemberPointRecordConvert.INSTANCE.convertPage02(pageResult)); + } + +} diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/point/vo/AppMemberPointRecordRespVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/point/vo/AppMemberPointRecordRespVO.java new file mode 100644 index 000000000..ec95b2e02 --- /dev/null +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/point/vo/AppMemberPointRecordRespVO.java @@ -0,0 +1,27 @@ +package cn.iocoder.yudao.module.member.controller.app.point.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "用户 App - 用户积分记录 Response VO") +@Data +public class AppMemberPointRecordRespVO { + + @Schema(description = "自增主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31457") + private Long id;; + + @Schema(description = "积分标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜") + private String title; + + @Schema(description = "积分描述", example = "你猜") + private String description; + + @Schema(description = "积分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") + private Integer point; + + @Schema(description = "发生时间", requiredMode = Schema.RequiredMode.REQUIRED) + private LocalDateTime createTime; + +} diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/signin/AppMemberSignInConfigController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/signin/AppMemberSignInConfigController.java new file mode 100644 index 000000000..62a52e3d8 --- /dev/null +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/signin/AppMemberSignInConfigController.java @@ -0,0 +1,37 @@ +package cn.iocoder.yudao.module.member.controller.app.signin; + +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.module.member.controller.app.signin.vo.config.AppMemberSignInConfigRespVO; +import cn.iocoder.yudao.module.member.convert.signin.MemberSignInConfigConvert; +import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInConfigDO; +import cn.iocoder.yudao.module.member.service.signin.MemberSignInConfigService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +@Tag(name = "用户 App - 签到规则") +@RestController +@RequestMapping("/member/sign-in/config") +@Validated +public class AppMemberSignInConfigController { + + @Resource + private MemberSignInConfigService signInConfigService; + + @GetMapping("/list") + @Operation(summary = "获得签到规则列表") + public CommonResult> getSignInConfigList() { + List pageResult = signInConfigService.getSignInConfigList(CommonStatusEnum.ENABLE.getStatus()); + return success(MemberSignInConfigConvert.INSTANCE.convertList02(pageResult)); + } + +} diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/signin/AppMemberSignInRecordController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/signin/AppMemberSignInRecordController.java new file mode 100644 index 000000000..bcc2227c1 --- /dev/null +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/signin/AppMemberSignInRecordController.java @@ -0,0 +1,69 @@ +package cn.iocoder.yudao.module.member.controller.app.signin; + +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.member.controller.app.signin.vo.record.AppMemberSignInRecordRespVO; +import cn.iocoder.yudao.module.member.controller.app.signin.vo.record.AppMemberSignInRecordSummaryRespVO; +import cn.iocoder.yudao.module.member.convert.signin.MemberSignInRecordConvert; +import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInRecordDO; +import cn.iocoder.yudao.module.member.service.signin.MemberSignInRecordService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.time.LocalDateTime; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; + +@Tag(name = "管理后台 - 签到记录") +@RestController +@RequestMapping("/member/sign-in/record") +@Validated +public class AppMemberSignInRecordController { + + @Resource + private MemberSignInRecordService signInRecordService; + + // TODO 芋艿:临时 mock => UserSignController.getUserInfo + @GetMapping("/get-summary") + @Operation(summary = "获得个人签到统计") + public CommonResult getSignInRecordSummary() { + AppMemberSignInRecordSummaryRespVO respVO = new AppMemberSignInRecordSummaryRespVO(); + if (false) { + respVO.setTotalDay(100); + respVO.setContinuousDay(5); + respVO.setTodaySignIn(true); + } else { + respVO.setTotalDay(100); + respVO.setContinuousDay(10); + respVO.setTodaySignIn(false); + } + return success(respVO); + } + + // TODO 芋艿:临时 mock => UserSignController.info + @PostMapping("/create") + @Operation(summary = "签到") + public CommonResult createSignInRecord() { + AppMemberSignInRecordRespVO respVO = new AppMemberSignInRecordRespVO() + .setPoint(10) + .setDay(10) + .setCreateTime(LocalDateTime.now()); + return success(respVO); + } + + @GetMapping("/page") + @Operation(summary = "获得签到记录分页") + public CommonResult> getSignRecordPage(PageParam pageParam) { + PageResult pageResult = signInRecordService.getSignRecordPage(getLoginUserId(), pageParam); + return success(MemberSignInRecordConvert.INSTANCE.convertPage02(pageResult)); + } + +} diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/signin/vo/config/AppMemberSignInConfigRespVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/signin/vo/config/AppMemberSignInConfigRespVO.java new file mode 100644 index 000000000..a18d3a28e --- /dev/null +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/signin/vo/config/AppMemberSignInConfigRespVO.java @@ -0,0 +1,16 @@ +package cn.iocoder.yudao.module.member.controller.app.signin.vo.config; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "用户 App - 签到规则 Response VO") +@Data +public class AppMemberSignInConfigRespVO { + + @Schema(description = "签到第 x 天", requiredMode = Schema.RequiredMode.REQUIRED, example = "7") + private Integer day; + + @Schema(description = "奖励积分", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") + private Integer point; + +} diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/signin/vo/record/AppMemberSignInRecordRespVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/signin/vo/record/AppMemberSignInRecordRespVO.java new file mode 100644 index 000000000..287408ce6 --- /dev/null +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/signin/vo/record/AppMemberSignInRecordRespVO.java @@ -0,0 +1,21 @@ +package cn.iocoder.yudao.module.member.controller.app.signin.vo.record; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "用户 App - 签到记录 Response VO") +@Data +public class AppMemberSignInRecordRespVO { + + @Schema(description = "第几天签到", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer day; + + @Schema(description = "签到的分数", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") + private Integer point; + + @Schema(description = "签到时间", requiredMode = Schema.RequiredMode.REQUIRED) + private LocalDateTime createTime; + +} diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/signin/vo/record/AppMemberSignInRecordSummaryRespVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/signin/vo/record/AppMemberSignInRecordSummaryRespVO.java new file mode 100644 index 000000000..30fb66a15 --- /dev/null +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/signin/vo/record/AppMemberSignInRecordSummaryRespVO.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.member.controller.app.signin.vo.record; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "用户 App - 个人签到统计 Response VO") +@Data +public class AppMemberSignInRecordSummaryRespVO { + + @Schema(description = "总签到天数", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") + private Integer totalDay; + + @Schema(description = "连续签到第 x 天", requiredMode = Schema.RequiredMode.REQUIRED, example = "3") + private Integer continuousDay; + + @Schema(description = "今天是否已签到", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") + private Boolean todaySignIn; + +} diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/point/MemberPointRecordConvert.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/point/MemberPointRecordConvert.java index 5f6d03503..1d2c146d2 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/point/MemberPointRecordConvert.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/point/MemberPointRecordConvert.java @@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO; import cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod.MemberPointRecordRespVO; +import cn.iocoder.yudao.module.member.controller.app.point.vo.AppMemberPointRecordRespVO; import cn.iocoder.yudao.module.member.dal.dataobject.point.MemberPointRecordDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; @@ -33,4 +34,6 @@ public interface MemberPointRecordConvert { } PageResult convertPage(PageResult pageResult); + PageResult convertPage02(PageResult pageResult); + } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/signin/MemberSignInConfigConvert.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/signin/MemberSignInConfigConvert.java index 23a3f7c57..5acd87151 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/signin/MemberSignInConfigConvert.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/signin/MemberSignInConfigConvert.java @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.member.convert.signin; import cn.iocoder.yudao.module.member.controller.admin.signin.vo.config.MemberSignInConfigCreateReqVO; import cn.iocoder.yudao.module.member.controller.admin.signin.vo.config.MemberSignInConfigRespVO; import cn.iocoder.yudao.module.member.controller.admin.signin.vo.config.MemberSignInConfigUpdateReqVO; +import cn.iocoder.yudao.module.member.controller.app.signin.vo.config.AppMemberSignInConfigRespVO; import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInConfigDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; @@ -27,4 +28,6 @@ public interface MemberSignInConfigConvert { List convertList(List list); + List convertList02(List list); + } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/signin/MemberSignInRecordConvert.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/signin/MemberSignInRecordConvert.java index 73280d641..c5022b854 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/signin/MemberSignInRecordConvert.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/signin/MemberSignInRecordConvert.java @@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.MapUtils; import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO; import cn.iocoder.yudao.module.member.controller.admin.signin.vo.record.MemberSignInRecordRespVO; +import cn.iocoder.yudao.module.member.controller.app.signin.vo.record.AppMemberSignInRecordRespVO; import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInRecordDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; @@ -33,4 +34,6 @@ public interface MemberSignInRecordConvert { } PageResult convertPage(PageResult pageResult); + PageResult convertPage02(PageResult pageResult); + } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/signin/MemberSignInRecordDO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/signin/MemberSignInRecordDO.java index 0734e7517..906fe6ca0 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/signin/MemberSignInRecordDO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/signin/MemberSignInRecordDO.java @@ -22,7 +22,7 @@ import lombok.*; public class MemberSignInRecordDO extends BaseDO { /** - * 签到自增id + * 编号 */ @TableId private Long id; diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/user/MemberUserDO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/user/MemberUserDO.java index 4cc1a7196..21a7b12f7 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/user/MemberUserDO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/user/MemberUserDO.java @@ -109,6 +109,7 @@ public class MemberUserDO extends TenantBaseDO { * 积分 */ private Integer point; + // TODO 芋艿:增加一个 totalPoint;个人信息接口要返回 /** * 会员标签列表,以逗号分隔 diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/point/MemberPointRecordMapper.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/point/MemberPointRecordMapper.java index aaaad2563..0d1f4aebb 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/point/MemberPointRecordMapper.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/point/MemberPointRecordMapper.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.member.dal.mysql.point; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; @@ -25,4 +26,10 @@ public interface MemberPointRecordMapper extends BaseMapperX selectPage(Long userId, PageParam pageVO) { + return selectPage(pageVO, new LambdaQueryWrapperX() + .eq(MemberPointRecordDO::getUserId, userId) + .orderByDesc(MemberPointRecordDO::getId)); + } + } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/signin/MemberSignInConfigMapper.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/signin/MemberSignInConfigMapper.java index 0dcabdd64..b63b8167c 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/signin/MemberSignInConfigMapper.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/signin/MemberSignInConfigMapper.java @@ -4,6 +4,8 @@ import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInConfigDO; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 签到规则 Mapper * @@ -16,4 +18,7 @@ public interface MemberSignInConfigMapper extends BaseMapperX selectListByStatus(Integer status) { + return selectList(MemberSignInConfigDO::getStatus, status); + } } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/signin/MemberSignInRecordMapper.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/signin/MemberSignInRecordMapper.java index 03b99707a..e78f4d391 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/signin/MemberSignInRecordMapper.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/signin/MemberSignInRecordMapper.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.member.dal.mysql.signin; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; @@ -25,4 +26,10 @@ public interface MemberSignInRecordMapper extends BaseMapperX selectPage(Long userId, PageParam pageParam) { + return selectPage(pageParam, new LambdaQueryWrapperX() + .eq(MemberSignInRecordDO::getUserId, userId) + .orderByDesc(MemberSignInRecordDO::getId)); + } + } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointConfigService.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointConfigService.java index 4becacd36..68319fdd1 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointConfigService.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointConfigService.java @@ -17,13 +17,13 @@ public interface MemberPointConfigService { * * @param saveReqVO 更新信息 */ - void saveConfig(@Valid MemberPointConfigSaveReqVO saveReqVO); + void savePointConfig(@Valid MemberPointConfigSaveReqVO saveReqVO); /** * 获得会员积分配置 * * @return 积分配置 */ - MemberPointConfigDO getConfig(); + MemberPointConfigDO getPointConfig(); } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointConfigServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointConfigServiceImpl.java index 57603457a..feb2aba86 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointConfigServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointConfigServiceImpl.java @@ -24,9 +24,9 @@ public class MemberPointConfigServiceImpl implements MemberPointConfigService { private MemberPointConfigMapper pointConfigMapper; @Override - public void saveConfig(MemberPointConfigSaveReqVO saveReqVO) { + public void savePointConfig(MemberPointConfigSaveReqVO saveReqVO) { // 存在,则进行更新 - MemberPointConfigDO dbConfig = getConfig(); + MemberPointConfigDO dbConfig = getPointConfig(); if (dbConfig != null) { pointConfigMapper.updateById(MemberPointConfigConvert.INSTANCE.convert(saveReqVO).setId(dbConfig.getId())); return; @@ -36,7 +36,7 @@ public class MemberPointConfigServiceImpl implements MemberPointConfigService { } @Override - public MemberPointConfigDO getConfig() { + public MemberPointConfigDO getPointConfig() { List list = pointConfigMapper.selectList(); return CollectionUtils.getFirst(list); } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointRecordService.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointRecordService.java index 4c6fb0cb4..971cb7274 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointRecordService.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointRecordService.java @@ -1,11 +1,10 @@ package cn.iocoder.yudao.module.member.service.point; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod.MemberPointRecordPageReqVO; import cn.iocoder.yudao.module.member.dal.dataobject.point.MemberPointRecordDO; -import javax.validation.Valid; - /** * 用户积分记录 Service 接口 * @@ -14,11 +13,20 @@ import javax.validation.Valid; public interface MemberPointRecordService { /** - * 获得用户积分记录分页 + * 【管理员】获得积分记录分页 * * @param pageReqVO 分页查询 - * @return 用户积分记录分页 + * @return 签到记录分页 */ - PageResult getRecordPage(MemberPointRecordPageReqVO pageReqVO); + PageResult getPointRecordPage(MemberPointRecordPageReqVO pageReqVO); + + /** + * 【会员】获得积分记录分页 + * + * @param userId 用户编号 + * @param pageVO 分页查询 + * @return 签到记录分页 + */ + PageResult getPointRecordPage(Long userId, PageParam pageVO); } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointRecordServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointRecordServiceImpl.java index 11f67bab3..52257183d 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointRecordServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointRecordServiceImpl.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.member.service.point; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.member.api.user.MemberUserApi; import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO; @@ -19,7 +20,7 @@ import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils. /** - * 用户积分记录 Service 实现类 + * 积分记录 Service 实现类 * * @author QingX */ @@ -34,7 +35,7 @@ public class MemberPointRecordServiceImpl implements MemberPointRecordService { private MemberUserApi memberUserApi; @Override - public PageResult getRecordPage(MemberPointRecordPageReqVO pageReqVO) { + public PageResult getPointRecordPage(MemberPointRecordPageReqVO pageReqVO) { // 根据用户昵称查询出用户 ids Set userIds = null; if (StringUtils.isNotBlank(pageReqVO.getNickname())) { @@ -49,4 +50,9 @@ public class MemberPointRecordServiceImpl implements MemberPointRecordService { return recordMapper.selectPage(pageReqVO, userIds); } + @Override + public PageResult getPointRecordPage(Long userId, PageParam pageVO) { + return recordMapper.selectPage(userId, pageVO); + } + } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInConfigService.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInConfigService.java index 9d998ad9b..b4a9c041c 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInConfigService.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInConfigService.java @@ -45,10 +45,18 @@ public interface MemberSignInConfigService { MemberSignInConfigDO getSignInConfig(Long id); /** - * 获得签到规则分页 + * 获得签到规则列表 * * @return 签到规则分页 */ List getSignInConfigList(); + /** + * 获得签到规则列表 + * + * @param status 状态 + * @return 签到规则分页 + */ + List getSignInConfigList(Integer status); + } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInConfigServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInConfigServiceImpl.java index 3fb32321b..87464e081 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInConfigServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInConfigServiceImpl.java @@ -96,4 +96,11 @@ public class MemberSignInConfigServiceImpl implements MemberSignInConfigService return list; } + @Override + public List getSignInConfigList(Integer status) { + List list = signInConfigMapper.selectListByStatus(status); + list.sort(Comparator.comparing(MemberSignInConfigDO::getDay)); + return list; + } + } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordService.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordService.java index e5acc3959..dd263fe42 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordService.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordService.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.member.service.signin; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.member.controller.admin.signin.vo.record.MemberSignInRecordPageReqVO; import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInRecordDO; @@ -12,11 +13,20 @@ import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInRecordDO public interface MemberSignInRecordService { /** - * 获得签到记录分页 + * 【管理员】获得签到记录分页 * * @param pageReqVO 分页查询 * @return 签到记录分页 */ PageResult getSignInRecordPage(MemberSignInRecordPageReqVO pageReqVO); + /** + * 【会员】获得签到记录分页 + * + * @param userId 用户编号 + * @param pageParam 分页查询 + * @return 签到记录分页 + */ + PageResult getSignRecordPage(Long userId, PageParam pageParam); + } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordServiceImpl.java index 79708ba5f..202c957d3 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordServiceImpl.java @@ -1,9 +1,11 @@ package cn.iocoder.yudao.module.member.service.signin; +import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.member.api.user.MemberUserApi; import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO; import cn.iocoder.yudao.module.member.controller.admin.signin.vo.record.MemberSignInRecordPageReqVO; +import cn.iocoder.yudao.module.member.controller.app.signin.vo.record.AppMemberSignInRecordRespVO; import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInRecordDO; import cn.iocoder.yudao.module.member.dal.mysql.signin.MemberSignInRecordMapper; import org.apache.commons.lang3.StringUtils; @@ -48,4 +50,9 @@ public class MemberSignInRecordServiceImpl implements MemberSignInRecordService return signInRecordMapper.selectPage(pageReqVO, userIds); } + @Override + public PageResult getSignRecordPage(Long userId, PageParam pageParam) { + return signInRecordMapper.selectPage(userId, pageParam); + } + } diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index cc383236c..e6296ceab 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -54,11 +54,11 @@ - - - - - + + cn.iocoder.boot + yudao-module-pay-biz + ${revision} + @@ -68,21 +68,21 @@ - - - - - - - - - - - - - - - + + cn.iocoder.boot + yudao-module-promotion-biz + ${revision} + + + cn.iocoder.boot + yudao-module-product-biz + ${revision} + + + cn.iocoder.boot + yudao-module-trade-biz + ${revision} +