| | |
| | | |
| | | import com.ruoyi.account.api.model.TAppUserIntegralChange; |
| | | import com.ruoyi.account.service.TAppUserIntegralChangeService; |
| | | import com.ruoyi.common.core.utils.OrderCodeUtil; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | public class PointDetailUtil { |
| | | @Resource |
| | | private TAppUserIntegralChangeService appUserIntegralChangeService; |
| | | public void addDetail(Integer old,Integer now,Integer type,Long userId,String extension,String code){ |
| | | public void addDetail(Integer old,Integer now,Integer type,Long userId,String extension,String code,String orderCode){ |
| | | |
| | | TAppUserIntegralChange tAppUserIntegralChange= new TAppUserIntegralChange(); |
| | | tAppUserIntegralChange.setCode(code); |
| | | tAppUserIntegralChange.setCode(OrderCodeUtil.getOrderCode(code)); |
| | | tAppUserIntegralChange.setAppUserId(userId); |
| | | tAppUserIntegralChange.setChangeType(type); |
| | | tAppUserIntegralChange.setHistoricalIntegral(old); |
| | | tAppUserIntegralChange.setCurrentIntegral(now); |
| | | tAppUserIntegralChange.setCreateTime(LocalDateTime.now()); |
| | | tAppUserIntegralChange.setExtension(extension); |
| | | tAppUserIntegralChange.setOrderCode(orderCode); |
| | | appUserIntegralChangeService.save(tAppUserIntegralChange); |
| | | |
| | | |