Commit 637b4656 authored by zhz's avatar zhz

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

parents 91edb697 bf16aadc
<?php
echo 3333333;
header("Content-type: text/html; charset=utf-8");
//利用PHP目录和文件函数遍历用户给出目录的所有的文件和文件夹,修改文件名称
function fRename($dirname)
{
if (!is_dir($dirname)) {
echo "{$dirname}不是一个有效的目录!";
exit();
}
$handle = opendir($dirname);
$i = 1;
while (($fn = readdir($handle)) !== false) {
if ($fn != '.' && $fn != '..') {
echo "<br>将名为:" . $fn . "\n\r";
$curDir = $dirname . '/' . $fn;
if (is_dir($curDir)) {
fRename($curDir);
} else {
$path = pathinfo($curDir);
if (empty($path['extension'])) {
//改成你自己想要的新名字
$newname = $path['dirname'] . '/' . $path['basename'] . '.jpg';
echo "替换成:" . $i . '.' . $newname . "\r\n";
rename($curDir, $newname);
$i++;
}
}
}
}
}
//给出一个目录名称可以是相对路径,也可以是绝对路径
fRename('/www/web/testadmin_shenbd_com/public_html/data/upload/mall/avatar_bak');
exit();
......@@ -188,7 +188,7 @@ class Common
break;
default:
foreach ($files as $f) {
$output = $staticUrl . '/' .$directory . $f;
$output = $staticUrl . '/' .$directory . $f.\Our\NameConst::jpgSuffix;
}
break;
}
......
......@@ -100,6 +100,10 @@ class ImageUtil {
if (is_null($ossClient)) {
\Error\ErrorModel::throwException(\Error\CodeConfigModel::ossServerSetError);
}
if(strpos($uploadImageName,\Our\NameConst::dot)===false){
$uploadImageName = $uploadImageName.\Our\NameConst::jpgSuffix;
}
$ossUploadFilePath = $path.$uploadImageName;
//return $ossUploadFilePath;
$return = $ossClient->uploadFile($bucketName, $ossUploadFilePath, $filePath);
......
......@@ -17,7 +17,9 @@ class CouponServiceModel extends \Business\AbstractModel{
\Error\ErrorModel::throwException($memberCouponDao->errorCode);
}
if($where['couponState'] == \Our\ApiConst::couponUnused){
$whereSql = ' coupon_state ='.$where['couponState'].' and member_id ='.$memberId.' and out_time > '.time();
$whereSql = ' coupon_state ='.$where['couponState'].' and member_id ='.$memberId.' and out_time >= '.time();
}else if($where['couponState']==\Our\ApiConst::couponOverdue) {
$whereSql = ' coupon_state in ('.\Our\ApiConst::couponUnused.','.\Our\ApiConst::couponOverdue.') and member_id ='.$memberId.' and out_time < '.time();
}else{
$whereSql = ' coupon_state ='.$where['couponState'].' and member_id ='.$memberId;
}
......
......@@ -247,10 +247,10 @@ class MessageServiceModel extends \Business\AbstractModel
{
$messageHistory = \DAO\MessageHistoryModel::getInstance();
$self = $this->getUserByMemberIdAndSelfType($memberId, $selfType);
$toMember = $this->getUserByMemberIdAndSelfType($toId, $toType);
if (empty($toId)) {
$toId =$this->getMemberIdByOtherIdAndType($otherId,$toType);
}
$toMember = $this->getUserByMemberIdAndSelfType($toId, $toType);
$returnMemeber['toId'] = (int)$toId;
$returnMemeber['toUserId'] = (int)$toMember['uid'];
$returnMemeber['toUserName'] = $toMember['name'];
......@@ -443,6 +443,7 @@ class MessageServiceModel extends \Business\AbstractModel
$message['gmtCreate'] = TIMESTAMP;
$message['isRead'] = ApiConst::unread;
$message['type'] = (int)$message['type'];
$message['content'] = base64_encode($message['content']);
$serializeMessage = serialize($message);
//将消息添加到表messageHistory
$mesageHistory['fromId'] = $fromId;
......@@ -480,6 +481,11 @@ class MessageServiceModel extends \Business\AbstractModel
register_shutdown_function(array($messageHistoryDao, "sendMessage"), $mesageHistory, $toId);
//$messageHistoryDao->sendMessage($mesageHistory,$toId);
if ($res1 && $res2) {
$clientPush=\JPush\ClientPush::getInstance();
$mesageHistory['id']=$res1;
$addData['message'] = unserialize($mesageHistory['message']);
$addData['message']['content']=base64_decode($addData['message']['content']);
$clientPush->push($addData);
return $res1;
} else {
return false;
......
File mode changed from 100755 to 100644
......@@ -654,13 +654,16 @@ class OrderModel extends \DAO\AbstractModel
if ($order['orderState'] == ApiConst::orderStateWaitPay && $order['paymentType'] != ApiConst::offlinePay && $order['paymentType'] != ApiConst::afterSendPay) {
$text = OrderConst::unpayMessage;
}
if ($order['orderState'] == ApiConst::orderStateWaitConfirm && $order['paymentType'] != ApiConst::offlinePay && $order['paymentType'] != ApiConst::afterSendPay) {
if($order['orderState']==ApiConst::orderStateClose && $order['orderState']==ApiConst::orderStateCancel){
$test='';
}else{
if((TIMESTAMP-$order['paymentTime'])<ApiConst::tenMinSecond){
$text = OrderConst::payCancelMessage;
}
}
// if ($order['orderState'] == ApiConst::orderStateWaitConfirm && $order['paymentType'] != ApiConst::offlinePay && $order['paymentType'] != ApiConst::afterSendPay) {
// if($order['orderState']==ApiConst::orderStateClose && $order['orderState']==ApiConst::orderStateCancel){
// $test='';
// }else{
// $text = OrderConst::payCancelMessage;
// }
// }
}
//详情
if ($textType == ApiConst::orderDetailDescribe) {
......
......@@ -15,6 +15,8 @@ if(APP_ENV=='test' || APP_ENV=='pre' ||APP_ENV=='ccwdevelop' || APP_ENV=='produc
error_reporting(0);
}
}
error_reporting(E_ALL);
$app = new \Yaf\Application(APPLICATION_PATH . "/conf/application.ini", APP_ENV);
$app->bootstrap()->run();
......@@ -48,7 +48,7 @@ class cliOrderClose extends basecli
$redis->auth($conf['password']);
}
$clientPush=\JPush\ClientPush::getInstance();
$messageService=\DAO\MessageHistoryModel::getInstance();
//$messageService=\DAO\MessageHistoryModel::getInstance();
while($pushData=$redis->lPop('push_center')){
$addData = unserialize($pushData);
$addData['message'] = unserialize($addData['message']);
......
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