mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 14:01:07 +00:00
【程序目录】优化缓存
This commit is contained in:
parent
814a161487
commit
08a1821b26
@ -72,9 +72,14 @@ class LiveGoods extends AuthController
|
||||
[$goods_info] = $this->request->postMore([
|
||||
['goods_info', []]
|
||||
], true);
|
||||
$error = false;
|
||||
foreach ($goods_info as $goods) {
|
||||
$this->validate($goods, \app\adminapi\validate\marketing\LiveGoodsValidate::class, 'save');
|
||||
if (!preg_match('/.*(\.png|\.jpg|\.jpeg|\.gif)$/', $goods['image']) && strpos(strtolower($goods['image']), "phar://") !== false) {
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
if ($error) return app('json')->fail(40137);
|
||||
$this->services->add($goods_info);
|
||||
return app('json')->success(100000);
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ class OrderShippingListener implements ListenerInterface
|
||||
return;
|
||||
}
|
||||
} else if ($order_type == 'recharge') { // 充值订单
|
||||
if ($order['recharge_type'] == 'weixin') {
|
||||
if ($order['recharge_type'] == 'routine') {
|
||||
$delivery_type = 3;
|
||||
$item_desc = '用户充值' . $order['price'];
|
||||
$out_trade_no = $order['order_id'];
|
||||
@ -59,7 +59,7 @@ class OrderShippingListener implements ListenerInterface
|
||||
return;
|
||||
}
|
||||
} else if ($order_type == 'member') { // 会员订单
|
||||
if ($order['pay_type'] == 'weixin') {
|
||||
if ($order['pay_type'] == 'routine') {
|
||||
$delivery_type = 3;
|
||||
$item_desc = '用户购买' . $order['member_type'] . '会员卡';
|
||||
$out_trade_no = $order['order_id'];
|
||||
|
||||
@ -39,6 +39,7 @@ class CacheService
|
||||
try {
|
||||
return Cache::tag($tag)->set($name, $value, $expire);
|
||||
} catch (\Throwable $e) {
|
||||
crmebLog('写入缓存错误:' . $e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user