mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-30 22:40:48 +00:00
Merge branch 'v5.0.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v5.0.0dev
This commit is contained in:
commit
adaccb88db
@ -49,10 +49,6 @@ Route::group('product', function () {
|
||||
Route::get('product/attrs/:id/:type', 'v1.product.StoreProduct/get_attrs')->option(['real_name' => '获取商品规格']);
|
||||
//商品列表头
|
||||
Route::get('product/type_header', 'v1.product.StoreProduct/type_header')->option(['real_name' => '商品列表头部数据']);
|
||||
//加入回收站
|
||||
Route::delete('product/:id', 'v1.product.StoreProduct/delete')->option(['real_name' => '商品放入回收站']);
|
||||
//保存新建或保存
|
||||
Route::post('product/:id', 'v1.product.StoreProduct/save')->option(['real_name' => '新建或修改商品']);
|
||||
//修改商品状态
|
||||
Route::put('product/set_show/:id/:is_show', 'v1.product.StoreProduct/set_show')->option(['real_name' => '修改商品状态']);
|
||||
//商品快速编辑
|
||||
@ -69,10 +65,6 @@ Route::group('product', function () {
|
||||
Route::get('product/rule/:id', 'v1.product.StoreProductRule/read')->option(['real_name' => '商品规则详情']);
|
||||
//删除属性规则
|
||||
Route::delete('product/rule/delete', 'v1.product.StoreProductRule/delete')->option(['real_name' => '删除商品规则']);
|
||||
//商品详情
|
||||
Route::get('product/:id', 'v1.product.StoreProduct/get_product_info')->option(['real_name' => '商品详情']);
|
||||
//生成属性
|
||||
Route::post('generate_attr/:id/:type', 'v1.product.StoreProduct/is_format_attr')->option(['real_name' => '生成商品规格列表']);
|
||||
//获取规则属性模板
|
||||
Route::get('product/get_rule', 'v1.product.StoreProduct/get_rule')->option(['real_name' => '获取商品规则属性模板']);
|
||||
//获取运费模板
|
||||
@ -83,6 +75,14 @@ Route::group('product', function () {
|
||||
Route::get('product/check_activity/:id', 'v1.product.StoreProduct/check_activity')->option(['real_name' => '检测是商品否有活动开启']);
|
||||
//导入虚拟商品卡密
|
||||
Route::get('product/import_card', 'v1.product.StoreProduct/import_card')->option(['real_name' => '导入虚拟商品卡密']);
|
||||
//商品详情
|
||||
Route::get('product/:id', 'v1.product.StoreProduct/get_product_info')->option(['real_name' => '商品详情']);
|
||||
//加入回收站
|
||||
Route::delete('product/:id', 'v1.product.StoreProduct/delete')->option(['real_name' => '商品放入回收站']);
|
||||
//保存新建或保存
|
||||
Route::post('product/:id', 'v1.product.StoreProduct/save')->option(['real_name' => '新建或修改商品']);
|
||||
//生成属性
|
||||
Route::post('generate_attr/:id/:type', 'v1.product.StoreProduct/is_format_attr')->option(['real_name' => '生成商品规格列表']);
|
||||
//商品批量操作
|
||||
Route::post('batch/setting', 'v1.product.StoreProduct/batchSetting')->option(['real_name' => '商品批量设置']);
|
||||
})->option(['parent' => 'product', 'cate_name' => '商品']);
|
||||
|
||||
@ -79,7 +79,8 @@ class StoreProductAttrServices extends BaseServices
|
||||
$res = $storeProductAttrValueServices->save($item);
|
||||
if ($item['is_virtual'] && (count($item['virtual_list']) || $item['disk_info'] != '') && !$item['coupon_id']) {
|
||||
$productVirtual->delete(['product_id' => $id, 'attr_unique' => $item['unique'], 'uid' => 0]);
|
||||
$data = [];
|
||||
$sales = $productVirtual->count(['product_id' => $id, 'attr_unique' => $item['unique']]);
|
||||
$storeProductAttrValueServices->update(['id' => $res['id']], ['stock' => $item['stock'] - $sales, 'sales' => $sales]);
|
||||
foreach ($item['virtual_list'] as &$items) {
|
||||
$data = [
|
||||
'product_id' => $id,
|
||||
|
||||
@ -13,6 +13,7 @@ namespace app\services\system\log;
|
||||
|
||||
|
||||
use app\services\BaseServices;
|
||||
use think\facade\Cache;
|
||||
|
||||
/**
|
||||
* Class ClearServices
|
||||
@ -77,5 +78,6 @@ class ClearServices extends BaseServices
|
||||
}
|
||||
}
|
||||
}
|
||||
Cache::clear();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user