Commit 115de3d4 authored by lingqingmei's avatar lingqingmei

Merge branch 'lyz_cart' of http://git.shenbd.com/api-project-dev/api.shenbd.com into master_dev

parents bcbbe9a4 4626557b
<<<<<<< HEAD
dea
=======
/nbproject/ /nbproject/
.idea .idea
>>>>>>> 07613dd26e99bb68b3772e7616f45675937eabb9
*.DS_Store *.DS_Store
upload upload
/data/log /data/log
/data/images /data/images
/scripts/crontab/push/nohup.out /scripts/crontab/push/nohup.out
/lib /lib
<<<<<<< HEAD
=======
>>>>>>> 07613dd26e99bb68b3772e7616f45675937eabb9
...@@ -160,15 +160,9 @@ class ImageUtil { ...@@ -160,15 +160,9 @@ class ImageUtil {
} }
public static function getCategoryHeadPic($gcId){ public static function getCategoryHeadPic($gcId){
$basePath=\Bootstrap::getUrlIniConfig('source');
$commonPath=ImageConst::defaultPath; $commonPath=ImageConst::defaultPath;
$fileName= ImageConst::categoryHeadPicPrefix.$gcId.\Our\NameConst::jpgSuffix; $fileName= ImageConst::categoryHeadPicPrefix.$gcId.\Our\NameConst::jpgSuffix;
$file=$basePath.$commonPath.$fileName;
if(file_exists($file)){
return \Our\Common::getStaticFile($fileName,$commonPath); return \Our\Common::getStaticFile($fileName,$commonPath);
}else{
return \Our\Common::getStaticFile(ImageConst::defaultCategoryImgName,$commonPath);
}
} }
/** /**
...@@ -185,8 +179,6 @@ class ImageUtil { ...@@ -185,8 +179,6 @@ class ImageUtil {
return $file_name; return $file_name;
} }
public static function saveWxImage($data) public static function saveWxImage($data)
{ {
$fileName = isset($data['image'])&&$data['image']?$data['image']:$data['memberAvatar']; $fileName = isset($data['image'])&&$data['image']?$data['image']:$data['memberAvatar'];
...@@ -201,8 +193,6 @@ class ImageUtil { ...@@ -201,8 +193,6 @@ class ImageUtil {
); );
} }
return false; return false;
} }
} }
...@@ -268,14 +268,14 @@ class GroupSaleServiceModel extends \Business\AbstractModel { ...@@ -268,14 +268,14 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
$result[$storeId]=$tempReturnStoreCartsObj; $result[$storeId]=$tempReturnStoreCartsObj;
} }
} }
//var_dump($result);
if($result){ if($result){
$storeIds = $cartListData['storeIds']; $storeIds = $cartListData['storeIds'];
$newResult = array(); $newResult = array();
foreach($storeIds as $key){ foreach($storeIds as $key){
$tempReturnCart = $result[$key]; $tempReturnCart = $result[$key];
$tempStore = $storeDao->get($key,false,false); $tempStore = $storeDao->get($key,false,false);
if($tempStore) { //如果存在店铺数据 if($tempStore&&$tempReturnCart) { //如果存在店铺数据
$tempReturnCart['inAreaFlag'] = $storeDao->checkAddressInServiceArea($address,$tempStore); $tempReturnCart['inAreaFlag'] = $storeDao->checkAddressInServiceArea($address,$tempStore);
$newResult[] = $tempReturnCart; $newResult[] = $tempReturnCart;
} }
......
...@@ -8,7 +8,7 @@ namespace Business\Store; ...@@ -8,7 +8,7 @@ namespace Business\Store;
*/ */
class ClassStoreServiceModel extends \Business\AbstractModel{ class ClassStoreServiceModel extends \Business\AbstractModel{
private $classStoreField = 'store_id as storeId,store_name as storeName,store_label as storeLabel,store_intro as storeIntro,store_longitude,store_latitude,gc_id as gcId,gc_name as gcName'; private $classStoreField = 'store_id as storeId,store_name as storeName,store_label as storeLabel,store_intro as storeIntro,store_longitude,store_latitude,gc_id as gcId,gc_name as gcName,sign_scope';
public function init() { public function init() {
} }
...@@ -49,8 +49,10 @@ class ClassStoreServiceModel extends \Business\AbstractModel{ ...@@ -49,8 +49,10 @@ class ClassStoreServiceModel extends \Business\AbstractModel{
$store_lat = $store['store_latitude']; $store_lat = $store['store_latitude'];
$store_lnt = $store['store_longitude']; $store_lnt = $store['store_longitude'];
$gcName = htmlspecialchars_decode($store['gcName']); $gcName = htmlspecialchars_decode($store['gcName']);
$storeScope = $store['sign_scope'];
unset($store['store_latitude']); unset($store['store_latitude']);
unset($store['store_longitude']); unset($store['store_longitude']);
unset($store['sign_scope']);
unset($store['gcId']); unset($store['gcId']);
unset($store['gcName']); unset($store['gcName']);
$store['storeLabel'] =\Our\ImageUtil::getStoreLabel($store['storeLabel'], \Our\ImageConst::storeLabel,213); $store['storeLabel'] =\Our\ImageUtil::getStoreLabel($store['storeLabel'], \Our\ImageConst::storeLabel,213);
...@@ -66,8 +68,8 @@ class ClassStoreServiceModel extends \Business\AbstractModel{ ...@@ -66,8 +68,8 @@ class ClassStoreServiceModel extends \Business\AbstractModel{
} }
$inAreaFlag = false; $inAreaFlag = false;
if(isset($store['sign_scope'])&&$store['sign_scope']){ if($storeScope){
$inAreaFlag = \Our\CommonExtension::locationInArea($lat,$lng,$store['sign_scope']); $inAreaFlag = \Our\CommonExtension::locationInArea($lat,$lng,$storeScope);
} }
if(!isset($newGcStoreList[$gcId])){ if(!isset($newGcStoreList[$gcId])){
$newGcStoreList[$gcId]['gcName'] = $gcName; $newGcStoreList[$gcId]['gcName'] = $gcName;
......
...@@ -41,6 +41,7 @@ class MemberCouponModel extends \DAO\AbstractModel{ ...@@ -41,6 +41,7 @@ class MemberCouponModel extends \DAO\AbstractModel{
*/ */
public function getListByMemberId($memberId,$couponIds){ public function getListByMemberId($memberId,$couponIds){
$whereSql = ' member_id = '.$memberId .' and coupon_id in ('.implode(',',$couponIds).')'; $whereSql = ' member_id = '.$memberId .' and coupon_id in ('.implode(',',$couponIds).')';
$result = $this->getList($whereSql);
return $result; return $result;
} }
......
...@@ -390,21 +390,21 @@ elastic.master.scheme="http"; ...@@ -390,21 +390,21 @@ elastic.master.scheme="http";
[lyztest : common] [lyztest : common]
; 数据库配置 ; 数据库配置
resources.database.params.driver = "pdo_mysql" resources.database.params.driver = "pdo_mysql"
resources.database.params.hostname = "106.14.14.233" resources.database.params.hostname = "192.168.134.18"
resources.database.params.port = 3306 resources.database.params.port = 3306
resources.database.params.database = "qmcs" resources.database.params.database = "qmcs"
resources.database.params.username = "root" resources.database.params.username = "root"
resources.database.params.password = "!@#$%12345werty" resources.database.params.password = "123456"
resources.database.params.charset = "UTF8" resources.database.params.charset = "UTF8"
resources.database.params.driver_options.1002 = "SET NAMES utf8" resources.database.params.driver_options.1002 = "SET NAMES utf8"
; 从库配置 ; 从库配置
resources.database.slave.params.driver = "pdo_mysql" resources.database.slave.params.driver = "pdo_mysql"
resources.database.slave.params.hostname = "106.14.14.233" resources.database.slave.params.hostname = "192.168.134.18"
resources.database.slave.params.port = 3306 resources.database.slave.params.port = 3306
resources.database.slave.params.database = "qmcs" resources.database.slave.params.database = "qmcs"
resources.database.slave.params.username = "root" resources.database.slave.params.username = "root"
resources.database.slave.params.password = "!@#$%12345werty" resources.database.slave.params.password = "123456"
resources.database.slave.params.charset = "UTF8" resources.database.slave.params.charset = "UTF8"
resources.database.slave.params.driver_options.1002 = "SET NAMES utf8" resources.database.slave.params.driver_options.1002 = "SET NAMES utf8"
......
Sasdasf Sasdasf
<<<<<<< HEAD
ssdfsdfdsd
=======
sdsd sdsd
>>>>>>> 07613dd26e99bb68b3772e7616f45675937eabb9
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment