| | |
| | | import com.mzl.flower.base.AbstractTransDTO; |
| | | import com.mzl.flower.base.annotation.DictTrans; |
| | | import com.mzl.flower.dto.AttachmentDTO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | |
| | | @ApiModelProperty("启用/禁用") |
| | | private Boolean isEnabled; |
| | | |
| | | @ApiModelProperty("粉丝数") |
| | | private int fans; |
| | | } |
| | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | public int fansCount(Long supplierId) { |
| | | int count = followMapper.selectCount(new LambdaQueryWrapper<Follow>() |
| | | .eq(Follow::getSupplierId, supplierId)); |
| | | return count; |
| | | } |
| | | } |
| | |
| | | if(StringUtils.isNotBlank(userId)){ |
| | | supplierDetail.setFollowed(followService.followed(userId, id)); |
| | | } |
| | | |
| | | supplierDetail.setFans(followService.fansCount(supplierDetail.getId())); |
| | | } |
| | | return returnData(R.SUCCESS.getCode(),supplierDetail); |
| | | } |