|
@@ -1,6 +1,5 @@
|
|
|
package org.jeecg.modules.duxiaoman.controller;
|
|
|
|
|
|
-import cn.com.ctop.common.module.mapper.MaterialInfoMapper;
|
|
|
import cn.com.ctop.common.module.utils.Check;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -24,7 +23,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
-import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
@@ -59,9 +57,13 @@ public class DuxiaomanMaterialInfoController {
|
|
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
|
|
HttpServletRequest req) {
|
|
|
+ String materialName = duxiaomanMaterialInfo.getMaterialName();
|
|
|
+ duxiaomanMaterialInfo.setMaterialName(null);
|
|
|
Result<IPage<DuxiaomanMaterialInfo>> result = new Result<>();
|
|
|
QueryWrapper<DuxiaomanMaterialInfo> queryWrapper = QueryGenerator.initQueryWrapper(duxiaomanMaterialInfo, req.getParameterMap());
|
|
|
-
|
|
|
+ if (!Check.isNull(materialName)) {
|
|
|
+ queryWrapper.like("material_name", materialName);
|
|
|
+ }
|
|
|
if (!Check.isNull(duxiaomanMaterialInfo.getUserId())) {
|
|
|
queryWrapper.eq("user_id", duxiaomanMaterialInfo.getUserId());
|
|
|
}
|
|
@@ -71,9 +73,6 @@ public class DuxiaomanMaterialInfoController {
|
|
|
if (!Check.isNull(duxiaomanMaterialInfo.getStatus())) {
|
|
|
queryWrapper.eq("status", duxiaomanMaterialInfo.getStatus());
|
|
|
}
|
|
|
- if (!Check.isNull(duxiaomanMaterialInfo.getMaterialName())) {
|
|
|
- queryWrapper.like("material_name", duxiaomanMaterialInfo.getMaterialName());
|
|
|
- }
|
|
|
if (!Check.isNull(duxiaomanMaterialInfo.getProductId())) {
|
|
|
queryWrapper.eq("product_id", duxiaomanMaterialInfo.getProductId());
|
|
|
}
|
|
@@ -277,7 +276,7 @@ public class DuxiaomanMaterialInfoController {
|
|
|
JSONObject obj = new JSONObject();
|
|
|
obj.put("channel", duxiaomanMaterialInfoService.getMaterialChannel());
|
|
|
obj.put("type", duxiaomanMaterialInfoService.getMaterialType());
|
|
|
- return Result.ok(obj);
|
|
|
+ return Result.ok(obj);
|
|
|
}
|
|
|
|
|
|
}
|