查询出来的字段 会显示有这样(老数据库- -)
{"code":"1","msg":"stm.success","obj":[{"sp":"潮盛 橄榄菜450g","gg":"1*12","dw":"瓶 ","lsj":12.9000}, {"sp":"潮盛 橄榄菜170g","gg":"1*12","dw":"瓶 ","lsj":6.0000}, {"sp":"潮盛 橄榄菜(碟装)112g","gg":"1*72","dw":"碟 ","lsj":3.0000}, {"sp":"糯米","gg":"","dw":"kg ","lsj":5.8000}, {"sp":"散装山水月芽米","gg":"","dw":"KG ","lsj":4.3800}]}
查询语句是这样
@At("/goodsList")
@Ok("json")
public Result getGoodsList(@Param("token")String token,@Param("type")String type,
@Param("page")int page,@Param("pageSize")int pageSize){
List<Goods> list = null;
try {
Dao dao = managerServer.getBusiness(token);
Pager pager = PagerUtil.conPager(page, pageSize);
Cnd cnd = Cnd.NEW();
if(Strings.isNotBlank(type))cnd.and("kindcode","=",type); // 小分类
cnd.desc("zjt").desc("djdate");
list = dao.query(Goods.class, cnd, pager, "^(sp|gg|dw|lsj)$"); // 这里只取零售价
} catch (BizException e1) {
return ExceptionBulider.handleException(e1);
} catch (Exception e) {
return Result.error();
}
return Result.success(list);
}
有没有dao实现对查询出来的字段把空格去掉 不确定哪些参数会有这种空格的啊!!