Merge branch 'dev/dev_xp' into dev/3.1_release_merge
This commit is contained in:
@@ -246,4 +246,6 @@ public interface AccountService extends IService<Account> {
|
|||||||
void setEduAdminToExpire(Account adminAccount);
|
void setEduAdminToExpire(Account adminAccount);
|
||||||
|
|
||||||
String getOrganizationTypeByRole(Integer roleNum);
|
String getOrganizationTypeByRole(Integer roleNum);
|
||||||
|
|
||||||
|
void validateUserValidaExpire(Account account);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,9 +39,10 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.apache.poi.ss.usermodel.*;
|
import org.apache.poi.ss.usermodel.*;
|
||||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.core.io.ClassPathResource;
|
import org.springframework.core.io.ClassPathResource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
@@ -83,6 +84,9 @@ import java.util.stream.Collectors;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> implements AccountService {
|
public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> implements AccountService {
|
||||||
|
@Resource
|
||||||
|
private ApplicationContext applicationContext;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private AccountMapper accountMapper;
|
private AccountMapper accountMapper;
|
||||||
|
|
||||||
@@ -279,7 +283,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
// 定义常量(临时)
|
// 定义常量(临时)
|
||||||
private static final Integer SYSTEM_USER_TYPE_EDU_ADMIN = 7;
|
private static final Integer SYSTEM_USER_TYPE_EDU_ADMIN = 7;
|
||||||
|
|
||||||
private void validateUserValidaExpire(Account account) {
|
public void validateUserValidaExpire(Account account) {
|
||||||
Long currentTime = new Date().getTime();
|
Long currentTime = new Date().getTime();
|
||||||
if (account.getSystemUser().equals(0)) {
|
if (account.getSystemUser().equals(0)) {
|
||||||
return;
|
return;
|
||||||
@@ -297,7 +301,9 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
if (isEduAdmin) {
|
if (isEduAdmin) {
|
||||||
setEduAdminToExpire(account);
|
setEduAdminToExpire(account);
|
||||||
} else {
|
} else {
|
||||||
toVisitor(account);
|
// 这里调用代理的 toVisitor 方法
|
||||||
|
AccountService proxy = applicationContext.getBean(AccountService.class);
|
||||||
|
proxy.toVisitor(account);
|
||||||
// return;
|
// return;
|
||||||
throw new BusinessException("account.expired", ResultEnum.PROMPT.getCode());
|
throw new BusinessException("account.expired", ResultEnum.PROMPT.getCode());
|
||||||
}
|
}
|
||||||
@@ -1949,6 +1955,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
return baseMapper.selectList(queryWrapper);
|
return baseMapper.selectList(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||||
public void toVisitor(Account account) {
|
public void toVisitor(Account account) {
|
||||||
accountMapper.toVisitor(account.getId());
|
accountMapper.toVisitor(account.getId());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -440,6 +440,8 @@ public class DesignItemServiceImpl extends ServiceImpl<DesignItemMapper, DesignI
|
|||||||
// designItemDetail.setPrintJson(JSON.toJSONString(printObject));
|
// designItemDetail.setPrintJson(JSON.toJSONString(printObject));
|
||||||
|
|
||||||
designItemDetail.setPartialDesign(Objects.isNull(detail.getPrint()) ? null : detail.getPrint().getPartial());
|
designItemDetail.setPartialDesign(Objects.isNull(detail.getPrint()) ? null : detail.getPrint().getPartial());
|
||||||
|
designItemDetail.setGradientString(detail.getGradientString());
|
||||||
|
|
||||||
designItemDetails.add(designItemDetail);
|
designItemDetails.add(designItemDetail);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user