1
This commit is contained in:
@@ -26,16 +26,16 @@ class User extends Base
|
||||
|
||||
|
||||
public function cusercode(){
|
||||
$data = $this->request->post();
|
||||
$rule = new Validate([
|
||||
"num"=>"require"
|
||||
]);
|
||||
if(!$rule->check($data)){
|
||||
return jsonError($rule->getError());
|
||||
}
|
||||
$list = $this->user_obj->where('state',0)->page($data['num'],1000)->select();
|
||||
// $data = $this->request->post();
|
||||
// $rule = new Validate([
|
||||
// "num"=>"require"
|
||||
// ]);
|
||||
// if(!$rule->check($data)){
|
||||
// return jsonError($rule->getError());
|
||||
// }
|
||||
$list = $this->user_obj->where('state',0)->select();
|
||||
foreach ($list as $v){
|
||||
$d['code'] = $this->creatUserCode($v['user_id']);
|
||||
$d['code'] = $this->creatUserCode($v['user_id']).$v['user_id'];
|
||||
$this->user_obj->where('user_id',$v['user_id'])->update($d);
|
||||
}
|
||||
echo 'done';
|
||||
|
||||
Reference in New Issue
Block a user