From 463add4ee035938f9622a6c981668620f097067d Mon Sep 17 00:00:00 2001 From: peng <peng.com> Date: 星期四, 21 八月 2025 15:29:22 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- manager-api/src/main/java/cn/lili/controller/lmk/PrizeActivityController.java | 68 ++++++ framework/src/main/java/cn/lili/modules/lmk/service/VideoCommentService.java | 3 framework/src/main/resources/mapper/lmk/PrizeActivityMapper.xml | 6 framework/src/main/java/cn/lili/modules/lmk/domain/query/VideoCommentMangerQuery.java | 42 +++ framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeDrawServiceImpl.java | 52 ++++ manager-api/src/main/java/cn/lili/controller/lmk/PrizeDrawController.java | 56 +++++ framework/src/main/java/cn/lili/modules/lmk/service/PrizeDrawService.java | 7 framework/src/main/java/cn/lili/modules/lmk/service/impl/ActivityServiceImpl.java | 7 framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoCommentServiceImpl.java | 8 framework/src/main/resources/mapper/lmk/PrizeDrawMapper.xml | 6 framework/src/main/java/cn/lili/modules/lmk/enums/general/PrizeActivityStatusEnum.java | 23 ++ framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java | 6 framework/src/main/java/cn/lili/modules/lmk/service/PrizeActivityService.java | 1 framework/src/main/java/cn/lili/modules/lmk/service/impl/ActivityRefPrizeServiceImpl.java | 51 ++++ framework/src/main/java/cn/lili/modules/lmk/service/ActivityRefPrizeService.java | 22 ++ framework/src/main/java/cn/lili/modules/lmk/domain/vo/ActivityRefPrizeVO.java | 4 framework/src/main/java/cn/lili/modules/lmk/domain/entity/PrizeDraw.java | 2 framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeActivityServiceImpl.java | 55 +++++ framework/src/main/resources/mapper/lmk/ActivityRefPrizeMapper.xml | 32 ++ framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreMemberServiceImpl.java | 2 framework/src/main/java/cn/lili/modules/lmk/domain/query/PrizeActivityQuery.java | 15 + framework/src/main/resources/mapper/lmk/VideoCommentMapper.xml | 32 ++ framework/src/main/java/cn/lili/modules/lmk/domain/entity/PrizeActivity.java | 6 framework/src/main/java/cn/lili/modules/lmk/mapper/VideoCommentMapper.java | 4 framework/src/main/java/cn/lili/modules/lmk/domain/vo/PrizeDrawVO.java | 3 framework/src/main/java/cn/lili/modules/lmk/mapper/ActivityRefPrizeMapper.java | 3 framework/src/main/java/cn/lili/modules/lmk/domain/query/PrizeDrawQuery.java | 8 framework/src/main/java/cn/lili/modules/lmk/domain/vo/PrizeActivityVO.java | 5 framework/src/main/java/cn/lili/modules/lmk/domain/form/ActivityRefPrizeForm.java | 8 framework/src/main/java/cn/lili/modules/member/serviceimpl/MemberServiceImpl.java | 2 framework/src/main/java/cn/lili/modules/lmk/domain/vo/ActivityRefPrizeInfoVO.java | 21 + framework/src/main/java/cn/lili/modules/lmk/domain/form/PrizeActivityForm.java | 7 manager-api/src/main/java/cn/lili/controller/lmk/VideoCommentController.java | 33 +++ framework/src/main/java/cn/lili/modules/lmk/domain/entity/ActivityRefPrize.java | 4 34 files changed, 586 insertions(+), 18 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/entity/ActivityRefPrize.java b/framework/src/main/java/cn/lili/modules/lmk/domain/entity/ActivityRefPrize.java index 9b98df2..eb07fbd 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/domain/entity/ActivityRefPrize.java +++ b/framework/src/main/java/cn/lili/modules/lmk/domain/entity/ActivityRefPrize.java @@ -21,11 +21,11 @@ @TableField("prize_activity_id") /** 鎶藉娲诲姩id */ - private Long prizeActivityId; + private String prizeActivityId; @TableField("prize_id") /** 濂栧搧id */ - private Long prizeId; + private String prizeId; @TableField("prize_content") /** 濂栧搧鍐呭 */ diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/entity/PrizeActivity.java b/framework/src/main/java/cn/lili/modules/lmk/domain/entity/PrizeActivity.java index f28dcfc..22b0f94 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/domain/entity/PrizeActivity.java +++ b/framework/src/main/java/cn/lili/modules/lmk/domain/entity/PrizeActivity.java @@ -3,11 +3,7 @@ import cn.lili.mybatis.BaseEntity; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; - -import java.io.Serializable; -import java.time.LocalDateTime; import java.util.Date; - import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import org.apache.ibatis.type.LocalDateTimeTypeHandler; @@ -59,7 +55,7 @@ private String activityCover; @TableField("enable_status") - /** 鏄惁寮�鍚椿鍔� */ + /** 鏄惁寮�鍚椿鍔� */ private String enableStatus; diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/entity/PrizeDraw.java b/framework/src/main/java/cn/lili/modules/lmk/domain/entity/PrizeDraw.java index 795b0bc..e30c0e9 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/domain/entity/PrizeDraw.java +++ b/framework/src/main/java/cn/lili/modules/lmk/domain/entity/PrizeDraw.java @@ -28,7 +28,7 @@ @TableField("coupon_id") /** 浼樻儬鍗穒d */ - private Long couponId; + private String couponId; @TableField("prize_content") /** 濂栧搧鍐呭 */ diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/form/ActivityRefPrizeForm.java b/framework/src/main/java/cn/lili/modules/lmk/domain/form/ActivityRefPrizeForm.java index 50bd893..c8c5ee5 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/domain/form/ActivityRefPrizeForm.java +++ b/framework/src/main/java/cn/lili/modules/lmk/domain/form/ActivityRefPrizeForm.java @@ -27,11 +27,15 @@ @NotNull(message = "鎶藉娲诲姩id涓嶈兘涓虹┖", groups = {Add.class, Update.class}) @ApiModelProperty("鎶藉娲诲姩id") - private Long prizeActivityId; + private String prizeActivityId; @NotNull(message = "濂栧搧id涓嶈兘涓虹┖", groups = {Add.class, Update.class}) @ApiModelProperty("濂栧搧id") - private Long prizeId; + private String prizeId; + + @NotNull(message = "姣忔棩鏈�澶т腑濂栨暟涓嶈兘涓虹┖", groups = {Add.class, Update.class}) + @ApiModelProperty("姣忔棩鏈�澶т腑濂栨暟") + private Integer maxPreDay; @NotBlank(message = "濂栧搧鍐呭涓嶈兘涓虹┖", groups = {Add.class, Update.class}) @ApiModelProperty("濂栧搧鍐呭") diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/form/PrizeActivityForm.java b/framework/src/main/java/cn/lili/modules/lmk/domain/form/PrizeActivityForm.java index 55df9b1..741dc5b 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/domain/form/PrizeActivityForm.java +++ b/framework/src/main/java/cn/lili/modules/lmk/domain/form/PrizeActivityForm.java @@ -4,9 +4,12 @@ import cn.lili.group.Add; import cn.lili.base.AbsForm; import cn.lili.modules.lmk.domain.entity.PrizeActivity; +import com.fasterxml.jackson.annotation.JsonFormat; import org.springframework.beans.BeanUtils; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; + +import org.springframework.format.annotation.DateTimeFormat; import org.springframework.lang.NonNull; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -33,10 +36,14 @@ @NotNull(message = "娲诲姩寮�濮嬫椂闂翠笉鑳戒负绌�", groups = {Add.class, Update.class}) @ApiModelProperty("娲诲姩寮�濮嬫椂闂�") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date beginTime; @NotNull(message = "娲诲姩缁撴潫鏃堕棿涓嶈兘涓虹┖", groups = {Add.class, Update.class}) @ApiModelProperty("娲诲姩缁撴潫鏃堕棿") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date endTime; @NotNull(message = "姣忔棩鏈�澶ф娊濂栦笂闄愪笉鑳戒负绌�", groups = {Add.class, Update.class}) diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/query/PrizeActivityQuery.java b/framework/src/main/java/cn/lili/modules/lmk/domain/query/PrizeActivityQuery.java index 8e930f0..22b9557 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/domain/query/PrizeActivityQuery.java +++ b/framework/src/main/java/cn/lili/modules/lmk/domain/query/PrizeActivityQuery.java @@ -1,7 +1,12 @@ package cn.lili.modules.lmk.domain.query; import cn.lili.base.AbsQuery; + +import java.util.Date; import java.util.List; + +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; import org.springframework.lang.NonNull; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; @@ -18,5 +23,15 @@ @Data @ApiModel(value = "PrizeActivity鏌ヨ鍙傛暟", description = "鎶藉娲诲姩鏌ヨ鍙傛暟") public class PrizeActivityQuery extends AbsQuery { + + public String activityName; + + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + public Date beginTime; + + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + public Date endTime; } diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/query/PrizeDrawQuery.java b/framework/src/main/java/cn/lili/modules/lmk/domain/query/PrizeDrawQuery.java index 7c996b2..8ade3da 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/domain/query/PrizeDrawQuery.java +++ b/framework/src/main/java/cn/lili/modules/lmk/domain/query/PrizeDrawQuery.java @@ -18,5 +18,13 @@ @Data @ApiModel(value = "PrizeDraw鏌ヨ鍙傛暟", description = "鎶藉娲诲姩濂栧搧鏌ヨ鍙傛暟") public class PrizeDrawQuery extends AbsQuery { + /** + * 濂栧搧鍚� + */ + private String prizeName; + /** + * 濂栧搧绫诲瀷 + */ + private String prizeType; } diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/query/VideoCommentMangerQuery.java b/framework/src/main/java/cn/lili/modules/lmk/domain/query/VideoCommentMangerQuery.java new file mode 100644 index 0000000..93b400b --- /dev/null +++ b/framework/src/main/java/cn/lili/modules/lmk/domain/query/VideoCommentMangerQuery.java @@ -0,0 +1,42 @@ +package cn.lili.modules.lmk.domain.query; + + +import cn.lili.base.AbsQuery; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import javax.validation.constraints.NotBlank; +import java.util.Date; + +/** + * lmk-shop-java + * + * @author : zxl + * @date : 2025-08-14 10:37 + **/ +@Data +@ApiModel(value = "VideoCommentMangerQuery鏌ヨ鍙傛暟", description = "绠$悊绔棰戣瘎璁烘煡璇㈠弬鏁�") +public class VideoCommentMangerQuery extends AbsQuery { + + @ApiModelProperty("瑙嗛id") + private String videoId; + + @ApiModelProperty("璇勮鍐呭") + private String commentContent; + + @ApiModelProperty("鐢ㄦ埛鍚嶇О") + private String nickName; + + @ApiModelProperty("璧峰鏃堕棿") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date startTime; + @ApiModelProperty("缁撴潫鏃堕棿") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date endTime; + +} \ No newline at end of file diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/vo/ActivityRefPrizeInfoVO.java b/framework/src/main/java/cn/lili/modules/lmk/domain/vo/ActivityRefPrizeInfoVO.java new file mode 100644 index 0000000..3fabc88 --- /dev/null +++ b/framework/src/main/java/cn/lili/modules/lmk/domain/vo/ActivityRefPrizeInfoVO.java @@ -0,0 +1,21 @@ +package cn.lili.modules.lmk.domain.vo; + + +import io.swagger.annotations.ApiModel; +import lombok.Data; + +/** + * lmk-shop-java + * 琛ュ厖濂栧搧鐩稿叧淇℃伅 + * + * @author : zxl + * @date : 2025-08-21 09:44 + **/ +@Data +@ApiModel(value = "琛ュ厖濂栧搧鐩稿叧淇℃伅", description = "琛ュ厖濂栧搧鐩稿叧淇℃伅") +public class ActivityRefPrizeInfoVO extends ActivityRefPrizeVO{ + private String prizeCover; + private String prizeCoverUrl; + private String prizeName; + private String prizeType; +} diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/vo/ActivityRefPrizeVO.java b/framework/src/main/java/cn/lili/modules/lmk/domain/vo/ActivityRefPrizeVO.java index 5e12626..41027e1 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/domain/vo/ActivityRefPrizeVO.java +++ b/framework/src/main/java/cn/lili/modules/lmk/domain/vo/ActivityRefPrizeVO.java @@ -24,11 +24,11 @@ /** 鎶藉娲诲姩id */ @ApiModelProperty("鎶藉娲诲姩id") - private Long prizeActivityId; + private String prizeActivityId; /** 濂栧搧id */ @ApiModelProperty("濂栧搧id") - private Long prizeId; + private String prizeId; /** 濂栧搧鍐呭 */ @ApiModelProperty("濂栧搧鍐呭") diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/vo/PrizeActivityVO.java b/framework/src/main/java/cn/lili/modules/lmk/domain/vo/PrizeActivityVO.java index 909c628..a8338c8 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/domain/vo/PrizeActivityVO.java +++ b/framework/src/main/java/cn/lili/modules/lmk/domain/vo/PrizeActivityVO.java @@ -56,6 +56,11 @@ @ApiModelProperty("鏄惁寮�鍚椿鍔�") private String enableStatus; + private String activityCoverUrl; + + private String activityImgUrl; + + public static PrizeActivityVO getVoByEntity(@NonNull PrizeActivity entity, PrizeActivityVO vo) { if(vo == null) { vo = new PrizeActivityVO(); diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/vo/PrizeDrawVO.java b/framework/src/main/java/cn/lili/modules/lmk/domain/vo/PrizeDrawVO.java index d1308fe..f390f3c 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/domain/vo/PrizeDrawVO.java +++ b/framework/src/main/java/cn/lili/modules/lmk/domain/vo/PrizeDrawVO.java @@ -48,6 +48,9 @@ @ApiModelProperty("濂栧搧鍥剧墖") private String prizeImg; + private String prizeCoverUrl; + + private String prizeImgUrl; public static PrizeDrawVO getVoByEntity(@NonNull PrizeDraw entity, PrizeDrawVO vo) { if(vo == null) { vo = new PrizeDrawVO(); diff --git a/framework/src/main/java/cn/lili/modules/lmk/enums/general/PrizeActivityStatusEnum.java b/framework/src/main/java/cn/lili/modules/lmk/enums/general/PrizeActivityStatusEnum.java new file mode 100644 index 0000000..c985764 --- /dev/null +++ b/framework/src/main/java/cn/lili/modules/lmk/enums/general/PrizeActivityStatusEnum.java @@ -0,0 +1,23 @@ +package cn.lili.modules.lmk.enums.general; + + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * lmk-shop-java + * 鎶藉娲诲姩鐘舵�� + * + * @author : zxl + * @date : 2025-08-21 11:43 + **/ +@AllArgsConstructor +@Getter +public enum PrizeActivityStatusEnum { + /** + * 鎶藉娲诲姩鐘舵�� + */ + OFF("off"), + ON("on"); + private final String description; +} diff --git a/framework/src/main/java/cn/lili/modules/lmk/mapper/ActivityRefPrizeMapper.java b/framework/src/main/java/cn/lili/modules/lmk/mapper/ActivityRefPrizeMapper.java index a7bde6e..07a65a2 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/mapper/ActivityRefPrizeMapper.java +++ b/framework/src/main/java/cn/lili/modules/lmk/mapper/ActivityRefPrizeMapper.java @@ -1,6 +1,7 @@ package cn.lili.modules.lmk.mapper; import cn.lili.modules.lmk.domain.entity.ActivityRefPrize; +import cn.lili.modules.lmk.domain.vo.ActivityRefPrizeInfoVO; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import cn.lili.modules.lmk.domain.vo.ActivityRefPrizeVO; @@ -33,4 +34,6 @@ String lockPrizeRef(@Param("refId") String refId);; + + List<ActivityRefPrizeInfoVO> getActivityRefPrizeByActivityId(String prizeActivityId); } diff --git a/framework/src/main/java/cn/lili/modules/lmk/mapper/VideoCommentMapper.java b/framework/src/main/java/cn/lili/modules/lmk/mapper/VideoCommentMapper.java index d05610e..94bc442 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/mapper/VideoCommentMapper.java +++ b/framework/src/main/java/cn/lili/modules/lmk/mapper/VideoCommentMapper.java @@ -1,6 +1,7 @@ package cn.lili.modules.lmk.mapper; import cn.lili.modules.lmk.domain.entity.VideoComment; +import cn.lili.modules.lmk.domain.query.VideoCommentMangerQuery; import cn.lili.modules.lmk.domain.vo.CollectTypeNumVO; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -27,6 +28,9 @@ */ VideoCommentVO getById(String id); + + IPage getManagerPage (IPage page, @Param("query") VideoCommentMangerQuery query); + /** * 鍒嗛〉 */ diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/ActivityRefPrizeService.java b/framework/src/main/java/cn/lili/modules/lmk/service/ActivityRefPrizeService.java index 6a0d684..5fc4a8d 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/service/ActivityRefPrizeService.java +++ b/framework/src/main/java/cn/lili/modules/lmk/service/ActivityRefPrizeService.java @@ -18,6 +18,28 @@ public interface ActivityRefPrizeService extends IService<ActivityRefPrize> { /** + * 鏍规嵁鎶藉娲诲姩id 杩斿洖濂栧搧闆嗗悎 + * @param prizeActivityId + * @return + */ + Result getActivityRefPrizeByActivityId(String prizeActivityId); + + /** + * 鏇村叿濂栧搧id娲诲姩鐩稿叧娲诲姩 + * @param prizeId + * @return + */ + Result getPrizeByIdAndPrizeActivityId(String prizeId); + + /** + * 鏂板濂栧搧 + * @param prizeActivityId + * @param list + * @return + */ + Result addList(String prizeActivityId,List<ActivityRefPrizeForm> list); + + /** * 娣诲姞 * @param form * @return diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/PrizeActivityService.java b/framework/src/main/java/cn/lili/modules/lmk/service/PrizeActivityService.java index 378d96a..7d7c058 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/service/PrizeActivityService.java +++ b/framework/src/main/java/cn/lili/modules/lmk/service/PrizeActivityService.java @@ -15,6 +15,7 @@ */ public interface PrizeActivityService extends IService<PrizeActivity> { + Result publishPrizeActivity(String id); /** * 娣诲姞 * @param form diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/PrizeDrawService.java b/framework/src/main/java/cn/lili/modules/lmk/service/PrizeDrawService.java index eda1c76..5acc085 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/service/PrizeDrawService.java +++ b/framework/src/main/java/cn/lili/modules/lmk/service/PrizeDrawService.java @@ -14,6 +14,12 @@ * @since 2025-08-14 */ public interface PrizeDrawService extends IService<PrizeDraw> { + /** + * 杩斿洖鑳藉惁淇敼锛屼互鍙婅嫢鏄紭鎯犲姷绫诲瀷锛岃繑鍥炰紭鎯犲姷淇℃伅銆� + * @param prizeDrawId + * @return + */ + Result canUpDatePrizeDraw(String prizeDrawId); /** * 娣诲姞 @@ -22,6 +28,7 @@ */ Result add(PrizeDrawForm form); + /** * 淇敼 * @param form diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/VideoCommentService.java b/framework/src/main/java/cn/lili/modules/lmk/service/VideoCommentService.java index b6bc798..fb24cf7 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/service/VideoCommentService.java +++ b/framework/src/main/java/cn/lili/modules/lmk/service/VideoCommentService.java @@ -3,6 +3,7 @@ import cn.lili.modules.lmk.domain.entity.ThumbsUpRecord; import cn.lili.modules.lmk.domain.entity.VideoComment; import cn.lili.modules.lmk.domain.form.ThumbsUpRecordForm; +import cn.lili.modules.lmk.domain.query.VideoCommentMangerQuery; import cn.lili.modules.lmk.domain.vo.CollectTypeNumVO; import com.baomidou.mybatisplus.extension.service.IService; import cn.lili.base.Result; @@ -18,6 +19,8 @@ */ public interface VideoCommentService extends IService<VideoComment> { + Result mangerComment(VideoCommentMangerQuery query); + /** * 娣诲姞 * @param form diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/ActivityRefPrizeServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/ActivityRefPrizeServiceImpl.java index 2f3658e..1b6fb25 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/ActivityRefPrizeServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/ActivityRefPrizeServiceImpl.java @@ -1,10 +1,15 @@ package cn.lili.modules.lmk.service.impl; +import cn.lili.common.utils.StringUtils; +import cn.lili.modules.lmk.domain.vo.ActivityRefPrizeInfoVO; +import cn.lili.utils.COSUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import cn.lili.modules.lmk.domain.entity.ActivityRefPrize; import cn.lili.modules.lmk.mapper.ActivityRefPrizeMapper; import cn.lili.modules.lmk.service.ActivityRefPrizeService; import cn.lili.base.Result; +import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import cn.lili.modules.lmk.domain.form.ActivityRefPrizeForm; import cn.lili.modules.lmk.domain.vo.ActivityRefPrizeVO; @@ -13,8 +18,10 @@ import lombok.RequiredArgsConstructor; import cn.lili.utils.PageUtil; import org.springframework.beans.BeanUtils; +import org.springframework.transaction.annotation.Transactional; import org.springframework.util.Assert; +import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @@ -26,9 +33,53 @@ */ @Service @RequiredArgsConstructor +@Transactional public class ActivityRefPrizeServiceImpl extends ServiceImpl<ActivityRefPrizeMapper, ActivityRefPrize> implements ActivityRefPrizeService { private final ActivityRefPrizeMapper activityRefPrizeMapper; + private final COSUtil cosUtil; + @Override + public Result getActivityRefPrizeByActivityId(String prizeActivityId){ + //浠ュ強濂栧搧瀵瑰簲淇℃伅 + List<ActivityRefPrizeInfoVO> activityRefPrizeByActivityIds = activityRefPrizeMapper.getActivityRefPrizeByActivityId(prizeActivityId); + for (ActivityRefPrizeInfoVO activityRefPrizeInfoVO : activityRefPrizeByActivityIds){ + if (StringUtils.isNotBlank(activityRefPrizeInfoVO.getPrizeCover())){ + activityRefPrizeInfoVO.setPrizeCoverUrl(cosUtil.getPreviewUrl(activityRefPrizeInfoVO.getPrizeCover())); + } + } + return Result.ok().data(activityRefPrizeByActivityIds); + } + + @Override + public Result getPrizeByIdAndPrizeActivityId(String prizeId){ + List<ActivityRefPrize> activityRefPrizeList = new LambdaQueryChainWrapper<>(baseMapper) + .eq(ActivityRefPrize::getPrizeId,prizeId) + .eq(ActivityRefPrize::getDeleteFlag,Boolean.FALSE) + .list(); + return Result.ok().data(activityRefPrizeList); + } + + @Override + public Result addList(String prizeActivityId,List<ActivityRefPrizeForm> list){ + //鍏堝垹闄ゅ啀閲嶆柊娣诲姞 + baseMapper.delete(new LambdaQueryWrapper<ActivityRefPrize>().eq(ActivityRefPrize::getPrizeActivityId,prizeActivityId)); + + List<ActivityRefPrize> activityRefPrizeList = new ArrayList<>(); + if (!list.isEmpty()){ + for (ActivityRefPrizeForm activityRefPrizeForm : list){ + ActivityRefPrize activityRefPrize = ActivityRefPrizeForm.getEntityByForm(activityRefPrizeForm,null); + //鍒濆鍖栭攣鐨勭増鏈� + activityRefPrize.setPrizeActivityId(prizeActivityId); + activityRefPrize.setRemainNum(activityRefPrizeForm.getPrizeNum()); + activityRefPrize.setVersion(0); + activityRefPrizeList.add(activityRefPrize); + } + this.saveBatch(activityRefPrizeList); + } + + return Result.ok(); + } + /** * 娣诲姞 diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/ActivityServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/ActivityServiceImpl.java index 12715a1..2920e96 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/ActivityServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/ActivityServiceImpl.java @@ -105,8 +105,11 @@ public Result remove(List<String> ids) { //鍒ゆ柇娲诲姩id鏄惁宸茬粡瀛樺湪鎶ュ悕浜哄憳 for(String id : ids){ - canDeleteActivity(id); - + Result result = canDeleteActivity(id); + Integer code = (Integer) result.get("code"); + if (code != 200){ + return result; + } } return Result.ok("鍒犻櫎鎴愬姛"); diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeActivityServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeActivityServiceImpl.java index 619d1eb..2b199ce 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeActivityServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeActivityServiceImpl.java @@ -1,5 +1,11 @@ package cn.lili.modules.lmk.service.impl; +import cn.lili.common.utils.StringUtils; +import cn.lili.modules.lmk.domain.entity.ActivityRefPrize; +import cn.lili.modules.lmk.domain.vo.ActivityRefPrizeInfoVO; +import cn.lili.modules.lmk.enums.general.PrizeActivityStatusEnum; +import cn.lili.modules.lmk.service.ActivityRefPrizeService; +import cn.lili.utils.COSUtil; import com.baomidou.mybatisplus.core.metadata.IPage; import cn.lili.modules.lmk.domain.entity.PrizeActivity; import cn.lili.modules.lmk.mapper.PrizeActivityMapper; @@ -14,7 +20,9 @@ import cn.lili.utils.PageUtil; import org.springframework.beans.BeanUtils; import org.springframework.util.Assert; +import org.springframework.util.CollectionUtils; +import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @@ -28,7 +36,45 @@ @RequiredArgsConstructor public class PrizeActivityServiceImpl extends ServiceImpl<PrizeActivityMapper, PrizeActivity> implements PrizeActivityService { + private final ActivityRefPrizeService activityRefPrizeService; private final PrizeActivityMapper prizeActivityMapper; + + private final COSUtil cOSUtil; + + @Override + public Result publishPrizeActivity(String id) { + PrizeActivity prizeActivity = baseMapper.selectById(id); + //鍒ゆ柇娲诲姩鏄惁瀛樺湪濂栧搧 瀛樺湪鍏佽寮�鍚� + + Object data = activityRefPrizeService.getActivityRefPrizeByActivityId(id).get("data"); + + if (data instanceof List<?>) { + List<?> rawList = (List<?>) data; + List<ActivityRefPrizeInfoVO> list = new ArrayList<>(); + for (Object item : rawList) { + if (item instanceof ActivityRefPrizeInfoVO) { + list.add((ActivityRefPrizeInfoVO) item); + } + } + if (CollectionUtils.isEmpty(list)) { + return Result.error("寮�鍚娊濂栨椿鍔ㄥ墠璇疯缃鍝�"); + } + // 浣跨敤 list + } + + + if (PrizeActivityStatusEnum.OFF.getDescription().equals(prizeActivity.getEnableStatus())) { + prizeActivity.setEnableStatus(PrizeActivityStatusEnum.ON.getDescription()); + baseMapper.updateById(prizeActivity); + return Result.ok("鍚姩鎴愬姛"); + }else { + prizeActivity.setEnableStatus(PrizeActivityStatusEnum.OFF.getDescription()); + baseMapper.updateById(prizeActivity); + return Result.ok("鍏抽棴鎴愬姛"); + } + + + } /** * 娣诲姞 @@ -89,6 +135,15 @@ public Result page(PrizeActivityQuery query) { IPage<PrizeActivityVO> page = PageUtil.getPage(query, PrizeActivityVO.class); baseMapper.getPage(page, query); + + for (PrizeActivityVO vo : page.getRecords()) { + if (StringUtils.isNotBlank(vo.getActivityCover())){ + vo.setActivityCoverUrl(cOSUtil.getPreviewUrl(vo.getActivityCover())); + } + if (StringUtils.isNotBlank(vo.getActivityImg())){ + vo.setActivityImgUrl(cOSUtil.getPreviewUrl(vo.getActivityImg())); + } + } return Result.ok().data(page.getRecords()).total(page.getTotal()); } diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeDrawServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeDrawServiceImpl.java index e2936a7..4ee4bc1 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeDrawServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/PrizeDrawServiceImpl.java @@ -1,5 +1,11 @@ package cn.lili.modules.lmk.service.impl; +import cn.lili.common.utils.StringUtils; +import cn.lili.modules.lmk.domain.entity.ActivityRefPrize; +import cn.lili.modules.lmk.service.ActivityRefPrizeService; +import cn.lili.modules.promotion.entity.vos.CouponVO; +import cn.lili.modules.promotion.service.CouponService; +import cn.lili.utils.COSUtil; import com.baomidou.mybatisplus.core.metadata.IPage; import cn.lili.modules.lmk.domain.entity.PrizeDraw; import cn.lili.modules.lmk.mapper.PrizeDrawMapper; @@ -14,7 +20,9 @@ import cn.lili.utils.PageUtil; import org.springframework.beans.BeanUtils; import org.springframework.util.Assert; +import org.springframework.util.CollectionUtils; +import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @@ -29,6 +37,41 @@ public class PrizeDrawServiceImpl extends ServiceImpl<PrizeDrawMapper, PrizeDraw> implements PrizeDrawService { private final PrizeDrawMapper prizeDrawMapper; + + private final ActivityRefPrizeService activityRefPrizeService; + + private final CouponService couponService; + + private final COSUtil cOSUtil; + + @Override + public Result canUpDatePrizeDraw(String prizeDrawId) { + PrizeDraw prizeDraw = baseMapper.selectById(prizeDrawId); + CouponVO detail = new CouponVO(); + if (StringUtils.isNotBlank(prizeDraw.getCouponId())){ + detail = couponService.getDetail(prizeDraw.getCouponId()); + } + Result result = Result.ok(); + result.data(detail); + Object data = activityRefPrizeService.getPrizeByIdAndPrizeActivityId(prizeDrawId).get("data"); + + if (data instanceof List<?>) { + List<?> rawList = (List<?>) data; + List<ActivityRefPrize> list = new ArrayList<>(); + for (Object item : rawList) { + if (item instanceof ActivityRefPrize) { + list.add((ActivityRefPrize) item); + } + } + if (CollectionUtils.isEmpty(list)) { + return result.put("state",true); + }else{ + return result.put("state",false); + } + // 浣跨敤 list + } + return result.put("state",false); + } /** * 娣诲姞 @@ -50,7 +93,6 @@ @Override public Result update(PrizeDrawForm form) { PrizeDraw entity = baseMapper.selectById(form.getId()); - // 涓虹┖鎶汭llegalArgumentException锛屽仛鍏ㄥ眬寮傚父澶勭悊 Assert.notNull(entity, "璁板綍涓嶅瓨鍦�"); BeanUtils.copyProperties(form, entity); @@ -89,6 +131,14 @@ public Result page(PrizeDrawQuery query) { IPage<PrizeDrawVO> page = PageUtil.getPage(query, PrizeDrawVO.class); baseMapper.getPage(page, query); + for (PrizeDrawVO vo : page.getRecords()) { + if (StringUtils.isNotBlank(vo.getPrizeCover())){ + vo.setPrizeCoverUrl(cOSUtil.getPreviewUrl(vo.getPrizeCover())); + } + if (StringUtils.isNotBlank(vo.getPrizeImg())){ + vo.setPrizeImgUrl(cOSUtil.getPreviewUrl(vo.getPrizeImg())); + } + } return Result.ok().data(page.getRecords()).total(page.getTotal()); } diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreMemberServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreMemberServiceImpl.java index 08bde48..e1a083e 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreMemberServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/StoreMemberServiceImpl.java @@ -59,7 +59,7 @@ public Result add(StoreMemberForm form) { String storeId =UserContext.getCurrentUser().getStoreId(); System.out.println(storeId); -// storeId = "1376433565247471616"; //娴嬭瘯鐢� + // if ( storeId == null){ return null; } diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoCommentServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoCommentServiceImpl.java index ca4e7af..bdff64b 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoCommentServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoCommentServiceImpl.java @@ -9,6 +9,7 @@ import cn.lili.modules.lmk.constant.RedisKeyExpireConstant; import cn.lili.modules.lmk.domain.entity.ThumbsUpRecord; import cn.lili.modules.lmk.domain.form.ThumbsUpRecordForm; +import cn.lili.modules.lmk.domain.query.VideoCommentMangerQuery; import cn.lili.modules.lmk.domain.vo.CollectTypeNumVO; import cn.lili.modules.lmk.enums.general.VideoCommentStatusEnum; import cn.lili.modules.lmk.event.event.VideoCommentNumCacheEvent; @@ -63,6 +64,13 @@ private final RocketmqCustomProperties rocketmqCustomProperties; private final ApplicationEventPublisher eventPublisher; + @Override + public Result mangerComment(VideoCommentMangerQuery query) { + IPage<VideoCommentVO> page = PageUtil.getPage(query, VideoCommentVO.class); + baseMapper.getManagerPage(page, query); + return Result.ok().data(page.getRecords()).total(page.getTotal()); + } + /** * 娣诲姞 * @param form diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java index 9e8fde1..d39a7a2 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java @@ -743,8 +743,12 @@ } if (VideoContentTypeEnum.VIDEO.getValue().equals(v.getVideoContentType())) { v.setVideoUrl(cosUtil.getPreviewUrl(v.getVideoFileKey())); + String coverFileKey = v.getCoverFileKey(); - v.setCoverUrl(cosUtil.getPreviewUrl(coverFileKey)); + if (StringUtils.isNotBlank(coverFileKey) && !coverFileKey.contains("http")) { + v.setCoverUrl(cosUtil.getPreviewUrl(coverFileKey)); + } + } else if (VideoContentTypeEnum.IMG.getValue().equals(v.getVideoContentType()) && StringUtils.isNotBlank(v.getVideoImgs())) { v.setImgs(JSON.parseArray(v.getVideoImgs(), String.class).stream().map(fileKey -> cosUtil.getPreviewUrl(fileKey)).collect(Collectors.toList())); } diff --git a/framework/src/main/java/cn/lili/modules/member/serviceimpl/MemberServiceImpl.java b/framework/src/main/java/cn/lili/modules/member/serviceimpl/MemberServiceImpl.java index 2f145e8..53ae9e3 100644 --- a/framework/src/main/java/cn/lili/modules/member/serviceimpl/MemberServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/member/serviceimpl/MemberServiceImpl.java @@ -549,7 +549,7 @@ public Result resetPassword(String id) { String password = "111111"; Member member = this.getById(id); - member.setPassword(new BCryptPasswordEncoder().encode(password)); + member.setPassword(new BCryptPasswordEncoder().encode(SecureUtil.md5(password))); this.updateById(member); return Result.ok("閲嶇疆鎴愬姛"); } diff --git a/framework/src/main/resources/mapper/lmk/ActivityRefPrizeMapper.xml b/framework/src/main/resources/mapper/lmk/ActivityRefPrizeMapper.xml index f06dad1..1ea9f4e 100644 --- a/framework/src/main/resources/mapper/lmk/ActivityRefPrizeMapper.xml +++ b/framework/src/main/resources/mapper/lmk/ActivityRefPrizeMapper.xml @@ -14,7 +14,39 @@ <result column="remain_num" property="remainNum" /> </resultMap> + <resultMap id="activityRefPrizeInfoMap" type="cn.lili.modules.lmk.domain.vo.ActivityRefPrizeInfoVO"> + <id column="id" property="id"/> + <result column="prize_activity_id" property="prizeActivityId" /> + <result column="prize_id" property="prizeId" /> + <result column="prize_content" property="prizeContent" /> + <result column="prize_num" property="prizeNum" /> + <result column="prize_probability" property="prizeProbability" /> + <result column="version" property="version" /> + <result column="remain_num" property="remainNum" /> + <result column="prize_name" property="prizeName" /> + <result column="prize_cover" property="prizeCover"/> + <result column="prize_type" property="prizeType"/> + </resultMap> + <select id="getActivityRefPrizeByActivityId" resultMap="activityRefPrizeInfoMap"> + SELECT + LARP.prize_activity_id, + LARP.prize_id, + LARP.prize_content, + LARP.prize_num, + LARP.prize_probability, + LARP.version, + LARP.remain_num, + LARP.id, + LPD.prize_name, + LPD.prize_cover, + LPD.prize_type + FROM + lmk_activity_ref_prize LARP + LEFT JOIN + lmk_prize_draw LPD ON LARP.prize_id = LPD.id + where LARP.prize_activity_id = #{prizeActivityId} AND LARP.delete_flag = 0 + </select> diff --git a/framework/src/main/resources/mapper/lmk/PrizeActivityMapper.xml b/framework/src/main/resources/mapper/lmk/PrizeActivityMapper.xml index f590d0f..d6b1535 100644 --- a/framework/src/main/resources/mapper/lmk/PrizeActivityMapper.xml +++ b/framework/src/main/resources/mapper/lmk/PrizeActivityMapper.xml @@ -57,6 +57,12 @@ lmk_prize_activity LPA WHERE LPA.delete_flag = 0 + <if test="query.activityName != null and query.activityName !=''"> + AND LPA.activity_name LIKE CONCAT('%',#{query.ctivityName},'%') + </if> + <if test="query.beginTime != null">AND LPA.begin_time >= #{query.beginTime}</if> + <if test="query.endTime != null">AND LPA.end_time <= #{query.endTime}</if> + </select> </mapper> diff --git a/framework/src/main/resources/mapper/lmk/PrizeDrawMapper.xml b/framework/src/main/resources/mapper/lmk/PrizeDrawMapper.xml index b6363b6..eba55c3 100644 --- a/framework/src/main/resources/mapper/lmk/PrizeDrawMapper.xml +++ b/framework/src/main/resources/mapper/lmk/PrizeDrawMapper.xml @@ -51,6 +51,12 @@ lmk_prize_draw LPD WHERE LPD.delete_flag = 0 + <if test="query.prizeName != null and query.prizeName != ''"> + AND LPD.prize_name like concat('%',#{query.prizeName},'%') + </if> + <if test="query.prizeType != null and query.prizeType != ''"> + AND LPD.prize_type = #{query.prizeType} + </if> </select> </mapper> diff --git a/framework/src/main/resources/mapper/lmk/VideoCommentMapper.xml b/framework/src/main/resources/mapper/lmk/VideoCommentMapper.xml index 672c021..eb8528b 100644 --- a/framework/src/main/resources/mapper/lmk/VideoCommentMapper.xml +++ b/framework/src/main/resources/mapper/lmk/VideoCommentMapper.xml @@ -49,6 +49,38 @@ LVC.id = #{id} AND LVC.delete_flag = 0 </select> + <select id="getManagerPage" resultMap="BaseResultMap"> + SELECT + LVC.video_id, + LVC.comment_content, + LVC.reply_id, + LVC.reply_user_id, + LVC.reply_user_nickname, + LVC.master_comment_id, + LVC.status, + LVC.thumbs_up_num, + LVC.id, + LVC.user_id, + LVC.user_nickname, + LVC.user_avatar, + LVC.create_time + FROM + lmk_video_comment LVC + WHERE + LVC.video_id = #{query.videoId} AND LVC.delete_flag = 0 + <if test="query.commentContent != null and query.commentContent !=''"> + AND LVC.comment_content like concat('%',#{query.commentContent},'%') + </if> + <if test="query.nickName != null and query.nickName !=''"> + AND LVC.user_nickname like concat('%',#{query.nickName},'%') + </if> + <if test="query.startTime != null"> + AND LVC.create_time >= #{query.startTime} + </if> + <if test="query.endTime != null"> + AND LVC.create_time <= #{query.endTime} + </if> + </select> <select id="getPage" resultMap="BaseResultMap"> SELECT diff --git a/manager-api/src/main/java/cn/lili/controller/lmk/PrizeActivityController.java b/manager-api/src/main/java/cn/lili/controller/lmk/PrizeActivityController.java new file mode 100644 index 0000000..2a93009 --- /dev/null +++ b/manager-api/src/main/java/cn/lili/controller/lmk/PrizeActivityController.java @@ -0,0 +1,68 @@ +package cn.lili.controller.lmk; + + +import cn.lili.base.Result; +import cn.lili.modules.lmk.domain.form.ActivityRefPrizeForm; +import cn.lili.modules.lmk.domain.form.PrizeActivityForm; +import cn.lili.modules.lmk.domain.query.PrizeActivityQuery; +import cn.lili.modules.lmk.service.ActivityRefPrizeService; +import cn.lili.modules.lmk.service.PrizeActivityService; +import lombok.RequiredArgsConstructor; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import javax.validation.constraints.Size; +import java.util.List; + +/** + * lmk-shop-java + * 鎶藉娲诲姩 + * + * @author : zxl + * @date : 2025-08-14 16:27 + **/ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/manager/lmk/activity-prize") +public class PrizeActivityController { + + private final PrizeActivityService prizeActivityService; + + private final ActivityRefPrizeService activityRefPrizeService; + @GetMapping + public Result getPage(PrizeActivityQuery query){ + return prizeActivityService.page(query); + } + @GetMapping("/{id}") + public Result detail(@PathVariable("id") String id){ + return prizeActivityService.detail(id); + } + @PutMapping + public Result edit(@RequestBody PrizeActivityForm form){ + return prizeActivityService.update(form); + } + @PostMapping + public Result add(@RequestBody PrizeActivityForm form){ + return prizeActivityService.add(form); + } + @DeleteMapping("/{id}") + public Result del(@PathVariable("id") String id){ + return prizeActivityService.removeById(id); + } + @PostMapping("/addActivityRefPrizeList/{id}") + public Result addListByPrizeDraw(@PathVariable("id") String prizeActivityId,@RequestBody @Valid @Size(max = 5, message = "濂栧搧鏁伴噺蹇呴』鍦�1鍒�5涓箣闂�") List<ActivityRefPrizeForm> list){ + return activityRefPrizeService.addList(prizeActivityId,list); + } + + @GetMapping("/getActivityRefPrizeByActivityId/{id}") + public Result getActivityRefPrizeByActivityId(@PathVariable("id") String prizeActivityId){ + return activityRefPrizeService.getActivityRefPrizeByActivityId(prizeActivityId); + } + + @PutMapping("/publishPrizeActivity/{id}") + public Result publishPrizeActivity(@PathVariable("id") String id){ + return prizeActivityService.publishPrizeActivity(id); + } +} diff --git a/manager-api/src/main/java/cn/lili/controller/lmk/PrizeDrawController.java b/manager-api/src/main/java/cn/lili/controller/lmk/PrizeDrawController.java new file mode 100644 index 0000000..656120f --- /dev/null +++ b/manager-api/src/main/java/cn/lili/controller/lmk/PrizeDrawController.java @@ -0,0 +1,56 @@ +package cn.lili.controller.lmk; + + +import cn.lili.base.Result; +import cn.lili.modules.lmk.domain.entity.ActivityRefPrize; +import cn.lili.modules.lmk.domain.form.PrizeDrawForm; +import cn.lili.modules.lmk.domain.query.PrizeDrawQuery; +import cn.lili.modules.lmk.service.ActivityRefPrizeService; +import cn.lili.modules.lmk.service.PrizeDrawService; +import lombok.RequiredArgsConstructor; +import org.springframework.util.CollectionUtils; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; +import java.util.List; + +/** + * lmk-shop-java + * + * @author : zxl + * @date : 2025-08-18 15:49 + **/ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/manager/lmk/prizeDraw") +public class PrizeDrawController { + private final PrizeDrawService prizeDrawService; + private final ActivityRefPrizeService activityRefPrizeService; + @GetMapping + public Result getPage(PrizeDrawQuery query){ + return prizeDrawService.page(query); + } + @GetMapping("/{id}") + public Result detail(@PathVariable("id") String id){ + return prizeDrawService.detail(id); + } + @PutMapping + public Result edit(@RequestBody PrizeDrawForm form){ + return prizeDrawService.update(form); + } + @PostMapping + public Result add(@RequestBody PrizeDrawForm form){ + return prizeDrawService.add(form); + } + @DeleteMapping("/{id}") + public Result del(@PathVariable("id") String id){ + return prizeDrawService.removeById(id); + } + + @GetMapping("/canUpDatePrizeDraw/{id}") + public Result canUpDatePrizeDraw(@PathVariable("id") String id){ + return prizeDrawService.canUpDatePrizeDraw(id); + } +} diff --git a/manager-api/src/main/java/cn/lili/controller/lmk/VideoCommentController.java b/manager-api/src/main/java/cn/lili/controller/lmk/VideoCommentController.java new file mode 100644 index 0000000..7a89ccc --- /dev/null +++ b/manager-api/src/main/java/cn/lili/controller/lmk/VideoCommentController.java @@ -0,0 +1,33 @@ +package cn.lili.controller.lmk; + + +import cn.lili.base.Result; +import cn.lili.modules.lmk.domain.query.VideoCommentMangerQuery; +import cn.lili.modules.lmk.service.VideoCommentService; +import lombok.RequiredArgsConstructor; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +/** + * lmk-shop-java + * 绠$悊绔瘎浠风鐞� + * + * @author : zxl + * @date : 2025-08-14 10:50 + **/ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/manager/lmk/videoComment") +public class VideoCommentController { + private final VideoCommentService videoCommentService; + + @GetMapping() + public Result getPage(VideoCommentMangerQuery query){ + return videoCommentService.mangerComment(query); + } + @DeleteMapping("/{id}") + public Result delete(@PathVariable("id")String id){ + return videoCommentService.removeById(id); + } +} -- Gitblit v1.8.0