TASK:brand dna获取进度 返回计算时间
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
package com.ai.da.model.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class InitializeProgressVO {
|
||||
private Boolean analyzed;
|
||||
|
||||
private double percent;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||
private LocalDateTime computeTime;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ai.da.service.impl;
|
||||
|
||||
import com.ai.da.common.config.exception.BusinessException;
|
||||
import com.ai.da.mapper.primary.ReferralMapper;
|
||||
import com.ai.da.mapper.primary.entity.Affiliate;
|
||||
import com.ai.da.mapper.primary.entity.Referral;
|
||||
@@ -64,6 +65,10 @@ public class ReferralServiceImpl extends ServiceImpl<ReferralMapper, Referral> i
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void editReferral(EditReferralDTO editReferralDTO){
|
||||
Referral referral = baseMapper.selectById(editReferralDTO.getId());
|
||||
if (Objects.isNull(referral)){
|
||||
throw new BusinessException("unknown referral id");
|
||||
}
|
||||
|
||||
if (Objects.nonNull(editReferralDTO.getAmount()) && editReferralDTO.getAmount().compareTo(referral.getCommission()) != 0){
|
||||
log.info("设置referral id为{} 原佣金 {} 设置为 {}", referral.getId(), referral.getAffiliateId(), editReferralDTO.getAmount());
|
||||
referral.setCommission(editReferralDTO.getAmount());
|
||||
|
||||
@@ -1610,6 +1610,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
return vo;
|
||||
}
|
||||
vo.setPercent(dto.getCurrent() * 1.0 / dto.getTotal());
|
||||
vo.setComputeTime(dto.getComputeTime());
|
||||
return vo;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user