/** * 获得一条管理员管理信息 */ public static function getAdminUserInfo($params) { $options = array('userId' => false); if (is_array($params)) { $options = array_merge($options, $params); } extract($options); $whereSql = ''; if ($userId) { $whereSql .= "and userId = '{$userId}' "; } $data = Helper_Dao::getRow(array('dbName' => 'Db_AndyouYun', 'tblName' => 'yun_adminuser', 'cols' => '*', 'whereSql' => $whereSql)); return $data; }
/** * 获得一条会员信息 */ public static function getMemberInfo($params) { $options = array('id' => false, 'phone' => false, 'cardno' => false, 'phoneOrCardno' => false, 'name' => false); if (is_array($params)) { $options = array_merge($options, $params); } extract($options); $whereSql = ''; if (!$id && !$phone && !$name && !$phoneOrCardno) { return false; } if ($id) { $whereSql .= "and id = '{$id}' "; } if ($phone) { $whereSql .= "and phone = '{$phone}' "; } if ($cardno) { $whereSql .= "and cardno = '{$cardno}' "; } if ($phoneOrCardno) { $whereSql .= "and (cardno = '{$phoneOrCardno}' or phone = '{$phoneOrCardno}') "; } if ($name) { $whereSql .= "and name like '%{$name}%' "; } $data = Helper_Dao::getRow(array('dbName' => 'Db_Andyou', 'tblName' => 'member', 'cols' => '*', 'whereSql' => $whereSql)); //获得会员类型 $memberCate = Helper_Member::getMemberCateInfoPairs(); if ($data) { if (isset($memberCate[$data["cateId"]])) { $data['cateName'] = $memberCate[$data["cateId"]]["name"]; $data['discount'] = $memberCate[$data["cateId"]]["discount"]; if ($memberCate[$data["cateId"]]['discountStr']) { //折扣的分类 $data['discountArr'] = json_decode($memberCate[$data["cateId"]]['discountStr'], true); } } else { $data['cateName'] = "未分类"; $data['discount'] = 1; } } return $data; }
public static function getMemberOtherPro($params) { $options = array('memberId' => false, 'id' => false, 'proId' => false); if (is_array($params)) { $options = array_merge($options, $params); } extract($options); $whereSql = ''; if ($id) { $whereSql .= "and id = '{$id}' "; } if ($proId) { $whereSql .= "and proId = {$proId} "; } if ($memberId) { $whereSql .= "and memberId = {$memberId} "; } $data = Helper_Dao::getRow(array('dbName' => 'Db_Andyou', 'tblName' => 'memeberotherpro', 'cols' => '*', 'whereSql' => $whereSql)); return $data; }
/** * 获得一条员工分类管理信息 */ public static function getStaffCateInfo($params) { $options = array('id' => false); if (is_array($params)) { $options = array_merge($options, $params); } extract($options); $whereSql = ''; if ($id) { $whereSql .= "and id = '{$id}' "; } $data = Helper_Dao::getRow(array('dbName' => 'Db_Andyou', 'tblName' => 'staffcate', 'cols' => 'id id,name name,salary salary,percentage percentage', 'whereSql' => $whereSql)); return $data; }
/** * 获得一条订单明细管理信息 */ public static function getBillsItemInfo($params) { $options = array('id' => false); if (is_array($params)) { $options = array_merge($options, $params); } extract($options); $whereSql = ''; if ($id) { $whereSql .= "and id = '{$id}' "; } $data = Helper_Dao::getRow(array('dbName' => 'Db_Andyou', 'tblName' => 'billsItem', 'cols' => 'id id,bid bid,bno bno,proId proId,num num,discount discount,price price,staffid staffid,memberId memberId,tm tm', 'whereSql' => $whereSql)); return $data; }