修复先款后货

This commit is contained in:
mkm 2023-11-14 11:41:43 +08:00
parent 56bef0a81e
commit b09f23963f
2 changed files with 2 additions and 1 deletions

View File

@ -30,6 +30,7 @@ class StoreCartDao extends BaseDao
const SOURCE_STORE_CLOUD = 101; //店铺内云商品
const SOURCE_CLOUD = 102; //云仓内店铺商品
const CITY_CLOUD = 103; //市级云仓商品
const SOURCE_PROCURE = 200; //供应链采购商品B2B
const SOURCE_COMMUNITY_RESALE = 201; //转售商品
const SOURCE_COMMUNITY_ENTRUST = 202; //委托商品

View File

@ -93,7 +93,7 @@ class StoreCart extends BaseController
case 99: //委托商品
$result = app()->make(ProductRepository::class)->cartCheck($data,$this->request->userInfo());
[$source, $sourceId, $pid] = explode(':', $this->request->param('source', '0'), 3) + ['', '', ''];
if($source==StoreCartDao::CITY_CLOUD){
if($source==StoreCartDao::CITY_CLOUD||$source==StoreCartDao::SOURCE_PROCURE){
$data['source'] = $source;
}else{
$data['source'] = (in_array($source, [0, 1]) && $pid == $data['product_id']) ? $source : 0;