无关风月
2024-08-19 5a22de857470ed18e993260e2cf3a38a1a43de7e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package com.ruoyi.account.util;
import java.time.LocalDateTime;
 
import com.ruoyi.account.api.model.TAppUserIntegralChange;
import com.ruoyi.account.service.TAppUserIntegralChangeService;
import org.springframework.stereotype.Component;
 
import javax.annotation.Resource;
 
@Component
public class PointDetailUtil {
    @Resource
    private TAppUserIntegralChangeService appUserIntegralChangeService;
    public void addDetail(Integer old,Integer now,Integer type,Long userId,String extension,String code){
 
        TAppUserIntegralChange tAppUserIntegralChange= new TAppUserIntegralChange();
        tAppUserIntegralChange.setCode(code);
        tAppUserIntegralChange.setAppUserId(userId);
        tAppUserIntegralChange.setChangeType(type);
        tAppUserIntegralChange.setHistoricalIntegral(old);
        tAppUserIntegralChange.setCurrentIntegral(now);
        tAppUserIntegralChange.setCreateTime(LocalDateTime.now());
        tAppUserIntegralChange.setExtension(extension);
        appUserIntegralChangeService.save(tAppUserIntegralChange);
 
 
    }
}