|
|
@ -19,6 +19,9 @@ import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.web.client.RestTemplate; |
|
|
|
|
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.time.LocalDate; |
|
|
|
import java.time.Month; |
|
|
@ -33,6 +36,7 @@ import java.util.Map; |
|
|
|
@CacheConfig(cacheNames = "other") |
|
|
|
public class OtherServiceImpl implements OtherService { |
|
|
|
|
|
|
|
private static final Logger log = LoggerFactory.getLogger(OtherServiceImpl.class); |
|
|
|
@Autowired |
|
|
|
private RestTemplate restTemplate; |
|
|
|
|
|
|
@ -40,6 +44,7 @@ public class OtherServiceImpl implements OtherService { |
|
|
|
private static final Set<String> typesToUpdateOne = new HashSet<>(); |
|
|
|
private static final Set<String> typesToUpdateTwo = new HashSet<>(); |
|
|
|
private static final Set<String> typesToUpdateThree = new HashSet<>(); |
|
|
|
private static final Set<String> typesToUpdateFour = new HashSet<>(); |
|
|
|
private final OtherMapper otherMapper; |
|
|
|
private final DetailYMapper detailYMapper; |
|
|
|
private final UserMapper userMapper; |
|
|
@ -110,6 +115,9 @@ public class OtherServiceImpl implements OtherService { |
|
|
|
typesToUpdateThree.add("39"); |
|
|
|
typesToUpdateThree.add("44"); |
|
|
|
|
|
|
|
|
|
|
|
typesToUpdateFour.add("65"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
@ -198,6 +206,12 @@ public class OtherServiceImpl implements OtherService { |
|
|
|
userMapper.addUserGold(userGold); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (typesToUpdateFour.contains(type)) { |
|
|
|
log.info("类型为 65,不写入数据"); |
|
|
|
return 0; // 返回默认值 |
|
|
|
} |
|
|
|
|
|
|
|
if (typesToUpdateZero.contains(type)) { |
|
|
|
System.out.println("充值------------------------------------------------------"); |
|
|
|
detailY.setUpdateType(0);// 设置 updateType 为 0 |
|
|
|