UNPKG

youzanyun-devtool-worker

Version:

31 lines (30 loc) 1.31 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const spring4js_nodejs_1 = require("spring4js-nodejs"); const get_1 = tslib_1.__importDefault(require("lodash/get")); let ShopService = class ShopService { async getTestShopList(param) { let res = await this.requestService.dubboCallWithAuthV2("com.youzan.baymax.api.DiyTestShopService", "getTestShopByApp", [param], { projectId: param.projectId }); if (+res.code !== 200 && +res.code !== 0) { throw new Error(res.message); } return { shopList: (0, get_1.default)(res.data, 'shopList') }; } async postBuyMpList(param) { let res = await this.requestService.dubboCallWithAuth('com.youzan.cloud.appstore.api.service.mp.PublishService', 'queryDiyMpAppSubscribeList', [param], { projectId: param.projectId, addPrivateData: ['appId', 'userId'] }); if (+res.code !== 200 && +res.code !== 0) { throw new Error(res.message); } return res.data; } }; tslib_1.__decorate([ (0, spring4js_nodejs_1.Resource)() ], ShopService.prototype, "requestService", void 0); ShopService = tslib_1.__decorate([ (0, spring4js_nodejs_1.Service)() ], ShopService); exports.default = ShopService;