| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace app\admin\model;
- use think\Model;
- class Productinfo extends Model
- {
- public function getProductInfo($condition)
- {
- $result = $this
- ->where($condition)
- ->select();
- return $result;
- }
- public function findProductInfo($condition)
- {
- $result = $this
- ->where($condition)
- ->find();
- return $result;
- }
- public function updateProductInfo($id, $data)
- {
- $result = $this
- ->where(['productInfo_id' => $id])
- ->update($data);
- return $result;
- }
- public function deleteProductInfo($condition)
- {
- $result = $this
- ->where($condition)
- ->delete();
- return $result;
- }
- public function addProductInfo($data)
- {
- $result = $this
- ->insert($data);
- return $result;
- }
- }
|