|
|
@ -4,6 +4,7 @@ import cn.hutool.core.util.IdUtil; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
import com.bnyer.common.redis.service.RedisService; |
|
|
import com.bnyer.common.redis.service.RedisService; |
|
|
|
|
|
import com.bnyer.common.redis.service.RedissonService; |
|
|
import com.bnyer.img.domain.CreatorProfit; |
|
|
import com.bnyer.img.domain.CreatorProfit; |
|
|
import com.bnyer.img.domain.InviteLog; |
|
|
import com.bnyer.img.domain.InviteLog; |
|
|
import com.bnyer.img.dto.CreatorProfitPageDto; |
|
|
import com.bnyer.img.dto.CreatorProfitPageDto; |
|
|
@ -40,6 +41,9 @@ public class CreatorProfitServiceImpl implements CreatorProfitService { |
|
|
@Autowired |
|
|
@Autowired |
|
|
private InviteLogMapper inviteLogMapper; |
|
|
private InviteLogMapper inviteLogMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private RedissonService redissonService; |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public boolean checkCreatorProfitExist(String mark) { |
|
|
public boolean checkCreatorProfitExist(String mark) { |
|
|
CreatorProfit creatorProfit = creatorProfitMapper.checkCreatorProfitExist(mark); |
|
|
CreatorProfit creatorProfit = creatorProfitMapper.checkCreatorProfitExist(mark); |
|
|
@ -56,7 +60,7 @@ public class CreatorProfitServiceImpl implements CreatorProfitService { |
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
long times = System.currentTimeMillis(); |
|
|
long times = System.currentTimeMillis(); |
|
|
String date = format.format(times); |
|
|
String date = format.format(times); |
|
|
String mark = creatorProfit.getCreatorId()+creatorProfit.getImgId()+creatorProfit.getAppType()+creatorProfit.getPlatform()+ |
|
|
String mark = creatorProfit.getCreatorId().toString() + creatorProfit.getImgId().toString() + creatorProfit.getAppType() + creatorProfit.getPlatform() + |
|
|
"0" + date.replace("-", ""); |
|
|
"0" + date.replace("-", ""); |
|
|
//缓存中下载总数+1
|
|
|
//缓存中下载总数+1
|
|
|
tiktokImgService.writeDownloadTotalNum(creatorProfit.getAppType(), creatorProfit.getPlatform()); |
|
|
tiktokImgService.writeDownloadTotalNum(creatorProfit.getAppType(), creatorProfit.getPlatform()); |
|
|
@ -110,7 +114,7 @@ public class CreatorProfitServiceImpl implements CreatorProfitService { |
|
|
List<String> updateList = new ArrayList<>(); |
|
|
List<String> updateList = new ArrayList<>(); |
|
|
List<CreatorProfit> insertList = new ArrayList<>(); |
|
|
List<CreatorProfit> insertList = new ArrayList<>(); |
|
|
for (InviteLog inviteLog : inviteLogs) { |
|
|
for (InviteLog inviteLog : inviteLogs) { |
|
|
String mark = inviteLog.getCreatorId()+creatorProfit.getImgId()+creatorProfit.getAppType()+creatorProfit.getPlatform()+ |
|
|
String mark = inviteLog.getCreatorId().toString() + creatorProfit.getImgId().toString() + creatorProfit.getAppType() + creatorProfit.getPlatform() + |
|
|
"1" + date.replace("-", ""); |
|
|
"1" + date.replace("-", ""); |
|
|
//检查收益表是否存在邀请记录,存在则记录更新邀请者Id
|
|
|
//检查收益表是否存在邀请记录,存在则记录更新邀请者Id
|
|
|
boolean b = this.checkCreatorProfitExist(mark); |
|
|
boolean b = this.checkCreatorProfitExist(mark); |
|
|
@ -187,7 +191,6 @@ public class CreatorProfitServiceImpl implements CreatorProfitService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public int changeIsShow(Long id, String status) { |
|
|
public int changeIsShow(Long id, String status) { |
|
|
|