123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <?php
- namespace app\common\model;
- use think\facade\Db;
- /**
- * ============================================================================
- *
- * ============================================================================
- * 版权所有 2014-2028 浙江惠利玛产业互联网有限公司,并保留所有权利。
- * 网站地址: https://www.valimart.net/
- * ----------------------------------------------------------------------------
- *
- * ============================================================================
- * 数据层模型
- */
- class Daddress extends BaseModel
- {
-
- /**
- * 新增
- * @access public
- * @author csdeshang
- * @param type $data 数据
- * @return type
- */
- public function addDaddress($data) {
- return Db::name('daddress')->insertGetId($data);
- }
- /**
- * 删除
- * @access public
- * @author csdeshang
- * @param type $condition 条件
- * @return type
- */
- public function delDaddress($condition) {
- return Db::name('daddress')->where($condition)->delete();
- }
- /**
- * 编辑更新
- * @access public
- * @author csdeshang
- * @param type $data 更新数据
- * @param type $condition 条件
- * @return type
- */
- public function editDaddress($data, $condition) {
- return Db::name('daddress')->where($condition)->update($data);
- }
- /**
- * 查询单条
- * @access public
- * @author csdeshang
- * @param type $condition 检索条件
- * @param type $fields 字段
- * @return type
- */
- public function getAddressInfo($condition, $fields = '*') {
- return Db::name('daddress')->field($fields)->where($condition)->find();
- }
- /**
- * 查询多条
- * @access public
- * @author csdeshang
- * @param type $condition 条件
- * @param type $fields 字段
- * @param type $order 排序
- * @param type $limit 限制
- * @return type
- */
- public function getAddressList($condition, $fields = '*', $order = '', $limit = 0) {
- return Db::name('daddress')->field($fields)->where($condition)->order($order)->limit($limit)->select()->toArray();
- }
-
- }
|