1
This commit is contained in:
parent
b6e2ec9472
commit
e89d39b955
@ -143,8 +143,9 @@ class MallController extends BaseAuthedController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$goodsDto = Mall::toDto($goodsDb);
|
$goodsDto = Mall::toDto($goodsDb);
|
||||||
if ($goodsDto['']) {
|
if ($goodsDto['cancel_countdown'] != 0) {
|
||||||
|
myself()->_rspErr(1, 'cant cancel');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
Mall::cancel($goodsDto['goods_uuid']);
|
Mall::cancel($goodsDto['goods_uuid']);
|
||||||
myself()->_rspOk();
|
myself()->_rspOk();
|
||||||
@ -159,11 +160,12 @@ class MallController extends BaseAuthedController {
|
|||||||
myself()->_rspErr(1, 'goods not found');
|
myself()->_rspErr(1, 'goods not found');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($goodsDb['seller'] != myself()->_getAccountId()) {
|
$goodsDto = Mall::toDto($goodsDb);
|
||||||
myself()->_rspErr(1, 'goods not found');
|
if ($goodsDto['modify_countdown'] != 0) {
|
||||||
|
myself()->_rspErr(1, 'cant modify price');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Mall::modifyPrice($goodsDb['goods_uuid'], $price);
|
Mall::modifyPrice($goodsDto['goods_uuid'], $price);
|
||||||
$this->_rspOk();
|
$this->_rspOk();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ class Mall extends BaseModel {
|
|||||||
'item_num' => $itemNum,
|
'item_num' => $itemNum,
|
||||||
'currency' => $currency,
|
'currency' => $currency,
|
||||||
'price' => $price,
|
'price' => $price,
|
||||||
|
'last_modify_price_time' => myself()->_getNowTime(),
|
||||||
'createtime' => myself()->_getNowTime(),
|
'createtime' => myself()->_getNowTime(),
|
||||||
'modifytime' => myself()->_getNowTime(),
|
'modifytime' => myself()->_getNowTime(),
|
||||||
));
|
));
|
||||||
@ -63,7 +64,8 @@ class Mall extends BaseModel {
|
|||||||
'goods_uuid' => $goodsUuid
|
'goods_uuid' => $goodsUuid
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'price' => $price
|
'price' => $price,
|
||||||
|
'last_modify_price_time' => myself()->_getNowTime(),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user