|
|
|
@ -20,7 +20,7 @@ import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
@RestController |
|
|
|
@RequestMapping(value = "/admin/goods.Goods",method = RequestMethod.POST) |
|
|
|
@RequestMapping(value = "/admin/goods.Goods") |
|
|
|
public class AdminGoodsController extends BaseController { |
|
|
|
@Autowired |
|
|
|
private GoodsService goodsService; |
|
|
|
@ -34,51 +34,53 @@ public class AdminGoodsController extends BaseController { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@RequestMapping("/list") |
|
|
|
public JSONObject list(HttpServletRequest request){ |
|
|
|
public JSONObject list(@RequestBody String jsonStr){ |
|
|
|
JSONObject request =JSONObject.parseObject(jsonStr); |
|
|
|
// 查询条件
|
|
|
|
Map qmap = new HashMap(); |
|
|
|
|
|
|
|
//分页
|
|
|
|
String page = request.getParameter("page"); |
|
|
|
String page = request.getString("page"); |
|
|
|
if(StringUtils.isBlank(page)){ |
|
|
|
page="1"; |
|
|
|
} |
|
|
|
int ipage=Integer.parseInt(page); |
|
|
|
|
|
|
|
// 查询
|
|
|
|
String limit = request.getParameter("limit"); |
|
|
|
String limit = request.getString("limit"); |
|
|
|
int ilimit=(StringUtils.isBlank(limit))?10:Integer.valueOf(limit); |
|
|
|
|
|
|
|
int start= ipage>1?(ipage-1)*ilimit:0; |
|
|
|
qmap.put("id",start); |
|
|
|
|
|
|
|
// 委托编码
|
|
|
|
String islicode=request.getParameter("islicode"); |
|
|
|
String islicode=request.getString("islicode"); |
|
|
|
if(!StringUtils.isBlank(islicode)){ |
|
|
|
qmap.put("islicode",islicode); |
|
|
|
} |
|
|
|
// 商品名称
|
|
|
|
String gname=request.getParameter("goods_name"); |
|
|
|
String gname=request.getString("goods_name"); |
|
|
|
if(!StringUtils.isBlank(gname)){ |
|
|
|
qmap.put("goods_name",gname); |
|
|
|
} |
|
|
|
//
|
|
|
|
String entrust_name =request.getParameter("entrust_name"); |
|
|
|
String entrust_name =request.getString("entrust_name"); |
|
|
|
if(StringUtils.isNotBlank(entrust_name)){ |
|
|
|
qmap.put("entrust_name",entrust_name); |
|
|
|
} |
|
|
|
|
|
|
|
//
|
|
|
|
String goods_entrust = request.getParameter("goods_entrust"); |
|
|
|
String goods_entrust = request.getString("goods_entrust"); |
|
|
|
if(StringUtils.isNotBlank(goods_entrust)){ |
|
|
|
qmap.put("goods_entrust",goods_entrust); |
|
|
|
} |
|
|
|
//
|
|
|
|
String goods_type= request.getParameter("goods_type"); |
|
|
|
String goods_type= request.getString("goods_type"); |
|
|
|
if(StringUtils.isNotBlank(goods_type)){ |
|
|
|
qmap.put("goods_type",goods_type); |
|
|
|
} |
|
|
|
//
|
|
|
|
String data_type= request.getParameter("data_type"); |
|
|
|
String data_type= request.getString("data_type"); |
|
|
|
if (StringUtils.isNotBlank(data_type)) { |
|
|
|
qmap.put("data_type",data_type); |
|
|
|
} |
|
|
|
@ -90,12 +92,12 @@ public class AdminGoodsController extends BaseController { |
|
|
|
// qmap.put("createtime","between "+aa[0]+" and "+aa[1]);
|
|
|
|
// }
|
|
|
|
// 委托状态
|
|
|
|
String entrust_status = request.getParameter("entrust_status"); |
|
|
|
String entrust_status = request.getString("entrust_status"); |
|
|
|
if(StringUtils.isNotBlank(entrust_status)){ |
|
|
|
qmap.put("entrust_status",entrust_status); |
|
|
|
} |
|
|
|
// 交易
|
|
|
|
String transaction = request.getParameter("transaction"); |
|
|
|
String transaction = request.getString("transaction"); |
|
|
|
if(StringUtils.isNotBlank(transaction)){ |
|
|
|
qmap.put("transaction",transaction); |
|
|
|
} |
|
|
|
@ -114,7 +116,7 @@ public class AdminGoodsController extends BaseController { |
|
|
|
* @param request |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@RequestMapping("/goodsDetail") |
|
|
|
@PostMapping("/goodsDetail") |
|
|
|
public JSONObject goodsDetail(@RequestBody String jstr, HttpServletRequest request){ |
|
|
|
String token = request.getHeader("token"); |
|
|
|
// 需要返回的结果
|
|
|
|
|