|
|
@@ -7,10 +7,10 @@ import com.izouma.nineth.dto.PageQuery;
|
|
|
import com.izouma.nineth.enums.*;
|
|
|
import com.izouma.nineth.exception.BusinessException;
|
|
|
import com.izouma.nineth.repo.*;
|
|
|
+import com.izouma.nineth.service.sms.SmsService;
|
|
|
import com.izouma.nineth.utils.JpaUtils;
|
|
|
import com.izouma.nineth.utils.SecurityUtils;
|
|
|
import com.izouma.nineth.utils.SnowflakeIdWorker;
|
|
|
-import lombok.AllArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
@@ -60,6 +60,8 @@ public class AuctionOrderService {
|
|
|
@Lazy
|
|
|
@Autowired
|
|
|
private OrderPayService orderPayService;
|
|
|
+ @Autowired
|
|
|
+ private SmsService smsService;
|
|
|
|
|
|
public Page<AuctionOrder> all(PageQuery pageQuery) {
|
|
|
return auctionOrderRepo
|
|
|
@@ -131,6 +133,10 @@ public class AuctionOrderService {
|
|
|
Asset asset = assetRepo.findById(auction.getAssetId()).orElseThrow(new BusinessException("资产不存在"));
|
|
|
asset.setStatus(AssetStatus.AUCTION_TRADING);
|
|
|
assetRepo.save(asset);
|
|
|
+ // 发送短信提醒用户转让成功
|
|
|
+ if (asset.getUserId() != null) {
|
|
|
+ smsService.sellOut(userRepo.findPhoneById(asset.getUserId()));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
BigDecimal price = AuctionPaymentType.FIXED_PRICE.equals(type) ? auction.getFixedPrice() : auction
|