diff --git a/ruoyi-cms/ruoyi-cms.iml b/ruoyi-cms/ruoyi-cms.iml new file mode 100644 index 000000000..42d762201 --- /dev/null +++ b/ruoyi-cms/ruoyi-cms.iml @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-cms/src/main/java/com/ruoyi/cms/controller/CmsUserController.java b/ruoyi-cms/src/main/java/com/ruoyi/cms/controller/CmsUserController.java index 7d391fce0..4423ca982 100644 --- a/ruoyi-cms/src/main/java/com/ruoyi/cms/controller/CmsUserController.java +++ b/ruoyi-cms/src/main/java/com/ruoyi/cms/controller/CmsUserController.java @@ -19,6 +19,8 @@ import com.ruoyi.train.course.domain.TrainCourseVO; import com.ruoyi.train.course.service.ITrainCourseCategoryService; import com.ruoyi.train.course.service.ITrainCourseSectionService; import com.ruoyi.train.course.service.ITrainCourseService; +import com.ruoyi.vip.domain.vo.VipUserOrdersVO; +import com.ruoyi.vip.service.IVipUserOrdersService; import org.apache.shiro.web.servlet.SimpleCookie; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -59,6 +61,9 @@ public class CmsUserController { @Autowired private IExamUserExaminationService examUserExaminationService; + @Autowired + private IVipUserOrdersService vipUserOrdersService; + @RequestMapping("/user/login.html") @@ -187,7 +192,12 @@ public class CmsUserController { } - + /** + * 考试记录详情 + * @param id + * @param map + * @return + */ @RequestMapping("/user/myuserexamination/detail/{id}") public String userExamquestion(@PathVariable Integer id, ModelMap map) { @@ -197,4 +207,21 @@ public class CmsUserController { return prefix + "/user/userexamination_detail"; } + @RequestMapping("/user/orders.html") + public String orders(ModelMap map) { + map.put( "user", ShiroUtils.getSysUser() ); + return prefix + "/user/orders"; + } + + @RequestMapping("/user/orders/list") + @ResponseBody + public AjaxResult orders(VipUserOrdersVO vipUserOrders) { + AjaxResult success = AjaxResult.success("插入成功"); + vipUserOrders.setVipUserId(ShiroUtils.getUserId().intValue()); + List list = vipUserOrdersService.selectVipUserOrdersPage(vipUserOrders); + success.put("total",new PageInfo(list).getTotal()); + success.put( "data", list ); + return success; + } + } diff --git a/ruoyi-cms/src/main/resources/templates/web/user/orders.html b/ruoyi-cms/src/main/resources/templates/web/user/orders.html new file mode 100644 index 000000000..6d81dfd87 --- /dev/null +++ b/ruoyi-cms/src/main/resources/templates/web/user/orders.html @@ -0,0 +1,92 @@ + + + + + + + +
+
+ +
+
+
+ +
+
+ 我的支付记录 +
+
+ + + + + +
+
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-cms/src/main/resources/templates/web/user/set.html b/ruoyi-cms/src/main/resources/templates/web/user/set.html index 250fed0e5..41bb56225 100644 --- a/ruoyi-cms/src/main/resources/templates/web/user/set.html +++ b/ruoyi-cms/src/main/resources/templates/web/user/set.html @@ -52,6 +52,12 @@ 考试记录 +
  • + + + 支付记录 + +
  • diff --git a/ruoyi-vip/src/main/resources/mapper/vip/VipUserOrdersMapper.xml b/ruoyi-vip/src/main/resources/mapper/vip/VipUserOrdersMapper.xml index ece095110..36e715d1b 100644 --- a/ruoyi-vip/src/main/resources/mapper/vip/VipUserOrdersMapper.xml +++ b/ruoyi-vip/src/main/resources/mapper/vip/VipUserOrdersMapper.xml @@ -32,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" join train_course c on c.id=o.train_course_id and o.id = #{id} + and o.vip_user_id = #{vipUserId} and u.user_name like CONCAT('%',#{vipUserName},'%') and c.name like CONCAT('%',#{trainCourseName},'%') and o.del_flag = #{delFlag}