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