优化工单模块,增加企微模块

This commit is contained in:
mgw
2024-07-10 15:58:47 +08:00
parent e8512b23e4
commit 6b140fe6dd
134 changed files with 12830 additions and 2 deletions

View File

@@ -0,0 +1,50 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from wechatpy.client.api.base import BaseWeChatAPI
class MerchantShelf(BaseWeChatAPI):
def add(self, name, banner, shelf_data):
return self._post(
'merchant/shelf/add',
data={
'shelf_name': name,
'shelf_banner': banner,
'shelf_data': shelf_data
}
)
def delete(self, shelf_id):
return self._post(
'merchant/shelf/del',
data={
'shelf_id': shelf_id
}
)
def update(self, shelf_id, name, banner, shelf_data):
return self._post(
'merchant/shelf/add',
data={
'shelf_id': shelf_id,
'shelf_name': name,
'shelf_banner': banner,
'shelf_data': shelf_data
}
)
def get_all(self):
res = self._get(
'merchant/shelf/getall',
result_processor=lambda x: x['shelves']
)
return res
def get(self, shelf_id):
return self._post(
'merchant/shelf/getbyid',
data={
'shelf_id': shelf_id
}
)