|
@@ -1,14 +1,22 @@
|
|
|
package com.qs.mp.web.controller.api.channel;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.qs.mp.channel.domain.Channel;
|
|
|
+import com.qs.mp.channel.domain.vo.ChannelVO;
|
|
|
import com.qs.mp.channel.service.IChannelService;
|
|
|
+import com.qs.mp.common.core.domain.AjaxResult;
|
|
|
import com.qs.mp.common.core.page.TableDataInfo;
|
|
|
+import com.qs.mp.common.enums.ErrorCodeEnum;
|
|
|
import com.qs.mp.system.service.id.BizIdGenerator;
|
|
|
import com.qs.mp.web.controller.common.BaseApiController;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import java.util.List;
|
|
|
+
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
@@ -44,4 +52,32 @@ public class ChannelController extends BaseApiController {
|
|
|
List<Channel> list = channelService.list(new LambdaQueryWrapper<Channel>());
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取我的下级渠道详情信息
|
|
|
+ *
|
|
|
+ * @param
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PostMapping(value = "subchannel/detail")
|
|
|
+ public AjaxResult getInfo(@RequestBody Channel channel) {
|
|
|
+ if (null == channel || null == channel.getChannelId()) {
|
|
|
+ return error(ErrorCodeEnum.ERROR_CODE_1001);
|
|
|
+ }
|
|
|
+
|
|
|
+ Long channelId = channel.getChannelId();
|
|
|
+ ChannelVO channelVO = new ChannelVO();
|
|
|
+// try {
|
|
|
+// Customer queryCustomer = customerService.getById(custId);
|
|
|
+// BeanUtils.copyProperties(queryCustomer, queryCustomerVO);
|
|
|
+// int totalShopCnt = shopService.count(new QueryWrapper<Shop>().lambda()
|
|
|
+// .eq(Shop::getCustId, hostHolder.getUser().getCustId()).in(Shop::getShopType, ShopTypeEnum.getShopTypes()));
|
|
|
+// queryCustomerVO.setShopNum(totalShopCnt);
|
|
|
+// } catch (DataOperationException e) {
|
|
|
+// return AjaxResult.error(e.getCode(), e.getMessage(), null);
|
|
|
+// }
|
|
|
+ return AjaxResult.success(channelVO);
|
|
|
+ }
|
|
|
+
|
|
|
}
|