51 lines
1.5 KiB
JavaScript
51 lines
1.5 KiB
JavaScript
'use strict';
|
|
|
|
const MainService = require('../main');
|
|
|
|
class storeService extends MainService {
|
|
constructor(ctx) {
|
|
super(ctx);
|
|
const _noNeedLogin = '';
|
|
const _noNeedRight = 'createStore,createWarehouse,joinStore,joinWarehouse';
|
|
const _noNeedAuth = '*';
|
|
this.systemInit(_noNeedLogin, _noNeedRight, '', _noNeedAuth);
|
|
}
|
|
async createStore(data) {
|
|
const { service } = this;
|
|
const result = await service.systems.store.createStore(data);
|
|
return this.success('ok', result);
|
|
}
|
|
async createWarehouse(data) {
|
|
const { service } = this;
|
|
const result = await service.systems.store.createWarehouse(data);
|
|
return this.success('ok', result);
|
|
}
|
|
async joinStore(data) {
|
|
const { service } = this;
|
|
const result = await service.systems.store.joinStore(data);
|
|
return this.success('ok', result);
|
|
}
|
|
async joinWarehouse(data) {
|
|
const { service } = this;
|
|
const result = await service.systems.store.joinWarehouse(data);
|
|
return this.success('ok', result);
|
|
}
|
|
async getStoreRoles(data) {
|
|
const { service } = this;
|
|
const result = await service.systems.store.getStoreRoles(data);
|
|
return this.success('ok', result);
|
|
}
|
|
async getStoreRoles(data) {
|
|
const { service } = this;
|
|
const result = await service.systems.store.getStoreRoles(data);
|
|
return this.success('ok', result);
|
|
}
|
|
async auditApply(data) {
|
|
const { service } = this;
|
|
const result = await service.systems.store.auditApply(data);
|
|
return this.success('ok', result);
|
|
}
|
|
|
|
}
|
|
module.exports = storeService;
|