|
|
# 新增平台
|
|
|
|
|
|
> 接口名: `/resources/getResPlatformById
|
|
|
|
|
|
### 方法
|
|
|
|
|
|
> POST JSONRAW
|
|
|
|
|
|
### 入参
|
|
|
|
|
|
-------------------------
|
|
|
|属性名称|类型|例子|说明|是否必填|长度限制|
|
|
|
|--------|----|----|---|----|--------|
|
|
|
|platformName|string|ipad|平台名称|是|50
|
|
|
|platformFlag|string|ipad|平台标示|是|50
|
|
|
|status|byte|1|状态|是|1
|
|
|
|
|
|
### 对应SQL的操作库表
|
|
|
|
|
|
```xml
|
|
|
<insert id="insertSelective" parameterType="com.yohobuy.platform.dal.cms.model.Platform" >
|
|
|
insert into platform
|
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
|
|
|
<if test="platformName != null" >
|
|
|
platform_name,
|
|
|
</if>
|
|
|
<if test="platformFlag != null" >
|
|
|
platform_flag,
|
|
|
</if>
|
|
|
create_time,
|
|
|
<if test="status != null" >
|
|
|
status,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
|
|
|
<if test="platformName != null" >
|
|
|
#{platformName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="platformFlag != null" >
|
|
|
#{platformFlag,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
UNIX_TIMESTAMP(),
|
|
|
<if test="status != null" >
|
|
|
#{status,jdbcType=TINYINT},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
```
|
|
|
|
|
|
### 错误编码
|
|
|
|
|
|
-------------------------
|
|
|
|错误码code|消息|说明|
|
|
|
|--------|----|----|
|
|
|
|200|操作成功| |
|
|
|
|400|平台名称不能为空!| |
|
|
|
|404|平台状态不能为空!| |
|
|
|
|500|平台信息新增失败!| |
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
``` json
|
|
|
{
|
|
|
"code": 200,
|
|
|
"data": [],
|
|
|
"md5": "d751713988987e9331980363e24189ce",
|
|
|
"message": "添加成功."
|
|
|
}
|
|
|
|
|
|
``` |
...
|
...
|
|