Administrator
2025-07-10 1bd4ff2dea7dde4592c31f6911255c9d28d45f87
src/main/java/cc/mrbird/febs/mall/service/impl/ClothesTypeServiceImpl.java
@@ -16,10 +16,7 @@
import cc.mrbird.febs.mall.service.IApiMallMemberWalletService;
import cc.mrbird.febs.mall.service.IMallMoneyFlowService;
import cc.mrbird.febs.mall.vo.AdminMallOrderInfoVo;
import cc.mrbird.febs.mall.vo.clothes.AdminClothesLocationRemarkVo;
import cc.mrbird.febs.mall.vo.clothes.AdminClothesOrderListVo;
import cc.mrbird.febs.mall.vo.clothes.AdminClothesPatternRemarkVo;
import cc.mrbird.febs.mall.vo.clothes.AdminClothesSocialListVo;
import cc.mrbird.febs.mall.vo.clothes.*;
import cc.mrbird.febs.pay.util.WeixinServiceUtil;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
@@ -74,6 +71,7 @@
    private final ClothesPatternRemarkMapper clothesPatternRemarkMapper;
    private final ClothesLocationRemarkMapper clothesLocationRemarkMapper;
    private final ClothesSocialCommentMapper clothesSocialCommentMapper;
    private final IApiMallMemberWalletService memberWalletService;
    private final IMallMoneyFlowService mallMoneyFlowService;
@@ -752,6 +750,13 @@
    }
    @Override
    public IPage<AdminClothesSocialCommentVo> socialComment(ClothesSocialComment dto, QueryRequest request) {
        Page<AdminClothesSocialCommentVo> page = new Page<>(request.getPageNum(), request.getPageSize());
        IPage<AdminClothesSocialCommentVo> vos = clothesSocialCommentMapper.selectSocialCommentListInPage(page, dto);
        return vos;
    }
    @Override
    public FebsResponse socialState(Long id, Integer state) {
        ClothesSocial clothesSocial = clothesSocialMapper.selectById(id);
@@ -768,6 +773,39 @@
    }
    @Override
    public FebsResponse commentStateSwitch(Long id, Integer state) {
        ClothesSocial clothesSocial = clothesSocialMapper.selectById(id);
        if(ObjectUtil.isNull(clothesSocial)){
            throw new RuntimeException("内容不存在");
        }
        clothesSocialMapper.update(
                null,
                Wrappers.lambdaUpdate(ClothesSocial.class)
                        .set(ClothesSocial::getCommentState, state)
                        .eq(ClothesSocial::getId, id)
        );
        return new FebsResponse().success().message("操作成功");
    }
    @Override
    public FebsResponse showStateSwitch(Long id, Integer state) {
        ClothesSocialComment clothesSocialComment = clothesSocialCommentMapper.selectById(id);
        if(ObjectUtil.isNull(clothesSocialComment)){
            throw new RuntimeException("评论不存在");
        }
        clothesSocialCommentMapper.update(
                null,
                Wrappers.lambdaUpdate(ClothesSocialComment.class)
                        .set(ClothesSocialComment::getShowState, state)
                        .eq(ClothesSocialComment::getId, id)
        );
        return new FebsResponse().success().message("操作成功");
    }
    @Override
    public FebsResponse socialHotState(Long id, Integer state) {
        ClothesSocial clothesSocial = clothesSocialMapper.selectById(id);