X Tutup
The Wayback Machine - https://web.archive.org/web/20201015013910/https://github.com/APIJSON/APIJSON/issues/50
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java demo 网站上的查询返回结果不合期望 #50

Open
zhangchunlin opened this issue Nov 22, 2018 · 1 comment
Open

Java demo 网站上的查询返回结果不合期望 #50

zhangchunlin opened this issue Nov 22, 2018 · 1 comment
Labels
bug

Comments

@zhangchunlin
Copy link

@zhangchunlin zhangchunlin commented Nov 22, 2018

环境信息

  • 系统: 你的demo网站
  • JDK: 你的demo网站
  • 数据库: 你的demo网站
  • APIJSON: 你的demo网站

问题描述

Java demo 网站上的查询返回结果不合期望,如

请求:

{
  "user":{
    "id":9999999999
  }
}

返回:

{"user":{"id":9999999999},"code":200,"msg":"success"}

期望这里应该返回 "user":null 或者如果这里没有user这个表,那么应该返回错误值和错误信息

请求:

{
  "User":{
    "id":9999999999
  }
}

返回:

{"code":200,"msg":"success"}

期望返回 "User":null

请求:

{
  "user":{
  },
  "[]":{
    "count":3,             
    "User":{
      "@column":"id,name" 
    }
  }
}

返回:

{"code":200,"msg":"success"}

期望如果不支持小写开头的表名,那么应该返回错误值而不是success

@TommyLemon
Copy link
Member

@TommyLemon TommyLemon commented Nov 26, 2018

1.小写的认为是普通对象,例如

{
    "data": {
        "User": {
            "id": 82001
        }
    }
}

返回

{
    "data": {
        "User": {
            "id": 82001,
            "sex": 0,
            "name": "测试账号",
            "tag": "Dev",
            "head": "https://gss2.bdstatic.com/-fo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike92%2C5%2C5%2C92%2C30/sign=c31ae7219525bc313f5009ca3fb6e6d4/42a98226cffc1e17646dbede4690f603728de90b.jpg",
            "contactIdList": [
                82003,
                93793,
                82005
            ],
            "pictureList": [
                "http://common.cnblogs.com/images/icon_weibo_24.png"
            ],
            "date": "2017-02-01 19:21:50.0"
        }
    },
    "code": 200,
    "msg": "success"
}

2.的确是一个bug,后续解决

@TommyLemon TommyLemon added the bug label Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.
X Tutup