
- 新增码速达配置选项,包括订单备注状态和售后处理状态- 实现限购数量和金额的 redis 优化处理 - 添加渠道余额获取功能 - 修改订单状态更新逻辑,支持码速达- 优化自动发卡软件设置界面
91 lines
1.9 KiB
PHP
91 lines
1.9 KiB
PHP
<?php
|
|
|
|
namespace app\openapi\controller\maSuDaApi;
|
|
|
|
|
|
use app\channel\service\ChannelService;
|
|
use app\channel\service\ProductBaseService;
|
|
use app\gateway\service\CurlService;
|
|
use app\gateway\service\RedisService as redisObj;
|
|
use app\merchant\service\MerchantService;
|
|
use app\merchant\service\OrderHistoryService;
|
|
use app\merchant\service\OrderLastweekHistoryService;
|
|
use app\merchant\service\OrderService;
|
|
use app\merchant\service\ProductService;
|
|
use app\order\service\Kami91OrderService;
|
|
use think\admin\Controller;
|
|
use app\core\Service as CoreService;
|
|
use think\exception\HttpResponseException;
|
|
use think\facade\Db;
|
|
use think\facade\Log;
|
|
use app\channel\service\ProductService as CProductService;
|
|
|
|
class App extends Controller
|
|
{
|
|
|
|
protected $merchant_id;
|
|
|
|
protected string $host_url = 'https://supplier-api.wanmahui.com/api/openplatform/gateway';
|
|
|
|
# code码定义
|
|
protected $code = array
|
|
(
|
|
# 成功
|
|
1 => 'ok',
|
|
# 小于0为失败
|
|
0 => '暂时未处理',
|
|
|
|
1100 => '商品不存在',
|
|
|
|
|
|
);
|
|
|
|
protected string $uid = '';
|
|
protected string $secretKey = '';
|
|
|
|
|
|
# code码定义
|
|
|
|
# 查询接口 一般用于查询数据,同步执行
|
|
|
|
|
|
# 提交接口 一般用于提交数据,异步执行
|
|
|
|
public function getAppId()
|
|
{
|
|
$response = [
|
|
'appId'=>2025011935557114401
|
|
];
|
|
$this->yes($response);
|
|
|
|
}
|
|
|
|
protected function getAppSecret()
|
|
{
|
|
return 'ez8bfsrgefga5nkx5zgccegrb25mct7w';
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* 返回成功的消息
|
|
* @param mixed $info
|
|
* @param string $data
|
|
* @param integer $code
|
|
*/
|
|
protected function yes($data = '{-null-}', $info = 'ok', $code = 200)
|
|
{
|
|
|
|
$response = [
|
|
'code' => $code,
|
|
'message' => $info,
|
|
'data' => $data
|
|
];
|
|
throw new HttpResponseException(json($response));
|
|
}
|
|
|
|
|
|
|
|
|
|
} |