@be-link/pos-cli-nodejs 0.0.79 → 0.0.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/pos/http.js
CHANGED
|
@@ -22,7 +22,11 @@ async function callApi(url, ...request) {
|
|
|
22
22
|
}
|
|
23
23
|
catch (error) {
|
|
24
24
|
const axiosError = error;
|
|
25
|
-
const ErrorClass = axiosError.response
|
|
25
|
+
const ErrorClass = axiosError.response
|
|
26
|
+
? axiosError.response.status === 400
|
|
27
|
+
? BizError_1.default
|
|
28
|
+
: SystemError_1.default
|
|
29
|
+
: SystemError_1.default;
|
|
26
30
|
if (axiosError.response) {
|
|
27
31
|
const response = axiosError.response;
|
|
28
32
|
const data = response.data;
|
|
@@ -15,6 +15,7 @@ declare class QueryByCommodityService extends BaseService implements Service.Que
|
|
|
15
15
|
queryPeriodTradeOrderOperatorList(request: Service.Request.queryPeriodTradeOrderOperatorList): Promise<Service.Response.queryPeriodTradeOrderOperatorList[]>;
|
|
16
16
|
queryRollingSalesStatistics(request: Service.Request.queryRollingSalesStatistics): Promise<Service.Response.queryRollingSalesStatistics[]>;
|
|
17
17
|
queryItemSalesInfoInDays(request: Service.Request.IQueryItemSaleInfoInDays): Promise<Service.Response.IQueryItemSaleInfoInDays[]>;
|
|
18
|
+
countRollingSalesStatistics(request: Service.Request.queryRollingSalesStatistics): Promise<number>;
|
|
18
19
|
}
|
|
19
20
|
declare const queryByCommodityService: QueryByCommodityService;
|
|
20
21
|
export default queryByCommodityService;
|
|
@@ -46,6 +46,9 @@ class QueryByCommodityService extends service_1.default {
|
|
|
46
46
|
queryItemSalesInfoInDays(request) {
|
|
47
47
|
return (0, http_1.callApi)(this.getApiUrl(this.queryItemSalesInfoInDays), request);
|
|
48
48
|
}
|
|
49
|
+
countRollingSalesStatistics(request) {
|
|
50
|
+
return (0, http_1.callApi)(this.getApiUrl(this.countRollingSalesStatistics), request);
|
|
51
|
+
}
|
|
49
52
|
}
|
|
50
53
|
const queryByCommodityService = new QueryByCommodityService();
|
|
51
54
|
exports.default = queryByCommodityService;
|
|
@@ -665,6 +665,10 @@ export declare namespace Service {
|
|
|
665
665
|
* @path /query/commodity/query-rolling-sales-statistics
|
|
666
666
|
*/
|
|
667
667
|
queryRollingSalesStatistics(request: Request.queryRollingSalesStatistics): Promise<Response.queryRollingSalesStatistics[]>;
|
|
668
|
+
/**
|
|
669
|
+
* 查询动销统计总计金额
|
|
670
|
+
*/
|
|
671
|
+
countRollingSalesStatistics(request: Request.queryRollingSalesStatistics): Promise<number>;
|
|
668
672
|
/**
|
|
669
673
|
* 查询近N天的商品售卖信息
|
|
670
674
|
* @path /query/commodity/query-item-sales-info-in-days
|