还款日设置
This commit is contained in:
parent
2383d24c12
commit
6fb1da3141
@ -116,6 +116,7 @@ class Note extends Base
|
||||
$name = input("post.name");
|
||||
$cur_cash = input('post.cur_cash');
|
||||
$credit_cash = input('post.credit_cash');
|
||||
$return_date = input('post.return_date', 1);
|
||||
if ($id == 0){
|
||||
Db::startTrans();
|
||||
try {
|
||||
@ -124,6 +125,7 @@ class Note extends Base
|
||||
"cur_cash" => $cur_cash,
|
||||
'name' => $name,
|
||||
'credit_cash' => $credit_cash,
|
||||
"return_date" => $return_date,
|
||||
]);
|
||||
Db::name("note_credit_detail")->insert([
|
||||
"credit_id" => $id,
|
||||
@ -159,7 +161,7 @@ class Note extends Base
|
||||
}
|
||||
Db::name('note_credit')
|
||||
->where(["user_id" => $userId, "id" => $id])
|
||||
->update(compact('name', 'credit_cash'));
|
||||
->update(compact('name', 'credit_cash', 'return_date'));
|
||||
Db::commit();
|
||||
return WSTReturn("OK", 1);
|
||||
} catch (Exception $e) {
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
namespace wstmart\app\controller;
|
||||
use think\Db;
|
||||
use wstmart\app\model\Users as M;
|
||||
use wstmart\app\model\Favorites;
|
||||
use wstmart\app\model\Messages;
|
||||
@ -838,4 +839,23 @@ public function forgetPasss(){
|
||||
$m = new MUsers();
|
||||
return $m->getShareInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
* 注销
|
||||
*/
|
||||
public function unregister(){
|
||||
$m = new M();
|
||||
$userId = $this->getUserId();
|
||||
$user = $m->getById($userId);
|
||||
if (empty($user)) exit(jsonReturn('系统异常',0,[]));
|
||||
$opUser = input('post.op_user');
|
||||
// TODO: 记录操作人员名称
|
||||
// TODO: 验证规则
|
||||
Db::startTrans();
|
||||
$m->where('userId', '=', $userId)->update([
|
||||
'dataFlag'=>9,
|
||||
]);
|
||||
Db::rollback();
|
||||
exit(jsonReturn('成功',1,[]));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user