修改底部导航装修接口
This commit is contained in:
parent
81224c4013
commit
60455a7227
|
|
@ -40,7 +40,7 @@ public class TabbarController {
|
|||
*/
|
||||
@PostMapping("/save")
|
||||
public Object save(@RequestBody Map<String, Object> params) {
|
||||
System.out.println( ArrayUtil.objectToListAsStr(params.get("list")));
|
||||
// System.out.println( ArrayUtil.objectToListAsStr(params.get("list")));
|
||||
|
||||
iDecorateTabbarService.save(params);
|
||||
return AjaxResult.success();
|
||||
|
|
|
|||
|
|
@ -67,7 +67,9 @@ public class DecorateTabbarServiceImpl implements IDecorateTabbarService {
|
|||
public void save(Map<String, Object> params) {
|
||||
decorateTabbarMapper.delete(new QueryWrapper<DecorateTabbar>().gt("id", 0));
|
||||
|
||||
for (Map<String, String> item: ArrayUtil.stringToListAsMapStr(params.get("list").toString())) {
|
||||
for (String obj : ArrayUtil.objectToListAsStr(params.get("list"))) {
|
||||
Map<String, String> item = ToolsUtil.jsonToMap(obj);
|
||||
System.out.println(item);
|
||||
DecorateTabbar model = new DecorateTabbar();
|
||||
model.setName(item.get("name"));
|
||||
model.setSelected(UrlUtil.toRelativeUrl(item.get("selected")));
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ public class ArrayUtil {
|
|||
* @param object 对象
|
||||
* @return List<String>
|
||||
*/
|
||||
public static List<Integer> objectToListAsStr(Object object) {
|
||||
public static List<String> objectToListAsStr(Object object) {
|
||||
if (StringUtil.isNull(object)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue