|
@ -94,16 +94,21 @@ public class DcInfoBoardTemplateServiceImpl implements IDcInfoBoardTemplateServi |
|
|
/** |
|
|
/** |
|
|
* 模板分类排序 |
|
|
* 模板分类排序 |
|
|
* |
|
|
* |
|
|
* @param ids |
|
|
* @param param |
|
|
* @return 结果 |
|
|
* @return 结果 |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public AjaxResult updateCategorySort(Long[] ids){ |
|
|
public AjaxResult updateCategorySort(Map<String,Object> param){ |
|
|
for (int i = 0; i < ids.length; i++) { |
|
|
if (!param.containsKey("ids") || !param.containsKey("dictType")){ |
|
|
dcInfoBoardTemplateMapper.updateCategorySort(ids[i],i); |
|
|
return AjaxResult.error("参数错误"); |
|
|
} |
|
|
} |
|
|
List<SysDictData> dictDataList = dcInfoBoardTemplateMapper.selectCategoryList(); |
|
|
List<Integer> ids = (List<Integer>) param.get("ids"); |
|
|
DictUtils.setDictCache("iot_template_category",dictDataList); |
|
|
String dictType = (String) param.get("dictType"); |
|
|
|
|
|
for (int i = 0; i < ids.size(); i++) { |
|
|
|
|
|
dcInfoBoardTemplateMapper.updateCategorySort(ids.get(i),i); |
|
|
|
|
|
} |
|
|
|
|
|
List<SysDictData> dictDataList = dcInfoBoardTemplateMapper.selectCategoryList(dictType); |
|
|
|
|
|
DictUtils.setDictCache(dictType,dictDataList); |
|
|
return AjaxResult.success("修改排序成功"); |
|
|
return AjaxResult.success("修改排序成功"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|