|
@@ -0,0 +1,80 @@
|
|
|
+/*
|
|
|
+ * Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
|
|
|
+ *
|
|
|
+ * https://www.mall4j.com/
|
|
|
+ *
|
|
|
+ * 未经允许,不可做商业用途!
|
|
|
+ *
|
|
|
+ * 版权所有,侵权必究!
|
|
|
+ */
|
|
|
+
|
|
|
+package com.qs.mp.web.controller.api.channel;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.qs.mp.admin.domain.TicketBox;
|
|
|
+import com.qs.mp.admin.domain.param.TicketBoxParam;
|
|
|
+import com.qs.mp.admin.service.ITicketBoxService;
|
|
|
+import com.qs.mp.channel.domain.ChannelAddr;
|
|
|
+import com.qs.mp.channel.domain.param.AddrParam;
|
|
|
+import com.qs.mp.channel.service.IChannelAddrService;
|
|
|
+import com.qs.mp.common.core.domain.AjaxResult;
|
|
|
+import com.qs.mp.utils.SecurityUtils;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
+import javax.validation.Valid;
|
|
|
+import lombok.AllArgsConstructor;
|
|
|
+import ma.glasnost.orika.MapperFacade;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+
|
|
|
+@RestController
|
|
|
+@RequestMapping("/api/v1/mp/channel/mall")
|
|
|
+@Api(tags = "渠道盲票商城接口")
|
|
|
+@AllArgsConstructor
|
|
|
+public class ChannelTicketController {
|
|
|
+
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ITicketBoxService ticketBoxService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private MapperFacade mapperFacade;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 盲票进货列表
|
|
|
+ */
|
|
|
+ @PostMapping("/ticket/list")
|
|
|
+ @ApiOperation(value = "盲票组列表" , notes = "获取所有盲票信息")
|
|
|
+ public AjaxResult list(@RequestBody TicketBoxParam param) {
|
|
|
+ List<TicketBox> ticketBoxes = ticketBoxService.list(
|
|
|
+ new LambdaQueryWrapper<TicketBox>().eq(TicketBox::getType, param.getType())
|
|
|
+ .eq(null != param.getCategoryId() && 0 != param.getCategoryId(), TicketBox::getCategoryId, param.getCategoryId()));
|
|
|
+// .eq()
|
|
|
+// .orderByDesc(ChannelAddr::getCommonAddr).orderByDesc(ChannelAddr::getUpdateTime));
|
|
|
+
|
|
|
+ return AjaxResult.success(ticketBoxes);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取地址信息订单配送地址
|
|
|
+ */
|
|
|
+ @PostMapping("/address/query")
|
|
|
+ @ApiOperation(value = "获取地址信息" , notes = "根据地址id,获取地址信息")
|
|
|
+ public AjaxResult getInfo(@RequestBody AddrParam addrParam) {
|
|
|
+ if (addrParam.getAddrId() == null || addrParam.getAddrId() == 0) {
|
|
|
+ return AjaxResult.error("参数异常,地址ID缺失");
|
|
|
+ }
|
|
|
+ Long channelId = SecurityUtils.getLoginUser().getChannelId();
|
|
|
+// ChannelAddr channelAddr = channelAddrService.getChannelAddrByUserId(addrParam.getAddrId(),
|
|
|
+// channelId);
|
|
|
+ return AjaxResult.success();
|
|
|
+ }
|
|
|
+
|
|
|
+}
|