zyp 1 周之前
父节点
当前提交
feae0aae76

+ 7 - 1
fs-service-system/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java

@@ -824,7 +824,13 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
             FsUserWx fsUserWx = fsUserWxService.selectByAppIdAndUserId(param.getAppId(),user.getUserId(),1);
             if (fsUserWx ==null){
                 packetParam.setOpenId(user.getMaOpenId());
-                handleFsUserWx(user,param.getAppId());
+                try {
+                    handleFsUserWx(user,param.getAppId());
+                } catch (Exception e){
+                    e.printStackTrace();
+                    logger.error(e.getMessage(),e);
+                }
+
             }else {
                 //查出openid并赋值
                 packetParam.setOpenId(fsUserWx.getOpenId());

+ 2 - 0
fs-service-system/src/main/java/com/fs/his/service/impl/FsUserWxServiceImpl.java

@@ -28,6 +28,8 @@ public class FsUserWxServiceImpl extends ServiceImpl<FsUserWxMapper, FsUserWx> i
                         .eq("app_id", appId)
                         .eq("fs_user_id", userId)
                         .eq("type", type)
+                        .orderByDesc("id")
+                        .last("LIMIT 1")
         );
     }
 }