feat: 更新 UserRewardDao 类,优化转账备注为可翻译字符串
This commit is contained in:
parent
73b731ed88
commit
59e0342781
|
@ -66,6 +66,12 @@ class UserRewardDao
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*转账函数
|
*转账函数
|
||||||
|
*
|
||||||
|
* @param [type] $userid
|
||||||
|
* @param [type] $status
|
||||||
|
* @param [type] $money
|
||||||
|
* @param [type] $memo 备注
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function base($userid, $status, $money, $memo)
|
public static function base($userid, $status, $money, $memo)
|
||||||
{
|
{
|
||||||
|
@ -78,7 +84,7 @@ class UserRewardDao
|
||||||
$UserReward->money = $money;
|
$UserReward->money = $money;
|
||||||
$UserReward->before = $user->money;
|
$UserReward->before = $user->money;
|
||||||
$UserReward->after = $user->money + $money;
|
$UserReward->after = $user->money + $money;
|
||||||
$UserReward->memo = $memo;
|
$UserReward->memo = trans($memo);
|
||||||
$UserReward->createtime2 = date('Y-m-d H:i:s');
|
$UserReward->createtime2 = date('Y-m-d H:i:s');
|
||||||
$user->money = $UserReward->after;
|
$user->money = $UserReward->after;
|
||||||
$user->save();
|
$user->save();
|
||||||
|
@ -98,8 +104,7 @@ class UserRewardDao
|
||||||
$UserReward->money = $money;
|
$UserReward->money = $money;
|
||||||
$UserReward->before = $user->money;
|
$UserReward->before = $user->money;
|
||||||
$UserReward->after = $user->money + $money;
|
$UserReward->after = $user->money + $money;
|
||||||
$UserReward->memo = $memo;
|
$UserReward->memo = trans($memo);
|
||||||
$UserReward->memo = $memo;
|
|
||||||
$UserReward->createtime2 = date('Y-m-d H:i:s');
|
$UserReward->createtime2 = date('Y-m-d H:i:s');
|
||||||
$UserReward->phone = $phone;
|
$UserReward->phone = $phone;
|
||||||
$user->money = $UserReward->after;
|
$user->money = $UserReward->after;
|
||||||
|
|
Loading…
Reference in New Issue