|
@@ -6,13 +6,20 @@ import com.ruixuan.common.core.page.TableDataInfo;
|
|
import com.ruixuan.common.utils.Check;
|
|
import com.ruixuan.common.utils.Check;
|
|
import com.ruixuan.common.utils.DateUtils;
|
|
import com.ruixuan.common.utils.DateUtils;
|
|
import com.ruixuan.data.utils.ExportExcelUtils;
|
|
import com.ruixuan.data.utils.ExportExcelUtils;
|
|
|
|
+import com.ruixuan.isc.service.IKuaishouPromoterService;
|
|
import com.ruixuan.isc.service.ISupplyChainService;
|
|
import com.ruixuan.isc.service.ISupplyChainService;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiParam;
|
|
import io.swagger.annotations.ApiParam;
|
|
import lombok.SneakyThrows;
|
|
import lombok.SneakyThrows;
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
+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.RequestParam;
|
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
@@ -20,7 +27,10 @@ import java.io.IOException;
|
|
import java.io.OutputStream;
|
|
import java.io.OutputStream;
|
|
import java.io.UnsupportedEncodingException;
|
|
import java.io.UnsupportedEncodingException;
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
-import java.util.*;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+import java.util.HashMap;
|
|
|
|
+import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("/isv/supply_chain")
|
|
@RequestMapping("/isv/supply_chain")
|
|
@@ -29,6 +39,9 @@ public class SupplyChainController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private ISupplyChainService supplyChainService;
|
|
private ISupplyChainService supplyChainService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private IKuaishouPromoterService promoterService;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 达人订单
|
|
* 达人订单
|
|
*
|
|
*
|
|
@@ -516,9 +529,9 @@ public class SupplyChainController extends BaseController {
|
|
@GetMapping("/indexOrderRank")
|
|
@GetMapping("/indexOrderRank")
|
|
@ApiOperation(value = "首页-商品排行")
|
|
@ApiOperation(value = "首页-商品排行")
|
|
public TableDataInfo indexOrderRank(
|
|
public TableDataInfo indexOrderRank(
|
|
- @ApiParam("时间类型") @RequestParam(value = "dateType", required = false) Integer dateType,
|
|
|
|
- @ApiParam("开始时间") @RequestParam(value = "orderStartDate", required = false) String orderStartDate,
|
|
|
|
- @ApiParam("结束时间") @RequestParam(value = "orderEndDate", required = false) String orderEndDate) {
|
|
|
|
|
|
+ @ApiParam("时间类型") @RequestParam(value = "dateType", required = true) Integer dateType,
|
|
|
|
+ @ApiParam("开始时间") @RequestParam(value = "orderStartDate", required = true) String orderStartDate,
|
|
|
|
+ @ApiParam("结束时间") @RequestParam(value = "orderEndDate", required = true) String orderEndDate) {
|
|
|
|
|
|
Map<String, Object> requestMap = new HashMap<>();
|
|
Map<String, Object> requestMap = new HashMap<>();
|
|
if (dateType == 0) {
|
|
if (dateType == 0) {
|
|
@@ -563,12 +576,16 @@ public class SupplyChainController extends BaseController {
|
|
@GetMapping("/indexPromoterRank")
|
|
@GetMapping("/indexPromoterRank")
|
|
@ApiOperation(value = "首页-达人排行")
|
|
@ApiOperation(value = "首页-达人排行")
|
|
public TableDataInfo indexPromoterRank(
|
|
public TableDataInfo indexPromoterRank(
|
|
- @ApiParam("时间类型") @RequestParam(value = "dateType", required = false) Integer dateType,
|
|
|
|
- @ApiParam("开始时间") @RequestParam(value = "orderStartDate", required = false) String orderStartDate,
|
|
|
|
- @ApiParam("结束时间") @RequestParam(value = "orderEndDate", required = false) String orderEndDate) {
|
|
|
|
|
|
+ @ApiParam("时间类型") @RequestParam(value = "dateType", required = true) Integer dateType,
|
|
|
|
+ @ApiParam("开始时间") @RequestParam(value = "orderStartDate", required = true) String orderStartDate,
|
|
|
|
+ @ApiParam("结束时间") @RequestParam(value = "orderEndDate", required = true) String orderEndDate,
|
|
|
|
+ @ApiParam("userId") @RequestParam(value = "userId", required = false) Long userId) {
|
|
|
|
|
|
Map<String, Object> requestMap = new HashMap<>();
|
|
Map<String, Object> requestMap = new HashMap<>();
|
|
if (dateType == 0) {
|
|
if (dateType == 0) {
|
|
|
|
+ if (Check.isNotNull(userId)) {
|
|
|
|
+ requestMap.put("promoterIds", promoterService.selectPromoterIdList(userId));
|
|
|
|
+ }
|
|
if (!Check.isNull(orderStartDate)) {
|
|
if (!Check.isNull(orderStartDate)) {
|
|
Long start = DateUtils.getStartLongTime(orderStartDate); //当天开始时间
|
|
Long start = DateUtils.getStartLongTime(orderStartDate); //当天开始时间
|
|
requestMap.put("start", start);
|
|
requestMap.put("start", start);
|
|
@@ -1051,7 +1068,7 @@ public class SupplyChainController extends BaseController {
|
|
exportList.add(export);
|
|
exportList.add(export);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- String[] headers = {"所属人", "商品ID", "商品名称", "商品单价", "佣金率", "订单数", "有效订单数", "有效订单率", "失效订单数", "发货数", "发货率", "未发货数", "付款金额", "服务费率", "预估服务费收入", "结算服务费收入","商品封面"};
|
|
|
|
|
|
+ String[] headers = {"所属人", "商品ID", "商品名称", "商品单价", "佣金率", "订单数", "有效订单数", "有效订单率", "失效订单数", "发货数", "发货率", "未发货数", "付款金额", "服务费率", "预估服务费收入", "结算服务费收入", "商品封面"};
|
|
OutputStream os = response.getOutputStream();
|
|
OutputStream os = response.getOutputStream();
|
|
ExportExcelUtils eeu = new ExportExcelUtils();
|
|
ExportExcelUtils eeu = new ExportExcelUtils();
|
|
XSSFWorkbook workbook = new XSSFWorkbook();
|
|
XSSFWorkbook workbook = new XSSFWorkbook();
|