//package com.backendsys.service.Ai.Aizn; // //import cn.hutool.core.convert.Convert; //import com.backendsys.entity.Ai.Aizn.AiznImageIncantationDTO; //import com.backendsys.mapper.Ai.Aizn.AiznImageIncantationMapper; //import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.stereotype.Service; // //import java.util.*; // //@Service //public class AiznImageIncantationServiceImpl implements AiznImageIncantationService { // // @Autowired // private AiznImageIncantationMapper aiznImageIncantationMapper; // // @Override // public List> getImageIncantationList(AiznImageIncantationDTO aiznImageIncantationDTO) { // // List> resp = aiznImageIncantationMapper.queryAiznImageIncantation(aiznImageIncantationDTO); // // Map> groupedData = new LinkedHashMap<>(); // // for (Map item : resp) { // int categoryId = Convert.toInt(item.get("category_id")); // String categoryName = Convert.toStr(item.get("category_name")); // String name = Convert.toStr(item.get("name")); // // if (!groupedData.containsKey(categoryId)) { // Map categoryData = new LinkedHashMap<>(); // categoryData.put("category_id", categoryId); // categoryData.put("category_name", categoryName); // categoryData.put("list", new ArrayList<>()); // groupedData.put(categoryId, categoryData); // } // // List> list = (List>) groupedData.get(categoryId).get("list"); // Map data = new LinkedHashMap<>(); // data.put("name", name); // list.add(data); // } // // // 打印转换后的数据 // List> result = new ArrayList<>(groupedData.values()); // // return result; // } // // // @Override // public List> getImageIncantationDescriptionList() { // return aiznImageIncantationMapper.queryAiznImageIncantationDescription(); // } // //}