コード例 #1
0
        public void OnPostPayCourseTime()
        {
            Msg = "创建成功!";
            try
            {
                string openId = "o3nwE0qI_cOkirmh_qbGGG-5G6B0";

                ECoursePrice cp = _courseSrv.GetStandPrice();
                cp.Qty   = 10;
                cp.Price = 2000;

                List <EUserCourse> eUserCourses = new List <EUserCourse>();


                eUserCourses.Add(new EUserCourse
                {
                    CourseScheduleType = cp.CourseScheduleType,
                    LessonCode         = "2019_1_5_MS-1_1_Standard",
                    UserOpenId         = openId,
                });

                eUserCourses.Add(new EUserCourse
                {
                    CourseScheduleType = cp.CourseScheduleType,
                    LessonCode         = "2019_1_6_WQ-1_1_Standard",
                    UserOpenId         = openId,
                });

                eUserCourses.Add(new EUserCourse
                {
                    CourseScheduleType = cp.CourseScheduleType,
                    LessonCode         = "2019_2_5_SF-1_1_Standard",
                    UserOpenId         = openId,
                });

                //var order = _busSrv.PayCourseOrder(openId, cp);

                //_busSrv.PayCourseSuccess(order.OrderId);

                //_busSrv.UserSelectNewCourses(openId, eUserCourses);
            }
            catch (Exception ex)
            {
                Msg = ex.Message;
            }
        }