|
@@ -9,10 +9,12 @@ import com.qs.mp.channel.domain.ChannelTicketTransfer;
|
|
|
import com.qs.mp.channel.domain.param.ChannelMyTicketQueryParam;
|
|
|
import com.qs.mp.channel.domain.param.ChannelTicketTransferParam;
|
|
|
import com.qs.mp.channel.domain.vo.ChannelMyTicketVO;
|
|
|
+import com.qs.mp.channel.domain.vo.ChannelTicketTransferDetailVO;
|
|
|
import com.qs.mp.channel.service.IChannelOrderDetailService;
|
|
|
import com.qs.mp.channel.service.IChannelService;
|
|
|
import com.qs.mp.channel.service.IChannelTicketTransferService;
|
|
|
import com.qs.mp.common.core.domain.AjaxResult;
|
|
|
+import com.qs.mp.common.core.page.TableDataInfo;
|
|
|
import com.qs.mp.common.enums.ChannelCertifyStatusEnum;
|
|
|
import com.qs.mp.common.enums.TicketPkgSaleStatusEnum;
|
|
|
import com.qs.mp.common.utils.StringUtils;
|
|
@@ -52,28 +54,27 @@ public class ChannelMyTicketController extends BaseApiController {
|
|
|
@ApiResponses(
|
|
|
@ApiResponse(code = 200, message = "成功", response = ChannelMyTicketVO.class)
|
|
|
)
|
|
|
- public AjaxResult list(@RequestBody ChannelMyTicketQueryParam channelMyTicketQueryParam) {
|
|
|
+ public TableDataInfo list(@RequestBody ChannelMyTicketQueryParam channelMyTicketQueryParam) {
|
|
|
Long channelId = SecurityUtils.getLoginUser().getChannelId();
|
|
|
if (channelId == null) {
|
|
|
- return AjaxResult.error("非法调用");
|
|
|
+ throw new RuntimeException("非法调用");
|
|
|
}
|
|
|
|
|
|
startPage();
|
|
|
// 获取我的盲票列表
|
|
|
List<ChannelMyTicketVO> list = channelOrderDetailService.listMyTicket(channelId, channelMyTicketQueryParam);
|
|
|
-
|
|
|
- return AjaxResult.success(list);
|
|
|
+ return getDataTable(list);
|
|
|
}
|
|
|
|
|
|
- @PostMapping("/channel/mobile")
|
|
|
+ @PostMapping("/channel/mobile/{mobile}")
|
|
|
@ApiOperation("根据手机号获取经销商信息")
|
|
|
@ApiImplicitParams(
|
|
|
- @ApiImplicitParam(name = "mobile", value = "手机号", required = true, dataType = "String", paramType = "query")
|
|
|
+ @ApiImplicitParam(name = "mobile", value = "手机号", required = true, dataType = "String", paramType = "path")
|
|
|
)
|
|
|
@ApiResponses(
|
|
|
@ApiResponse(code = 200, message = "成功", response = Channel.class)
|
|
|
)
|
|
|
- public AjaxResult channelInfoByMobile(@RequestParam String mobile) {
|
|
|
+ public AjaxResult channelInfoByMobile(@PathVariable("mobile") String mobile) {
|
|
|
Long channelId = SecurityUtils.getLoginUser().getChannelId();
|
|
|
if (channelId == null) {
|
|
|
return AjaxResult.error("非法调用");
|
|
@@ -145,20 +146,39 @@ public class ChannelMyTicketController extends BaseApiController {
|
|
|
@ApiResponses(
|
|
|
@ApiResponse(code = 200, message = "成功", response = ChannelMyTicketVO.class)
|
|
|
)
|
|
|
- public AjaxResult transferList(){
|
|
|
+ public TableDataInfo transferList(){
|
|
|
Long transferChannelId = SecurityUtils.getLoginUser().getChannelId();
|
|
|
if (transferChannelId == null) {
|
|
|
- return AjaxResult.error("非法调用");
|
|
|
+ throw new RuntimeException("非法调用");
|
|
|
}
|
|
|
|
|
|
// 开启分页
|
|
|
startPage();
|
|
|
|
|
|
// 获取我的已转让的盲票列表
|
|
|
- List<ChannelMyTicketVO> list = channelTicketTransferService.listTransferTicketList(transferChannelId);
|
|
|
- return AjaxResult.success(list);
|
|
|
+ List<ChannelMyTicketVO> list = channelTicketTransferService.listTransferTicketList(transferChannelId);
|
|
|
+ return getDataTable(list);
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @PostMapping("/transfer/detail/{id}")
|
|
|
+ @ApiOperation("转让盲票详情")
|
|
|
+ @ApiImplicitParams(
|
|
|
+ @ApiImplicitParam(name = "id", value = "转让详情id", required = true, dataType = "Long", paramType = "query")
|
|
|
+ )
|
|
|
+ @ApiResponses(
|
|
|
+ @ApiResponse(code = 200, message = "成功", response = ChannelTicketTransferDetailVO.class)
|
|
|
+ )
|
|
|
+ public AjaxResult detail(@PathVariable("id") Long id) {
|
|
|
+ Long transferChannelId = SecurityUtils.getLoginUser().getChannelId();
|
|
|
+
|
|
|
+ if (transferChannelId == null) {
|
|
|
+ return AjaxResult.error("非法调用");
|
|
|
+ }
|
|
|
+
|
|
|
+ ChannelTicketTransferDetailVO channelTicketTransferDetailVO = channelTicketTransferService.getTicketTransferDetailById(id, transferChannelId);
|
|
|
+
|
|
|
+ return AjaxResult.success(channelTicketTransferDetailVO);
|
|
|
+ }
|
|
|
|
|
|
}
|