commit
fae9e71d3c
@ -41,9 +41,6 @@ class ProductAttrDao extends BaseDao
|
|||||||
*/
|
*/
|
||||||
public function insert(array $data)
|
public function insert(array $data)
|
||||||
{
|
{
|
||||||
foreach ($data as &$item) {
|
|
||||||
$item['profit_rate'] = bcdiv(bcsub($item['price'], $item['procure_price'], 2), $item['price'], 2) * 100;
|
|
||||||
}
|
|
||||||
return ($this->getModel()::getDB())->insertAll($data);
|
return ($this->getModel()::getDB())->insertAll($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ class MerchantIntentionRepository extends BaseRepository
|
|||||||
if ($intention['type'] == 2) {
|
if ($intention['type'] == 2) {
|
||||||
$merId = MerchantIntention::where('uid', $intention['uid'])->where('status', 1)->value('mer_id');
|
$merId = MerchantIntention::where('uid', $intention['uid'])->where('status', 1)->value('mer_id');
|
||||||
if (!empty($merId)) {
|
if (!empty($merId)) {
|
||||||
Merchant::where('mer_id', $merId)->update(['business_status' => 2]);
|
Merchant::where('mer_id', $merId)->update(['business_status' => 2, 'mer_settlement_agree_status' => 1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!empty($smsData)) {
|
if (!empty($smsData)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user