|
|
@@ -27,6 +27,7 @@ import com.izouma.nineth.utils.SecurityUtils;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.RandomStringUtils;
|
|
|
+import org.springframework.cache.annotation.Cacheable;
|
|
|
import org.springframework.data.annotation.Transient;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
import org.springframework.data.domain.PageRequest;
|
|
|
@@ -74,8 +75,13 @@ public class DomainOrderService {
|
|
|
.findAll(JpaUtils.toSpecification(pageQuery, DomainOrder.class), JpaUtils.toPageRequest(pageQuery));
|
|
|
}
|
|
|
|
|
|
- public boolean isContainChinese(String str) {
|
|
|
+ @Cacheable(value = "newestDomain")
|
|
|
+ public Page<DomainOrder> newest() {
|
|
|
+ PageRequest pageRequest = PageRequest.of(0, 50);
|
|
|
+ return domainOrderRepo.findAllByOrderStatusOrderByCreatedAtDesc(OrderStatus.FINISH, pageRequest);
|
|
|
+ }
|
|
|
|
|
|
+ public boolean isContainChinese(String str) {
|
|
|
if (StringUtils.isEmpty(str)) {
|
|
|
throw new BusinessException("sms context is empty!");
|
|
|
}
|