
package com.jeelowcode.module.biz.enhance;



import com.jeelowcode.core.framework.config.aspect.enhance.model.EnhanceContext;
import com.jeelowcode.core.framework.config.aspect.enhance.model.EnhanceResult;
import com.jeelowcode.core.framework.config.aspect.enhance.plugin.AfterAdvicePlugin;
import com.jeelowcode.core.framework.utils.Func;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @author JX
 * @create 2024-08-19 15:05
 * @dedescription:
 */
@Component
public class LinTestEnhance implements AfterAdvicePlugin {
    @Override
    public void execute(EnhanceContext enhanceContext) {
        EnhanceResult result = enhanceContext.getResult();
        List<Map<String, Object>> records = result.getRecords();
        records.forEach(record -> {
            String name = Func.getMap2Str(record, "name");
            record.put("name",name+"先生");

        });
    }
}
