Commit 8ba26bc3 authored by lingqingmei's avatar lingqingmei

Merge branch 'ccw' of tui.shenbd.com:api-project-dev/api.shenbd.com into ccw

parents cd5e6921 4da7f4a0
......@@ -61,7 +61,7 @@ class IndexController extends \Our\Controller_Abstract {
"shareType": "1",
"storeName": "LQ日化用品",
"timestamp": "1543913056",
"type": "4",
"type": "3",
"driverType": 2,
"qrCode": "https://img.shenbd.com/mall/salesman_qr/170.png",
"address": "鑫雄盛快捷酒店仓山紫番林幼儿园",
......@@ -102,7 +102,6 @@ class IndexController extends \Our\Controller_Abstract {
$this->_view->display('index/store.phtml');
}
if($paramsStr['type']==\Our\ApiConst::shareGoods || $paramsStr['type']==\Our\ApiConst::shareGroup){
$this->_view->display('index/goods.phtml');
}
if($paramsStr['type']==\Our\ApiConst::shareSaler){
......@@ -112,11 +111,20 @@ class IndexController extends \Our\Controller_Abstract {
}
public function getInvateHtmlAction(){
$req=$this->getRequest()->getQuery();
if(empty($req['params'] )){
//echo $req['cacheKey'];exit;
if(empty($req['cacheKey'] )){
echo 'error';exit;
}
$params=base64_decode($req['params']);
$this->memberDb0Redis=\Redis\Db0\MemberRedisModel::getInstance();
$res= $this->memberDb0Redis->tableCacheGet($req['cacheKey']);
$params=unserialize($res);
$params=base64_decode($params);
// $params['name']='陈传文4';
// $params['telephone']='18305954587';
// $params['qrcodeUrl']='//static.shenbd.com/www/index/2018/img/card/code.jpg';
// $params['areaManage']='区域经理';
$params=\Our\Common::paramToJson($params);
// $params['areaManage']='经理';
$this->_view->assign("params", $params);
}
......
......@@ -158,6 +158,9 @@ class DescribeConst
const refundRetund='退货';
const refundSuccess='退款成功';
const alreadyRecieve='已收货';
const alreadyComplete='已完成';
const sellerRefuseReturn='卖家拒绝退货';
const sellerAgreeReturn='卖家同意退货';
......
......@@ -133,7 +133,7 @@ class StoreUtil {
$addKey=\Our\Common::getConfig('password.key');
$payLogList = array();
$newChargeList = array();
foreach($list as $class){
foreach($list as $class){
$paySn = date('YmdHis').$this->createncode(18);
$storeId = $class['store_id'];
$payLog = array();
......@@ -160,9 +160,9 @@ class StoreUtil {
$payLog['pay_amount'] = 0;
$chargeLog['gmt_create'] = $currentTime;
$chargeLog['gmt_update'] = $currentTime;
$chargeLog['service_fee_sign'] = md5($currentTime,$chargeLog['service_fee'],$addKey);
$chargeLog['service_fee_sign'] = md5($currentTime.$chargeLog['service_fee'].$addKey);
$newChargeList[] = $chargeLog;
$resultClass = $qmStoreClassModel->update(array('deadline'=>$chargeLog['new_end_time'],'deadline_sign'=>md5($class['gmt_create'],$chargeLog['new_end_time'],$addKey),'gmt_update'=>$currentTime),array('gc_id'=>$chargeLog['gc_id'],'store_id'=>$chargeLog['store_id']));
$resultClass = $qmStoreClassModel->update(array('deadline'=>$chargeLog['new_end_time'],'deadline_sign'=>md5($class['gmt_create'].$chargeLog['new_end_time'].$addKey),'gmt_update'=>$currentTime),array('gc_id'=>$chargeLog['gc_id'],'store_id'=>$chargeLog['store_id']));
if($resultClass===false){
$qmStoreClassModel->db->doRollback();
}
......
......@@ -717,7 +717,7 @@ class CartServiceModel extends \Business\AbstractModel{
$deliverySetting['sellerDistribution'] = $store['seller_distribution'];
if($deliverySetting['sellerDistribution']){
$deliverySetting['leftAmount'] = \Our\ApiConst::zero;
$deliverySetting['inServiceAreaFlag'] = \Our\ApiConst::zero;
$deliverySetting['inServiceAreaFlag'] = \Our\ApiConst::one;
//var_dump(json_encode($store));
if((isset($store['start_shipping_price'])&&$store['start_shipping_price']>\Our\ApiConst::zero)&&$storeCarts['storeTotalPrice']<$store['start_shipping_price']){
//$deliverySetting['sellerDistribution'] = \Our\ApiConst::zero;
......@@ -729,7 +729,8 @@ class CartServiceModel extends \Business\AbstractModel{
}
$deliverySetting['deliverTimeList'] =array();
if($address){
$result = \Store\StoreUtil::getInstance()->checkAddressInServiceArea(array('lng'=>$address['lng'],'lat'=>$address['lat']),$storeId);
//$result = \Store\StoreUtil::getInstance()->checkAddressInServiceArea(array('lng'=>$address['lng'],'lat'=>$address['lat']),$storeId);
$result = true;
$storeDistance = \Our\CommonExtension::getDistance($address['lat'],$address['lng'],$store['store_latitude'],$store['store_longitude'],\Our\ApiConst::one);
if($result){
$deliverySetting['inServiceAreaFlag'] = \Our\ApiConst::one;
......@@ -741,14 +742,14 @@ class CartServiceModel extends \Business\AbstractModel{
$deliverySetting['other'] = $deliverTimeList['other']?$deliverTimeList['other']:\Our\ApiConst::zero;
}
}
}else{
}/*else{
$sess=\Yaf\Session::getInstance();
$currentAddress = $sess->get('currentAddress');
$result = \Store\StoreUtil::getInstance()->checkAddressInServiceArea(array('lng'=>$currentAddress['lng'],'lat'=>$currentAddress['lat']),$storeId);
if($result){
$deliverySetting['inServiceAreaFlag'] = \Our\ApiConst::one;
}
}
}*/
}else{
$deliverySetting['sellerDistribution'] = \Our\ApiConst::zero;
}
......
......@@ -335,15 +335,19 @@ class GoodsClassServiceModel extends \Business\AbstractModel{
if(isset($treeGcIds[$secondGcId][\Our\ApiConst::zero])&&$newPlatThirdGcList){
foreach($treeGcIds[$secondGcId][\Our\ApiConst::zero] as $tempPaltThirdGcId){
$tempPlatClass = $newPlatThirdGcList[$tempPaltThirdGcId];
$tempPlatClass['storeFlag'] = \Our\ApiConst::zero;
$childrenClasses[] = $tempPlatClass;
if($tempPlatClass){
$tempPlatClass['storeFlag'] = \Our\ApiConst::zero;
$childrenClasses[] = $tempPlatClass;
}
}
}
if(isset($treeGcIds[$secondGcId][\Our\ApiConst::one])&&$storeThirdGcList){
foreach($treeGcIds[$secondGcId][\Our\ApiConst::one] as $tempStoreThirdGcId){
$tempStoreClass = $storeThirdGcList[$tempStoreThirdGcId] ;
$tempStoreClass['storeFlag'] = \Our\ApiConst::one;
$childrenClasses[] = $tempStoreClass;
if($tempStoreClass){
$tempStoreClass['storeFlag'] = \Our\ApiConst::one;
$childrenClasses[] = $tempStoreClass;
}
}
}
$returnTemp['childClasses'] = $childrenClasses;
......
......@@ -279,10 +279,12 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
case 1:
$order[] = ['sale_num','DESC'];
$order[] = ['eval_score','DESC'];
$order[] = ['goodsCommonId','DESC'];
$saleSort = true;
break;
case 2:
$order[] = ['sale_num','DESC'];
$order[] = ['goodsCommonId','DESC'];
$saleSort = true;
break;
case 3:
......@@ -297,6 +299,8 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
default:
$order[] = ['sale_num','DESC'];
$order[] = ['eval_score','DESC'];
$order[] = ['goodsCommonId','DESC'];
$saleSort = true;
break;
}
return array($where,$order,$attrStr,$saleSort);
......@@ -458,7 +462,6 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
if($pageSize === 0){
\Error\ErrorModel::throwException(\Error\CodeConfigModel::commonError);
}
$limit = array($pageIndex*$pageSize,$pageSize);
$where = array();
$where[] = "store_id={$storeId}";
......@@ -1356,7 +1359,6 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
}else{
$plusFlag=true;
}
$goodsClassStrMinus = $storeOnlineGoodsClassDao->getChangedGoodsClass(\Our\ApiConst::minus);
if($goodsClassStrMinus&&$minusFlag==false){
$goodsClassMinus = unserialize($goodsClassStrMinus);
......@@ -1381,6 +1383,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$oldTemp = $storeOnlineGoodsClassDao->findByWhere($goodsClass);
if(!$oldTemp){
$storeOnlineGoodsClassDao->insert($goodsClass);
\Our\RedisHelper::delCachedFunction(\Redis\Db6\StoreOnlineGoodsClassRedisModel::getInstance(),array(&$storeOnlineGoodsClassDao, 'getStoreOnlineGoodsClassesByGcId'),array(),array($goodsClass['store_id']));
}
return true;
}
......@@ -1392,16 +1395,19 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$gcFrom = $goodsClass['gc_from'];
$where['gc_id_1'] = $goodsClass['gc_id_1'];
$where['gc_id_2'] = $goodsClass['gc_id_2'];
$where['gc_id_3'] = $goodsClass['gc_id_3'];
$where['store_id'] = $goodsClass['store_id'];
$where['goods_state'] = \Our\ApiConst::onlineGoodsState;
$where['goods_verify'] = \Our\ApiConst::onlineGoodsVerify;
$where['is_del'] = \Our\ApiConst::onlineGoodsDel;
if($gcFrom==\Our\ApiConst::one){
$where['goods_class_t_id'] = $goodsClass['gc_id_3'];
}else{
$where['gc_id_3'] = $goodsClass['gc_id_3'];
}
$tempOne = $goodsCommonDao->getOne($where,'goods_commonid');
if(!$tempOne){
$storeOnlineGoodsClassDao->del($goodsClass);
\Our\RedisHelper::delCachedFunction(\Redis\Db6\StoreOnlineGoodsClassRedisModel::getInstance(),array(&$storeOnlineGoodsClassDao, 'getStoreOnlineGoodsClassesByGcId'),array(),array($goodsClass['store_id']));
}
}
}
......
......@@ -37,7 +37,7 @@ class RefundServiceModel extends \Business\AbstractModel
//获得退款详情字段
private $refundReturnField = 'refund_id as refundId,order_id as orderId,order_sn as orderSn,refund_sn as refundSn,store_id as storeId,store_name as storeName,seller_state as sellerState,goods_id as goodsId,order_goods_id as orderGoodsId,goods_name as goodsName,goods_num as goodsNum,refund_amount as refundAmount,goods_image as goodsImage,refund_type as refundType,refund_state as refundState,return_type as returnType,add_time as addTime,seller_time as sellerTime,admin_time as adminTime,reason_info as reasonInfo,pic_info as picInfo,buyer_message as buyerMessage,seller_message as sellerMessage,admin_message adminMessage,express_id as expressId,invoice_no as invoiceNo,ship_time as shipTime,delay_time as delayTime,receive_time as receiveTime,shipping_over as shippingOver,shipping_sign as shippingSign,shipping_html as shippingHtml,is_suc_refund as isSucRefund,refund_shipping_type as refundShippingType,address_id as addressId,diliveryman_id as diliverymanId,is_platform_in as isPlatformIn,platform_in_reason as platformInReason,platform_state as platformState,seller_state as sellerState,return_type as returnType,refund_shipping_type as refundShippingType,buyer_refund_amount as buyerRefundAmount,reason_id as reasonId,receive_message as receiveMessage,goods_state as goodsState';
private $storeRefundReturnField = 'refund_id as refundId,order_id as orderId,order_sn as orderSn,refund_sn as refundSn,store_id as storeId,store_name as storeName,seller_state as sellerState,goods_id as goodsId,order_goods_id as orderGoodsId,goods_name as goodsName,goods_num as goodsNum,refund_amount as refundAmount,buyer_refund_amount as buyerRefundAmount,goods_image as goodsImage,refund_type as refundType,refund_state as refundState,return_type as returnType,add_time as addTime,seller_time as sellerTime,admin_time as adminTime,reason_id as reasonId,reason_info as reasonInfo,pic_info as picInfo,buyer_message as buyerMessage,seller_message as sellerMessage,admin_message adminMessage,express_id as expressId,invoice_no as invoiceNo,ship_time as shipTime,delay_time as delayTime,receive_time as receiveTime,receive_message as receiveMessage,shipping_over as shippingOver,shipping_sign as shippingSign,shipping_html as shippingHtml,is_suc_refund as isSucRefund,refund_shipping_type as refundShippingType,address_id as addressId,diliveryman_id as diliverymanId,is_platform_in as isPlatformIn,platform_in_reason as platformInReason,platform_state as platformState,return_type as returnType,refund_shipping_type as refundShippingType,goods_state as goodsState,buyer_name as buyerName';
private $storeRefundReturnField = 'refund_id as refundId,order_id as orderId,order_sn as orderSn,refund_sn as refundSn,store_id as storeId,store_name as storeName,seller_state as sellerState,goods_id as goodsId,order_goods_id as orderGoodsId,goods_name as goodsName,goods_num as goodsNum,refund_amount as refundAmount,buyer_refund_amount as buyerRefundAmount,goods_image as goodsImage,refund_type as refundType,refund_state as refundState,return_type as returnType,add_time as addTime,seller_time as sellerTime,admin_time as adminTime,reason_id as reasonId,reason_info as reasonInfo,pic_info as picInfo,buyer_message as buyerMessage,seller_message as sellerMessage,admin_message adminMessage,express_id as expressId,invoice_no as invoiceNo,ship_time as shipTime,delay_time as delayTime,receive_time as receiveTime,receive_message as receiveMessage,shipping_over as shippingOver,shipping_sign as shippingSign,shipping_html as shippingHtml,is_suc_refund as isSucRefund,refund_shipping_type as refundShippingType,address_id as addressId,diliveryman_id as diliverymanId,is_platform_in as isPlatformIn,platform_in_reason as platformInReason,platform_state as platformState,return_type as returnType,refund_shipping_type as refundShippingType,goods_state as goodsState,buyer_name as buyerName,payment_type as paymentType';
private $order;
......@@ -167,7 +167,10 @@ class RefundServiceModel extends \Business\AbstractModel
}
}
}
$refundUpdate = array('is_suc_refund' => 1, 'gmt_update' => TIMESTAMP, 'refund_state' => 3);
$refundUpdate = array('gmt_update' => TIMESTAMP, 'refund_state' => 3);
if($refund['is_suc_refund']!=ApiConst::refundSuccess){
$refundUpdate['refund_state']=ApiConst::refundStateProccess;
}
$res = $refundReturnDao->update(array('refund_id' => $refund['refund_id']), $refundUpdate);
if (!$res) {
ErrorModel::throwException(CodeConfigModel::refundWriteError);
......@@ -175,7 +178,13 @@ class RefundServiceModel extends \Business\AbstractModel
// showDialog('退款成功,退款表写入失败,请联系工作人员!',$reload,'error');
return false;
}
$result = $orderGoodsDao->update(array('rec_id' => $refund['order_goods_id']), array('refund_state_name'=>'退款成功', 'gmt_update' => TIMESTAMP));
$refundGoodsUpdate= array('refund_state_name'=>DescribeConst::alreadyComplete, 'gmt_update' => TIMESTAMP);
if(!in_array($refund['payment_type'],ArrayConst::orderPayTypeOnlines)){
if($refund['is_suc_refund']!=ApiConst::refundSuccess){
$refundGoodsUpdate['refund_state_name']=DescribeConst::alreadyRecieve;
}
}
$result = $orderGoodsDao->update(array('rec_id' => $refund['order_goods_id']),$refundGoodsUpdate );
if (!$result) {
$refundReturnDao->db->doRollback();
// showDialog('refund_state_name',$reload,'error');
......@@ -223,6 +232,16 @@ class RefundServiceModel extends \Business\AbstractModel
}$updateData=array();
$updateData['is_suc_refund']=ApiConst::refundSuccess;
$updateData['refund_state']=ApiConst::refundStateComplete;
if($returnDetail['goodsState']!=ApiConst::goodsStateRecieved){
if($returnDetail['refundType']==ApiConst::refundApplyOnlyMoney){
$updateData['refund_state']=ApiConst::refundStateComplete;
}else{
$updateData['refund_state']=ApiConst::refundStateProccess;
if($returnDetail['returnType']==ApiConst::returnTypeNotReturn){
$updateData['refund_state']=ApiConst::refundStateComplete;
}
}
}
$res=$refundReturnDao->update(array('refund_id'=>$refundId), $updateData);
$goodsUpdateData['is_refund']=ApiConst::refundSuccess;
$goodsUpdateData['refund_state_name']=DescribeConst::refundSuccess;
......@@ -562,22 +581,37 @@ class RefundServiceModel extends \Business\AbstractModel
} else {
$updateData = array('is_suc_refund'=>1,'gmt_update'=>TIMESTAMP);
}
$res=$refundReturnDao->update(array('refund_id'=>$refund['refund_id']), $updateData);
if(!$res){
$refundReturnDao->db->doRollback();
// showDialog('退款成功,退款表写入失败,请联系工作人员!',$reload,'error');
return false;
}
$result= $orderGoodsDao->update(array('rec_id'=>$refund['order_goods_id']), array('is_refund'=>1,'gmt_update'=>TIMESTAMP));
if(!$result){
$refundReturnDao->db->doRollback();
// showDialog('refund_state_name',$reload,'error');
return false;
}
}else{
$updateData['is_suc_refund']=ApiConst::zero;
$res=$refundReturnDao->update(array('refund_id'=>$refund['refund_id']), $updateData);
if(!$res){
$refundReturnDao->db->doRollback();
// showDialog('退款成功,退款表写入失败,请联系工作人员!',$reload,'error');
return false;
}
}
}else{
$updateData = array('is_suc_refund'=>ApiConst::zero,'gmt_update'=>TIMESTAMP,'seller_state'=>$refund_array['seller_state'],'refund_state'=>ApiConst::refundStateProccess);
}
$res=$refundReturnDao->update(array('refund_id'=>$refund['refund_id']), $updateData);
if(!$res){
$refundReturnDao->db->doRollback();
$res=$refundReturnDao->update(array('refund_id'=>$refund['refund_id']), $updateData);
if(!$res){
$refundReturnDao->db->doRollback();
// showDialog('退款成功,退款表写入失败,请联系工作人员!',$reload,'error');
return false;
}
$result= $orderGoodsDao->update(array('rec_id'=>$refund['order_goods_id']), array('is_refund'=>1,'gmt_update'=>TIMESTAMP));
if(!$result){
$refundReturnDao->db->doRollback();
// showDialog('refund_state_name',$reload,'error');
return false;
return false;
}
}
}
$refundReturnDao->db->doCommit();
$refundReturnDao->deleteRefundCache($refund['buyer_id'], $refund['refund_id']);
......
......@@ -399,11 +399,14 @@ class StoreServiceModel extends \Business\AbstractModel{
public function getRecommendGoods($storeId,$activities){
$storeClassDAO = \DAO\StoreGoodsClassModel::getInstance();
$tempStcs = $storeClassDAO->getList(array('store_id'=>$storeId),'stc_id,stc_name');
$recommendGoods = [];
if($tempStcs) {
$storeClassGoodsDao = \DAO\StoreGoodsClassGoodsModel::getInstance();
$stcGoods = $storeClassGoodsDao->getList('stc_id in('.implode(',',array_column($tempStcs,'stc_id')).')','stc_id,goods_common_id');
foreach ($tempStcs as $stc) {
$recommendGoods[$stc['stc_id']] = array('stcId'=>$stc['stc_id'],'stcName'=>$stc['stc_name'],'goods'=>[]);
}
}
$recommendGoods = [];
if($stcGoods){
$goodsIds = array_column($stcGoods,'goods_common_id');
$goodsCommonDAO = \DAO\GoodsCommonModel::getInstance();
......@@ -412,7 +415,6 @@ class StoreServiceModel extends \Business\AbstractModel{
}else{
$tempGoods = $goodsCommonDAO->getListWithSale(array('han_goods_common.goods_commonid in('.implode(',',$goodsIds).')'),'goods_name,goods_image,goods_price,goods_marketprice,han_goods_common.goods_commonid,IFNULL(discount_price,han_goods_common.goods_price) AS goodsPrice',$activities);
}
if($tempGoods && $tempStcs){
$stcs = [];
foreach ($tempStcs as $v){
......@@ -431,18 +433,19 @@ class StoreServiceModel extends \Business\AbstractModel{
'goodsPrice'=>$goods[$v['goods_common_id']]['goodsPrice'],
'goodsMarketPrice'=>$goods[$v['goods_common_id']]['goods_marketprice'],
];
if(key_exists($v['stc_id'],$recommendGoods)){
if(count($recommendGoods[$v['stc_id']]['goods']) >= 8){
continue;
}
array_push($recommendGoods[$v['stc_id']]['goods'],$good);
}else{
$recommendGoods[$v['stc_id']] = [
'stcId'=>$v['stc_id'],
'stcName'=>$stcs[$v['stc_id']]['stc_name'],
'goods'=>array($good)
];
}
array_push($recommendGoods[$v['stc_id']]['goods'],$good);
// if(key_exists($v['stc_id'],$recommendGoods)){
// if(count($recommendGoods[$v['stc_id']]['goods']) >= 8){
// continue;
// }
// array_push($recommendGoods[$v['stc_id']]['goods'],$good);
// }else{
// $recommendGoods[$v['stc_id']] = [
// 'stcId'=>$v['stc_id'],
// 'stcName'=>$stcs[$v['stc_id']]['stc_name'],
// 'goods'=>array($good)
// ];
// }
}
}
$tempRecommendGoods = array();
......@@ -1344,10 +1347,10 @@ class StoreServiceModel extends \Business\AbstractModel{
foreach ($stores as $store) {
if($store['amount'] >= 400) {
//自动免费续费 当前签约分类租金2个月
$storeUtil->calcChargeMoney(array('month'=>2,'store_end_time'=>$store['store_end_time'],'contract_time'=>$store['contract_time']));
$storeUtil->calcChargeMoney(array($store['store_id']=>array('month'=>2,'store_end_time'=>$store['store_end_time'],'contract_time'=>$store['contract_time'])));
}elseif ($store['amount'] >= 300) {
//自动免费续费 当前签约分类租金1个月
$storeUtil->calcChargeMoney(array('month'=>1,'store_end_time'=>$store['store_end_time'],'contract_time'=>$store['contract_time']));
$storeUtil->calcChargeMoney(array($store['store_id']=>array('month'=>1,'store_end_time'=>$store['store_end_time'],'contract_time'=>$store['contract_time'])));
}
// elseif ($store['amount'] < 30) {
// //查看是否有签约分类续费记录
......
......@@ -483,7 +483,11 @@ class GoodsModel extends \DAO\AbstractModel {
return true;
}
public function update($data, $where){
$this->setDb(\Our\DbNameConst::masterDBConnectName);
$result = $this->db->update($this->_tableName)->rows($data)->where($where)->execute();
return $result;
}
/**
* 获取格式化的规格值
......
<?php
namespace DAO\Goods;
class GoodsSnapshotModel extends \DAO\AbstractModel
{
/**
* 表名
*
* @var string
*/
protected $_tableName = 'han_goods_snapshot';
/**
* 主键
*
* @var string
*/
protected $_primaryKey = 'id';
public function init()
{
}
public function insert($data)
{
$this->setDb(\Our\DbNameConst::masterDBConnectName);
return $this->db->insert($this->_tableName)->rows($data)->execute();
}
public function save($data, $where){
$this->setDb(\Our\DbNameConst::masterDBConnectName);
$result = $this->db->update($this->_tableName)->rows($data)->where($where)->execute();
return $result;
}
/**
* 类实例
*
* @var \DAO\UserModel
*/
private static $_instance = null;
/**
* 获取类实例
*
* @return \DAO\UserModel
*/
public static function getInstance()
{
if (!(self::$_instance instanceof self)) {
self::$_instance = new self();
}
return self::$_instance;
}
}
File mode changed from 100755 to 100644
......@@ -25,7 +25,7 @@ class RefundReturnModel extends \DAO\AbstractModel
* @var string
*/
protected $_tableName = 'han_refund_return';
public $refundDetailField = 'is_platform_in as isPlatformIn,seller_state as sellerState,platform_state as platformState,refund_id as refundId,order_id as orderId,store_id as storeId,order_goods_id as orderGoodsId';
public $refundDetailField = 'is_platform_in as isPlatformIn,seller_state as sellerState,platform_state as platformState,refund_id as refundId,order_id as orderId,store_id as storeId,order_goods_id as orderGoodsId,refund_type as refundType,return_type as returnType,goods_state as goodsState';
public $refundReturnField = "seller_state,refund_state,is_platform_in,platform_state";
private $sumField = "order_id as orderId,buyer_id as buyerId,store_id as storeId,goods_num as goodsNum,refund_amount as refundAmount,is_suc_refund as isSucRefund,gmt_update as gmtUpdate";
private $sumRefundAmount = " sum(refund_amount) as sumRefundAmont";
......@@ -212,8 +212,37 @@ class RefundReturnModel extends \DAO\AbstractModel
public function getStatusExtent($returnRefund, $isSeller = false)
{
// // if($returnRefund['refundState']!=ApiConst::refundCompleted){
// if ($returnRefund['sellerState'] == ApiConst::refundSellerAgree) {
// if ($returnRefund['refundState'] == ApiConst::refundCompleted) {
// return OrderConst::complete;
// }
// if ($returnRefund['refundType'] == ApiConst::refundTypeMoney) {
// return OrderConst::sellerAgree;
// }
// if ($returnRefund['refundType'] == ApiConst::refundTypeGoods) {
// if ($returnRefund['isSucRefund'] == ApiConst::refundSuccess) {
// return OrderConst::alreadyReufndMoney;
// }
// if ($returnRefund['goodsState'] == ApiConst::goodsStateUnRecieve) {
// return OrderConst::goodsStateUnRecieve;
// }
// if ($returnRefund['goodsState'] == ApiConst::goodsStateRecieved) {
// return OrderConst::goodsStateRecieved;
// }
// if ($returnRefund['returnType'] == ApiConst::returnTypeNotReturn) {
// return OrderConst::sellerAgreeReturn;
// }
// if ($returnRefund['returnType'] == ApiConst::returnTypeMustReturn) {
// return OrderConst::waitSellerRecieve;
// }
// }
// }
// if($returnRefund['refundState']!=ApiConst::refundCompleted){
if ($returnRefund['sellerState'] == ApiConst::refundSellerAgree) {
if ($returnRefund['refundState'] == ApiConst::refundCompleted) {
return OrderConst::complete;
}
if ($returnRefund['isSucRefund'] == ApiConst::refundSuccess) {
return OrderConst::alreadyReufndMoney;
}
......@@ -221,21 +250,41 @@ class RefundReturnModel extends \DAO\AbstractModel
return OrderConst::sellerAgree;
}
if ($returnRefund['refundType'] == ApiConst::refundTypeGoods) {
if ($returnRefund['isSucRefund'] == ApiConst::refundSuccess) {
return OrderConst::alreadyReufndMoney;
}
if ($returnRefund['goodsState'] == ApiConst::goodsStateUnRecieve) {
return OrderConst::goodsStateUnRecieve;
return OrderConst::goodsStateUnRecieve;
}
if ($returnRefund['goodsState'] == ApiConst::goodsStateRecieved) {
return OrderConst::goodsStateRecieved;
}
if ($returnRefund['returnType'] == ApiConst::returnTypeNotReturn) {
return OrderConst::sellerAgreeReturn;
}
if ($returnRefund['returnType'] == ApiConst::returnTypeMustReturn) {
return OrderConst::waitSellerRecieve;
if ($returnRefund['isSucRefund'] == ApiConst::refundSuccess) {
if($returnRefund['goodsState'] == ApiConst::goodsStateRecieved){
return OrderConst::complete;
}
if($isSeller){
if ($returnRefund['returnType'] == ApiConst::returnTypeNotReturn) {
$stateName= OrderConst::complete;
}
if ($returnRefund['returnType'] == ApiConst::returnTypeMustReturn) {
$stateName=OrderConst::alreadyReufndMoney;
}
}else{
if ($returnRefund['returnType'] == ApiConst::returnTypeNotReturn) {
$stateName= OrderConst::sellerAgreeReturn;
}
if ($returnRefund['returnType'] == ApiConst::returnTypeMustReturn) {
$stateName=OrderConst::waitSellerRecieve;
}
}
}else{
if($returnRefund['goodsState'] == ApiConst::goodsStateRecieved){
return OrderConst::goodsStateRecieved;
}
if ($returnRefund['returnType'] == ApiConst::returnTypeNotReturn) {
$stateName= OrderConst::sellerAgreeReturn;
}
if ($returnRefund['returnType'] == ApiConst::returnTypeMustReturn) {
$stateName=OrderConst::waitSellerRecieve;
}
}
return $stateName;
}
}
if ($returnRefund['sellerState'] == ApiConst::refundSellerRefuse) {
......
......@@ -24,42 +24,44 @@
src: url('/data/fonts/fonts/rzyzkxk.ttf');
}
.wrap { max-width:1276px; margin: 0 auto; }
.wrap { width:1322px; margin: 0 auto; }
body { background: #fff; font-size: 14px; line-height: 1.5; font-family: "Microsoft Yahei";}
body { background: #fff; font-size: 14px; line-height: 1.5; font-family:"Microsoft Yahei";}
.mod-card{ height: 1063px; background: url("//static.shenbd.com/www/index/2018/img/card/bg-card.jpg") no-repeat; position: relative; color:#030000}
.mod-card{ height: 1100px; background: url("//static.shenbd.com/www/index/2018/img/card/bg-card-b.jpg") no-repeat; position: relative; color:#030000}
.mod-card .mod-c1, .mod-card .mod-c2{ position: absolute; width: 50%; text-align: center;}
.mod-card .mod-c1{ left: 0; top: 300px;}
.mod-card .mod-c2{ right: 0; top: 200px;}
.mod-card .t1{ margin-top: 35px;}
.mod-card .t2{ margin-top: 255px;}
.mod-card .mod-c1{ left: 0; top: 316px;}
.mod-card .mod-c2{ right: 0; top: 188px;}
.mod-card .t1{ margin-top: 25px;}
.mod-card .t2{ margin-top: 260px; line-height: 1; }
.mod-card .message{ line-height: 1.4; margin-top: 160px;}
.mod-card .name{ font-size: 74px; font-family: 'rzyzkxk';}
.mod-card .title{ font-size: 26px;}
.mod-card .phone{ font-size: 36px; margin-top: 20px; letter-spacing: 8px;}
.mod-card .code{ margin-top: 60px;}
.mod-card .code-txt{ font-size: 30px; margin-top: 20px; letter-spacing: 15px; padding-left: 30px;}
</style>
</head>
<body>
<div class="wrap">
<div class="mod-card">
<div class="mod-c1">
<p><img src="//static.shenbd.com/www/index/2018/img/code-download-400.jpg" width="325" height="325" alt="我的身边店"></p>
<p class="t1"><img src="//static.shenbd.com/www/index/2018/img/card/t1.png" alt="我的身边店"></p>
<p class="t2"><img src="//static.shenbd.com/www/index/2018/img/card/t2.png" alt="您身边的品牌 服务品牌的你"></p>
<p><img src="//static.shenbd.com/www/index/2018/img/code-download-400.jpg" width="340" height="340" alt="我的身边店"></p>
<p class="t1"><img src="//static.shenbd.com/www/index/2018/img/card/t1-b.jpg" alt="我的身边店" width="226"></p>
<p class="t2"><img src="//static.shenbd.com/www/index/2018/img/card/slogan-b.jpg" alt="我的身边店" width="500"></p>
</div>
<div class="mod-c2">
<div class="logo">
<img src="//static.shenbd.com/lib/img/logo-black.png" alt="我的身边店">
<img src="//static.shenbd.com/www/index/2018/img/card/logo-b.jpg" alt="我的身边店" width="318">
</div>
<div class="message">
<p class="name"><?php echo $params['name']; ?></p>
<p class="title">区域经理</p>
<p class="title"><?php echo $params['areaManage']; ?></p>
<p class="phone"><?php echo $params['telephone']; ?></p>
</div>
<div class="code">
<img width="213" src="<?php echo $params['qrcodeUrl']; ?>" alt="我的身边店">
<img width="213" src="<?php echo $params['qrcodeUrl']; ?>" width="222" height="222" alt="我的身边店">
<p class="code-txt">扫码开店</p>
</div>
</div>
</div>
......
......@@ -22,7 +22,7 @@
body { background: #fff; font-size: 14px; line-height: 1.5; font-family: "Microsoft Yahei";}
.mod-card{ height: 1181px; position: relative; background: url("//static.shenbd.com/www/index/2018/img/card/bg-card2.jpg") no-repeat;}
.mod-card{ height: 1181px; position: relative; background:#e47d2b url("//static.shenbd.com/www/index/2018/img/card/bg-card2-b.png") bottom center no-repeat;}
.mod-card .info{ position: absolute; left: 126px; top: 118px;}
.mod-card .name{ color:#fff; font-size: 72px; font-weight: bold}
.mod-card .img-box{ margin-top: 85px;}
......
......@@ -22,7 +22,7 @@
body { background: #fff; font-size: 14px; line-height: 1.5; font-family: "Microsoft Yahei";}
.mod-card{ height: 1181px; position: relative; background: url("//static.shenbd.com/www/index/2018/img/card/bg-card2.jpg") no-repeat;}
.mod-card{ height: 1181px; position: relative; background:#e47d2b url("//static.shenbd.com/www/index/2018/img/card/bg-card2-b.png") bottom center no-repeat;}
.mod-card .info{ position: absolute; left: 126px; top: 118px; width: 86%;}
.mod-card .name{ color:#fff; font-size: 72px; font-weight: bold}
.mod-card .img-box{ margin-top: 85px;}
......@@ -38,7 +38,7 @@
<div class="wrap">
<div class="mod-card">
<div class="info">
<div class="name">一凡书城德化县分店</div>
<div class="name"><?php echo $params['storeName'];?></div>
<div class="img-box" >
<div class="code" >
<div id="qrcodeImg" class="code-in"></div>
......
......@@ -6,17 +6,17 @@
<title></title>
<style type="text/css">
html,body,p,span,div,img{margin:0;padding:0;}body{width:750px;}
.shareC { width:750px;padding:0; text-align:center;font-family:"黑体";color:#212121;}
.avatar{padding:55px 55px 20px 55px;}
.shareC {width:750px;padding:0;text-align:center;font-family: "Microsoft Yahei";color:#212121;}
.avatar{padding: 35px 55px 20px 55px;}
#headerBg{width:600px; height:500px;}
#title{font-size:34px; }
#title{ font-size:28px; line-height:36px; padding:0 110px 0 110px; height:72px;display:block; display:-webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;overflow:hidden;text-overflow:ellipsis;}
.price{color:#ff8519;font-size:46px;}
.price #price{font-size:34px; text-decoration:line-through;}
.qrcode{background:url(/data/img/flower.png); height:488px; margin:6px auto 0 auto;}
#qrImg {margin-top:80px;}
#title{font-size: 40px;line-height: 1.5;padding:0 110px 0 110px;/* height:72px; */display:block;display:-webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;overflow:hidden;text-overflow:ellipsis;}
.price{color:#ff8519;font-size: 40px;margin-top: 20px;}
.price #price{font-size: 30px;text-decoration:line-through;}
.qrcode{background:url(/data/img/flower.png);height: 388px;margin: 40px auto 0 auto;padding-top: 100px;}
/*#qrImg {margin-top:80px;}*/
#qrcodeImg img { margin: 0 auto;}
.footer{ font-size:30px; height:66px; line-height:66px; padding:0 0 55px 0;}
.footer{font-size:30px;height:66px;line-height:66px;padding: 20px 0 55px 0;}
.footer img{vertical-align:bottom; display:inline-block;}
</style>
</head>
......@@ -42,6 +42,12 @@
</div>
<script type="text/javascript" src="/data/js/qrcode.min.js"></script>
<script type="text/javascript">
function removeElement(_element){
var _parentElement = _element.parentNode;
if(_parentElement){
_parentElement.removeChild(_element);
}
}
var pageObj = {
type : "<?php echo $params['shareType'];?>",//1或2是小程序码,其它是二维码
id : "<?php echo $params['id'];?>",//1是小程序码,2是二维码,
......@@ -64,8 +70,11 @@
if(pageObj.price != pageObj.discount)
document.getElementById("price").innerHTML = "<span style='font-size:30px;'>¥</span>"+(pageObj.price / 100).toFixed(2);
if(pageObj.type<=2){
document.getElementById("qrImg").src = pageObj.qrImg;}
document.getElementById("qrImg").src = pageObj.qrImg;
}
else{
var ele=document.getElementById('qrImg');
removeElement(ele);
new QRCode(document.getElementById('qrcodeImg'), pageObj.url);
}
......
......@@ -148,7 +148,7 @@ resources.database.mongo.params.driver_options.1002 = "SET NAMES utf8"
redis.database.params.host = "127.0.0.1"
redis.database.params.port = "6379"
redis.database.params.prefix = "qm_"
;redis.database.params.password = "23456ertyu"
;redis.database.params.password = ""
out.config="/data/config"
password.key='~!@#$`1234qwertasdfgzxcvb';
......@@ -285,7 +285,7 @@ elastic.master.scheme="http";
[ccwdevelop : common]
; 数据库配置
resources.database.params.driver = "pdo_mysql"
resources.database.params.hostname = "127.0.0.1"
resources.database.params.hostname = "172.18.0.3"
resources.database.params.port = 3306
resources.database.params.database = "qmcs"
resources.database.params.username = "root"
......@@ -295,7 +295,7 @@ resources.database.params.driver_options.1002 = "SET NAMES utf8"
; 从库配置
resources.database.slave.params.driver = "pdo_mysql"
resources.database.slave.params.hostname = "127.0.0.1"
resources.database.slave.params.hostname = "172.18.0.3"
resources.database.slave.params.port = 3306
resources.database.slave.params.database = "qmcs"
resources.database.slave.params.username = "root"
......@@ -316,7 +316,7 @@ resources.database.mongo.params.driver_options.1002 = "SET NAMES utf8"
password.key='~!@#$`1234qwertasdfgzxcvb';
redis.database.params.host = "127.0.0.1"
redis.database.params.host = "172.18.0.2"
redis.database.params.port = "6379"
redis.database.params.prefix = "qm_"
redis.database.params.password = ""
......
<?php
/**
* 添加商品快照
* 执行一次
*/
define("APPLICATION_PATH", realpath(dirname(__FILE__) . '/../../../')); //指向public的上一级
require APPLICATION_PATH . '/scripts/crontab/common.php';
$goodsList = \DAO\GoodsModel::getInstance()->getList(array('snapshot_id'=>0),'*');
foreach ($goodsList as $goods) {
$snaId = \DAO\Goods\GoodsSnapshotModel::getInstance()->insert(array('content'=>serialize($goods),'type'=>1));
\DAO\GoodsModel::getInstance()->update(array('snapshot_id'=>$snaId),array('goods_id'=>$goods['goods_id']));
}
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