Commit c1604a7c by huluobin

dashboard 请求头

parent c042d5b2
......@@ -3,7 +3,6 @@ package com.gogirl.interfaces.dashboard;
import com.gogirl.application.dashboard.DashboardService;
import com.gogirl.application.store.store.StoreManageService;
import com.gogirl.infrastructure.common.base.JsonResult;
import com.gogirl.infrastructure.common.exception.RRException;
import com.gogirl.infrastructure.feign.AdminFeign;
import com.gogirl.shared.admin.AdminPage;
import com.gogirl.shared.admin.dashboard.req.*;
......@@ -48,21 +47,23 @@ public class DashboardController {
GetStoreTrendApiResp resp = dashboardService.getStoreTrendApi(request);
throw new RRException("Saas服务改造升级 预计22号升级完成");
return JsonResult.success(resp);
}
@ApiOperation("见doc文档getStoreListApi")
@PostMapping("/no_getStoreListApi")
public JsonResult<List<Map<String, Object>>> getStoreListApi(@RequestBody GetStoreListApiRequest request) {
List<Map<String, Object>> result = dashboardService.getStoreListApi(request);
throw new RRException("Saas服务改造升级 预计22号升级完成");
return JsonResult.success(result);
}
@ApiOperation("见doc文档preStorageSumApi")
@PostMapping("/no_preStorageSumApi")
public JsonResult<Map<String, Object>> preStorageSumApi(@RequestBody PreStorageSumApiRequest request) {
Map<String, Object> result = dashboardService.preStorageSumApi(request);
throw new RRException("Saas服务改造升级 预计22号升级完成");
return JsonResult.success(result);
}
......@@ -70,7 +71,7 @@ public class DashboardController {
@PostMapping(value = "/api/Report/no_revenueSumByTypeApi")
public JsonResult<Map<String, Object>> revenueSumByTypeApi(@RequestBody RevenueSumByTypeApiRequest request) {
Map<String, Object> result = dashboardService.revenueSumByTypeApi(request);
throw new RRException("Saas服务改造升级 预计22号升级完成");
return JsonResult.success(result);
}
......@@ -78,7 +79,7 @@ public class DashboardController {
@PostMapping("/no_revenueTypeListApi")
public JsonResult<List<Map<String, Object>>> revenueTypeListApi(@RequestBody RevenueTypeListRequest request) {
List<Map<String, Object>> result = dashboardService.revenueTypeListApi(request);
throw new RRException("Saas服务改造升级 预计22号升级完成");
return JsonResult.success(result);
}
......@@ -86,7 +87,7 @@ public class DashboardController {
@PostMapping("/no_revenueSumApi")
public JsonResult<List<Map<String, Object>>> revenueSumApi(@RequestBody RevenueSumApiRequest request) {
List<Map<String, Object>> result = dashboardService.revenueSumApi(request);
throw new RRException("Saas服务改造升级 预计22号升级完成");
return JsonResult.success(result);
}
......@@ -94,7 +95,7 @@ public class DashboardController {
@PostMapping("/no_getTechnicianPage")
public JsonResult<AdminPage<AdminTechnicianScoreResp>> getTechnicianPage(@RequestBody GetTechnicianPageRequest request) {
AdminPage<AdminTechnicianScoreResp> respAdminPage = dashboardService.getTechnicianPage(request);
throw new RRException("Saas服务改造升级 预计22号升级完成");
return JsonResult.success(respAdminPage);
}
......@@ -102,7 +103,7 @@ public class DashboardController {
@PostMapping("/no_achievementsPersonaResultPageApi")
public JsonResult<AdminPage<AchievementsPersonaResult>> achievementsPersonaResultPageApi(@RequestBody AchievementsPersonaResultPageApiRequest request) {
AdminPage<AchievementsPersonaResult> page = dashboardService.achievementsPersonaResultPageApi(request);
throw new RRException("Saas服务改造升级 预计22号升级完成");
return JsonResult.success(page);
}
......@@ -110,6 +111,6 @@ public class DashboardController {
@PostMapping("/no_revenueServiceListApi")
public JsonResult<List<Map<String, Object>>> revenueServiceListApi(@RequestBody RevenueServiceListApiRequest request) {
List<Map<String, Object>> result = dashboardService.revenueServiceListApi(request);
throw new RRException("Saas服务改造升级 预计22号升级完成");
return JsonResult.success(result);
}
}
......@@ -25,4 +25,6 @@ public class GetStoreListApiRequest extends AdminPageRequest {
@JsonProperty("user_store_ids")
private List<Integer> userStoreIds;
private Integer brand_id = 1;
}
......@@ -26,4 +26,6 @@ public class GetStoreTrendApiRequest {
@JsonProperty("user_store_ids")
private List<Integer> userStoreIds;
private Integer brand_id = 1;
}
......@@ -22,4 +22,6 @@ public class PreStorageSumApiRequest {
@JsonProperty("user_store_ids")
private List<Integer> userStoreIds;
private Integer brand_id = 1;
}
......@@ -22,4 +22,6 @@ public class RevenueServiceListApiRequest {
@JsonProperty("user_store_ids")
private List<Integer> userStoreIds;
private Integer brand_id = 1;
}
......@@ -19,5 +19,6 @@ public class RevenueSumApiRequest {
@JsonProperty("date_utc")
private List<String> dateUtc;
private Integer brand_id = 1;
}
......@@ -18,4 +18,7 @@ public class RevenueSumByTypeApiRequest {
@JsonProperty("date_utc")
private List<String> dateUtc;
private Integer brand_id = 1;
}
......@@ -21,4 +21,7 @@ public class RevenueTypeListRequest {
@JsonProperty("user_store_ids")
private List<Integer> userStoreIds;
private Integer brand_id = 1;
}
......@@ -57,5 +57,9 @@ public class PurchaseSkuPOI implements Serializable {
@ApiModelProperty("商品图")
private URL imagesUrl;
@ExcelProperty(value = "库存数量")
@ApiModelProperty("库存数量")
private Integer quantity;
}
package com.gogirl.shared.product.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* <p>
*
* </p>
*
* @author robbendev
* @since 2020/6/6 5:35 下午
*/
@Data
public class ExportPurchaseSkuExcel implements Serializable {
@ExcelProperty("sku")
private String sku;
@ExcelProperty("名称")
private String name;
@ExcelProperty("店铺看到的价格")
private BigDecimal shopPrice;
@ExcelProperty("采购价格")
private BigDecimal purchasePrice;
@ExcelProperty("分类")
private String category;
@ExcelProperty("型号")
private String model;
@ExcelProperty("库存")
private String stock;
}
......@@ -34,4 +34,7 @@ public class ImportPurchaseSkuExcel implements Serializable {
@ExcelProperty("型号")
private String model;
@ExcelProperty("库存")
private String stock;
}
......@@ -27,9 +27,17 @@
<select id="purchaseSkuExcel" resultType="com.gogirl.shared.product.PurchaseSkuPOI">
SELECT t1.sku, t1.picture_path, t1.sku_name, t2.`name` sku_type, t1.sku_model, t1.shop_price, t1.purchase_price
SELECT t1.sku,
t1.picture_path,
t1.sku_name,
t2.`name` sku_type,
t1.sku_model,
t1.shop_price,
t1.purchase_price,
t3.num quantity
from purchase_sku t1
LEFT JOIN purchase_sku_type t2 on t1.sku_type = t2.id
left join purchase_stock t3 on t1.sku = t3.sku
</select>
<select id="listByProduceIds" resultType="com.gogirl.domain.product.purchase.PurchaseSku">
......
......@@ -59,6 +59,7 @@ import com.gogirl.infrastructure.schedule.Schedule;
import com.gogirl.infrastructure.service.excel.ExcelListener;
import com.gogirl.infrastructure.service.excel.MallProductExcelListener;
import com.gogirl.infrastructure.service.mail.MailService;
import com.gogirl.shared.product.PurchaseSkuPOI;
import com.gogirl.shared.product.excel.ImportMallProductExcel;
import com.gogirl.shared.product.excel.ImportPurchaseSkuExcel;
import lombok.extern.slf4j.Slf4j;
......@@ -203,7 +204,6 @@ public class Test {
orderPayMapper.delete(new LambdaQueryWrapper<OrderPay>().eq(OrderPay::getAmount, 0));
}
@org.junit.Test
public void customerPay() {
......@@ -500,7 +500,6 @@ public class Test {
mailService.sendSimpleMail("robbendev@qq.com", "pre", "test");
}
@Resource
Schedule schedule;
......@@ -569,7 +568,6 @@ public class Test {
System.out.println(customerBalanceRecord.getRefereeId());
}
@Resource
MarketService marketService;
......@@ -581,7 +579,6 @@ public class Test {
});
}
@Resource
OverTimeRecordMapper overtimeRecordMapper;
......@@ -606,7 +603,6 @@ public class Test {
});
}
@Resource
TakeLeaveEventMapper takeLeaveEventMapper;
......@@ -697,6 +693,12 @@ public class Test {
EasyExcel.read(filePath, ImportPurchaseSkuExcel.class, new ExcelListener(purchaseSkuMapper)).sheet().doRead();
}
@org.junit.Test
public void exportSku() {
List<PurchaseSkuPOI> purchaseSkuPOIS = purchaseSkuMapper.purchaseSkuExcel();
EasyExcel.write("/Users/huluobin/exportSku.xlsx", PurchaseSkuPOI.class).sheet().doWrite(purchaseSkuPOIS);
}
@Resource
MallProductMapper mallProductMapper;
......@@ -741,7 +743,6 @@ public class Test {
@Resource
ChargeOrderServiceImpl chargeOrderService;
@org.junit.Test
public void chargeCustomerCard() {
GogirlToken gogirlToken = new GogirlToken();
......
......@@ -33,7 +33,7 @@ import java.util.Map;
* @author robbendev
* @since 2020/8/17 10:35 上午
*/
@ActiveProfiles("pre")
@ActiveProfiles("prod")
@RunWith(SpringRunner.class)
@SpringBootTest
@Slf4j
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment