| | |
| | | import com.ruoyi.system.api.domain.Member; |
| | | import com.ruoyi.system.api.domain.MemberPoints; |
| | | import com.ruoyi.system.api.domain.dto.MemberDTO; |
| | | import com.ruoyi.system.api.domain.dto.MemberPointsDTO; |
| | | import com.ruoyi.system.api.feignClient.MemberClient; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | import java.util.stream.Collectors; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | .eq(StringUtils.isNotNull(query.getPointsStatus()), MemberPoints::getPointsStatus, |
| | | query.getPointsStatus()) |
| | | .in(StringUtils.isNotEmpty(memberIdSet), MemberPoints::getMemberId, memberIdSet) |
| | | .eq(StringUtils.isNotNull(query.getId()), MemberPoints::getMemberId, query.getId()) |
| | | .orderByDesc(MemberPoints::getCreateTime) |
| | | .page(page); |
| | | if (StringUtils.isEmpty(page.getRecords())) { |
| | |
| | | } |
| | | return memberDTO; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(propagation = Propagation.REQUIRES_NEW) |
| | | public void addMemberPoints(MemberPointsDTO memberPointsDTO) { |
| | | MemberPoints points = new MemberPoints(); |
| | | points.setMemberId(memberPointsDTO.getMemberId()); |
| | | points.setPointsType(memberPointsDTO.getPointsType()); |
| | | points.setPoints(memberPointsDTO.getPoints()); |
| | | this.save(points); |
| | | } |
| | | } |