@IocBean
public class EcppGoodsFilter extends AbstractProcessor implements ActionFilter {
@Inject
private Dao dao;
@Override
public View match(ActionContext context) {
return null;
}
@Override
public void process(ActionContext ac) throws Throwable {
doNext(ac);
NutMap data = (NutMap) ac.getMethodReturn();
try {
List<NutMap> topics = data.getAsList("topics", NutMap.class);
for (NutMap topic : topics) {
String code = topic.getString("goods_sn");
String name = getSkuName(code);
name = StringUtils.replace(name, "REKOE", "/");
topic.put("style_name", name);
}
} catch (Exception e) {
ac.setMethodReturn(NutMap.NEW().addv("topics", new ArrayList<NutMap>()));
}
}
新增加的属性 style_name
在返回中未找到,这个值是不可修改么?