|
|
|
@ -68,7 +68,7 @@ public class GoodsController extends BaseController { |
|
|
|
* @param goods_type |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@PostMapping("/getTypeGoods") |
|
|
|
@RequestMapping("/getTypeGoods") |
|
|
|
public JSONObject getTypeGoods(String type,String createtime,String goods_type){ |
|
|
|
//10长的时间戳
|
|
|
|
long startTime = System.currentTimeMillis(); |
|
|
|
@ -76,9 +76,9 @@ public class GoodsController extends BaseController { |
|
|
|
long endtime = System.currentTimeMillis(); |
|
|
|
JSONObject outjson = new JSONObject(); |
|
|
|
if(goodsList!=null){ |
|
|
|
outjson.put("code","success"); |
|
|
|
outjson.put("code","00000000"); |
|
|
|
outjson.put("msg","成功"); |
|
|
|
outjson.put("userTime",(endtime-startTime)/1000l+"ms"); |
|
|
|
outjson.put("useTime",(endtime-startTime)/1000l+"ms"); |
|
|
|
outjson.put("data",goodsList); |
|
|
|
}else{ |
|
|
|
outjson.put("code","failure"); |
|
|
|
@ -87,11 +87,28 @@ public class GoodsController extends BaseController { |
|
|
|
return outjson; |
|
|
|
} |
|
|
|
|
|
|
|
@PostMapping("/getTypeGoods/{type}") |
|
|
|
public JSONObject getTypeGoodsRest(@PathVariable String type){ |
|
|
|
long startTime = System.currentTimeMillis(); |
|
|
|
List<Goods> goodsList = goodsService.getTypeGoods(type,"",""); |
|
|
|
long endtime = System.currentTimeMillis(); |
|
|
|
JSONObject outjson = new JSONObject(); |
|
|
|
if(goodsList!=null){ |
|
|
|
outjson.put("code","00000000"); |
|
|
|
outjson.put("msg","成功"); |
|
|
|
outjson.put("useTime",(endtime-startTime)/1000l+"ms"); |
|
|
|
outjson.put("data",goodsList); |
|
|
|
}else{ |
|
|
|
outjson.put("code","failure"); |
|
|
|
outjson.put("msg","请求失败"); |
|
|
|
} |
|
|
|
return outjson; |
|
|
|
} |
|
|
|
/** |
|
|
|
* 接口处理搜索 |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@PostMapping("/searchGoods") |
|
|
|
@RequestMapping("/searchGoods") |
|
|
|
public JSONObject searchGoods(@RequestBody String reqstr){ |
|
|
|
//{"pay_type":1,"goods_status":1,"record_type":"","entrust_name":"clytest1012-1","entrust_user_name":"","page":1,"limit":8}
|
|
|
|
log.info("查询委托信息接口:"+reqstr); |
|
|
|
|