feat: 添加产品类型参数到商品存储逻辑

This commit is contained in:
mkm 2024-06-25 14:08:10 +08:00
parent a66017a21e
commit 2d0dcf8a4b
4 changed files with 8 additions and 3 deletions

View File

@ -53,6 +53,7 @@ class StoreProductLogic extends BaseLogic
'manufacturer_information' => $params['manufacturer_information']??'',
'swap' => $params['swap'] ?? 0,
'batch' => $params['batch'] ?? 0,
'product_type' => $params['product_type'] ?? 0,
];
// if ($params['rose'] > 0) {
// $rose_price = bcmul($params['cost'], $params['rose'], 2);
@ -154,7 +155,6 @@ class StoreProductLogic extends BaseLogic
'batch' => $params['batch'],
'manufacturer_information' => $params['manufacturer_information']??'',
'swap' => $params['swap'] ?? 0,
];
StoreProduct::where('id', $params['id'])->update($data);

View File

@ -10,6 +10,7 @@ use app\common\model\Config as ModelConfig;
use app\common\model\store_branch_product\StoreBranchProduct;
use app\common\model\system_store\SystemStore;
use app\common\service\pay\PayService;
use app\common\service\PushService;
use app\common\service\wechat\WechatTemplate;
use Exception;
use support\Cache;
@ -28,7 +29,10 @@ class IndexController extends BaseApiController
public function index()
{
d(2);
$uid=9;
$a= PushService::push('wechat_mmp_'.$uid, $uid, ['type'=>'INDUSTRYMEMBERS','msg'=>'支付超时,订单已被取消,请重新提交订单','data'=>['id'=>5]]);
return json($a);

View File

@ -64,6 +64,7 @@ class StoreStorageSend implements Consumer
'batch' => $find['batch'],
'store_id' => $store_id,
'sales' => 0,
'product_type' => $find['product_type'],
'stock' => 0,
];
$branch = StoreBranchProduct::create($product);

View File

@ -12,7 +12,7 @@ use DateTime;
class IndexController extends BaseLikeController
{
public $store_id=3;
public $store_id=0;
public function index()
{