Commit 3bd32d21 authored by zhz's avatar zhz

Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into master_dev

parents 24eb0629 17da3191
...@@ -423,8 +423,11 @@ class ApiConst ...@@ -423,8 +423,11 @@ class ApiConst
const set = 2; const set = 2;
//桌面最新版本 //桌面最新版本
const clietnAppversion='1.0.1'; const xpClientAppVersion='1.0.4';
//微信小程序是否发布 const winClientAppVersion='1.0.4';
const xpClientAppVersionOnline='1.0.0';
const winClientAppVersionOnline='1.0.0';
//微信小是否发布
const isWxPublish = 0; const isWxPublish = 0;
//消息模板类型 //消息模板类型
......
...@@ -115,6 +115,7 @@ class NameConst { ...@@ -115,6 +115,7 @@ class NameConst {
const authInfoPrefix = 'authInfo_'; const authInfoPrefix = 'authInfo_';
const allField = '*'; const allField = '*';
const desc = 'desc'; const desc = 'desc';
...@@ -156,7 +157,9 @@ class NameConst { ...@@ -156,7 +157,9 @@ class NameConst {
const footprint = 'footprint';//足迹数量 const footprint = 'footprint';//足迹数量
const clientUpdateUrl='shenbd.zip'; const clientUpdateUrl='shenbd.zip';
const onlineClientUpdateUrl='shenbdonline.zip';
const xpClientUpdateUrl='shendbxp.zip';
const xpOnlineClientUpdateUrl='shendbxponline.zip';
const leftBracket = '['; const leftBracket = '[';
const rightBracket = ']'; const rightBracket = ']';
const elasticName='elastic.master'; const elasticName='elastic.master';
...@@ -196,6 +199,9 @@ class NameConst { ...@@ -196,6 +199,9 @@ class NameConst {
const Macao = '澳门'; const Macao = '澳门';
const otherCountry = '海外'; const otherCountry = '海外';
const xp='xp';
const win='win';
} }
?> ?>
\ No newline at end of file
...@@ -10,7 +10,7 @@ class QPay extends \Payment\TencentPay{ ...@@ -10,7 +10,7 @@ class QPay extends \Payment\TencentPay{
public function __construct() { public function __construct() {
$this->appid = \Our\PayConst::qPayAppId; $this->appid = \Our\PayConst::qPayAppId;
$this->notify_url = \Our\NameConst::httpPrefix.$_SERVER['SERVER_NAME'].\Our\PayConst::qPayNotifyUrl; $this->notify_url = \Our\Common::getBaseUrl().\Our\PayConst::qPayNotifyUrl;
$this->mch_id = \Our\PayConst::qPayMchId; $this->mch_id = \Our\PayConst::qPayMchId;
$this->key = \Our\PayConst::qPayKey; $this->key = \Our\PayConst::qPayKey;
$this->sslcert_path = \Our\PayConst::qqSslcertPath; $this->sslcert_path = \Our\PayConst::qqSslcertPath;
......
...@@ -12,7 +12,7 @@ class WxLitePay extends \Payment\TencentPay{ ...@@ -12,7 +12,7 @@ class WxLitePay extends \Payment\TencentPay{
public function __construct() public function __construct()
{ {
$this->appid = \Our\PayConst::wxLiteAppId; $this->appid = \Our\PayConst::wxLiteAppId;
$this->notify_url = \Our\NameConst::httpPrefix.$_SERVER['SERVER_NAME'].\Our\PayConst::wxLiteNotifyUrl; $this->notify_url = \Our\Common::getBaseUrl().\Our\PayConst::wxLiteNotifyUrl;
$this->mch_id = \Our\PayConst::wxPayMchId; $this->mch_id = \Our\PayConst::wxPayMchId;
$this->key = \Our\PayConst::wxSPayKey; $this->key = \Our\PayConst::wxSPayKey;
$this->sslcert_path = \Our\PayConst::wxSslcertPath; $this->sslcert_path = \Our\PayConst::wxSslcertPath;
......
...@@ -15,7 +15,7 @@ class WxPay extends \Payment\TencentPay ...@@ -15,7 +15,7 @@ class WxPay extends \Payment\TencentPay
public function __construct() public function __construct()
{ {
$this->appid = \Our\PayConst::wxPayAppId; $this->appid = \Our\PayConst::wxPayAppId;
$this->notify_url = \Our\NameConst::httpPrefix . $_SERVER['SERVER_NAME'] . \Our\PayConst::wxAppNotifyUrl; $this->notify_url = \Our\Common::getBaseUrl(). \Our\PayConst::wxAppNotifyUrl;
$this->mch_id = \Our\PayConst::wxPayMchId; $this->mch_id = \Our\PayConst::wxPayMchId;
$this->key = \Our\PayConst::wxPayKey; $this->key = \Our\PayConst::wxPayKey;
$this->sslcert_path = \Our\PayConst::wxSslcertPath; $this->sslcert_path = \Our\PayConst::wxSslcertPath;
......
...@@ -686,10 +686,14 @@ class CartServiceModel extends \Business\AbstractModel{ ...@@ -686,10 +686,14 @@ class CartServiceModel extends \Business\AbstractModel{
if($deliverySetting['offlinePay']){ if($deliverySetting['offlinePay']){
$offlinePaywayArray = unserialize($store['offline_payway']); $offlinePaywayArray = unserialize($store['offline_payway']);
if($offlinePaywayArray){ if($offlinePaywayArray){
foreach($offlinePaywayArray['images'] as $image){ if($offlinePaywayArray['images']){
if($image){ foreach($offlinePaywayArray['images'] as $image){
$offlinePaywayArray['imageUrls'][] = \Our\Common::getStaticFile($image, \Our\ImageConst::storeLabel); if($image){
$offlinePaywayArray['imageUrls'][] = \Our\Common::getStaticFile($image, \Our\ImageConst::storeLabel);
}
} }
}else{
$offlinePaywayArray['imageUrls'] = array();
} }
$deliverySetting['offlinePayway'] = $offlinePaywayArray; $deliverySetting['offlinePayway'] = $offlinePaywayArray;
} }
......
...@@ -23,14 +23,33 @@ class SettingServiceModel extends \Business\AbstractModel{ ...@@ -23,14 +23,33 @@ class SettingServiceModel extends \Business\AbstractModel{
* 获取应用版本 * 获取应用版本
* @return array 版本信息 * @return array 版本信息
*/ */
public function getAppVersion(){ public function getAppVersion($data){
$settingDAO = \DAO\SettingModel::getInstance(); $settingDAO = \DAO\SettingModel::getInstance();
$version=array(); $version=array();
$version['app_version'] = ApiConst::clietnAppversion; if($data['opSystem']==NameConst::xp){
if(APP_ENV=='pre'){
$version['app_version'] = ApiConst::xpClientAppVersion;
$fileName='/'.NameConst::xpClientUpdateUrl;
}
if(APP_ENV=='product'|| APP_ENV=='productOne'){
$version['app_version'] = ApiConst::xpClientAppVersionOnline;
$fileName='/'.NameConst::xpOnlineClientUpdateUrl;
}
}else{
if(APP_ENV=='pre'){
$version['app_version']=ApiConst::winClientAppVersion;
$fileName='/'.NameConst::clientUpdateUrl;
}
if(APP_ENV=='product'|| APP_ENV=='productOne'){
$version['app_version']=ApiConst::winClientAppVersionOnline;
$fileName='/'.NameConst::onlineClientUpdateUrl;
}
}
//$version = $settingDAO->getListCache(array('app_version')); //$version = $settingDAO->getListCache(array('app_version'));
$updateUrl=\Bootstrap::getUrlIniConfig('ossHost'); $updateUrl=\Bootstrap::getUrlIniConfig('ossHost');
$fileName='/'.NameConst::clientUpdateUrl;
$updateUrl=$updateUrl.'/'.$fileName; $updateUrl=$updateUrl.'/'.$fileName;
return array('version'=>$version['app_version'],'updateUrl'=>$updateUrl); return array('version'=>$version['app_version'],'updateUrl'=>$updateUrl);
} }
......
...@@ -216,12 +216,14 @@ class RefundServiceModel extends \Business\AbstractModel ...@@ -216,12 +216,14 @@ class RefundServiceModel extends \Business\AbstractModel
$refundReturnDao = \DAO\Order\RefundReturnModel::getInstance(DbNameConst::masterDBConnectName); $refundReturnDao = \DAO\Order\RefundReturnModel::getInstance(DbNameConst::masterDBConnectName);
$returnDetail=$refundReturnDao->findByRefundId($refundId,$refundReturnDao->refundDetailField); $returnDetail=$refundReturnDao->findByRefundId($refundId,$refundReturnDao->refundDetailField);
$storeDao=\DAO\StoreModel::getInstance(DbNameConst::masterDBConnectName); $storeDao=\DAO\StoreModel::getInstance(DbNameConst::masterDBConnectName);
//$orderGoodsDao=\DAO\Order\RefundReturnModel::getInstance();
if($returnDetail['storeId']!=$storeId){ if($returnDetail['storeId']!=$storeId){
ErrorModel::throwException(CodeConfigModel::notExistRefund); ErrorModel::throwException(CodeConfigModel::notExistRefund);
}$updateData=array(); }$updateData=array();
$updateData['is_suc_refund']=ApiConst::refundSuccess; $updateData['is_suc_refund']=ApiConst::refundSuccess;
$updateData['refund_type']=ApiConst::refundStateComplete; $updateData['refund_state']=ApiConst::refundStateComplete;
$res=$refundReturnDao->update(array('refund_id'=>$refundId), $updateData); $res=$refundReturnDao->update(array('refund_id'=>$refundId), $updateData);
\Our\RedisHelper::delCachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$refundReturnDao, 'getList'), array(), array($refundId)); \Our\RedisHelper::delCachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$refundReturnDao, 'getList'), array(), array($refundId));
$storeDao->deleteStoreCache($storeId,$refundId); $storeDao->deleteStoreCache($storeId,$refundId);
$storeDao->deleteStoreRefundCache($storeId,$refundId); $storeDao->deleteStoreRefundCache($storeId,$refundId);
...@@ -1037,7 +1039,8 @@ class RefundServiceModel extends \Business\AbstractModel ...@@ -1037,7 +1039,8 @@ class RefundServiceModel extends \Business\AbstractModel
} }
} else { } else {
$refundAmount = $orderGoods['goodsPrice']*$orderGoods['goodsNum']; //$refundAmount = $orderGoods['goodsPrice']*$orderGoods['goodsNum'];
$refundAmount =$orderInfo['orderAmount'];
} }
$returnData['refundAmount'] = $refundAmount - $orderInfo['refundAmount'] - $returnData['needShippingFee'] + $shippingFee; $returnData['refundAmount'] = $refundAmount - $orderInfo['refundAmount'] - $returnData['needShippingFee'] + $shippingFee;
if((int)$returnData['refundAmount'] <ApiConst::zero){ if((int)$returnData['refundAmount'] <ApiConst::zero){
......
...@@ -145,6 +145,7 @@ class DeliveryServiceModel extends \Business\AbstractModel ...@@ -145,6 +145,7 @@ class DeliveryServiceModel extends \Business\AbstractModel
} }
$memberData['diliveryman_id']=$resData; $memberData['diliveryman_id']=$resData;
$memberDao->saveInfo($memberData,$member['memberId']); $memberDao->saveInfo($memberData,$member['memberId']);
// $memberDb0Redis=\Redis\Db0\MemberRedisModel::getInstance(); // $memberDb0Redis=\Redis\Db0\MemberRedisModel::getInstance();
// $memberDb0Redis->tableHSet(trim($member['diliveryman_id']),$resData,ApiConst::tenDaySecond); // $memberDb0Redis->tableHSet(trim($member['diliveryman_id']),$resData,ApiConst::tenDaySecond);
return $resData; return $resData;
......
...@@ -276,7 +276,7 @@ class ShopkeeperServiceModel extends \Business\AbstractModel ...@@ -276,7 +276,7 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
'orderId'=>$order['order_id'])); 'orderId'=>$order['order_id']));
$push->addOneToClient($pushData); $push->addOneToClient($pushData);
$push->sendTcpMessage(); $push->sendTcpMessage();
$push->addOneToClient(); // $push->addOneToClient();
// \Our\RedisHelper::rpush('client_push',array('storeId'=>$order['storeId'],'type'=>ApiConst::messageWaitReceive,'op'=>NameConst::reduce,'num'=>ApiConst::one,'params'=>array('c'=>'shopkeeper','m'=>'orderDetail','orderId'=>$order['orderId']))); // \Our\RedisHelper::rpush('client_push',array('storeId'=>$order['storeId'],'type'=>ApiConst::messageWaitReceive,'op'=>NameConst::reduce,'num'=>ApiConst::one,'params'=>array('c'=>'shopkeeper','m'=>'orderDetail','orderId'=>$order['orderId'])));
//\Our\RedisHelper::rpush('client_push',array('storeId'=>$order['storeId'],'type'=>$type,'op'=>NameConst::add,'num'=>ApiConst::one,'params'=>array('c'=>'shopkeeper','m'=>'orderDetail','orderId'=>$order['orderId']))); //\Our\RedisHelper::rpush('client_push',array('storeId'=>$order['storeId'],'type'=>$type,'op'=>NameConst::add,'num'=>ApiConst::one,'params'=>array('c'=>'shopkeeper','m'=>'orderDetail','orderId'=>$order['orderId'])));
$orderDao->deleteOrderCache($order['buyer_id'], $orderId, $order['store_id'], true); $orderDao->deleteOrderCache($order['buyer_id'], $orderId, $order['store_id'], true);
......
...@@ -866,11 +866,23 @@ class StoreServiceModel extends \Business\AbstractModel{ ...@@ -866,11 +866,23 @@ class StoreServiceModel extends \Business\AbstractModel{
$returnStores['stores'][] =$purchasedStore; $returnStores['stores'][] =$purchasedStore;
} }
} }
if($returnStores['stores']){ if($returnStores['stores']){
foreach($returnStores['stores'] as $key => $tempStore){
$tempDistance[$key] = $tempStore['storeDistance'];
}
array_multisort($tempDistance, SORT_ASC, $returnStores['stores']);
$return[] = $returnStores; $return[] = $returnStores;
} }
} }
if($return){ if($return){
$tempReturn = array();
foreach($return as $tempVal){
$distance = min(array_column($tempVal['stores'],'storeDistance'));
$tempReturn[$distance] = $tempVal;
}
ksort($tempReturn);
$return = array_values($tempReturn);
return $return; return $return;
} }
} }
......
...@@ -45,6 +45,7 @@ class DeliveryController extends \Our\Controller_AbstractClient { ...@@ -45,6 +45,7 @@ class DeliveryController extends \Our\Controller_AbstractClient {
*/ */
public function getDeliveriersAction(){ public function getDeliveriersAction(){
$result = $this->shopkeeperService->getDiliveryManByStoreId($this->memberId); $result = $this->shopkeeperService->getDiliveryManByStoreId($this->memberId);
$result=$result?$result:[];
if($result!==false){ if($result!==false){
$this->success($result,\Our\DescribeConst::successMessage,\Our\DescribeConst::successMessage); $this->success($result,\Our\DescribeConst::successMessage,\Our\DescribeConst::successMessage);
} }
...@@ -67,7 +68,9 @@ class DeliveryController extends \Our\Controller_AbstractClient { ...@@ -67,7 +68,9 @@ class DeliveryController extends \Our\Controller_AbstractClient {
$deliveryService=\Business\Store\DeliveryServiceModel::getInstance(); $deliveryService=\Business\Store\DeliveryServiceModel::getInstance();
$trueName=$this->req['data']['trueName']; $trueName=$this->req['data']['trueName'];
$memberMobile=$this->req['data']['memberMobile']; $memberMobile=$this->req['data']['memberMobile'];
$result =$deliveryService->addDeleiveryMan($this->storeId,$memberMobile,$trueName); $result =$deliveryService->addDeleiveryMan($this->storeId,$memberMobile,$trueName);
$this->req[NameConst::data]['memberId']=$result;
if($result!==false){ if($result!==false){
$this->success($result,\Our\DescribeConst::successMessage,\Our\DescribeConst::successMessage); $this->success($result,\Our\DescribeConst::successMessage,\Our\DescribeConst::successMessage);
} }
......
...@@ -156,6 +156,9 @@ class ShopkeeperController extends \Our\Controller_AbstractClient { ...@@ -156,6 +156,9 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
public function getDeliveriersAction(){ public function getDeliveriersAction(){
$result = $this->shopkeeperService->getDiliveryManByStoreId($this->memberId); $result = $this->shopkeeperService->getDiliveryManByStoreId($this->memberId);
if($result!==false){ if($result!==false){
if(!$result){
$result=[];
}
$this->success($result,\Our\DescribeConst::successMessage,\Our\DescribeConst::successMessage); $this->success($result,\Our\DescribeConst::successMessage,\Our\DescribeConst::successMessage);
} }
ErrorModel::throwException(CodeConfigModel::commonError); ErrorModel::throwException(CodeConfigModel::commonError);
......
...@@ -37,7 +37,7 @@ class UserController extends \Our\Controller_AbstractIndex { ...@@ -37,7 +37,7 @@ class UserController extends \Our\Controller_AbstractIndex {
if(!empty($seller)){ if(!empty($seller)){
$mobile=$seller['memberMobile']; $mobile=$sellerName;
$isStore=$this->memberService->getOneByStoreId($seller['storeId']); $isStore=$this->memberService->getOneByStoreId($seller['storeId']);
if(empty($isStore)){ if(empty($isStore)){
\Error\ErrorModel::throwException(\Error\CodeConfigModel::storeIsRefuse); \Error\ErrorModel::throwException(\Error\CodeConfigModel::storeIsRefuse);
...@@ -47,8 +47,10 @@ class UserController extends \Our\Controller_AbstractIndex { ...@@ -47,8 +47,10 @@ class UserController extends \Our\Controller_AbstractIndex {
}else{ }else{
\Error\ErrorModel::throwException(\Error\CodeConfigModel::errorUsernameOrPassword); \Error\ErrorModel::throwException(\Error\CodeConfigModel::errorUsernameOrPassword);
} }
if($this->memberService->checkUserNamePassWord($mobile,$password)){
if($this->memberService->checkUserNamePassWord($sellerName,$password)){
$member= $this->memberService->getOneByMobileAndPassword($mobile,$password); $member= $this->memberService->getOneByMobileAndPassword($mobile,$password);
//$member= $this->memberService->getOneByMobileAndPassword($mobile,$password);
// //第二步保存扫码会员信息 // //第二步保存扫码会员信息
// $result = $this->memberService->saveStoreMembers($member['member_id']); // $result = $this->memberService->saveStoreMembers($member['member_id']);
// if(!$result){ // if(!$result){
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -71,7 +71,8 @@ class cliShopkeeperIndex extends basecli ...@@ -71,7 +71,8 @@ class cliShopkeeperIndex extends basecli
$shopkeeperService->baseDir= \Our\Common::getConfig('out.config'); $shopkeeperService->baseDir= \Our\Common::getConfig('out.config');
try { try {
$shopkeeperService->insertStoreMemberStatics(); $shopkeeperService->insertStoreMemberStatics();
$shopkeeperService->reduceStoreMemberStatics(); //退货退款订单自动关闭
// $shopkeeperService->reduceStoreMemberStatics();
//$shopkeeperService->storeStatictisTask(); //$shopkeeperService->storeStatictisTask();
$shopkeeperService->updateLastId(); $shopkeeperService->updateLastId();
} catch (Exception $ex) { } catch (Exception $ex) {
......
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