Merge branch 'dev/dev_xp' into dev/dev
This commit is contained in:
@@ -32,8 +32,10 @@ public interface AccountMapper extends CommonMapper<Account> {
|
|||||||
|
|
||||||
void toVisitor(Long id);
|
void toVisitor(Long id);
|
||||||
|
|
||||||
List<AccountCreditsUsageDTO> selectCreditUsage(boolean groupByEvent, String changeEvent, String role, String userEmail, Long id, String startTime, String endTime, Integer size, Integer offset);
|
List<AccountCreditsUsageDTO> selectCreditUsage(boolean groupByEvent, String changeEvent, String role,
|
||||||
|
String userEmail, Long id, String startTime, String endTime,
|
||||||
|
Integer size, Integer offset, String organizationName);
|
||||||
|
|
||||||
int countCreditUsage(boolean groupByEvent, String changeEvent, String role, String userEmail, Long id, String startTime, String endTime);
|
int countCreditUsage(boolean groupByEvent, String changeEvent, String role, String userEmail, Long id, String startTime, String endTime, String organizationName);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,16 @@
|
|||||||
package com.ai.da.model.vo;
|
package com.ai.da.model.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class InitializeProgressVO {
|
public class InitializeProgressVO {
|
||||||
private Boolean analyzed;
|
private Boolean analyzed;
|
||||||
|
|
||||||
private double percent;
|
private double percent;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
|
||||||
|
private LocalDateTime computeTime;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -883,11 +883,11 @@ public class ConvenientInquiryServiceImpl extends ServiceImpl<QuestionnaireMappe
|
|||||||
int offset = (queryDTO.getPage() - 1) * size;
|
int offset = (queryDTO.getPage() - 1) * size;
|
||||||
List<AccountCreditsUsageDTO> creditsUsageDTOS = accountMapper.selectCreditUsage(
|
List<AccountCreditsUsageDTO> creditsUsageDTOS = accountMapper.selectCreditUsage(
|
||||||
groupByEvent, queryDTO.getChangeEvent(), role, queryDTO.getUserEmail(), queryDTO.getId(),
|
groupByEvent, queryDTO.getChangeEvent(), role, queryDTO.getUserEmail(), queryDTO.getId(),
|
||||||
queryDTO.getStartTime(), queryDTO.getEndTime(), size, offset);
|
queryDTO.getStartTime(), queryDTO.getEndTime(), size, offset, account.getOrganizationName());
|
||||||
if (!creditsUsageDTOS.isEmpty()){
|
if (!creditsUsageDTOS.isEmpty()){
|
||||||
int total = accountMapper.countCreditUsage(
|
int total = accountMapper.countCreditUsage(
|
||||||
groupByEvent, queryDTO.getChangeEvent(), role, queryDTO.getUserEmail(), queryDTO.getId(),
|
groupByEvent, queryDTO.getChangeEvent(), role, queryDTO.getUserEmail(), queryDTO.getId(),
|
||||||
queryDTO.getStartTime(), queryDTO.getEndTime());
|
queryDTO.getStartTime(), queryDTO.getEndTime(), account.getOrganizationName());
|
||||||
// 总页数
|
// 总页数
|
||||||
double totalPage = Math.ceil((double) total / size);
|
double totalPage = Math.ceil((double) total / size);
|
||||||
// 组装返回参数
|
// 组装返回参数
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.ai.da.service.impl;
|
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.ReferralMapper;
|
||||||
import com.ai.da.mapper.primary.entity.Affiliate;
|
import com.ai.da.mapper.primary.entity.Affiliate;
|
||||||
import com.ai.da.mapper.primary.entity.Referral;
|
import com.ai.da.mapper.primary.entity.Referral;
|
||||||
@@ -64,6 +65,10 @@ public class ReferralServiceImpl extends ServiceImpl<ReferralMapper, Referral> i
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void editReferral(EditReferralDTO editReferralDTO){
|
public void editReferral(EditReferralDTO editReferralDTO){
|
||||||
Referral referral = baseMapper.selectById(editReferralDTO.getId());
|
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){
|
if (Objects.nonNull(editReferralDTO.getAmount()) && editReferralDTO.getAmount().compareTo(referral.getCommission()) != 0){
|
||||||
log.info("设置referral id为{} 原佣金 {} 设置为 {}", referral.getId(), referral.getAffiliateId(), editReferralDTO.getAmount());
|
log.info("设置referral id为{} 原佣金 {} 设置为 {}", referral.getId(), referral.getAffiliateId(), editReferralDTO.getAmount());
|
||||||
referral.setCommission(editReferralDTO.getAmount());
|
referral.setCommission(editReferralDTO.getAmount());
|
||||||
|
|||||||
@@ -1610,6 +1610,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
|||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
vo.setPercent(dto.getCurrent() * 1.0 / dto.getTotal());
|
vo.setPercent(dto.getCurrent() * 1.0 / dto.getTotal());
|
||||||
|
vo.setComputeTime(dto.getComputeTime());
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,6 +84,9 @@
|
|||||||
a.system_user IN (0, 1, 2, 3, 4)
|
a.system_user IN (0, 1, 2, 3, 4)
|
||||||
</when>
|
</when>
|
||||||
</choose>
|
</choose>
|
||||||
|
<if test="organizationName != null and organizationName != ''">
|
||||||
|
AND a.organization_name = #{organizationName}
|
||||||
|
</if>
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
AND a.id = #{id}
|
AND a.id = #{id}
|
||||||
</if>
|
</if>
|
||||||
@@ -126,6 +129,9 @@
|
|||||||
a.system_user IN (0, 1, 2, 3, 4)
|
a.system_user IN (0, 1, 2, 3, 4)
|
||||||
</when>
|
</when>
|
||||||
</choose>
|
</choose>
|
||||||
|
<if test="organizationName != null and organizationName != ''">
|
||||||
|
AND a.organization_name = #{organizationName}
|
||||||
|
</if>
|
||||||
<if test="userEmail != null and userEmail != ''">
|
<if test="userEmail != null and userEmail != ''">
|
||||||
AND a.user_email = #{userEmail}
|
AND a.user_email = #{userEmail}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
Reference in New Issue
Block a user