7 changed files with 69 additions and 29 deletions
@ -0,0 +1,28 @@ |
|||||||
|
package co.yixiang.config; |
||||||
|
|
||||||
|
import cn.hutool.json.JSONUtil; |
||||||
|
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; |
||||||
|
|
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
// 世纪的handler
|
||||||
|
public class SsjListHandler extends JacksonTypeHandler { |
||||||
|
|
||||||
|
private Class<?> type; |
||||||
|
|
||||||
|
public SsjListHandler(Class<?> type) { |
||||||
|
super(type); |
||||||
|
this.type = type; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected List<?> parse(String json) { |
||||||
|
// return super.parse(json);
|
||||||
|
return JSONUtil.toList(json,type); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected String toJson(Object obj) { |
||||||
|
return super.toJson(obj); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,10 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||||
|
<mapper namespace="co.yixiang.modules.product.service.mapper.StoreProductMapper"> |
||||||
|
|
||||||
|
<resultMap id="resultMap" type="co.yixiang.modules.product.domain.YxStoreProduct"> |
||||||
|
<result property="config" column="config" typeHandler="co.yixiang.config.SsjListHandler" javaType="co.yixiang.modules.evaluation.domain.EditableTabs"/> |
||||||
|
|
||||||
|
</resultMap> |
||||||
|
|
||||||
|
</mapper> |
Loading…
Reference in new issue