diff --git a/app/common/dao/user/UserDao.php b/app/common/dao/user/UserDao.php index 89df3f3..23d9111 100644 --- a/app/common/dao/user/UserDao.php +++ b/app/common/dao/user/UserDao.php @@ -85,6 +85,8 @@ class UserDao extends BaseDao }); })->when(isset($where['status']) && $where['status'] !== '', function (BaseQuery $query) use ($where) { return $query->where('User.status', intval($where['status'])); + })->when(isset($where['mer_id']) && $where['mer_id'] !== '', function (BaseQuery $query) use ($where) { + return $query->where('User.mer_id', intval($where['mer_id'])); })->when(isset($where['group_id']) && $where['group_id'], function (BaseQuery $query) use ($where) { return $query->where('User.group_id', intval($where['group_id'])); })->when(isset($where['brokerage_level']) && $where['brokerage_level'], function (BaseQuery $query) use ($where) { diff --git a/app/common/repositories/user/UserAssetsLogRepository.php b/app/common/repositories/user/UserAssetsLogRepository.php index d1607be..741255e 100644 --- a/app/common/repositories/user/UserAssetsLogRepository.php +++ b/app/common/repositories/user/UserAssetsLogRepository.php @@ -197,6 +197,7 @@ class UserAssetsLogRepository extends BaseRepository $welfare = $consume = $huitong = $contribution = 0; $consume = round($orderItem['total_price'] * $orderItem['commission_rate'] / 100, 2); $consume = $this->_getValue($consume); + Log::info("+++++++++++++merchantAndPlatformAssets uid is ".$user['uid']); $logList[] = array( 'uid' => $user['uid'], 'asset_type' => self::ASSET_TYPE_CONSUME, @@ -749,6 +750,9 @@ class UserAssetsLogRepository extends BaseRepository foreach ($data as $item) { $item['type'] = $changeType[$item['type']] ?? '未知'; $item['asset_type'] = $assetsType[$item['asset_type']] ?? '未知'; + if($item['status'] == self::STATUS_REFUND){ + $item['type'] .= '(已退款)'; + } if($item['count'] > 0){ $item['count'] = "+".$item['count']; } diff --git a/app/controller/admin/system/merchant/Merchant.php b/app/controller/admin/system/merchant/Merchant.php index f50d122..799c18f 100644 --- a/app/controller/admin/system/merchant/Merchant.php +++ b/app/controller/admin/system/merchant/Merchant.php @@ -31,6 +31,7 @@ use think\App; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; use think\db\exception\ModelNotFoundException; +use think\facade\Log; use think\facade\Queue; /** @@ -153,7 +154,7 @@ class Merchant extends BaseController return app('json')->fail('请输入正确的手机号'); if (!$data['category_id'] || !$merchantCategoryRepository->exists($data['category_id'])) return app('json')->fail('商户分类不存在'); - + Log::info("+++++++++++merchant-update ". json_encode($data)); unset($data['mer_account'], $data['mer_password']); $margin = $this->repository->checkMargin($id, $data['type_id']); $data['margin'] = $margin['margin']; diff --git a/app/controller/admin/user/User.php b/app/controller/admin/user/User.php index dad0cd0..632272a 100644 --- a/app/controller/admin/user/User.php +++ b/app/controller/admin/user/User.php @@ -269,7 +269,7 @@ class User extends BaseController $where[] = array('create_time','between',[date('Y-m-d', strtotime($date[0])),date('Y-m-d', strtotime($date[1]) +86400)]); } if($user) $where[] = array('uid','=',$user['uid']); - $where[] = array('status','in',[UserAssetsLogRepository::STATUS_FROZEN, UserAssetsLogRepository::STATUS_SUCCESS, UserAssetsLogRepository::STATUS_USED]); + $where[] = array('status','in',[UserAssetsLogRepository::STATUS_FROZEN, UserAssetsLogRepository::STATUS_SUCCESS, UserAssetsLogRepository::STATUS_USED, UserAssetsLogRepository::STATUS_REFUND]); return app('json')->success(app(UserAssetsLogRepository::class)->list(0, $where, $page, $limit)); } diff --git a/app/controller/api/user/User.php b/app/controller/api/user/User.php index 9abd585..52c5bfc 100644 --- a/app/controller/api/user/User.php +++ b/app/controller/api/user/User.php @@ -59,7 +59,7 @@ class User extends BaseController $where = array(); $where[] = array('asset_type','=',$asset_type); if($change_type) $where[] = array('type','=',$change_type); - $where[] = array('status','in',[UserAssetsLogRepository::STATUS_FROZEN, UserAssetsLogRepository::STATUS_SUCCESS, UserAssetsLogRepository::STATUS_USED]); + $where[] = array('status','in',[UserAssetsLogRepository::STATUS_FROZEN, UserAssetsLogRepository::STATUS_SUCCESS, UserAssetsLogRepository::STATUS_USED, UserAssetsLogRepository::STATUS_REFUND]); return app('json')->success(app(UserAssetsLogRepository::class)->list($uid, $where, $page, $limit)); } diff --git a/app/validate/admin/MerchantValidate.php b/app/validate/admin/MerchantValidate.php index f24d74a..3a70025 100644 --- a/app/validate/admin/MerchantValidate.php +++ b/app/validate/admin/MerchantValidate.php @@ -50,7 +50,8 @@ class MerchantValidate extends Validate 'is_bro_goods|直播商品状态' => 'require|in:0,1', 'is_bro_room|直播间状态' => 'require|in:0,1', 'is_trader|自营状态' => 'require|in:0,1', - 'commission_rate|提成比例' => '>=:0' + 'commission_rate|提成比例' => '>=:0', + 'district_id|所属区域' =>'>=:0' ]; /**