commit
7dd46d13a5
@ -62,7 +62,18 @@ class StoreExtractController extends BaseAdminController
|
|||||||
}
|
}
|
||||||
return $this->fail(StoreExtractLogic::getError());
|
return $this->fail(StoreExtractLogic::getError());
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @notes 确认提现
|
||||||
|
* @return \think\response\Json
|
||||||
|
* @author admin
|
||||||
|
* @date 2024/05/31 17:09
|
||||||
|
*/
|
||||||
|
public function enter()
|
||||||
|
{
|
||||||
|
$params = $this->request->post();
|
||||||
|
$result = StoreExtractLogic::Enter($params);
|
||||||
|
return $this->success('提现成功', [], 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notes 删除门店提现
|
* @notes 删除门店提现
|
||||||
|
@ -81,7 +81,6 @@ class UserController extends BaseAdminController
|
|||||||
$res['page_no'] = $params['page_no'];
|
$res['page_no'] = $params['page_no'];
|
||||||
$res['page_size'] = $params['page_size'];
|
$res['page_size'] = $params['page_size'];
|
||||||
return $this->success('ok', $res);
|
return $this->success('ok', $res);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -91,7 +90,6 @@ class UserController extends BaseAdminController
|
|||||||
public function userSing()
|
public function userSing()
|
||||||
{
|
{
|
||||||
return $this->dataLists(new UserSignLogLists());
|
return $this->dataLists(new UserSignLogLists());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -113,4 +111,18 @@ class UserController extends BaseAdminController
|
|||||||
return $this->success('ok', $res);
|
return $this->success('ok', $res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//设置采购款
|
||||||
|
public function setPurchaseFunds()
|
||||||
|
{
|
||||||
|
$params = $this->request->post();
|
||||||
|
$res = UserLogic::PurchaseFunds($params);
|
||||||
|
return $this->success( '设置成功',[],1,1);
|
||||||
|
}
|
||||||
|
//设置余额
|
||||||
|
public function setnowMoney()
|
||||||
|
{
|
||||||
|
$params = $this->request->post();
|
||||||
|
$res = UserLogic::nowMoney($params);
|
||||||
|
return $this->success( '设置成功',[],1,1);
|
||||||
|
}
|
||||||
}
|
}
|
@ -71,7 +71,7 @@ class BeforehandOrderCartInfoLists extends BaseAdminDataLists implements ListsSe
|
|||||||
}
|
}
|
||||||
|
|
||||||
$list = BeforehandOrderCartInfo::where($this->searchWhere)
|
$list = BeforehandOrderCartInfo::where($this->searchWhere)
|
||||||
->field(['id', 'bhoid', 'uid', 'is_buyer', 'buyer_uid', 'product_id', 'attr_value_id', 'purchase', 'price', 'total_price', 'cart_num', 'mark'])
|
->field(['id', 'bhoid','package','store_info','marques','gross_weight','net_weight','accept_num','after_sales','loss', 'uid', 'is_buyer', 'buyer_uid', 'product_id', 'attr_value_id', 'purchase', 'price', 'total_price', 'cart_num', 'mark'])
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()->each(function ($item) use($system_store,$order_mark) {
|
->select()->each(function ($item) use($system_store,$order_mark) {
|
||||||
@ -140,12 +140,18 @@ class BeforehandOrderCartInfoLists extends BaseAdminDataLists implements ListsSe
|
|||||||
'bhoid' => '订单id',
|
'bhoid' => '订单id',
|
||||||
'store_name' => '商品名称',
|
'store_name' => '商品名称',
|
||||||
'system_store' => '门店',
|
'system_store' => '门店',
|
||||||
'warehouse_stock' => '仓库数量',
|
'marques' => '型号',
|
||||||
'cart_num' => '需求数量',
|
'package' => '包装',
|
||||||
'top_cate_name' => '分类',
|
'top_cate_name' => '分类',
|
||||||
'unit_name' => '单位',
|
'unit_name' => '单位',
|
||||||
|
'gross_weight' => '毛重',
|
||||||
|
'net_weight' => '净重',
|
||||||
|
'warehouse_stock' => '仓库数量',
|
||||||
|
'cart_num' => '需求数量',
|
||||||
'price' => '单价',
|
'price' => '单价',
|
||||||
'total_price' => '总价',
|
'total_price' => '总价',
|
||||||
|
'after_sales' => '售后',
|
||||||
|
'loss' => '损耗',
|
||||||
'mark' => '备注',
|
'mark' => '备注',
|
||||||
'order_mark' => '订单备注',
|
'order_mark' => '订单备注',
|
||||||
|
|
||||||
|
@ -66,6 +66,8 @@ class StoreExtractLists extends BaseAdminDataLists implements ListsSearchInterfa
|
|||||||
$item->id_card=$find['id_card'];
|
$item->id_card=$find['id_card'];
|
||||||
$item->openid=$openid;
|
$item->openid=$openid;
|
||||||
}
|
}
|
||||||
|
$item->status_name=$item->status==1?"通过":"审核中";
|
||||||
|
$item->pay_status_name=$item->pay_status==1?"已转账":"未转账";
|
||||||
})
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ class StoreFinanceFlowLists extends BaseAdminDataLists implements ListsSearchInt
|
|||||||
public function setSearch(): array
|
public function setSearch(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'=' => ['store_id', 'user_id', 'create_time', 'staff_id','financial_type','financial_pm','order_id'],
|
'=' => ['store_id', 'user_id', 'create_time', 'staff_id','financial_type','financial_pm','order_id','order_sn'],
|
||||||
'between_time' => 'create_time',
|
'between_time' => 'create_time',
|
||||||
'%pipe_like%' => ['keyword' => 'order_sn'],
|
'%pipe_like%' => ['keyword' => 'order_sn'],
|
||||||
];
|
];
|
||||||
|
@ -11,6 +11,8 @@ use app\common\model\store_product\StoreProduct;
|
|||||||
use app\common\model\system_store\SystemStore;
|
use app\common\model\system_store\SystemStore;
|
||||||
use app\common\model\warehouse\Warehouse;
|
use app\common\model\warehouse\Warehouse;
|
||||||
use app\common\lists\ListsExcelInterface;
|
use app\common\lists\ListsExcelInterface;
|
||||||
|
use app\common\model\store_category\StoreCategory;
|
||||||
|
use app\common\model\store_product_unit\StoreProductUnit;
|
||||||
use app\common\model\supplier\Supplier;
|
use app\common\model\supplier\Supplier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -78,6 +80,9 @@ class WarehouseProductLists extends BaseAdminDataLists implements ListsSearchInt
|
|||||||
$item->store_name = '';
|
$item->store_name = '';
|
||||||
$item->image = '';
|
$item->image = '';
|
||||||
$item->price = '';
|
$item->price = '';
|
||||||
|
$item->unit_name = '';
|
||||||
|
$item->store_info = '';
|
||||||
|
$item->top_cate_name = '';
|
||||||
if ($item->financial_pm == 0) {
|
if ($item->financial_pm == 0) {
|
||||||
$item->financial_pm_name = '出库';
|
$item->financial_pm_name = '出库';
|
||||||
} else {
|
} else {
|
||||||
@ -101,11 +106,14 @@ class WarehouseProductLists extends BaseAdminDataLists implements ListsSearchInt
|
|||||||
$item->admin_name = '';
|
$item->admin_name = '';
|
||||||
}
|
}
|
||||||
if ($item->product_id) {
|
if ($item->product_id) {
|
||||||
$find = StoreProduct::where('id', $item->product_id)->field('price,image,store_name')->find();
|
$find = StoreProduct::where('id', $item->product_id)->field('price,image,store_name,unit,store_info,top_cate_id')->withTrashed()->find();
|
||||||
if($find){
|
if($find){
|
||||||
$item->store_name = $find->store_name . '|' . $item->product_id;
|
$item->store_name = $find->store_name . '|' . $item->product_id;
|
||||||
$item->image = $find->image;
|
$item->image = $find->image;
|
||||||
$item->price = $find->price;
|
$item->price = $find->price;
|
||||||
|
$item->unit_name = StoreProductUnit::where('id', $find->unit)->value('name');
|
||||||
|
$item->store_info =$find->store_info;
|
||||||
|
$item->top_cate_name =StoreCategory::where('id', $find->top_cate_id)->value('name');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($item->warehouse_id) {
|
if ($item->warehouse_id) {
|
||||||
@ -182,12 +190,18 @@ class WarehouseProductLists extends BaseAdminDataLists implements ListsSearchInt
|
|||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
$data = [
|
$data = [
|
||||||
|
'id' => 'id',
|
||||||
'admin_name' => '操作人员',
|
'admin_name' => '操作人员',
|
||||||
'warehouse_name' => '仓库',
|
'warehouse_name' => '仓库',
|
||||||
'store_name' => '商品名称',
|
'store_name' => '商品名称',
|
||||||
|
'top_cate_name' => '分类',
|
||||||
|
'store_info' => '规格',
|
||||||
|
'unit_name' => '单位',
|
||||||
'financial_pm_name' => '出入库',
|
'financial_pm_name' => '出入库',
|
||||||
'system_store_name' => '门店',
|
'system_store_name' => '门店',
|
||||||
'nums' => '数量',
|
'nums' => '数量',
|
||||||
|
'purchase' => '价格',
|
||||||
|
'total_price' => '总价',
|
||||||
'create_time' => '操作时间',
|
'create_time' => '操作时间',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -55,11 +55,24 @@ class BeforehandOrderLogic extends BaseLogic
|
|||||||
$total_price = 0;
|
$total_price = 0;
|
||||||
$uid = $params['uid'] ?? 0;
|
$uid = $params['uid'] ?? 0;
|
||||||
foreach ($params['product_arr'] as $k => $v) {
|
foreach ($params['product_arr'] as $k => $v) {
|
||||||
|
if($v['product_id']<=0){
|
||||||
|
unset($params['product_arr'][$k]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$datas[$k]['purchase'] = $v['purchase'];
|
||||||
$datas[$k]['mark'] = $v['mark'] ?? '';
|
$datas[$k]['mark'] = $v['mark'] ?? '';
|
||||||
$datas[$k]['product_id'] = $v['product_id'];
|
$datas[$k]['product_id'] = $v['product_id'];
|
||||||
$datas[$k]['uid'] = $uid;
|
$datas[$k]['uid'] = $uid;
|
||||||
|
$datas[$k]['marques'] = $v['marques'];
|
||||||
|
$datas[$k]['store_info'] = $v['store_info'];
|
||||||
|
$datas[$k]['after_sales'] = $v['after_sales'];
|
||||||
|
$datas[$k]['loss'] = $v['loss'];
|
||||||
|
$datas[$k]['unit'] = $v['unit'];
|
||||||
|
$datas[$k]['gross_weight'] = $v['gross_weight'];
|
||||||
|
$datas[$k]['net_weight'] = $v['net_weight'];
|
||||||
$datas[$k]['cart_num'] = $v['nums'];
|
$datas[$k]['cart_num'] = $v['nums'];
|
||||||
$datas[$k]['price'] = $v['purchase'];
|
$datas[$k]['price'] = $v['price'];
|
||||||
|
$datas[$k]['package'] = $v['package'];
|
||||||
$datas[$k]['total_price'] = $v['total_price'];
|
$datas[$k]['total_price'] = $v['total_price'];
|
||||||
$datas[$k]['create_time'] = time();
|
$datas[$k]['create_time'] = time();
|
||||||
$datas[$k]['update_time'] = time();
|
$datas[$k]['update_time'] = time();
|
||||||
@ -84,9 +97,22 @@ class BeforehandOrderLogic extends BaseLogic
|
|||||||
'arrival_time' => strtotime($params['arrival_time']),
|
'arrival_time' => strtotime($params['arrival_time']),
|
||||||
'order_type' => $order_type
|
'order_type' => $order_type
|
||||||
]);
|
]);
|
||||||
|
$product_arr=[];
|
||||||
foreach ($datas as $k => $v) {
|
foreach ($datas as $k => $v) {
|
||||||
$datas[$k]['bhoid'] = $order['id'];
|
$datas[$k]['bhoid'] = $order['id'];
|
||||||
|
|
||||||
|
$data['id']=$v['product_id'];
|
||||||
|
$data['marques']=$v['marques'];
|
||||||
|
$data['store_info']=$v['store_info'];
|
||||||
|
$data['after_sales']=$v['after_sales'];
|
||||||
|
$data['package']=$v['package'];
|
||||||
|
$data['loss']=$v['loss'];
|
||||||
|
$data['gross_weight']=$v['gross_weight'];
|
||||||
|
$data['net_weight']=$v['net_weight'];
|
||||||
|
$data['mark']=$v['mark'];
|
||||||
|
$product_arr[]=$data;
|
||||||
}
|
}
|
||||||
|
(new StoreProduct())->saveAll($product_arr);
|
||||||
(new BeforehandOrderCartInfo())->saveAll($datas);
|
(new BeforehandOrderCartInfo())->saveAll($datas);
|
||||||
Db::commit();
|
Db::commit();
|
||||||
return true;
|
return true;
|
||||||
@ -335,7 +361,7 @@ class BeforehandOrderLogic extends BaseLogic
|
|||||||
'admin_id' => $admin_id,
|
'admin_id' => $admin_id,
|
||||||
'total_price' => $arr['total_price'],
|
'total_price' => $arr['total_price'],
|
||||||
'price' => $arr['price'],
|
'price' => $arr['price'],
|
||||||
'purchase' => $arr['price'],
|
'purchase' => $arr['purchase'],
|
||||||
'oid' => $res['id'],
|
'oid' => $res['id'],
|
||||||
'code' => $res['code'],
|
'code' => $res['code'],
|
||||||
];
|
];
|
||||||
|
@ -40,6 +40,25 @@ class StoreExtractLogic extends BaseLogic
|
|||||||
throw new BusinessException($e->getMessage());
|
throw new BusinessException($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @notes 确认提现
|
||||||
|
* @param array $params
|
||||||
|
* @return bool
|
||||||
|
* @author admin
|
||||||
|
* @date 2024/05/31 17:09
|
||||||
|
*/
|
||||||
|
public static function Enter(array $params): bool
|
||||||
|
{
|
||||||
|
Db::startTrans();
|
||||||
|
try {
|
||||||
|
StoreExtract::update(['status'=>1,'pay_status'=>1],['id'=>$params['id']]);
|
||||||
|
Db::commit();
|
||||||
|
return true;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
Db::rollback();
|
||||||
|
throw new BusinessException($e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -11,6 +11,7 @@ use app\common\model\store_branch_product_exchange\StoreBranchProductExchange;
|
|||||||
use app\common\model\store_category\StoreCategory;
|
use app\common\model\store_category\StoreCategory;
|
||||||
use app\common\model\store_product_attr_value\StoreProductAttrValue;
|
use app\common\model\store_product_attr_value\StoreProductAttrValue;
|
||||||
use app\common\model\store_product_cate\StoreProductCate;
|
use app\common\model\store_product_cate\StoreProductCate;
|
||||||
|
use app\common\model\store_product_unit\StoreProductUnit;
|
||||||
use app\common\model\system_store\SystemStore;
|
use app\common\model\system_store\SystemStore;
|
||||||
use app\common\model\system_store_storage\SystemStoreStorage;
|
use app\common\model\system_store_storage\SystemStoreStorage;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
@ -288,18 +289,10 @@ class StoreProductLogic extends BaseLogic
|
|||||||
public static function detail($params): array
|
public static function detail($params): array
|
||||||
{
|
{
|
||||||
$data = StoreProduct::where('id', $params['id'])->findOrEmpty()->toArray();
|
$data = StoreProduct::where('id', $params['id'])->findOrEmpty()->toArray();
|
||||||
if ($data) {
|
if(empty($data)){
|
||||||
$data['cate_arr'] = [];
|
throw new BusinessException('商品不存在');
|
||||||
$id_1 = StoreCategory::where('id', $data['cate_id'])->value('pid');
|
|
||||||
if ($id_1) {
|
|
||||||
$id_2 = StoreCategory::where('id', $id_1)->value('pid');
|
|
||||||
if ($id_2 == 0) {
|
|
||||||
$data['cate_arr'] = [$id_1, $data['cate_id']];
|
|
||||||
} else {
|
|
||||||
$data['cate_arr'] = [$id_2, $id_1, $data['cate_id']];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
$data['unit_name']=StoreProductUnit::where('id', $data['unit'])->value('name');
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ use app\common\enum\OrderEnum;
|
|||||||
use app\common\enum\user\UserTerminalEnum;
|
use app\common\enum\user\UserTerminalEnum;
|
||||||
use app\common\enum\YesNoEnum;
|
use app\common\enum\YesNoEnum;
|
||||||
use app\common\logic\BaseLogic;
|
use app\common\logic\BaseLogic;
|
||||||
|
use app\common\logic\CapitalFlowLogic;
|
||||||
use app\common\model\finance\CapitalFlow;
|
use app\common\model\finance\CapitalFlow;
|
||||||
use app\common\model\store_finance_flow\StoreFinanceFlow;
|
use app\common\model\store_finance_flow\StoreFinanceFlow;
|
||||||
use app\common\model\store_order\StoreOrder;
|
use app\common\model\store_order\StoreOrder;
|
||||||
@ -188,8 +189,21 @@ class UserLogic extends BaseLogic
|
|||||||
public static function detail(int $userId): array
|
public static function detail(int $userId): array
|
||||||
{
|
{
|
||||||
$field = [
|
$field = [
|
||||||
'id', 'account', 'nickname', 'avatar', 'real_name','integral','label_id','user_ship',
|
'id',
|
||||||
'sex', 'mobile', 'create_time', 'login_time', 'channel','now_money','purchase_funds'
|
'account',
|
||||||
|
'nickname',
|
||||||
|
'avatar',
|
||||||
|
'real_name',
|
||||||
|
'integral',
|
||||||
|
'label_id',
|
||||||
|
'user_ship',
|
||||||
|
'sex',
|
||||||
|
'mobile',
|
||||||
|
'create_time',
|
||||||
|
'login_time',
|
||||||
|
'channel',
|
||||||
|
'now_money',
|
||||||
|
'purchase_funds'
|
||||||
];
|
];
|
||||||
|
|
||||||
$user = User::where(['id' => $userId])->field($field)
|
$user = User::where(['id' => $userId])->field($field)
|
||||||
@ -218,6 +232,56 @@ class UserLogic extends BaseLogic
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新采购款
|
||||||
|
*/
|
||||||
|
public static function PurchaseFunds(array $params)
|
||||||
|
{
|
||||||
|
$find = User::where(['id' => $params['id']])->find();
|
||||||
|
Db::startTrans();
|
||||||
|
try {
|
||||||
|
$capitalFlowDao = new CapitalFlowLogic($find, 'user');
|
||||||
|
if ($params['type'] == 1) {
|
||||||
|
$capitalFlowDao->userIncome('system_purchase_add', 'system', 0, $params['purchase_funds'],'',1);
|
||||||
|
$find->purchase_funds = bcadd($params['purchase_funds'], $find['purchase_funds'], 2);
|
||||||
|
$find->save();
|
||||||
|
} else {
|
||||||
|
$capitalFlowDao->userExpense('system_purchase_dec', 'system', 0, $params['purchase_funds']);
|
||||||
|
$find->purchase_funds = bcsub($params['purchase_funds'], $find['purchase_funds'], 2);
|
||||||
|
$find->save();
|
||||||
|
}
|
||||||
|
Db::commit();
|
||||||
|
return true;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
Db::rollback();
|
||||||
|
throw new BusinessException($e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 更新余额
|
||||||
|
*/
|
||||||
|
public static function nowMoney(array $params)
|
||||||
|
{
|
||||||
|
$find = User::where(['id' => $params['id']])->find();
|
||||||
|
Db::startTrans();
|
||||||
|
try {
|
||||||
|
$capitalFlowDao = new CapitalFlowLogic($find, 'user');
|
||||||
|
if ($params['type'] == 1) {
|
||||||
|
$capitalFlowDao->userIncome('system_balance_add', 'system', 0, $params['now_money'],);
|
||||||
|
$find->now_money = bcadd($params['now_money'], $find['now_money'], 2);
|
||||||
|
$find->save();
|
||||||
|
} else {
|
||||||
|
$capitalFlowDao->userExpense('system_balance_reduce', 'system', 0, $params['now_money']);
|
||||||
|
$find->now_money = bcsub($params['now_money'], $find['now_money'], 2);
|
||||||
|
$find->save();
|
||||||
|
}
|
||||||
|
Db::commit();
|
||||||
|
return true;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
Db::rollback();
|
||||||
|
throw new BusinessException($e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
public static function dealDetails($params)
|
public static function dealDetails($params)
|
||||||
{
|
{
|
||||||
switch ($params['type']) {
|
switch ($params['type']) {
|
||||||
@ -289,8 +353,6 @@ class UserLogic extends BaseLogic
|
|||||||
'lists' => $data,
|
'lists' => $data,
|
||||||
'count' => $count
|
'count' => $count
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function giftList($uid, $params)
|
public static function giftList($uid, $params)
|
||||||
@ -304,7 +366,6 @@ class UserLogic extends BaseLogic
|
|||||||
'lists' => $list,
|
'lists' => $list,
|
||||||
'count' => $count
|
'count' => $count
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function dealTitleCate($pay_type)
|
public static function dealTitleCate($pay_type)
|
||||||
|
@ -154,8 +154,9 @@ class WarehouseProductLogic extends BaseLogic
|
|||||||
'nums' => $params['nums'],
|
'nums' => $params['nums'],
|
||||||
'before_nums' => $storege['nums'],
|
'before_nums' => $storege['nums'],
|
||||||
'after_nums' => $after_nums,
|
'after_nums' => $after_nums,
|
||||||
'purchase' => $params['purchase'] ?? '',
|
'price' => $params['price'] ?? 0,
|
||||||
'total_price' => $params['total_price'] ?? '',
|
'purchase' => $params['purchase'] ?? 0,
|
||||||
|
'total_price' => $params['total_price'] ?? 0,
|
||||||
'admin_id' => $params['admin_id'],
|
'admin_id' => $params['admin_id'],
|
||||||
'code' => $params['code'] ?? '',
|
'code' => $params['code'] ?? '',
|
||||||
'status' => 1,
|
'status' => 1,
|
||||||
|
@ -80,8 +80,8 @@ class CapitalFlowLogic extends BaseLogic
|
|||||||
$model->before_balance = bcadd($this->user['now_money'], $amount, 2);
|
$model->before_balance = bcadd($this->user['now_money'], $amount, 2);
|
||||||
$model->balance = $this->user['now_money'];
|
$model->balance = $this->user['now_money'];
|
||||||
} else {
|
} else {
|
||||||
$model->before_balance = $this->user['now_money'];
|
$model->before_balance = $this->user['purchase_funds'];
|
||||||
$model->balance = $this->user['now_money'];
|
$model->balance = bcsub($this->user['purchase_funds'], $amount, 2);
|
||||||
}
|
}
|
||||||
$model->create_time = date('Y-m-d H:i:s');
|
$model->create_time = date('Y-m-d H:i:s');
|
||||||
$model->type = 'out';
|
$model->type = 'out';
|
||||||
@ -176,6 +176,8 @@ class CapitalFlowLogic extends BaseLogic
|
|||||||
return "系统增加余额{$amount}元";
|
return "系统增加余额{$amount}元";
|
||||||
case 'system_purchase_add':
|
case 'system_purchase_add':
|
||||||
return "系统增加采购款{$amount}元";
|
return "系统增加采购款{$amount}元";
|
||||||
|
case 'system_purchase_dec':
|
||||||
|
return "系统减少采购款{$amount}元";
|
||||||
case 'system_balance_reduce':
|
case 'system_balance_reduce':
|
||||||
return "系统减少余额{$amount}元";
|
return "系统减少余额{$amount}元";
|
||||||
case 'user_balance_recharge_refund':
|
case 'user_balance_recharge_refund':
|
||||||
|
@ -6,4 +6,6 @@ namespace app\common\model;
|
|||||||
|
|
||||||
class OperationLog extends BaseModel
|
class OperationLog extends BaseModel
|
||||||
{
|
{
|
||||||
|
// protected $json = ['params'];
|
||||||
|
|
||||||
}
|
}
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user