...
|
...
|
@@ -23,7 +23,7 @@ class Crontab extends Api |
|
|
public function index()
|
|
|
{
|
|
|
//查询未生成的条形码
|
|
|
$id = db('study')->where('barcode', '')->limit(10)->column('id');
|
|
|
$id = db('study')->where('generate', 0)->limit(10)->column('id');
|
|
|
foreach ($id as $k => $v){
|
|
|
$res = str_pad($v, 8, "0", STR_PAD_LEFT);
|
|
|
$barpath = Resource::StudyBar($res);
|
...
|
...
|
@@ -31,7 +31,8 @@ class Crontab extends Api |
|
|
->where('id',$v)
|
|
|
->update([
|
|
|
'barcode' => $barpath,
|
|
|
'unique' => $res
|
|
|
'unique' => $res,
|
|
|
'generate'=>1
|
|
|
]);
|
|
|
}
|
|
|
}
|
...
|
...
|
|