| | |
| | | import com.ruoyi.account.vo.UserPointDetailVO; |
| | | import com.ruoyi.account.vo.UserPointStatistics; |
| | | import com.ruoyi.account.vo.UserPointVO; |
| | | import com.ruoyi.common.core.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.PhoneNumberValidator; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.other.api.enums.PointChangeType; |
| | | import com.ruoyi.system.api.domain.SysConfig; |
| | | import com.ruoyi.system.api.feignClient.SysConfigClient; |
| | | import com.ruoyi.system.api.model.LoginUser; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private TokenService tokenService; |
| | | @Resource |
| | | private UserPointService userPointService; |
| | | @Resource |
| | | private SysConfigClient sysConfigClient; |
| | | |
| | | |
| | | |
| | |
| | | userPointVO.setExpendPoint(appUser.getExchangePoint()); |
| | | userPointVO.setTransferableInPoint(appUser.getTransferableInPoint()); |
| | | userPointVO.setTransferableOutPoint(appUser.getTransferableOutPoint()); |
| | | R<SysConfig> info = sysConfigClient.getInfo(9L); |
| | | if (info == null || info.getData() == null) { |
| | | throw new RuntimeException("获取积分兑换比例配置失败"); |
| | | } |
| | | String configValue = info.getData().getConfigValue(); |
| | | if (StringUtils.isBlank(configValue)) { |
| | | throw new RuntimeException("积分兑换比例配置值为空"); |
| | | } |
| | | Boolean isTransferable = Boolean.valueOf(configValue.trim()); |
| | | userPointVO.setIsTransferable(isTransferable); |
| | | return userPointVO; |
| | | } |
| | | |