diff --git a/yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/enums/ErrorCodeConstants.java b/yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/enums/ErrorCodeConstants.java index 8a4cd7f63..25fcdc874 100644 --- a/yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/enums/ErrorCodeConstants.java +++ b/yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/enums/ErrorCodeConstants.java @@ -24,10 +24,8 @@ public interface ErrorCodeConstants { ErrorCode ADDRESS_NOT_EXISTS = new ErrorCode(1004004000, "用户收件地址不存在"); //========== 用户积分 1004005000 ========== - ErrorCode CONFIG_NOT_EXISTS = new ErrorCode(1004005001, "积分设置不存在"); - - ErrorCode CONFIG_EXISTS = new ErrorCode(1004005002, "积分设置已存在,只允配置一条记录"); + // TODO @xiaqing:错误码要分段;例如说这里,积分配置、积分记录、签到配置、签到记录;分成 4 段; ErrorCode SIGN_IN_CONFIG_NOT_EXISTS = new ErrorCode(1004005003, "签到天数规则不存在"); ErrorCode SIGN_IN_CONFIG_EXISTS = new ErrorCode(1004005004, "签到天数规则已存在"); 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 70c7b9f09..ef207075c 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 @@ -2,9 +2,9 @@ package cn.iocoder.yudao.module.member.controller.admin.point; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod.*; +import cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod.MemberPointRecordPageReqVO; +import cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod.MemberPointRecordRespVO; +import cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod.MemberPointRecordUpdateReqVO; 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; @@ -16,14 +16,9 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; -import java.io.IOException; -import java.util.Collection; -import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 用户积分记录") @RestController @@ -34,6 +29,7 @@ public class MemberPointRecordController { @Resource private MemberPointRecordService recordService; + // TODO @xiaqing:积分应该没有更新操作呀?可以删除哈; @PutMapping("/update") @Operation(summary = "更新用户积分记录") @PreAuthorize("@ss.hasPermission('point:record:update')") @@ -51,15 +47,6 @@ public class MemberPointRecordController { return success(MemberPointRecordConvert.INSTANCE.convert(record)); } - @GetMapping("/list") - @Operation(summary = "获得用户积分记录列表") - @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") - @PreAuthorize("@ss.hasPermission('point:record:query')") - public CommonResult> getRecordList(@RequestParam("ids") Collection ids) { - List list = recordService.getRecordList(ids); - return success(MemberPointRecordConvert.INSTANCE.convertList(list)); - } - @GetMapping("/page") @Operation(summary = "获得用户积分记录分页") @PreAuthorize("@ss.hasPermission('point:record:query')") @@ -68,16 +55,4 @@ public class MemberPointRecordController { return success(MemberPointRecordConvert.INSTANCE.convertPage(pageResult)); } - @GetMapping("/export-excel") - @Operation(summary = "导出用户积分记录 Excel") - @PreAuthorize("@ss.hasPermission('point:record:export')") - @OperateLog(type = EXPORT) - public void exportRecordExcel(@Valid MemberPointRecordExportReqVO exportReqVO, - HttpServletResponse response) throws IOException { - List list = recordService.getRecordList(exportReqVO); - // 导出 Excel - List datas = MemberPointRecordConvert.INSTANCE.convertList02(list); - ExcelUtils.write(response, "用户积分记录.xls", "数据", MemberPointRecordExcelVO.class, datas); - } - } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/point/vo/recrod/MemberPointRecordExcelVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/point/vo/recrod/MemberPointRecordExcelVO.java deleted file mode 100644 index e093c58fa..000000000 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/point/vo/recrod/MemberPointRecordExcelVO.java +++ /dev/null @@ -1,61 +0,0 @@ -package cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod; - -import lombok.*; - -import java.time.LocalDateTime; - -import com.alibaba.excel.annotation.ExcelProperty; -import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; -import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; - - -/** - * 用户积分记录 Excel VO - * - * @author QingX - */ -@Data -public class MemberPointRecordExcelVO { - - @ExcelProperty("自增主键") - private Long id; - - @ExcelProperty("业务编码") - private String bizId; - - @ExcelProperty(value = "业务类型", converter = DictConvert.class) - @DictFormat("biz_type") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中 - private String bizType; - - @ExcelProperty("1增加 0扣减") - private String type; - - @ExcelProperty("积分标题") - private String title; - - @ExcelProperty("积分描述") - private String description; - - @ExcelProperty("积分") - private Integer point; - - @ExcelProperty("变动后的积分") - private Integer totalPoint; - - @ExcelProperty(value = "状态:1-订单创建,2-冻结期,3-完成,4-失效(订单退款) ", converter = DictConvert.class) - @DictFormat("point_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中 - private Integer status; - - @ExcelProperty("用户id") - private Integer userId; - - @ExcelProperty("冻结时间") - private LocalDateTime freezingTime; - - @ExcelProperty("解冻时间") - private LocalDateTime thawingTime; - - @ExcelProperty("发生时间") - private LocalDateTime createTime; - -} 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 39c885bc6..ea208b6c6 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 @@ -2,9 +2,10 @@ package cn.iocoder.yudao.module.member.controller.admin.signin; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import cn.iocoder.yudao.module.member.controller.admin.signin.vo.*; +import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInConfigCreateReqVO; +import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInConfigPageReqVO; +import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInConfigRespVO; +import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInConfigUpdateReqVO; 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; @@ -16,14 +17,9 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; -import java.io.IOException; -import java.util.Collection; -import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 积分签到规则") @RestController @@ -67,15 +63,6 @@ public class MemberSignInConfigController { return success(MemberSignInConfigConvert.INSTANCE.convert(signInConfig)); } - @GetMapping("/list") - @Operation(summary = "获得积分签到规则列表") - @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") - @PreAuthorize("@ss.hasPermission('point:sign-in-config:query')") - public CommonResult> getSignInConfigList(@RequestParam("ids") Collection ids) { - List list = memberSignInConfigService.getSignInConfigList(ids); - return success(MemberSignInConfigConvert.INSTANCE.convertList(list)); - } - @GetMapping("/page") @Operation(summary = "获得积分签到规则分页") @PreAuthorize("@ss.hasPermission('point:sign-in-config:query')") @@ -84,16 +71,4 @@ public class MemberSignInConfigController { return success(MemberSignInConfigConvert.INSTANCE.convertPage(pageResult)); } - @GetMapping("/export-excel") - @Operation(summary = "导出积分签到规则 Excel") - @PreAuthorize("@ss.hasPermission('point:sign-in-config:export')") - @OperateLog(type = EXPORT) - public void exportSignInConfigExcel(@Valid MemberSignInConfigExportReqVO exportReqVO, - HttpServletResponse response) throws IOException { - List list = memberSignInConfigService.getSignInConfigList(exportReqVO); - // 导出 Excel - List datas = MemberSignInConfigConvert.INSTANCE.convertList02(list); - ExcelUtils.write(response, "积分签到规则.xls", "数据", MemberSignInConfigExcelVO.class, datas); - } - } 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 fcb9f71e7..fae6ebdab 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 @@ -2,9 +2,8 @@ package cn.iocoder.yudao.module.member.controller.admin.signin; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import cn.iocoder.yudao.module.member.controller.admin.signin.vo.*; +import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInRecordPageReqVO; +import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInRecordRespVO; 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; @@ -16,14 +15,9 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; -import java.io.IOException; -import java.util.Collection; -import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 用户签到积分") @RestController @@ -34,6 +28,7 @@ public class MemberSignInRecordController { @Resource private MemberSignInRecordService memberSignInRecordService; + // TODO @xiaqing:签到是不是不用删除? @DeleteMapping("/delete") @Operation(summary = "删除用户签到积分") @Parameter(name = "id", description = "编号", required = true) @@ -52,15 +47,6 @@ public class MemberSignInRecordController { return success(MemberSignInRecordConvert.INSTANCE.convert(signInRecord)); } - @GetMapping("/list") - @Operation(summary = "获得用户签到积分列表") - @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") - @PreAuthorize("@ss.hasPermission('point:sign-in-record:query')") - public CommonResult> getSignInRecordList(@RequestParam("ids") Collection ids) { - List list = memberSignInRecordService.getSignInRecordList(ids); - return success(MemberSignInRecordConvert.INSTANCE.convertList(list)); - } - @GetMapping("/page") @Operation(summary = "获得用户签到积分分页") @PreAuthorize("@ss.hasPermission('point:sign-in-record:query')") @@ -68,17 +54,4 @@ public class MemberSignInRecordController { PageResult pageResult = memberSignInRecordService.getSignInRecordPage(pageVO); return success(MemberSignInRecordConvert.INSTANCE.convertPage(pageResult)); } - - @GetMapping("/export-excel") - @Operation(summary = "导出用户签到积分 Excel") - @PreAuthorize("@ss.hasPermission('point:sign-in-record:export')") - @OperateLog(type = EXPORT) - public void exportSignInRecordExcel(@Valid MemberSignInRecordExportReqVO exportReqVO, - HttpServletResponse response) throws IOException { - List list = memberSignInRecordService.getSignInRecordList(exportReqVO); - // 导出 Excel - List datas = MemberSignInRecordConvert.INSTANCE.convertList02(list); - ExcelUtils.write(response, "用户签到积分.xls", "数据", MemberSignInRecordExcelVO.class, datas); - } - } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/MemberSignInConfigBaseVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/MemberSignInConfigBaseVO.java index 5410ccde7..334d98ad2 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/MemberSignInConfigBaseVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/MemberSignInConfigBaseVO.java @@ -10,7 +10,7 @@ import lombok.*; @Data public class MemberSignInConfigBaseVO { - @Schema(description = "签到第x天", example = "7") + @Schema(description = "签到第 x 天", example = "7") private Integer day; @Schema(description = "签到天数对应分数", example = "10") diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/MemberSignInConfigExcelVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/MemberSignInConfigExcelVO.java deleted file mode 100644 index c50c7a291..000000000 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/MemberSignInConfigExcelVO.java +++ /dev/null @@ -1,26 +0,0 @@ -package cn.iocoder.yudao.module.member.controller.admin.signin.vo; - -import lombok.*; - -import java.time.LocalDateTime; - -import com.alibaba.excel.annotation.ExcelProperty; - -/** - * 积分签到规则 Excel VO - * - * @author QingX - */ -@Data -public class MemberSignInConfigExcelVO { - - @ExcelProperty("签到第x天") - private Integer day; - - @ExcelProperty("签到天数对应分数") - private Integer point; - - @ExcelProperty("创建时间") - private LocalDateTime createTime; - -} diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/MemberSignInConfigExportReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/MemberSignInConfigExportReqVO.java deleted file mode 100644 index f714786f6..000000000 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/MemberSignInConfigExportReqVO.java +++ /dev/null @@ -1,13 +0,0 @@ -package cn.iocoder.yudao.module.member.controller.admin.signin.vo; - -import lombok.*; -import io.swagger.v3.oas.annotations.media.Schema; - -@Schema(description = "管理后台 - 积分签到规则 Excel 导出 Request VO,参数和 SignInConfigPageReqVO 是一致的") -@Data -public class MemberSignInConfigExportReqVO { - - @Schema(description = "签到第x天", example = "7") - private Integer day; - -} diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/MemberSignInRecordExcelVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/MemberSignInRecordExcelVO.java deleted file mode 100644 index 9deec36e1..000000000 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/MemberSignInRecordExcelVO.java +++ /dev/null @@ -1,31 +0,0 @@ -package cn.iocoder.yudao.module.member.controller.admin.signin.vo; - -import com.alibaba.excel.annotation.ExcelProperty; -import lombok.Data; - -import java.time.LocalDateTime; - -/** - * 用户签到积分 Excel VO - * - * @author 芋道源码 - */ -@Data -public class MemberSignInRecordExcelVO { - - @ExcelProperty("签到自增id") - private Long id; - - @ExcelProperty("签到用户") - private Integer userId; - - @ExcelProperty("第几天签到") - private Integer day; - - @ExcelProperty("签到的分数") - private Integer point; - - @ExcelProperty("签到时间") - private LocalDateTime createTime; - -} diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/MemberSignInRecordExportReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/MemberSignInRecordExportReqVO.java deleted file mode 100644 index df919be76..000000000 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/MemberSignInRecordExportReqVO.java +++ /dev/null @@ -1,25 +0,0 @@ -package cn.iocoder.yudao.module.member.controller.admin.signin.vo; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import org.springframework.format.annotation.DateTimeFormat; - -import java.time.LocalDateTime; - -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; - -@Schema(description = "管理后台 - 用户签到积分 Excel 导出 Request VO,参数和 SignInRecordPageReqVO 是一致的") -@Data -public class MemberSignInRecordExportReqVO { - - @Schema(description = "签到用户", example = "6507") - private Integer userId; - - @Schema(description = "第几天签到") - private Integer day; - - @Schema(description = "签到时间") - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - private LocalDateTime[] createTime; - -} 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 8d94843cd..4a771884b 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 @@ -1,11 +1,7 @@ package cn.iocoder.yudao.module.member.convert.point; -import java.util.*; - import cn.iocoder.yudao.framework.common.pojo.PageResult; - import cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod.MemberPointRecordCreateReqVO; -import cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod.MemberPointRecordExcelVO; import cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod.MemberPointRecordRespVO; import cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod.MemberPointRecordUpdateReqVO; import cn.iocoder.yudao.module.member.dal.dataobject.point.MemberPointRecordDO; @@ -28,10 +24,6 @@ public interface MemberPointRecordConvert { MemberPointRecordRespVO convert(MemberPointRecordDO bean); - List convertList(List list); - PageResult convertPage(PageResult page); - List convertList02(List list); - } 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 1068e089e..dcfcc932a 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 @@ -1,13 +1,14 @@ package cn.iocoder.yudao.module.member.convert.signin; -import java.util.*; - import cn.iocoder.yudao.framework.common.pojo.PageResult; - +import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInConfigCreateReqVO; +import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInConfigRespVO; +import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInConfigUpdateReqVO; import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInConfigDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; -import cn.iocoder.yudao.module.member.controller.admin.signin.vo.*; + +import java.util.List; /** * 积分签到规则 Convert @@ -29,6 +30,4 @@ public interface MemberSignInConfigConvert { PageResult convertPage(PageResult page); - 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 bc8d1ca62..0af4e6178 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 @@ -1,11 +1,7 @@ package cn.iocoder.yudao.module.member.convert.signin; -import java.util.*; - import cn.iocoder.yudao.framework.common.pojo.PageResult; - import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInRecordCreateReqVO; -import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInRecordExcelVO; import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInRecordRespVO; import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInRecordUpdateReqVO; import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInRecordDO; @@ -28,10 +24,6 @@ public interface MemberSignInRecordConvert { MemberSignInRecordRespVO convert(MemberSignInRecordDO bean); - List convertList(List list); - PageResult convertPage(PageResult page); - List convertList02(List list); - } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/point/MemberPointRecordDO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/point/MemberPointRecordDO.java index 59b55d314..895aea458 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/point/MemberPointRecordDO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/point/MemberPointRecordDO.java @@ -35,12 +35,13 @@ public class MemberPointRecordDO extends BaseDO { /** * 业务类型 * - * 枚举 {@link TODO biz_type 对应的类} + * 枚举 {@link TODO biz_type 对应枚举,然后改成 int 类型哈} */ private String bizType; /** * 1增加 0扣减 */ + // TODO @xiaqing:要不把 type 合并到 point 里?增加 point 是正数,减少 point 是负数? private String type; /** * 积分标题 @@ -60,7 +61,6 @@ public class MemberPointRecordDO extends BaseDO { private Integer totalPoint; /** * 状态:1-订单创建,2-冻结期,3-完成,4-失效(订单退款) - * * 枚举 {@link TODO point_status 对应的类} */ 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 67cca615e..095aa37f7 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 @@ -3,13 +3,10 @@ package cn.iocoder.yudao.module.member.dal.mysql.point; 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; -import cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod.MemberPointRecordExportReqVO; import cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod.MemberPointRecordPageReqVO; import cn.iocoder.yudao.module.member.dal.dataobject.point.MemberPointRecordDO; import org.apache.ibatis.annotations.Mapper; -import java.util.List; - /** * 用户积分记录 Mapper * @@ -28,14 +25,4 @@ public interface MemberPointRecordMapper extends BaseMapperX selectList(MemberPointRecordExportReqVO reqVO) { - return selectList(new LambdaQueryWrapperX() - .eqIfPresent(MemberPointRecordDO::getBizId, reqVO.getBizId()) - .eqIfPresent(MemberPointRecordDO::getBizType, reqVO.getBizType()) - .eqIfPresent(MemberPointRecordDO::getType, reqVO.getType()) - .eqIfPresent(MemberPointRecordDO::getTitle, reqVO.getTitle()) - .eqIfPresent(MemberPointRecordDO::getStatus, reqVO.getStatus()) - .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 5b6a9a7cc..6f14d0d5d 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 @@ -3,14 +3,11 @@ package cn.iocoder.yudao.module.member.dal.mysql.signin; 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; -import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInConfigExportReqVO; import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInConfigPageReqVO; import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInConfigUpdateReqVO; import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInConfigDO; import org.apache.ibatis.annotations.Mapper; -import java.util.List; - /** * 积分签到规则 Mapper * @@ -25,12 +22,6 @@ public interface MemberSignInConfigMapper extends BaseMapperX selectList(MemberSignInConfigExportReqVO reqVO) { - return selectList(new LambdaQueryWrapperX() - .eqIfPresent(MemberSignInConfigDO::getDay, reqVO.getDay()) - .orderByDesc(MemberSignInConfigDO::getId)); - } - // default long selectSameDayNotSelf(MemberSignInConfigUpdateReqVO reqVO){ return selectCount(new LambdaQueryWrapperX () 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 e7d45569e..532efa362 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 @@ -3,13 +3,10 @@ package cn.iocoder.yudao.module.member.dal.mysql.signin; 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; -import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInRecordExportReqVO; import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInRecordPageReqVO; import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInRecordDO; import org.apache.ibatis.annotations.Mapper; -import java.util.List; - /** * 用户签到积分 Mapper * @@ -26,12 +23,4 @@ public interface MemberSignInRecordMapper extends BaseMapperX selectList(MemberSignInRecordExportReqVO reqVO) { - return selectList(new LambdaQueryWrapperX() - .eqIfPresent(MemberSignInRecordDO::getUserId, reqVO.getUserId()) - .eqIfPresent(MemberSignInRecordDO::getDay, reqVO.getDay()) - .betweenIfPresent(MemberSignInRecordDO::getCreateTime, reqVO.getCreateTime()) - .orderByDesc(MemberSignInRecordDO::getId)); - } - } 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 103dc20b9..ebec0b579 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 @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.member.service.point; import cn.iocoder.yudao.module.member.controller.admin.point.vo.config.MemberPointConfigSaveReqVO; import cn.iocoder.yudao.module.member.convert.point.MemberPointConfigConvert; import cn.iocoder.yudao.module.member.dal.dataobject.point.MemberPointConfigDO; -import cn.iocoder.yudao.module.member.dal.dataobject.point.MemberPointRecordDO; import cn.iocoder.yudao.module.member.dal.mysql.point.MemberPointConfigMapper; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; @@ -25,6 +24,7 @@ public class MemberPointConfigServiceImpl implements MemberPointConfigService { @Override public void saveConfig(MemberPointConfigSaveReqVO saveReqVO) { + // TODO @xiaqing:直接 getConfig() 查询,如果不存在,则插入;存在,则进行更新; long total = pointConfigMapper.selectCount(); MemberPointConfigDO pointConfigDO = MemberPointConfigConvert.INSTANCE.convert(saveReqVO); //大于0存在记录,则更新,否则插入 @@ -38,6 +38,8 @@ public class MemberPointConfigServiceImpl implements MemberPointConfigService { @Override public MemberPointConfigDO getConfig() { List list = pointConfigMapper.selectList(); + // TODO @xiaqing:可以使用 CollUtil.getFirst() return list == null ? null : list.get(0); } + } 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 1191ef86b..37ac5ea2d 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,15 +1,11 @@ package cn.iocoder.yudao.module.member.service.point; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod.MemberPointRecordCreateReqVO; -import cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod.MemberPointRecordExportReqVO; import cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod.MemberPointRecordPageReqVO; import cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod.MemberPointRecordUpdateReqVO; import cn.iocoder.yudao.module.member.dal.dataobject.point.MemberPointRecordDO; import javax.validation.Valid; -import java.util.Collection; -import java.util.List; /** * 用户积分记录 Service 接口 @@ -17,7 +13,7 @@ import java.util.List; * @author QingX */ public interface MemberPointRecordService { - + // TODO @xiaqing:方法和方法之间,是空一行哈; /** * 更新用户积分记录 @@ -27,7 +23,6 @@ public interface MemberPointRecordService { void updateRecord(@Valid MemberPointRecordUpdateReqVO updateReqVO); - /** * 获得用户积分记录 * @@ -36,14 +31,6 @@ public interface MemberPointRecordService { */ MemberPointRecordDO getRecord(Long id); - /** - * 获得用户积分记录列表 - * - * @param ids 编号 - * @return 用户积分记录列表 - */ - List getRecordList(Collection ids); - /** * 获得用户积分记录分页 * @@ -52,12 +39,4 @@ public interface MemberPointRecordService { */ PageResult getRecordPage(MemberPointRecordPageReqVO pageReqVO); - /** - * 获得用户积分记录列表, 用于 Excel 导出 - * - * @param exportReqVO 查询条件 - * @return 用户积分记录列表 - */ - List getRecordList(MemberPointRecordExportReqVO exportReqVO); - } 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 4199d2997..e1d675723 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,8 +1,6 @@ package cn.iocoder.yudao.module.member.service.point; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod.MemberPointRecordCreateReqVO; -import cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod.MemberPointRecordExportReqVO; import cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod.MemberPointRecordPageReqVO; import cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod.MemberPointRecordUpdateReqVO; import cn.iocoder.yudao.module.member.convert.point.MemberPointRecordConvert; @@ -40,7 +38,6 @@ public class MemberPointRecordServiceImpl implements MemberPointRecordService { recordMapper.updateById(updateObj); } - private void validateRecordExists(Long id) { if (recordMapper.selectById(id) == null) { throw exception(ErrorCodeConstants.RECORD_NOT_EXISTS); @@ -52,19 +49,9 @@ public class MemberPointRecordServiceImpl implements MemberPointRecordService { return recordMapper.selectById(id); } - @Override - public List getRecordList(Collection ids) { - return recordMapper.selectBatchIds(ids); - } - @Override public PageResult getRecordPage(MemberPointRecordPageReqVO pageReqVO) { return recordMapper.selectPage(pageReqVO); } - @Override - public List getRecordList(MemberPointRecordExportReqVO exportReqVO) { - return recordMapper.selectList(exportReqVO); - } - } 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 28b993632..f58870507 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 @@ -1,14 +1,12 @@ package cn.iocoder.yudao.module.member.service.signin; -import java.util.*; -import javax.validation.*; - +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInConfigCreateReqVO; -import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInConfigExportReqVO; import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInConfigPageReqVO; import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInConfigUpdateReqVO; import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInConfigDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import javax.validation.Valid; /** * 积分签到规则 Service 接口 @@ -47,14 +45,6 @@ public interface MemberSignInConfigService { */ MemberSignInConfigDO getSignInConfig(Integer id); - /** - * 获得积分签到规则列表 - * - * @param ids 编号 - * @return 积分签到规则列表 - */ - List getSignInConfigList(Collection ids); - /** * 获得积分签到规则分页 * @@ -63,12 +53,4 @@ public interface MemberSignInConfigService { */ PageResult getSignInConfigPage(MemberSignInConfigPageReqVO pageReqVO); - /** - * 获得积分签到规则列表, 用于 Excel 导出 - * - * @param exportReqVO 查询条件 - * @return 积分签到规则列表 - */ - List getSignInConfigList(MemberSignInConfigExportReqVO exportReqVO); - } 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 8fdf8a54f..a1cc2e321 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 @@ -1,20 +1,20 @@ package cn.iocoder.yudao.module.member.service.signin; -import cn.iocoder.yudao.module.member.service.signin.MemberSignInConfigService; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInConfigCreateReqVO; +import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInConfigPageReqVO; +import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInConfigUpdateReqVO; +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.dal.mysql.signin.MemberSignInConfigMapper; import org.springframework.stereotype.Service; -import javax.annotation.Resource; import org.springframework.validation.annotation.Validated; -import java.util.*; -import cn.iocoder.yudao.module.member.controller.admin.signin.vo.*; -import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInConfigDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; - -import cn.iocoder.yudao.module.member.convert.signin.MemberSignInConfigConvert; -import cn.iocoder.yudao.module.member.dal.mysql.signin.MemberSignInConfigMapper; +import javax.annotation.Resource; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.*; +import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.SIGN_IN_CONFIG_EXISTS; +import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.SIGN_IN_CONFIG_NOT_EXISTS; /** * 积分签到规则 Service 实现类 @@ -28,17 +28,19 @@ public class MemberSignInConfigServiceImpl implements MemberSignInConfigService @Resource private MemberSignInConfigMapper memberSignInConfigMapper; + // TODO @xiaqing:这种写的逻辑,最好按照 校验 - 更新这样的顺序写;类似这里,37 要放到 34 前面;updateSignInConfig 也是一样的思路 @Override public Integer createSignInConfig(MemberSignInConfigCreateReqVO createReqVO) { // 插入 MemberSignInConfigDO signInConfig = MemberSignInConfigConvert.INSTANCE.convert(createReqVO); - //判断是否重复插入签到天数 + // 判断是否重复插入签到天数 validateSignInConfigExistsDay(signInConfig.getDay()); memberSignInConfigMapper.insert(signInConfig); // 返回 return signInConfig.getId(); } + // TODO @xiaqing:这个逻辑的空行要注意;52 到 53 是没必要的空行;而 49 和 50 之间有个空行会好点,可以区分出是 校验 - 更新这样的逻辑间隔 @Override public void updateSignInConfig(MemberSignInConfigUpdateReqVO updateReqVO) { // 校验存在 @@ -65,6 +67,8 @@ public class MemberSignInConfigServiceImpl implements MemberSignInConfigService throw exception(SIGN_IN_CONFIG_NOT_EXISTS); } } + + // TODO @xiaqing:这个唯一判断,也可以参考下别的模块哈; //根据签到天数判断是否存在一个相同的天数 private void validateSignInConfigExistsDay(Integer day) { if (memberSignInConfigMapper.selectCount(MemberSignInConfigDO::getDay,day)>0) { @@ -72,32 +76,22 @@ public class MemberSignInConfigServiceImpl implements MemberSignInConfigService } } - //更新天数时判断是否有重复的天数,需要去除自己 + // TODO @xiaqing:参考下别的模块,判断唯一,排除自己怎么写的哈; + // 更新天数时判断是否有重复的天数,需要去除自己 private void validateSignInConfigSameDayNotSelf(MemberSignInConfigUpdateReqVO reqVO) { if (memberSignInConfigMapper.selectSameDayNotSelf(reqVO)>0) { throw exception(SIGN_IN_CONFIG_EXISTS); } } - @Override public MemberSignInConfigDO getSignInConfig(Integer id) { return memberSignInConfigMapper.selectById(id); } - @Override - public List getSignInConfigList(Collection ids) { - return memberSignInConfigMapper.selectBatchIds(ids); - } - @Override public PageResult getSignInConfigPage(MemberSignInConfigPageReqVO pageReqVO) { return memberSignInConfigMapper.selectPage(pageReqVO); } - @Override - public List getSignInConfigList(MemberSignInConfigExportReqVO exportReqVO) { - return memberSignInConfigMapper.selectList(exportReqVO); - } - } 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 b5bda4720..0faf2c1a9 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,10 +1,8 @@ package cn.iocoder.yudao.module.member.service.signin; -import java.util.*; -import javax.validation.*; -import cn.iocoder.yudao.module.member.controller.admin.signin.vo.*; -import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInRecordDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInRecordPageReqVO; +import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInRecordDO; /** * 用户签到积分 Service 接口 @@ -13,8 +11,6 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; */ public interface MemberSignInRecordService { - - /** * 删除用户签到积分 * @@ -30,14 +26,6 @@ public interface MemberSignInRecordService { */ MemberSignInRecordDO getSignInRecord(Long id); - /** - * 获得用户签到积分列表 - * - * @param ids 编号 - * @return 用户签到积分列表 - */ - List getSignInRecordList(Collection ids); - /** * 获得用户签到积分分页 * @@ -46,12 +34,4 @@ public interface MemberSignInRecordService { */ PageResult getSignInRecordPage(MemberSignInRecordPageReqVO pageReqVO); - /** - * 获得用户签到积分列表, 用于 Excel 导出 - * - * @param exportReqVO 查询条件 - * @return 用户签到积分列表 - */ - List getSignInRecordList(MemberSignInRecordExportReqVO exportReqVO); - } 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 3476dfa57..23698b5e8 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,22 +1,16 @@ package cn.iocoder.yudao.module.member.service.signin; -import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInRecordCreateReqVO; -import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInRecordExportReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInRecordPageReqVO; -import cn.iocoder.yudao.module.member.controller.admin.signin.vo.MemberSignInRecordUpdateReqVO; import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInRecordDO; +import cn.iocoder.yudao.module.member.dal.mysql.signin.MemberSignInRecordMapper; import org.springframework.stereotype.Service; -import javax.annotation.Resource; import org.springframework.validation.annotation.Validated; -import java.util.*; -import cn.iocoder.yudao.framework.common.pojo.PageResult; - -import cn.iocoder.yudao.module.member.convert.signin.MemberSignInRecordConvert; -import cn.iocoder.yudao.module.member.dal.mysql.signin.MemberSignInRecordMapper; +import javax.annotation.Resource; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.*; +import static cn.iocoder.yudao.module.member.enums.ErrorCodeConstants.SIGN_IN_RECORD_NOT_EXISTS; /** * 用户签到积分 Service 实现类 @@ -49,19 +43,9 @@ public class MemberSignInRecordServiceImpl implements MemberSignInRecordService return memberSignInRecordMapper.selectById(id); } - @Override - public List getSignInRecordList(Collection ids) { - return memberSignInRecordMapper.selectBatchIds(ids); - } - @Override public PageResult getSignInRecordPage(MemberSignInRecordPageReqVO pageReqVO) { return memberSignInRecordMapper.selectPage(pageReqVO); } - @Override - public List getSignInRecordList(MemberSignInRecordExportReqVO exportReqVO) { - return memberSignInRecordMapper.selectList(exportReqVO); - } - } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/member/MemberWalletDO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/member/MemberWalletDO.java index 043481103..e6e92bf82 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/member/MemberWalletDO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/member/MemberWalletDO.java @@ -6,8 +6,9 @@ import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; +// TODO @jason:修改 MemberWalletDO 为 PayWalletDO /** - * 支付-会员钱包 DO + * 支付 - 会员钱包 DO * * @author jason */ @@ -22,10 +23,12 @@ public class MemberWalletDO extends BaseDO { @TableId private Long id; + // TODO @jaosn:增加 userType 字段; /** * 用户 id * * 关联 MemberUserDO 的 id 编号 + * 关联 AdminUserDO 的 id 编号 */ private Long userId; @@ -43,4 +46,4 @@ public class MemberWalletDO extends BaseDO { * 累计充值, 单位分 */ private Integer totalTopUp; -} \ No newline at end of file +} diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index c748e9455..cdc1d3fde 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -44,31 +44,31 @@ spring: primary: master datasource: master: - name: mall - url: jdbc:mysql://10.211.55.5:3308/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + name: ruoyi-vue-pro + url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 # url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 # url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例 # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.master.name} # SQLServer 连接的示例 username: root - password: 1qaz!QAZ + password: 123456 # username: sa # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W slave: # 模拟从库,可根据自己需要修改 - name: mall - url: jdbc:mysql://10.211.55.5:3308/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 + name: ruoyi-vue-pro + url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 # url: jdbc:mysql://127.0.0.1:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT # MySQL Connector/J 5.X 连接的示例 # url: jdbc:postgresql://127.0.0.1:5432/${spring.datasource.dynamic.datasource.slave.name} # PostgreSQL 连接的示例 # url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例 # url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=${spring.datasource.dynamic.datasource.slave.name} # SQLServer 连接的示例 username: root - password: 1qaz!QAZ + password: 123456 # username: sa # password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 redis: - host: 10.211.55.5 # 地址 + host: 127.0.0.1 # 地址 port: 6379 # 端口 database: 0 # 数据库索引 # password: dev # 密码,建议生产环境开启 @@ -159,7 +159,6 @@ logging: cn.iocoder.yudao.module.member.dal.mysql: debug cn.iocoder.yudao.module.trade.dal.mysql: debug cn.iocoder.yudao.module.promotion.dal.mysql: debug - cn.iocoder.yudao.module.point.dal.mysql: debug debug: false