123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- <?php
- namespace app\common\model;
- use think\facade\Db;
- class Sellergroup extends BaseModel
- {
-
- public function getSellergroupList($condition)
- {
- $result = Db::name('sellergroup')->where($condition)->select()->toArray();
- return $result;
- }
-
- public function getSellergroupInfo($condition)
- {
- $result = Db::name('sellergroup')->where($condition)->find();
- return $result;
- }
-
- public function isSellergroupExist($condition)
- {
- $result = Db::name('sellergroup')->where($condition)->find();
- if (empty($result)) {
- return FALSE;
- } else {
- return TRUE;
- }
- }
-
- public function addSellergroup($data)
- {
- return Db::name('sellergroup')->insertGetId($data);
- }
-
- public function editSellergroup($update, $condition)
- {
- return Db::name('sellergroup')->where($condition)->update($update);
- }
-
- public function delSellergroup($condition)
- {
- return Db::name('sellergroup')->where($condition)->delete();
- }
- }
|