package com.yinlihupo.enlish.service.mapper;

import com.yinlihupo.enlish.service.domain.dataobject.LessonPlansDO;
import com.yinlihupo.enlish.service.domain.mapper.LessonPlansDOMapper;
import com.yinlihupo.framework.common.util.JsonUtils;
import jakarta.annotation.Resource;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.Map;

@SpringBootTest
public class PlanTest {

    @Resource
    private LessonPlansDOMapper lessonPlansDOMapper;

    @Test
    public void test() throws Exception {
        LessonPlansDO lessonPlansDO = lessonPlansDOMapper.selectById(58);
        Map<String, Object> stringObjectMap = JsonUtils.parseMap(lessonPlansDO.getContentDetails(), String.class, Object.class);
        for (Map.Entry<String, Object> entry : stringObjectMap.entrySet()) {
            System.out.println(entry.getKey());
            System.out.println(entry.getValue());
            System.out.println("------------------------");
        }
    }
}
