123
This commit is contained in:
@@ -92,20 +92,23 @@ public class UserInviteServiceImpl extends ServiceImpl<UserInviteMapper, UserInv
|
||||
*/
|
||||
@Override
|
||||
public void incsCoinAsync(Long geUserId, Long seUserId, Long amount) {
|
||||
ExecutorConstant.COMMON_EXECUTOR.execute(() -> {
|
||||
if(geUserId == null || seUserId == null || amount == null || amount <= 0){
|
||||
log.error("执行收益的递增失败【参数异常】");
|
||||
return;
|
||||
}
|
||||
UserInvite one = this.getOne(Wrappers.lambdaQuery(UserInvite.class)
|
||||
.eq(UserInvite::getInviteId, geUserId)
|
||||
.eq(UserInvite::getUserId, seUserId));
|
||||
if(one == null){
|
||||
log.error("执行收益的递增失败");
|
||||
return;
|
||||
}
|
||||
baseMapper.incsCoinTotal(one.getId(),amount);
|
||||
});
|
||||
ExecutorConstant.COMMON_EXECUTOR.execute(() -> incsCoin(geUserId,seUserId,amount));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void incsCoin(Long geUserId, Long seUserId, Long amount){
|
||||
if(geUserId == null || seUserId == null || amount == null || amount <= 0){
|
||||
log.error("执行收益的递增失败【参数异常】");
|
||||
return;
|
||||
}
|
||||
UserInvite one = this.getOne(Wrappers.lambdaQuery(UserInvite.class)
|
||||
.eq(UserInvite::getInviteId, geUserId)
|
||||
.eq(UserInvite::getUserId, seUserId));
|
||||
if(one == null){
|
||||
log.error("执行收益的递增失败");
|
||||
return;
|
||||
}
|
||||
baseMapper.incsCoinTotal(one.getId(),amount);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user