Commit cb3422ec authored by dmy's avatar dmy

中医药小程序代码提交

parent 71c24d00
...@@ -213,15 +213,17 @@ public class AreaServiceImpl implements AreaService { ...@@ -213,15 +213,17 @@ public class AreaServiceImpl implements AreaService {
if (StringHelper.isEmpty(req.getAreaId())) { if (StringHelper.isEmpty(req.getAreaId())) {
FloorAreaVo areaVo = new FloorAreaVo(); FloorAreaVo areaVo = new FloorAreaVo();
String areaId = StringHelper.getNewID(); String areaId = StringHelper.getNewID();
areaVo.setFloorId(areaId); areaVo.setAreaId(areaId);
areaVo.setFloorId(req.getFloorId());
ObjectHelper.writeWithFrom(areaVo, req); ObjectHelper.writeWithFrom(areaVo, req);
areaVo.setCreateTime(DateHelper.getNow()); areaVo.setCreateTime(DateHelper.getNow());
areaVo.setIsFeature(0);
floorAreaDao.create(areaVo); floorAreaDao.create(areaVo);
FloorAreaExtendVo areaExtendVo = new FloorAreaExtendVo(); FloorAreaExtendVo areaExtendVo = new FloorAreaExtendVo();
areaExtendVo.setAreaId(areaId); areaExtendVo.setAreaId(areaId);
areaExtendVo.setAreaExtendId(StringHelper.getNewID()); areaExtendVo.setAreaExtendId(StringHelper.getNewID());
ObjectHelper.writeWithFrom(areaExtendVo, req.getFloorAreaExtendVo()); ObjectHelper.writeWithFrom(areaExtendVo, req.getAreaExtendVo());
floorAreaExtendDao.create(areaExtendVo); floorAreaExtendDao.create(areaExtendVo);
ImageReqVo imageReqVo = new ImageReqVo(); ImageReqVo imageReqVo = new ImageReqVo();
...@@ -239,15 +241,15 @@ public class AreaServiceImpl implements AreaService { ...@@ -239,15 +241,15 @@ public class AreaServiceImpl implements AreaService {
FloorAreaExtendVo areaExtendVo = new FloorAreaExtendVo(); FloorAreaExtendVo areaExtendVo = new FloorAreaExtendVo();
areaExtendVo.setAreaId(req.getAreaId()); areaExtendVo.setAreaId(req.getAreaId());
areaExtendVo.setLanguageType(req.getFloorAreaExtendVo().getLanguageType()); areaExtendVo.setLanguageType(req.getAreaExtendVo().getLanguageType());
FloorAreaExtendVo loadExtend = floorAreaExtendDao.load(areaExtendVo, FloorAreaExtendVo.class); FloorAreaExtendVo loadExtend = floorAreaExtendDao.load(areaExtendVo, FloorAreaExtendVo.class);
if (loadExtend == null) { if (loadExtend == null) {
//新增 //新增
areaExtendVo.setAreaExtendId(StringHelper.getNewID()); areaExtendVo.setAreaExtendId(StringHelper.getNewID());
ObjectHelper.writeWithFrom(areaExtendVo, req.getFloorAreaExtendVo()); ObjectHelper.writeWithFrom(areaExtendVo, req.getAreaExtendVo());
floorAreaExtendDao.create(areaExtendVo); floorAreaExtendDao.create(areaExtendVo);
} else { } else {
ObjectHelper.writeWithFrom(loadExtend, req.getFloorAreaExtendVo()); ObjectHelper.writeWithFrom(loadExtend, req.getAreaExtendVo());
floorAreaExtendDao.update(loadExtend); floorAreaExtendDao.update(loadExtend);
} }
ImageReqVo imageReqVo = new ImageReqVo(); ImageReqVo imageReqVo = new ImageReqVo();
......
...@@ -87,15 +87,18 @@ public class ImageServiceImpl implements ImageService { ...@@ -87,15 +87,18 @@ public class ImageServiceImpl implements ImageService {
@Override @Override
public String saveList(ImageReqVo imageReqVo) { public String saveList(ImageReqVo imageReqVo) {
List<ImageVo> imageList = new ArrayList<>(); List<ImageVo> imageList = new ArrayList<>();
for (ImageVo imageVo : imageReqVo.getImageList()) { if (!StringHelper.isEmpty(imageReqVo.getImageList())
ImageVo image = new ImageVo(); && imageReqVo.getImageList().size() > 0) {
ObjectHelper.writeWithFrom(image, imageReqVo); for (ImageVo imageVo : imageReqVo.getImageList()) {
image.setImageId(StringHelper.getNewID()); ImageVo image = new ImageVo();
image.setCreateTime(DateHelper.getNow()); ObjectHelper.writeWithFrom(image, imageReqVo);
image.setImageUrl(imageVo.getImageUrl()); image.setImageId(StringHelper.getNewID());
imageList.add(image); image.setCreateTime(DateHelper.getNow());
image.setImageUrl(imageVo.getImageUrl());
imageList.add(image);
}
imageDao.createList(imageList);
} }
imageDao.createList(imageReqVo.getImageList());
return imageReqVo.getRelationId(); return imageReqVo.getRelationId();
} }
} }
...@@ -22,6 +22,7 @@ public class ProductCategoryDaoImpl extends BaseDaoImpl implements ProductCatego ...@@ -22,6 +22,7 @@ public class ProductCategoryDaoImpl extends BaseDaoImpl implements ProductCatego
" left join tcm_image as ti on p.category_id = ti.relation_id where 1=1 {WHERE} order by p.sort") " left join tcm_image as ti on p.category_id = ti.relation_id where 1=1 {WHERE} order by p.sort")
.add("categoryId", "and p.category_id = ?") .add("categoryId", "and p.category_id = ?")
.add("languageType", "and pe.language_type =?") .add("languageType", "and pe.language_type =?")
.add("categoryType", "and p.category_type = ?")
; ;
} }
......
...@@ -10,7 +10,7 @@ public class FloorAreaReqVo extends FloorAreaVo { ...@@ -10,7 +10,7 @@ public class FloorAreaReqVo extends FloorAreaVo {
private Integer languageType; private Integer languageType;
private FloorAreaExtendVo floorAreaExtendVo; private FloorAreaExtendVo areaExtendVo;
private List<ImageVo> imageVoList; private List<ImageVo> imageVoList;
...@@ -22,12 +22,12 @@ public class FloorAreaReqVo extends FloorAreaVo { ...@@ -22,12 +22,12 @@ public class FloorAreaReqVo extends FloorAreaVo {
this.imageVoList = imageVoList; this.imageVoList = imageVoList;
} }
public FloorAreaExtendVo getFloorAreaExtendVo() { public FloorAreaExtendVo getAreaExtendVo() {
return floorAreaExtendVo; return areaExtendVo;
} }
public void setFloorAreaExtendVo(FloorAreaExtendVo floorAreaExtendVo) { public void setAreaExtendVo(FloorAreaExtendVo areaExtendVo) {
this.floorAreaExtendVo = floorAreaExtendVo; this.areaExtendVo = areaExtendVo;
} }
public Integer getLanguageType() { public Integer getLanguageType() {
......
...@@ -9,6 +9,8 @@ public class ProductCategoryLoadPageReqVo extends PageSizeReqVo { ...@@ -9,6 +9,8 @@ public class ProductCategoryLoadPageReqVo extends PageSizeReqVo {
private String categoryId; private String categoryId;
private Integer categoryType;
private String categoryName; private String categoryName;
private Integer languageType; private Integer languageType;
...@@ -52,4 +54,12 @@ public class ProductCategoryLoadPageReqVo extends PageSizeReqVo { ...@@ -52,4 +54,12 @@ public class ProductCategoryLoadPageReqVo extends PageSizeReqVo {
public void setLanguageType(Integer languageType) { public void setLanguageType(Integer languageType) {
this.languageType = languageType; this.languageType = languageType;
} }
public Integer getCategoryType() {
return categoryType;
}
public void setCategoryType(Integer categoryType) {
this.categoryType = categoryType;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment