소스 검색

更新分数接口修复bug

qingjie 1 개월 전
부모
커밋
8a26346c52
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      webapi/webapi/HttpSocket.cpp

+ 1 - 1
webapi/webapi/HttpSocket.cpp

@@ -962,7 +962,7 @@ std::string HttpSocket::updateuserscore(std::map<std::string, std::string> getda
 
 	//用户不存在不减商家的分数
 	auto firstuser = m_pcoll->find_one(bsoncxx::builder::stream::document{} << "account" << tuserscore.account.c_str() << bsoncxx::builder::stream::finalize);
-	if (!firstuser || firstuser->view()["spreaderid"])
+	if (!firstuser || !firstuser->view()["spreaderid"])
 	{
 		strret = funclib::rettojson(11, "user is not exist");
 		return strret;