@wangjialin
2018-07-25T21:50:46.000000Z
字数 10225
阅读 982
app后置冲印体验(单份订单)
1、获取赠品冲印订单的状态和过期时间 – GetOrderStatusAndCountdown
入参
订单id: orderId 必填
hasImageGroup:非必须
返回内容
test(
{
"errId":"0",
"errMsg":"",
"idc":"0",
"seq":"",
"code":"0000",
"desc":"",
"orderFlag":"2",
"photoStatus":"0",
"countdown":"20210118152811"
}
)
返回结果字段说明:
"orderFlag":"2", //订单标识 0 普通订单;1 赠品后置订单;2 主品后置订单
"photoStatus":"0", //后置订单图片状态 0 等待上传;1 上传完成; 2 上传过期
"countdown":"20210113171821" //过期时间,格式:yyyyMMddHHmmss
2、获取相册已经上传的照片信息 – GetCyBag
入参说明:
orderId=73428224252 (订单id,必填)
hasImageGroup=1 (必填)
timeStamp=1524554980576 (必填)
返回结果
test(
{
"errId":"0",
"errMsg":"",
"idc":"0",
"seq":"",
"code":"0000",
"desc":"",
"skuName":"亮丽(SPLENDID)照片冲印套餐 3.5英寸正方形照片30张+DIY礼包 洗照片 手机在线冲印",
"countdown":"20210118152811",
"orderFlag":"2",
"photoStatus":"0",
"skuNum":"1",
"skuId":"4586105",
"timestamp":"1529378052735",
"albumNum":"1",
"maxImageNum":"30",
"uploadImageNum":"3",
"cutType":"2",
"width":"890",
"height":"890",
"printingimages":[
{
"albumId":"3380541",
"imageId":"102849540",
"imageUrl":"jfs/t20110/274/1301269892/1911703/e552bc93/5b28753dN7e693a43.jpg",
"imageWidth":"2976",
"imageHeight":"3968",
"created":"2018-06-19 11:15:09",
"imageName":"5b28753dN7e693a43.jpg",
"skuId":"4586105",
"skuCount":"2",
"isChecked":"1",
"orientation":"0",
"type":"1",
"value":"2976x2976_0_49"
}
,
{
"albumId":"3380541",
"imageId":"103282841",
"imageUrl":"jfs/t24442/68/311249396/54821/f87fa73c/5b2b654dN4efba214.jpg",
"imageWidth":"440",
"imageHeight":"784",
"created":"2018-06-21 16:43:57",
"imageName":"5b2b654dN4efba214.jpg",
"skuId":"4586105",
"skuCount":"1",
"isChecked":"1",
"orientation":"1",
"type":"1",
"value":"441x441_0_172"
}
]
}
)
返回参数说明:
skuName : 亮丽(SPLENDID)照片冲印套餐 3.5英寸正方形照片30张+DIY礼包 洗照片 手机在线冲印 , //名称
countdown : 20210118152811 , //过期时间
orderFlag : 2 , ////订单标识 0 普通订单;1 赠品后置订单;2 主品后置订单
photoStatus : 0 , // //后置订单图片状态 0 等待上传;1 上传完成; 2 上传过期 基类成员放前面
skuNum : 1 , //sku数量(份数)
skuId : 4586105 ,
timestamp : 1529378052735 ,
albumNum : 1 , //相册数量(同一个相册重复的次数)
maxImageNum : 30 , // 需要上传的照片数量
uploadImageNum : 3 , //已经上传的照片
cutType : 2 , //裁剪类型 0原图不裁剪 1留白 2居中裁剪
width : 890 , // 裁剪的宽
height : 890 , //裁剪的高 照片首次裁剪时,按照这两个参数来设置裁剪比例
albumId : 3380541 ,
imageId : 103282841 ,
imageUrl : jfs/t24442/68/311249396/54821/f87fa73c/5b2b654dN4efba214.jpg ,
imageWidth : 440 ,
imageHeight : 784 ,
created : 2018-06-21 16:43:57 ,
imageName : 5b2b654dN4efba214.jpg ,
skuId : 4586105 ,
skuCount : 1 , //照片数量
isChecked : 1 ,
orientation : 1 ,
type : 1 ,
value : 441x441_0_172
3、照片上传 – UpLoadPhoto
sq照片上传
微信照片上传
通过queryImageGroupList查看timestamp,如果没有timestamp的话调用addImageGroup来产生 timestamp , 这个addImageGroup即用于单份sku timestamp产生也用于多份sku timestamp产生
./nao_dashoucy_test addImageGroupManual 10.187.3.14 niejinci 73428224252 4586105
response:{ "dwVersion":20180408, "mapResult":[ "timestamp":1527646812087 ], "strCode":"0000", "strMessage":"" }
然后添加一张照片:
https://wq.jd.com/deal/dashoucy/upLoadphoto?token=0&handletimestamp=1527646812087 &skuid=4586105&t=0.3879324805314006&g_tk=1579100890&g_ty=lk
4、更新sku的相册缓存(在编辑照片完之后调用) – UpdateSkus
入参说明
imageIds=99702978 (必填,要更新的相册id,多个id用逗号分隔)
skuId=4586105 (必填)
num=3(必填,更新的数量)
timeStamp=1527646812087 (必填)
返回结果
test(
{
"errId":"0",
"errMsg":"",
"idc":"0",
"seq":"",
"code":"0000",
"desc":"调用成功"
}
)
再次查看相册
注意uploadImageNum字段已经变成了3
test(
{
"errId":"0",
"errMsg":"",
"idc":"0",
"seq":"",
"code":"0000",
"desc":"",
"skuName":"亮丽(SPLENDID)照片套餐 3.5英寸正方形30张+DIY礼包",
"countdown":"20210118152811",
"skuNum":"1",
"skuId":"4586105",
"albumNum":"1",
"maxImageNum":"30",
"uploadImageNum","3",
"printingimages":[
{
"albumId":"3380541",
"imageId":"99702978",
"imageUrl":"jfs/t22348/54/444258118/49757/6cd2b50/5b0e0b39N14ba5b13.jpg",
"imageWidth":"456",
"imageHeight":"498",
"created":"2018-05-30 10:23:53",
"imageName":"5b0e0b39N14ba5b13.jpg",
"skuId":"4586105",
"skuCount":"3",
"isChecked":"0",
"orientation":"1"
}
]
}
)
5、批量修改照片 – UpdateSkusBatch
入参说明:
imageIds=99694133,99702978 (必填, 要更新的相片id,多个id之间用逗号分隔)
skuId=4586105 (必填)
num=2 (必填,要更新的数量)
timeStamp=1527646812087 (必填,相册时间戳)
返回结果
test(
{
"errId":"0",
"errMsg":"",
"idc":"0",
"seq":"",
"code":"0000",
"desc":"调用成功"
}
)
再次查看相册中的相片,相片数量都变成了2
test(
{
"errId":"0",
"errMsg":"",
"idc":"0",
"seq":"",
"code":"0000",
"desc":"",
"skuName":"亮丽(SPLENDID)照片套餐 3.5英寸正方形30张+DIY礼包",
"countdown":"20210118152811",
"skuNum":"1",
"skuId":"4586105",
"albumNum":"1",
"maxImageNum":"30",
"uploadImageNum","4",
"printingimages":[
{
"albumId":"3380541",
"imageId":"99694133",
"imageUrl":"jfs/t21997/159/433768424/3466891/c80cf0c4/5b0e0fc4Nf3df29a9.jpg",
"imageWidth":"2976",
"imageHeight":"3968",
"created":"2018-05-30 10:43:16",
"imageName":"5b0e0fc4Nf3df29a9.jpg",
"skuId":"4586105",
"skuCount":"2",
"isChecked":"0",
"orientation":"0"
}
,
{
"albumId":"3380541",
"imageId":"99702978",
"imageUrl":"jfs/t22348/54/444258118/49757/6cd2b50/5b0e0b39N14ba5b13.jpg",
"imageWidth":"456",
"imageHeight":"498",
"created":"2018-05-30 10:23:53",
"imageName":"5b0e0b39N14ba5b13.jpg",
"skuId":"4586105",
"skuCount":"2",
"isChecked":"0",
"orientation":"1"
}
]
}
)
6、删除照片 – DeleteImages
入参说明
imageIds=99615450 (必填,要删除的照片id,多个id之间用逗号分隔)
timeStamp=1524554980576 (必填)
返回结果:
test(
{
"errId":"0",
"errMsg":"",
"idc":"0",
"seq":"",
"code":"0000",
"desc":"调用成功"
}
)
再次查看相册
test(
{
"errId":"0",
"errMsg":"",
"idc":"0",
"seq":"",
"code":"0000",
"desc":"",
"skuName":"亮丽(SPLENDID)照片套餐 3.5英寸正方形30张+DIY礼包",
"countdown":"20210118152811",
"skuNum":"1",
"skuId":"4586105",
"albumNum":"",
"maxImageNum":"",
"uploadImageNum","",
"printingimages":[
]
}
)
7、提交冲印 – SubmitCy
http://wq.jd.com/deal/dashoucy/SubmitCy?orderId=73428224252&callback=test&g_ty=ls
入参说明:
orderId=73428224252 (必填)
8、照片组操作 – PhotoGroupOperate 包括:添加一个新的照片timestamp;删除一个照片timestamp;更新照片timestamp的份数;查询订单及sku的照片组信息,照片组中的照片信息最多返回九个(照片的用途是九宫格展示)
入参说明:
orderId=73428224252 (必填)
skuId=4586105 (必填)
op=4 (必填,其含义,op=1:addImageGroup,添加照片组; op=2:deleteImageGroup,删除照片组; op=3:updateImageGroupNum,更新照片组数量; op=4:queryImageGroupList, 查询订单及sku的照片组信息)
当op=2时,还需要传timeStamp参数
当op=3时,还需要传timeStamp和num参数
addImageGroup – addImageGroup即用于单份sku timestamp产生也用于多份sku timestamp的产生
test(
{
"errId":"0",
"errMsg":"",
"idc":"0",
"seq":"",
"code":"0000",
"desc":"",
"skuName":"",
"countdown":"",
"skuNum":"",
"timeStamp":"1527652083357"
}
)
updateImageGroupNum
http://wq.jd.com/deal/dashoucy/PhotoGroupOperate?orderId=73249820926&skuId=4705099&timeStamp=1524137051089&num=2&op=3&callback=test&g_ty=ls
deleteImageGroup
http://wq.jd.com/deal/dashoucy/PhotoGroupOperate?orderId=73249820926&skuId=4705099&timeStamp=1526025451220&op=2&callback=test&g_ty=ls
test(
{
"errId":"0",
"errMsg":"",
"idc":"0",
"seq":"",
"code":"0000",
"desc":"",
"skuName":"",
"countdown":"",
"skuNum":"",
test(
{
"errId":"0",
"errMsg":"",
"idc":"0",
"seq":"",
"code":"0000",
"desc":"",
"skuName":"亮丽(SPLENDID)照片冲印套餐 6英寸照片30张+相册 洗照片 手机在线冲印",
"countdown":"20210113171821",
"orderFlag":"2",
"photoStatus":"0",
"skuNum":"3",
"orderId":"73249820926",
"skuId":"4705099",
"imageGroupList":[
{
"timeStamp":"1528443905102",
"num":"1",
"maxImageNum":"30",
"uploadImageNum":"1",
"images":[
{
"albumId":"3380541",
"imageId":"101126490",
"imageUrl":"jfs/t22114/360/837857039/1440751/454ed400/5b1a3e7bN01287275.png",
"imageWidth":"1080",
"imageHeight":"2060",
"created":"1528446587000",
"imageName":"5b1a3e7bN01287275.png",
"orientation":""
}
]
}
,
{
"timeStamp":"1528444714323",
"num":"1",
"maxImageNum":"30",
"uploadImageNum":"2",
"images":[
{
"albumId":"3380541",
"imageId":"101117262",
"imageUrl":"jfs/t20137/168/853676026/2877496/b88a7ecf/5b1a3b89N5fb13d29.jpg",
"imageWidth":"3968",
"imageHeight":"2976",
"created":"1528445833000",
"imageName":"5b1a3b89N5fb13d29.jpg",
"orientation":""
}
,
{
"albumId":"3380541",
"imageId":"101174548",
"imageUrl":"jfs/t22201/36/890369720/1036266/46f02dfc/5b1a3731N44d6bf31.png",
"imageWidth":"1080",
"imageHeight":"2060",
"created":"1528444721000",
"imageName":"5b1a3731N44d6bf31.png",
"orientation":""
}
]
}
]
}
)
多份sku的订单购物袋用下面的接口:updateImageGroupNum
在多份sku购物袋方法中要调用querySkusByOrderId来获取skuName和过期时间
http://wq.jd.com/deal/dashoucy/PhotoGroupOperate?orderId=73249820926&skuId=4705099&op=4&callback=test&g_ty=ls
返回结果
test(
{
"errId":"0",
"errMsg":"",
"idc":"0",
"seq":"",
"code":"0000",
"desc":"",
"skuName":"亮丽(SPLENDID)相册薄套餐 6英寸照片30张+相册",
"countdown":"20210113171821",
"skuNum":"3",
"orderId":"73249820926",
"skuId":"4705099",
"imageGroupList":[
{
"timeStamp":"1526025451220",
"num":"1",
"maxImageNum":"30",
"uploadImageNum":"1",
"images":[
"albumId":"3380541",
"imageId":"96797767",
"imageUrl":"jfs/t19663/55/2472915205/2601993/e02bafed/5af54cf8N38552be8.jpg",
"imageWidth":"3968",
"imageHeight":"2976",
"created":"1526025464000",
"imageName":"5af54cf8N38552be8.jpg",
"orientation":""
]
}
,
{
"timeStamp":"1526025530093",
"num":"1",
"maxImageNum":"30",
"uploadImageNum":"1",
"images":[
"albumId":"3380541",
"imageId":"96797794",
"imageUrl":"jfs/t21556/248/12048299/2660528/bd0fc24e/5af54d4cN97690d61.jpg",
"imageWidth":"2976",
"imageHeight":"3968",
"created":"1526025548000",
"imageName":"5af54d4cN97690d61.jpg",
"orientation":""
]
}
]
}
)
9、获取timestamp
入参:
orderId (订单id,必传)
skuId(必传)
hasImageGroup(必传)
返回
test(
{
"errId":"0",
"errMsg":"",
"idc":"0",
"seq":"",
"code":"0000",
"desc":"",
"timestamp":"1528453520941"
}
)
10、SetPicCut 设置照片裁剪
入参:
imageid : 照片id (必传)
skuId : (毕传)
type : type=1时必传,=0时可以不传。 )type=0 留白,value无意义, type=1,value表示裁剪参数 )
value : 裁剪参数,type=1是必传,格式为: 2976x2976_0_49
test(
{
"errId":"0",
"errMsg":"",
"idc":"0",
"seq":"",
"code":"0000",
"desc":"调用成功"
}
)