|
@@ -36,6 +36,7 @@ import org.springframework.data.redis.core.RedisTemplate;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
@@ -164,6 +165,38 @@ public class SellerOverviewController extends BaseController {
|
|
|
return SldResponse.success(result);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation("首页不同站点概况实时统计数据")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "source", value = "站点来源 1:海外站 2:国内站")
|
|
|
+ })
|
|
|
+ @GetMapping("source/presentData")
|
|
|
+ public JsonResult<SellerSourcePresentIndexVO> indexSourcePresentData(HttpServletRequest request, @RequestParam(required = false, defaultValue = "1") Integer source) {
|
|
|
+ Vendor vendor = UserUtil.getUser(request, Vendor.class);
|
|
|
+ SellerSourcePresentIndexVO result = new SellerSourcePresentIndexVO();
|
|
|
+ //违规商品数
|
|
|
+ GoodsExample goodsExample = new GoodsExample();
|
|
|
+ goodsExample.setStoreId(vendor.getStoreId());
|
|
|
+ goodsExample.setDistributionChannel(source);
|
|
|
+ goodsExample.setState(GoodsConst.GOODS_STATE_LOWER_BY_SYSTEM);
|
|
|
+ goodsExample.setIsDelete(GoodsConst.GOODS_IS_DELETE_NO);
|
|
|
+ result.setSysLowerGoodsNum(goodsModel.getGoodsCount(goodsExample));
|
|
|
+
|
|
|
+ //询盘数据
|
|
|
+ List<String> itemTypes = new ArrayList<>();
|
|
|
+ itemTypes.add(EnquiryConst.ENQUIRY_ITEM_TYPE_GOODS);
|
|
|
+ itemTypes.add(EnquiryConst.ENQUIRY_ITEM_TYPE_SHOP);
|
|
|
+ String itemTypeStr = StringUtil.listToString(itemTypes);
|
|
|
+
|
|
|
+ //待分配询盘数
|
|
|
+ MemberEnquiryExample memberEnquiryToAssignExample = new MemberEnquiryExample();
|
|
|
+ memberEnquiryToAssignExample.setStoreId(vendor.getStoreId());
|
|
|
+ memberEnquiryToAssignExample.setChannel(source);
|
|
|
+ memberEnquiryToAssignExample.setStatusEqual(EnquiryConst.ENQUIRY_NEW);
|
|
|
+ memberEnquiryToAssignExample.setItemTypeIn(itemTypeStr);
|
|
|
+ result.setEnquiryToBeAssignNum(memberEnquiryModel.getMemberEnquiryCount(memberEnquiryToAssignExample));
|
|
|
+ return SldResponse.success(result);
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation("支付或下单金额趋势")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "startTime", value = "开始时间", required = true),
|