prescript
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.peanut.modules.book.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -27,6 +29,9 @@ public class PrescriptServiceImpl extends ServiceImpl<PrescriptDao, PrescriptEn
|
||||
wrapper.eq(prescriptCategoryId>0,PrescriptEntity::getPrescriptCategoryId,prescriptCategoryId);
|
||||
wrapper.orderByDesc(PrescriptEntity::getSort);
|
||||
Page<PrescriptEntity> prescriptEntityPage = getBaseMapper().selectPage(new Page<>(page, limit), wrapper);
|
||||
for (PrescriptEntity p : prescriptEntityPage.getRecords()){
|
||||
p.setImageList(JSON.parseArray(p.getImages(),String.class));
|
||||
}
|
||||
return prescriptEntityPage;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user