Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gogirl-miniapp-backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huluobin
gogirl-miniapp-backend
Commits
c1604a7c
Commit
c1604a7c
authored
Sep 24, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard 请求头
parent
c042d5b2
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
90 additions
and
18 deletions
+90
-18
DashboardController.java
.../com/gogirl/interfaces/dashboard/DashboardController.java
+11
-10
GetStoreListApiRequest.java
...rl/shared/admin/dashboard/req/GetStoreListApiRequest.java
+2
-0
GetStoreTrendApiRequest.java
...l/shared/admin/dashboard/req/GetStoreTrendApiRequest.java
+2
-0
PreStorageSumApiRequest.java
...l/shared/admin/dashboard/req/PreStorageSumApiRequest.java
+2
-0
RevenueServiceListApiRequest.java
...red/admin/dashboard/req/RevenueServiceListApiRequest.java
+2
-0
RevenueSumApiRequest.java
...girl/shared/admin/dashboard/req/RevenueSumApiRequest.java
+1
-0
RevenueSumByTypeApiRequest.java
...hared/admin/dashboard/req/RevenueSumByTypeApiRequest.java
+3
-0
RevenueTypeListRequest.java
...rl/shared/admin/dashboard/req/RevenueTypeListRequest.java
+3
-0
PurchaseSkuPOI.java
src/main/java/com/gogirl/shared/product/PurchaseSkuPOI.java
+4
-0
ExportPurchaseSkuExcel.java
...m/gogirl/shared/product/excel/ExportPurchaseSkuExcel.java
+40
-0
ImportPurchaseSkuExcel.java
...m/gogirl/shared/product/excel/ImportPurchaseSkuExcel.java
+3
-0
PurchaseSkuMapper.xml
src/main/resources/mapper/product/PurchaseSkuMapper.xml
+9
-1
Test.java
src/test/java/com/gogirl/Test.java
+7
-6
AdminFeignTest.java
.../java/com/gogirl/infrastructure/feign/AdminFeignTest.java
+1
-1
No files found.
src/main/java/com/gogirl/interfaces/dashboard/DashboardController.java
View file @
c1604a7c
...
...
@@ -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
);
}
}
src/main/java/com/gogirl/shared/admin/dashboard/req/GetStoreListApiRequest.java
View file @
c1604a7c
...
...
@@ -25,4 +25,6 @@ public class GetStoreListApiRequest extends AdminPageRequest {
@JsonProperty
(
"user_store_ids"
)
private
List
<
Integer
>
userStoreIds
;
private
Integer
brand_id
=
1
;
}
src/main/java/com/gogirl/shared/admin/dashboard/req/GetStoreTrendApiRequest.java
View file @
c1604a7c
...
...
@@ -26,4 +26,6 @@ public class GetStoreTrendApiRequest {
@JsonProperty
(
"user_store_ids"
)
private
List
<
Integer
>
userStoreIds
;
private
Integer
brand_id
=
1
;
}
src/main/java/com/gogirl/shared/admin/dashboard/req/PreStorageSumApiRequest.java
View file @
c1604a7c
...
...
@@ -22,4 +22,6 @@ public class PreStorageSumApiRequest {
@JsonProperty
(
"user_store_ids"
)
private
List
<
Integer
>
userStoreIds
;
private
Integer
brand_id
=
1
;
}
src/main/java/com/gogirl/shared/admin/dashboard/req/RevenueServiceListApiRequest.java
View file @
c1604a7c
...
...
@@ -22,4 +22,6 @@ public class RevenueServiceListApiRequest {
@JsonProperty
(
"user_store_ids"
)
private
List
<
Integer
>
userStoreIds
;
private
Integer
brand_id
=
1
;
}
src/main/java/com/gogirl/shared/admin/dashboard/req/RevenueSumApiRequest.java
View file @
c1604a7c
...
...
@@ -19,5 +19,6 @@ public class RevenueSumApiRequest {
@JsonProperty
(
"date_utc"
)
private
List
<
String
>
dateUtc
;
private
Integer
brand_id
=
1
;
}
src/main/java/com/gogirl/shared/admin/dashboard/req/RevenueSumByTypeApiRequest.java
View file @
c1604a7c
...
...
@@ -18,4 +18,7 @@ public class RevenueSumByTypeApiRequest {
@JsonProperty
(
"date_utc"
)
private
List
<
String
>
dateUtc
;
private
Integer
brand_id
=
1
;
}
src/main/java/com/gogirl/shared/admin/dashboard/req/RevenueTypeListRequest.java
View file @
c1604a7c
...
...
@@ -21,4 +21,7 @@ public class RevenueTypeListRequest {
@JsonProperty
(
"user_store_ids"
)
private
List
<
Integer
>
userStoreIds
;
private
Integer
brand_id
=
1
;
}
src/main/java/com/gogirl/shared/product/PurchaseSkuPOI.java
View file @
c1604a7c
...
...
@@ -57,5 +57,9 @@ public class PurchaseSkuPOI implements Serializable {
@ApiModelProperty
(
"商品图"
)
private
URL
imagesUrl
;
@ExcelProperty
(
value
=
"库存数量"
)
@ApiModelProperty
(
"库存数量"
)
private
Integer
quantity
;
}
src/main/java/com/gogirl/shared/product/excel/ExportPurchaseSkuExcel.java
0 → 100644
View file @
c1604a7c
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
;
}
src/main/java/com/gogirl/shared/product/excel/ImportPurchaseSkuExcel.java
View file @
c1604a7c
...
...
@@ -34,4 +34,7 @@ public class ImportPurchaseSkuExcel implements Serializable {
@ExcelProperty
(
"型号"
)
private
String
model
;
@ExcelProperty
(
"库存"
)
private
String
stock
;
}
src/main/resources/mapper/product/PurchaseSkuMapper.xml
View file @
c1604a7c
...
...
@@ -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"
>
...
...
src/test/java/com/gogirl/Test.java
View file @
c1604a7c
...
...
@@ -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
();
...
...
src/test/java/com/gogirl/infrastructure/feign/AdminFeignTest.java
View file @
c1604a7c
...
...
@@ -33,7 +33,7 @@ import java.util.Map;
* @author robbendev
* @since 2020/8/17 10:35 上午
*/
@ActiveProfiles
(
"pr
e
"
)
@ActiveProfiles
(
"pr
od
"
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
@Slf4j
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment