|
@@ -29,7 +29,7 @@ class TeacLogin
|
|
|
*/
|
|
*/
|
|
|
public static function setCreateTrade(int $uid, float $price, int $stock, int $typeId, float $frozen)//:object
|
|
public static function setCreateTrade(int $uid, float $price, int $stock, int $typeId, float $frozen)//:object
|
|
|
{
|
|
{
|
|
|
- $rows = ProductTeac::where('user_id', $uid)->where('trade_id', $typeId)->where('price', $price)->where('status', ProductTeac::Normal)->find();
|
|
|
|
|
|
|
+ $rows = ProductTeac::where('user_id', $uid)->where('type_id', $typeId)->where('price', $price)->where('status', ProductTeac::Normal)->find();
|
|
|
$fee = config('teac_trade.'. self::$feeList[$typeId]);
|
|
$fee = config('teac_trade.'. self::$feeList[$typeId]);
|
|
|
if($rows) {
|
|
if($rows) {
|
|
|
$total_price = bcmul($price, $stock, 4);
|
|
$total_price = bcmul($price, $stock, 4);
|