bug
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.peanut.modules.master.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.peanut.common.utils.R;
|
||||
@@ -33,13 +34,10 @@ public class ShopStoreController {
|
||||
*/
|
||||
@RequestMapping("/getStoreList")
|
||||
public R getStoreList(@RequestBody Map params){
|
||||
MPJLambdaWrapper<ShopStore> wrapper = new MPJLambdaWrapper();
|
||||
if (params.containsKey("name")&&!"".equals(params.get("name").toString())){
|
||||
wrapper.like(ShopStore::getName,params.get("name").toString());
|
||||
}
|
||||
Page<ShopStore> page = shopStoreService.page(new Page<>(
|
||||
Long.parseLong(params.get("current").toString()), Long.parseLong(params.get("limit").toString())),wrapper);
|
||||
return R.ok().put("result", page);
|
||||
LambdaQueryWrapper<ShopStore> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.orderByAsc(ShopStore::getSort);
|
||||
List<ShopStore> shopStores = shopStoreService.getBaseMapper().selectList(wrapper);
|
||||
return R.ok().put("list",shopStores);
|
||||
}
|
||||
|
||||
@RequestMapping(path = "/getStoreById")
|
||||
@@ -51,7 +49,7 @@ public class ShopStoreController {
|
||||
@RequestMapping(path = "/saveOrUpdateStore")
|
||||
public R saveOrUpdateStore(@RequestBody ShopStore store) {
|
||||
shopStoreService.saveOrUpdate(store);
|
||||
return R.ok();
|
||||
return R.ok().put("result",store);
|
||||
}
|
||||
|
||||
@RequestMapping(path = "/delStore")
|
||||
|
||||
Reference in New Issue
Block a user