修改底部导航装修接口

This commit is contained in:
TinyAnts 2022-09-07 09:28:24 +08:00
parent 81224c4013
commit 60455a7227
3 changed files with 5 additions and 3 deletions

View File

@ -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();

View File

@ -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")));

View File

@ -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();
}