还款日设置
This commit is contained in:
parent
2383d24c12
commit
6fb1da3141
@ -116,6 +116,7 @@ class Note extends Base
|
|||||||
$name = input("post.name");
|
$name = input("post.name");
|
||||||
$cur_cash = input('post.cur_cash');
|
$cur_cash = input('post.cur_cash');
|
||||||
$credit_cash = input('post.credit_cash');
|
$credit_cash = input('post.credit_cash');
|
||||||
|
$return_date = input('post.return_date', 1);
|
||||||
if ($id == 0){
|
if ($id == 0){
|
||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
@ -124,6 +125,7 @@ class Note extends Base
|
|||||||
"cur_cash" => $cur_cash,
|
"cur_cash" => $cur_cash,
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'credit_cash' => $credit_cash,
|
'credit_cash' => $credit_cash,
|
||||||
|
"return_date" => $return_date,
|
||||||
]);
|
]);
|
||||||
Db::name("note_credit_detail")->insert([
|
Db::name("note_credit_detail")->insert([
|
||||||
"credit_id" => $id,
|
"credit_id" => $id,
|
||||||
@ -159,7 +161,7 @@ class Note extends Base
|
|||||||
}
|
}
|
||||||
Db::name('note_credit')
|
Db::name('note_credit')
|
||||||
->where(["user_id" => $userId, "id" => $id])
|
->where(["user_id" => $userId, "id" => $id])
|
||||||
->update(compact('name', 'credit_cash'));
|
->update(compact('name', 'credit_cash', 'return_date'));
|
||||||
Db::commit();
|
Db::commit();
|
||||||
return WSTReturn("OK", 1);
|
return WSTReturn("OK", 1);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace wstmart\app\controller;
|
namespace wstmart\app\controller;
|
||||||
|
use think\Db;
|
||||||
use wstmart\app\model\Users as M;
|
use wstmart\app\model\Users as M;
|
||||||
use wstmart\app\model\Favorites;
|
use wstmart\app\model\Favorites;
|
||||||
use wstmart\app\model\Messages;
|
use wstmart\app\model\Messages;
|
||||||
@ -838,4 +839,23 @@ public function forgetPasss(){
|
|||||||
$m = new MUsers();
|
$m = new MUsers();
|
||||||
return $m->getShareInfo();
|
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