Explorar o código

Merge branch 'dev' into 'mp-server-test'

优化

See merge request quanshu/mp-server!804
jiang hao %!s(int64=2) %!d(string=hai) anos
pai
achega
b0b195e8c8

+ 3 - 1
mp-service/src/main/java/com/qs/mp/user/service/impl/UserHitPrizeServiceImpl.java

@@ -40,6 +40,7 @@ import java.util.stream.Collectors;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.aop.framework.AopContext;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -222,7 +223,8 @@ public class UserHitPrizeServiceImpl extends ServiceImpl<UserHitPrizeMapper, Use
             }
             try {
                 // 兑奖
-                this.cashPrize(ticket, userId, ticketAwardsPrize.getAwardsId(), ticketAwardsPrize.getPrizeId());
+                UserHitPrizeServiceImpl proxy = (UserHitPrizeServiceImpl) AopContext.currentProxy();
+                proxy.cashPrize(ticket, userId, ticketAwardsPrize.getAwardsId(), ticketAwardsPrize.getPrizeId());
             } finally {
                 distributedLocker.unlock(lockKey);
             }