Administrator
2025-07-22 87b793dc328b8cd4a6263acc45bc7dcfdacf04d1
src/main/java/cc/mrbird/febs/mall/service/impl/ApiClothesSocialServiceImpl.java
@@ -669,6 +669,32 @@
        return new FebsResponse().success().message("操作成功");
    }
    @Override
    public FebsResponse followState(ApiSocialCollectFollowStateDto dto) {
        Long memberId = LoginUserUtil.getLoginUser().getId();
        HashMap<String, Object> stringObjectHashMap = new HashMap<>();
        Integer collectState = clothesSocialFollowMapper.selectCount(
                Wrappers.lambdaQuery(ClothesSocialFollow.class)
                        .eq(ClothesSocialFollow::getMemberId, memberId)
                        .eq(ClothesSocialFollow::getSourceType, SocialSourceTypeEnum.SOCIAL.getValue())
                        .eq(ClothesSocialFollow::getSourceId, dto.getSocialId())
                        .eq(ClothesSocialFollow::getType, SocialTypeEnum.COLLECT.getValue())
        );
        stringObjectHashMap.put("collectState", collectState);
        Integer likeState = clothesSocialFollowMapper.selectCount(
                Wrappers.lambdaQuery(ClothesSocialFollow.class)
                        .eq(ClothesSocialFollow::getMemberId, memberId)
                        .eq(ClothesSocialFollow::getSourceType, SocialSourceTypeEnum.SOCIAL.getValue())
                        .eq(ClothesSocialFollow::getSourceId, dto.getSocialId())
                        .eq(ClothesSocialFollow::getType, SocialTypeEnum.LIKE.getValue())
        );
        stringObjectHashMap.put("likeState", likeState);
        return new FebsResponse().success().data(stringObjectHashMap);
    }
    public static void main(String[] args) {
        JSONObject jsonObject = new JSONObject();
        jsonObject.putByPath("text", "123");