getShopTopArea.md
3.91 KB
用户画像--地域分布
接口名:
/chart/getShopTopArea
例子(http://localhost:8080/chart/getShopTopArea)
方法
POST JSONRAW
入参
属性名称 | 类型 | 例子 | 说明 | 是否必填 | 长度限制 |
---|---|---|---|---|---|
shopId | number | 16 | 店铺ID | Y | |
dateId | number | 12 | 时间点 | Y |
对应SQL的操作库表
<select id="selectShopTopAreaByShopId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from shop_top_area
<where>
<if test="shopTopArea.shopId != null ">
and shop_id=#{shopTopArea.shopId,jdbcType=INTEGER}
</if>
<if test="shopTopArea.shopId != null ">
and date_id=#{shopTopArea.dateId,jdbcType=INTEGER}
</if>
</where>
order by order_rate desc
limit 10
</select>
错误编码
错误码code | 消息 | 说明 |
---|---|---|
200 | 查询成功! | |
401 | 参数错误! | |
500 | 查询失败! |
返回
{
"alg": "SALT_MD5",
"code": 200,
"data":
{
"area":
[
{
"dateId": 12,
"id": 2,
"orderNum": 1321,
"orderRate": 99,
"province": "贵州",
"rank": 1,
"shopId": 16,
"shopName": "万安"
},
{
"dateId": 12,
"id": 3,
"orderNum": 421,
"orderRate": 87,
"province": "重庆",
"rank": 2,
"shopId": 16,
"shopName": "万安"
},
{
"dateId": 12,
"id": 4,
"orderNum": 411,
"orderRate": 66,
"province": "江苏",
"rank": 2,
"shopId": 16,
"shopName": "万安"
},
{
"dateId": 12,
"id": 1,
"orderNum": 321,
"orderRate": 54,
"province": "福建",
"rank": 4,
"shopId": 16,
"shopName": "万安"
}
],
"yoho":
[
{
"dateId": 12,
"id": 8,
"orderNum": 1321,
"orderRate": 99,
"province": "贵州",
"rank": 1,
"shopId": -1,
"shopName": "万安"
},
{
"dateId": 12,
"id": 10,
"orderNum": 421,
"orderRate": 87,
"province": "重庆",
"rank": 2,
"shopId": -1,
"shopName": "万安"
},
{
"dateId": 12,
"id": 12,
"orderNum": 411,
"orderRate": 66,
"province": "江苏",
"rank": 2,
"shopId": -1,
"shopName": "万安"
},
{
"dateId": 12,
"id": 6,
"orderNum": 321,
"orderRate": 54,
"province": "福建",
"rank": 4,
"shopId": -1,
"shopName": "万安"
}
]
},
"md5": "4f6d92a7ce189d1ab6e1326dc98c6d47",
"message": "getShopTopArea success"
}