| | |
| | | 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"); |