nili 6 months ago
parent
commit
2213b8c36b
  1. 14
      game-service/src/main/java/awesome/group/game/service/citrus/AdvRecordService.java

14
game-service/src/main/java/awesome/group/game/service/citrus/AdvRecordService.java

@ -80,14 +80,16 @@ public class AdvRecordService {
record.setDeviceName(bo.deviceName);
record.setIp(ip);
record.setAdvId(bo.advId);
if (bo.advType == Constants.VIDEO && u.getAdminId() != null) {
long gap = ecpm - ecpmReal - contribute;
MatrixAdmin admin = adminMapper.selectById(u.getAdminId());
if (admin.getIncomeRate() != null) {
record.setEcpmAdmin(gap * admin.getIncomeRate() / 100);
if (u.getAdminId() != null) {
record.setAdminId(u.getAdminId());
if (bo.advType == Constants.VIDEO ) {
long gap = ecpm - ecpmReal - contribute;
MatrixAdmin admin = adminMapper.selectById(u.getAdminId());
if (admin.getIncomeRate() != null) {
record.setEcpmAdmin(gap * admin.getIncomeRate() / 100);
}
}
}
mapper.insert(record);
if (ecpmReal > 0) {
userMapper.incIncome(uid, ecpmReal, contribute);

Loading…
Cancel
Save