|
|
@ -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); |
|
|
|