|
|
@@ -3,6 +3,7 @@ package zs.payment.controller;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
@@ -14,6 +15,8 @@ import zs.payment.req.yunmall.goods.GoodsSaveReq;
|
|
|
import zs.payment.service.yunmall.goods.GoodsService;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
+import java.net.URLDecoder;
|
|
|
+import java.nio.charset.StandardCharsets;
|
|
|
import java.util.Map;
|
|
|
|
|
|
@Slf4j
|
|
|
@@ -29,9 +32,9 @@ public class YunMallGoodsController {
|
|
|
* 提供给企云商城php-单个供货和取消供货
|
|
|
*/
|
|
|
@PostMapping("/save")
|
|
|
- public Boolean saveGoods(@Valid @RequestBody GoodsSaveReq req){
|
|
|
+ public Boolean saveGoods(@Valid @RequestBody GoodsSaveReq req) {
|
|
|
log.info("---/yunmall/goods/save传入的参数为{}---", JSONObject.toJSONString(req));
|
|
|
- return goodsService.saveGoods(req.getGdId(),req.getOp());
|
|
|
+ return goodsService.saveGoods(req.getGdId(), req.getOp());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -49,15 +52,15 @@ public class YunMallGoodsController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/search", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
public Map<String, Object> search(
|
|
|
- @RequestParam(required = false) Long shopId,
|
|
|
- @RequestParam(required = false) String keyWord,
|
|
|
- @RequestParam(required = false) String categorys,
|
|
|
- @RequestParam(required = false) String pts,
|
|
|
- @RequestParam(required = false, defaultValue = "10") Integer psize,
|
|
|
- @RequestParam(required = false, defaultValue = "1") Integer pno,
|
|
|
- @RequestParam(required = false, defaultValue = "1") Integer orderBy) {
|
|
|
+ @RequestParam(required = false) Long shopId,
|
|
|
+ @RequestParam(required = false) String keyWord,
|
|
|
+ @RequestParam(required = false) String categorys,
|
|
|
+ @RequestParam(required = false) String pts,
|
|
|
+ @RequestParam(required = false, defaultValue = "10") Integer psize,
|
|
|
+ @RequestParam(required = false, defaultValue = "1") Integer pno,
|
|
|
+ @RequestParam(required = false, defaultValue = "1") Integer orderBy) {
|
|
|
log.info("---/yunmall/goods/search shopId={},keyWord={},categorys={},pts={},psize={},pno={},orderBy={}---",
|
|
|
- shopId, keyWord, categorys, pts, psize, pno, orderBy);
|
|
|
+ shopId, keyWord, categorys, pts, psize, pno, orderBy);
|
|
|
return goodsService.searchGoods(shopId, keyWord, categorys, pts, psize, pno, orderBy);
|
|
|
}
|
|
|
|