正在显示
1 个修改的文件
包含
4 行增加
和
1 行删除
| @@ -80,11 +80,13 @@ class UpdateBuildConfiguration extends Command | @@ -80,11 +80,13 @@ class UpdateBuildConfiguration extends Command | ||
| 80 | */ | 80 | */ |
| 81 | public function getProduct(){ | 81 | public function getProduct(){ |
| 82 | $productModel = new Product(); | 82 | $productModel = new Product(); |
| 83 | - $lists = $productModel->list(); | 83 | + $lists = $productModel->list([],'id',['id','content']); |
| 84 | $detailModel = new Detail(); | 84 | $detailModel = new Detail(); |
| 85 | if(!empty($lists)){ | 85 | if(!empty($lists)){ |
| 86 | foreach ($lists as $k => $v){ | 86 | foreach ($lists as $k => $v){ |
| 87 | echo date('Y-m-d H:i:s') . '产品id:'.$v['id'] . PHP_EOL; | 87 | echo date('Y-m-d H:i:s') . '产品id:'.$v['id'] . PHP_EOL; |
| 88 | + $info = $detailModel->read(['product_id'=>$v['id']],['id']); | ||
| 89 | + if($info === false){ | ||
| 88 | $data = [ | 90 | $data = [ |
| 89 | 'product_id'=>$v['id'], | 91 | 'product_id'=>$v['id'], |
| 90 | 'column_id'=>1, | 92 | 'column_id'=>1, |
| @@ -98,6 +100,7 @@ class UpdateBuildConfiguration extends Command | @@ -98,6 +100,7 @@ class UpdateBuildConfiguration extends Command | ||
| 98 | $detailModel->insert($data); | 100 | $detailModel->insert($data); |
| 99 | } | 101 | } |
| 100 | } | 102 | } |
| 103 | + } | ||
| 101 | return true; | 104 | return true; |
| 102 | } | 105 | } |
| 103 | 106 |
-
请 注册 或 登录 后发表评论