更新
This commit is contained in:
parent
f86ebc29a2
commit
d2ece017df
app
common
dao/store/order
model/store/order
repositories/store/order
controller/api
@ -206,7 +206,7 @@ class StoreOrderOtherDao extends BaseDao
|
||||
$query->where('order_sn', 'like', '%' . $where['order_search'] . '%')->whereOr('user_phone', $where['order_search']);
|
||||
})
|
||||
->when(isset($where['group_order_sn']) && $where['group_order_sn'] !== '', function ($query) use ($where) {
|
||||
$query->join('StoreGroupOrder GO', 'StoreOrderOther.group_order_id = GStoreOrderOther.group_order_id')->where('group_order_sn', $where['group_order_sn']);
|
||||
$query->join('StoreGroupOrder GO', 'StoreOrderOther.group_order_id = GO.group_order_id')->where('group_order_sn', $where['group_order_sn']);
|
||||
})
|
||||
->when(isset($where['keywords']) && $where['keywords'] !== '', function ($query) use ($where) {
|
||||
$query->where(function ($query) use ($where) {
|
||||
|
@ -20,6 +20,7 @@ use app\common\model\store\product\ProductGroupUser;
|
||||
use app\common\model\store\service\StoreService;
|
||||
use app\common\model\store\shipping\Express;
|
||||
use app\common\model\system\merchant\Merchant;
|
||||
use app\common\model\system\merchant\MerchantIntention;
|
||||
use app\common\model\user\User;
|
||||
use app\common\repositories\store\MerchantTakeRepository;
|
||||
|
||||
|
@ -1254,7 +1254,7 @@ class StoreOtherOrderRepository extends BaseRepository
|
||||
->with([
|
||||
'orderProduct',
|
||||
'merchant' => function ($query) {
|
||||
return $query->field('mer_id,mer_name,is_trader');
|
||||
return $query->field('mer_id,mer_name,is_trader,financial_bank');
|
||||
},
|
||||
'verifyService' => function ($query) {
|
||||
return $query->field('service_id,nickname');
|
||||
|
@ -1608,11 +1608,20 @@ class Auth extends BaseController
|
||||
'fail_msg' => $remark
|
||||
];
|
||||
Db::name('merchant_intention')->where('mer_intention_id', $id)->where('type', 2)->update($updData);
|
||||
$merId = Db::name('merchant_intention')->where('mer_intention_id', $id)->where('type', 2)->value('mer_id', 0);
|
||||
Db::name('merchant')->where('mer_id', $merId)->where('status', 1)->update(['business_status' => ($status == 1 ? 2 : 3)]);
|
||||
if ($status == 1) {
|
||||
Db::name('merchant')->where('mer_id', $merId)->update(['mer_settlement_agree_status' => 1]);
|
||||
$merchant_intention = Db::name('merchant_intention')->where('mer_intention_id', $id)->where('type', 2)->find();
|
||||
if($merchant_intention){
|
||||
if ($status == 1) {
|
||||
$datas['business_status']=2;
|
||||
$datas['mer_settlement_agree_status']=1;
|
||||
$datas['financial_bank']=json_encode(['name'=>$merchant_intention['bank_username'],
|
||||
'bank_code'=>$merchant_intention['bank_code'],'bank'=>$merchant_intention['bank_opening'],'bank_branch'=>""]);
|
||||
}else{
|
||||
$datas['business_status']=3;
|
||||
}
|
||||
Db::name('merchant')->where('mer_id', $merchant_intention['mer_id'])->where('status', 1)->update($datas);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return app('json')->success('同步成功');
|
||||
|
@ -319,7 +319,6 @@ class Merchant extends BaseController
|
||||
$_line = bcsub($merchant->mer_money, $extract_minimum_line, 2);
|
||||
$_extract = ($_line < 0) ? 0 : $_line;
|
||||
$merLockMoney = app()->make(UserBillRepository::class)->merchantLickMoney($merId);
|
||||
$merchant_intention= Db::name('merchant_intention')->where('mer_id',$merchant->mer_id)->find();
|
||||
$data = [
|
||||
'mer_id' => $merchant->mer_id, //商户id
|
||||
'mer_name' => $merchant->mer_name, //商户名称
|
||||
@ -329,9 +328,9 @@ class Merchant extends BaseController
|
||||
'extract_minimum_line' => $extract_minimum_line, //提现最低额度
|
||||
'extract_minimum_num' => $extract_minimum_num, //提现最低次数
|
||||
'extract_money' => $_extract, //可提现金额
|
||||
'financial_bank_bank' => $merchant_intention->bank_username ?? '', //银行账户姓名
|
||||
'financial_bank_opening' => $merchant_intention->bank_opening ?? '', //开户行
|
||||
'financial_bank_code' => $merchant_intention->bank_code ?? '', //银行账号
|
||||
'financial_bank_bank' => $merchant->financial_bank->name ?? '', //银行账户姓名
|
||||
'financial_bank_opening' => $merchant->financial_bank->bank ?? '', //开户行
|
||||
'financial_bank_code' => $merchant->financial_bank->bank_code ?? '', //银行账号
|
||||
'financial_type' => $merchant->financial_type, //提现方式
|
||||
'ot_margin' => $merchant->ot_margin, //提现方式
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user