123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <?php
- namespace app\common\model;
- use think\facade\Db;
- /**
- * ============================================================================
- *
- * ============================================================================
- * 版权所有 2014-2028 浙江惠利玛产业互联网有限公司,并保留所有权利。
- * 网站地址: https://www.valimart.net/
- * ----------------------------------------------------------------------------
- *
- * ============================================================================
- * 数据层模型
- */
- class Sellergroup extends BaseModel {
- /**
- * 读取列表
- * @access public
- * @author csdeshang
- * @param type $condition 条件
- * @return type
- */
- public function getSellergroupList($condition) {
- $result = Db::name('sellergroup')->where($condition)->select()->toArray();
- return $result;
- }
- /**
- * 读取单条记录
- * @access public
- * @author csdeshang
- * @param type $condition 条件
- * @return type
- */
- public function getSellergroupInfo($condition) {
- $result = Db::name('sellergroup')->where($condition)->find();
- return $result;
- }
- /**
- * 判断是否存在
- * @access public
- * @author csdeshang
- * @param type $condition 条件
- * @return boolean
- */
- public function isSellergroupExist($condition) {
- $result = Db::name('sellergroup')->where($condition)->find();
- if (empty($result)) {
- return FALSE;
- } else {
- return TRUE;
- }
- }
- /**
- * 增加
- * @access public
- * @author csdeshang
- * @param array $data 参数内容
- * @return bool
- */
- public function addSellergroup($data) {
- return Db::name('sellergroup')->insertGetId($data);
- }
- /**
- * 更新
- * @access public
- * @author csdeshang
- * @param array $update 数据
- * @param array $condition 条件
- * @return bool
- */
- public function editSellergroup($update, $condition) {
- return Db::name('sellergroup')->where($condition)->update($update);
- }
- /**
- * 删除
- * @access public
- * @author csdeshang
- * @param array $condition 条件
- * @return bool
- */
- public function delSellergroup($condition) {
- return Db::name('sellergroup')->where($condition)->delete();
- }
- }
|