Skip to content

Commit

Permalink
简单修改
Browse files Browse the repository at this point in the history
简单修改
  • Loading branch information
NingLeixueR committed Dec 22, 2023
1 parent 3b92574 commit 7821fe8
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 16 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ set(CMAKE_CXX_STANDARD 20)
IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
#set(CMAKE_CXX_FLAGS "${COLLECT_GCC} -std=c++0x -pthread -lrt -L/usr/lib64/mysql -lmysqlclient -lcurl")
#-lboost_thread
set(CMAKE_CXX_FLAGS "${COLLECT_GCC} -Wfatal-errors -std=c++20 -march=native -msse4.1 -O3 -pthread -lrt -L/usr/lib64/mysql -L/root/lbtest/lbtest/lib -lmysqlclient -lcurl -lcryptopp -lmycorekkk -lboost -lcryptopp -I/usr/include/mysql -I/usr/include/curl -I/root/lbtest/lbtest/3part/boost/libs/atomic/src/")
#set(CMAKE_CXX_FLAGS "${COLLECT_GCC} -D_GLIBCXX_USE_CXX11_ABI=0 -Wfatal-errors -std=c++20 -march=native -msse4.1 -O3 -pthread -lrt -lprotobuf -L/usr/lib64/mysql -L/root/lbtest/lbtest/lib -lmysqlclient -lcurl -lcryptopp -lmycorekkk -lboost -I/usr/include/mysql -I/usr/include/curl -I/root/lbtest/lbtest/3part/boost/libs/atomic/src/")
set(CMAKE_CXX_FLAGS "${COLLECT_GCC} -D_GLIBCXX_USE_CXX11_ABI=0 -Wfatal-errors -std=c++20 -march=native -msse4.1 -O3 -pthread -lrt -lprotobuf -lmysqlclient -lcurl -lcryptopp -L/root/ngl/lib -lmycorekkk -I/usr/include/mysql -I/usr/include/curl -I/root/lbtest/lbtest/3part/boost/libs/atomic/src/")
INCLUDE_DIRECTORIES(3part/boost/libs/atomic/src)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux")

IF (CMAKE_SYSTEM_NAME MATCHES "Windows")
SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib/Debug)
ENDIF (CMAKE_SYSTEM_NAME MATCHES "Windows")

SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
INCLUDE_DIRECTORIES(/)

INCLUDE_DIRECTORIES(3part/MPI/Include)
Expand Down
2 changes: 1 addition & 1 deletion php/pay/pay_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
$gm = $_GET['gm'];
$stat = $_GET['stat'];

update_recharge($orderid, $roleid, $gm, $stat);
update_recharge($orderid, $roleid, $gm, $stat, isset($_GET['islog'])? true:false);
?>
26 changes: 18 additions & 8 deletions php/pay/payapi.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,20 @@ function createtime($orderid)
return intval(substr($orderid,25,10));
}

function update_recharge($orderid, $roleid, $gm, $stat)
function update_recharge($orderid, $roleid, $gm, $stat, bool islog)
{
$rechargeid = rechargeid($orderid);
$area = area($orderid);
$id = id($orderid);
$createtime = createtime($orderid);
echo "[{$orderid}]###[area:{$area}][id:{$id}][rechargeid:{$rechargeid}][createtime:{$createtime}]<br/>";
//echo "[{$orderid}]###[area:{$area}][id:{$id}][rechargeid:{$rechargeid}][createtime:{$createtime}]<br/>";

$con = mysql_connect(DB_IP . ":" . DB_PORT, DB_USER, DB_PASS);
if(!$con)
{
$Result['ret'] = 1;
$Result['msg'] = 'Can not connect: ' . mysql_error();
echo json_encode($Result);
return;
if(islog)
echo 'Can not connect: ' . mysql_error();
return false;
}

mysql_select_db(GMSYS, $con);
Expand All @@ -66,8 +65,19 @@ function update_recharge($orderid, $roleid, $gm, $stat)

$QueryInster = "insert into db_recharge(orderid,roleid,rechargeid,createtime,gm,stat) values ('{$orderid}', {$roleid}, {$rechargeid}, now(), {$gm}, {$stat})";
$QueryInster = $QueryInster." on duplicate key update gm=values(gm),stat=values(stat);";
mysql_query($QueryInster);
echo "{$QueryInster}<br/>";
if(mysql_query($QueryInster))
{
if(islog)
echo $QueryInster." success";
return true;
}
else
{
if(islog)
echo $QueryInster." fail";
return false;
}

}


Expand Down
6 changes: 4 additions & 2 deletions public/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@ SET(PUBLIC_LIST ${PROJECT_SOURCE_DIR})
FILE(GLOB_RECURSE PUBLIC_LIST_INCLUDE ${PUBLIC_LIST}/*.h )
FILE(GLOB_RECURSE PUBLIC_LIST_SRC ${PUBLIC_LIST}/*.cpp)
FILE(GLOB_RECURSE PUBLIC_LIST_CSRC ${PUBLIC_LIST}/*.c)
FILE(GLOB_RECURSE CORE_LIST_PBSRC ${PUBLIC_LIST}/*.cc)
SOURCE_GROUP("Header Files" FILES ${PUBLIC_LIST_INCLUDE})
SOURCE_GROUP("Source Files" FILES ${PUBLIC_LIST_SRC})
SOURCE_GROUP("Source Files" FILES ${PUBLIC_LIST_CSRC})
SOURCE_GROUP("Pb Source Files" FILES ${CORE_LIST_PBSRC})



IF (CMAKE_SYSTEM_NAME MATCHES "Windows")
ADD_LIBRARY(libmycore STATIC ${PUBLIC_LIST_INCLUDE} ${PUBLIC_LIST_SRC} ${PUBLIC_LIST_CSRC})
ADD_LIBRARY(libmycore STATIC ${PUBLIC_LIST_INCLUDE} ${PUBLIC_LIST_SRC} ${PUBLIC_LIST_CSRC} ${CORE_LIST_PBSRC})
ENDIF (CMAKE_SYSTEM_NAME MATCHES "Windows")


IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
ADD_LIBRARY(mycore STATIC ${PUBLIC_LIST_INCLUDE} ${PUBLIC_LIST_SRC} ${PUBLIC_LIST_CSRC})
ADD_LIBRARY(mycore STATIC ${PUBLIC_LIST_INCLUDE} ${PUBLIC_LIST_SRC} ${PUBLIC_LIST_CSRC} ${CORE_LIST_PBSRC})
ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux")


Expand Down
7 changes: 4 additions & 3 deletions server/node/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ ${CORE_PROTOBUF_LIST_CSRC}
)
#set_target_properties
IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
target_link_libraries(node mycorekkk)
target_link_libraries(node boost)
target_link_libraries(node hiredis)
target_link_libraries(node cryptopp)
#target_link_libraries(node mycorekkk)
#target_link_libraries(node boost)
#target_link_libraries(node hiredis)
#target_link_libraries(node cryptopp)
ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux")

IF (CMAKE_SYSTEM_NAME MATCHES "Windows")
Expand Down

0 comments on commit 7821fe8

Please sign in to comment.