|
|
@@ -4,14 +4,12 @@ import com.kym.entity.miniapp.Account;
|
|
|
import com.kym.entity.miniapp.ChargeOrder;
|
|
|
import com.kym.entity.miniapp.OrderRechargeRights;
|
|
|
import com.kym.entity.miniapp.UserRechargeRights;
|
|
|
-import com.kym.entity.miniapp.other.DiscountCompute;
|
|
|
import com.kym.service.miniapp.DiscountService;
|
|
|
import com.kym.service.miniapp.OrderRechargeRightsService;
|
|
|
import com.kym.service.miniapp.UserRechargeRightsService;
|
|
|
-import jakarta.annotation.Resource;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
@@ -35,6 +33,7 @@ public class RechargeRightsDiscountHandle implements DiscountService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public void computeDiscount(ChargeOrder chargeOrder, Account account) {
|
|
|
int discountAmount;
|
|
|
|