feat(CommissionProductLogic): updated prod calc logic for user ship condition, added source check for order, improved code quality
This commit is contained in:
parent
0718d0635b
commit
98bd00fe01
@ -23,7 +23,11 @@ class CommissionProductLogic extends BaseLogic
|
|||||||
*/
|
*/
|
||||||
function calculate_product_flow($find, $order, $village_uid = 0, $brigade_uid = 0, $user_ship = 0, $spread_user_ship = 0)
|
function calculate_product_flow($find, $order, $village_uid = 0, $brigade_uid = 0, $user_ship = 0, $spread_user_ship = 0)
|
||||||
{
|
{
|
||||||
|
if(isset($order['source']) && $order['source'] == 2){
|
||||||
|
$product = StoreBranchProduct::where('product_id', $find['product_id'])->where('store_id', $order['store_id'])->find();
|
||||||
|
}else{
|
||||||
$product = StoreProduct::where('id', $find['product_id'])->find();
|
$product = StoreProduct::where('id', $find['product_id'])->find();
|
||||||
|
}
|
||||||
if ($product) {
|
if ($product) {
|
||||||
//活动商品
|
//活动商品
|
||||||
if ($product['product_type'] == 4) {
|
if ($product['product_type'] == 4) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user