|
@@ -0,0 +1,119 @@
|
|
|
+package com.miaxis.pc.controller.wx;
|
|
|
+
|
|
|
+import com.miaxis.common.core.controller.BaseController;
|
|
|
+import com.miaxis.common.core.domain.Response;
|
|
|
+import com.miaxis.common.core.domain.entity.SysRole;
|
|
|
+import com.miaxis.common.core.domain.entity.SysUser;
|
|
|
+import com.miaxis.common.core.page.ResponsePageInfo;
|
|
|
+import com.miaxis.common.utils.SecurityUtils;
|
|
|
+import com.miaxis.system.service.ISysRoleService;
|
|
|
+import com.miaxis.system.service.ISysUserService;
|
|
|
+import com.miaxis.wx.domain.WxOrder;
|
|
|
+import com.miaxis.wx.dto.QuerySchoolOrderListDTO;
|
|
|
+import com.miaxis.wx.service.IRefundRecordService;
|
|
|
+import com.miaxis.wx.service.IWxOrderService;
|
|
|
+import com.miaxis.common.core.domain.vo.AgentVO;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequiredArgsConstructor
|
|
|
+@RequestMapping("/activities/wx")
|
|
|
+@Api(tags = {"【pc-驾校订单】"})
|
|
|
+@Slf4j
|
|
|
+class PcWxController extends BaseController {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IWxOrderService wxOrderService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IRefundRecordService refundRecordService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ISysUserService userService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ISysRoleService roleService;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+//
|
|
|
+// @GetMapping("/order/list")
|
|
|
+// @ApiOperation("查询订单列表")
|
|
|
+// @ApiImplicitParams({
|
|
|
+// @ApiImplicitParam(name = "pageNum",value = "当前页码" ,dataType = "int", paramType = "query", required = false),
|
|
|
+// @ApiImplicitParam(name = "pageSize",value = "每页数据量" , dataType = "int", paramType = "query", required = false),
|
|
|
+// })
|
|
|
+// @PreAuthorize("@ss.hasPermi('activities:order:list')")
|
|
|
+// public ResponsePageInfo<WxOrder> list(@ModelAttribute PcWxOrderListDTO pcWxOrderListDTO){
|
|
|
+// startPage();
|
|
|
+// List<WxOrder> list = wxOrderService.selectPcOrderList(pcWxOrderListDTO);
|
|
|
+// return toResponsePageInfo(list);
|
|
|
+// }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @GetMapping("/order/school/list")
|
|
|
+ @ApiOperation("查询驾校订单列表")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "pageNum",value = "当前页码" ,dataType = "int", paramType = "query", required = false),
|
|
|
+ @ApiImplicitParam(name = "pageSize",value = "每页数据量" , dataType = "int", paramType = "query", required = false),
|
|
|
+ })
|
|
|
+ @PreAuthorize("@ss.hasPermi('wx:order:list')")
|
|
|
+ public ResponsePageInfo<WxOrder> schoolList(@ModelAttribute QuerySchoolOrderListDTO dto){
|
|
|
+ startPage();
|
|
|
+ SysUser user = SecurityUtils.getLoginUser().getUser();
|
|
|
+ dto.setSchoolName(user.getUserId()==1l? dto.getSchoolName(): user.getNickName());
|
|
|
+ List<WxOrder> list = wxOrderService.QuerySchoolOrderList(dto);
|
|
|
+ return toResponsePageInfo(list);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询驾校列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('wx:order:list')")
|
|
|
+ @GetMapping("/schoolList")
|
|
|
+ @ApiOperation("查询驾校列表")
|
|
|
+ public Response<List<AgentVO>> agentList(String schoolName){
|
|
|
+ SysRole sysRole = new SysRole();
|
|
|
+ sysRole.setRoleKey("school");
|
|
|
+ List<SysRole> sysRoles = roleService.selectRoleList(sysRole);
|
|
|
+ Long roleId = sysRoles.get(0).getRoleId();
|
|
|
+ List<AgentVO> sysUsersList = userService.getAgentList(roleId,schoolName);
|
|
|
+ return Response.success(sysUsersList);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+}
|