|
@@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
18
|
18
|
import org.springframework.stereotype.Service;
|
19
|
19
|
|
20
|
20
|
import java.time.LocalDateTime;
|
|
21
|
+import java.util.List;
|
21
|
22
|
import java.util.Map;
|
22
|
23
|
|
23
|
24
|
/**
|
|
@@ -47,8 +48,16 @@ public class TaPointsRecordsServiceImpl extends ServiceImpl<TaPointsRecordsMappe
|
47
|
48
|
|
48
|
49
|
@Override
|
49
|
50
|
public void authPoints(String personId) {
|
50
|
|
- TaPerson person = taPersonMapper.selectById(personId);
|
51
|
|
- sendPoints(person,4,CommConstant.POINTS_AUTHORIZE);
|
|
51
|
+ //查看是否领取过授权积分
|
|
52
|
+ QueryWrapper<TaPointsRecords> taPointsRecordsQueryWrapper = new QueryWrapper<>();
|
|
53
|
+ taPointsRecordsQueryWrapper.eq("person_id", personId);
|
|
54
|
+ taPointsRecordsQueryWrapper.eq("change_type",CommConstant.POINTS_AUTHORIZE);
|
|
55
|
+
|
|
56
|
+ List<TaPointsRecords> taPointsRecordsList = taPointsRecordsMapper.selectList(taPointsRecordsQueryWrapper);
|
|
57
|
+ if (taPointsRecordsList.size() < 1){
|
|
58
|
+ TaPerson person = taPersonMapper.selectById(personId);
|
|
59
|
+ sendPoints(person,4,CommConstant.POINTS_AUTHORIZE);
|
|
60
|
+ }
|
52
|
61
|
}
|
53
|
62
|
|
54
|
63
|
private void sendPoints(TaPerson person,Integer rulesId,String shareType) {
|