Althars123 3 years ago
parent
commit
dc6f74774b

+ 3 - 4
twzd-admin/src/main/java/com/miaxis/app/controller/wx/WxNotifyController.java

@@ -29,6 +29,7 @@ import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.joda.time.DateTime;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.Base64Utils;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -205,6 +206,7 @@ public class WxNotifyController {
 
 
 
+    @Transactional
     public String writeNotifyDataToDb(JSONObject jsonObject) {
         String outTradeNo = jsonObject.getString("out_trade_no");
         WxOrder wxOrder = wxOrderService.getByOutTradeNo(outTradeNo);
@@ -250,10 +252,7 @@ public class WxNotifyController {
         userInfoService.updateById(userinfo);
 
         //更新上下文中对象状态
-//        LoginUser loginUser = SecurityUtils.getLoginUser();
-////        loginUser.setStudent(userinfo);
-////        //刷新缓存中的数据
-////        tokenService.refreshToken(loginUser);
+
 
         //发送模板消息
         messageTemplateSend(userinfo,wxOrder);