Commit cb3422ec authored by dmy's avatar dmy

中医药小程序代码提交

parent 71c24d00
......@@ -213,15 +213,17 @@ public class AreaServiceImpl implements AreaService {
if (StringHelper.isEmpty(req.getAreaId())) {
FloorAreaVo areaVo = new FloorAreaVo();
String areaId = StringHelper.getNewID();
areaVo.setFloorId(areaId);
areaVo.setAreaId(areaId);
areaVo.setFloorId(req.getFloorId());
ObjectHelper.writeWithFrom(areaVo, req);
areaVo.setCreateTime(DateHelper.getNow());
areaVo.setIsFeature(0);
floorAreaDao.create(areaVo);
FloorAreaExtendVo areaExtendVo = new FloorAreaExtendVo();
areaExtendVo.setAreaId(areaId);
areaExtendVo.setAreaExtendId(StringHelper.getNewID());
ObjectHelper.writeWithFrom(areaExtendVo, req.getFloorAreaExtendVo());
ObjectHelper.writeWithFrom(areaExtendVo, req.getAreaExtendVo());
floorAreaExtendDao.create(areaExtendVo);
ImageReqVo imageReqVo = new ImageReqVo();
......@@ -239,15 +241,15 @@ public class AreaServiceImpl implements AreaService {
FloorAreaExtendVo areaExtendVo = new FloorAreaExtendVo();
areaExtendVo.setAreaId(req.getAreaId());
areaExtendVo.setLanguageType(req.getFloorAreaExtendVo().getLanguageType());
areaExtendVo.setLanguageType(req.getAreaExtendVo().getLanguageType());
FloorAreaExtendVo loadExtend = floorAreaExtendDao.load(areaExtendVo, FloorAreaExtendVo.class);
if (loadExtend == null) {
//新增
areaExtendVo.setAreaExtendId(StringHelper.getNewID());
ObjectHelper.writeWithFrom(areaExtendVo, req.getFloorAreaExtendVo());
ObjectHelper.writeWithFrom(areaExtendVo, req.getAreaExtendVo());
floorAreaExtendDao.create(areaExtendVo);
} else {
ObjectHelper.writeWithFrom(loadExtend, req.getFloorAreaExtendVo());
ObjectHelper.writeWithFrom(loadExtend, req.getAreaExtendVo());
floorAreaExtendDao.update(loadExtend);
}
ImageReqVo imageReqVo = new ImageReqVo();
......
......@@ -87,6 +87,8 @@ public class ImageServiceImpl implements ImageService {
@Override
public String saveList(ImageReqVo imageReqVo) {
List<ImageVo> imageList = new ArrayList<>();
if (!StringHelper.isEmpty(imageReqVo.getImageList())
&& imageReqVo.getImageList().size() > 0) {
for (ImageVo imageVo : imageReqVo.getImageList()) {
ImageVo image = new ImageVo();
ObjectHelper.writeWithFrom(image, imageReqVo);
......@@ -95,7 +97,8 @@ public class ImageServiceImpl implements ImageService {
image.setImageUrl(imageVo.getImageUrl());
imageList.add(image);
}
imageDao.createList(imageReqVo.getImageList());
imageDao.createList(imageList);
}
return imageReqVo.getRelationId();
}
}
......@@ -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")
.add("categoryId", "and p.category_id = ?")
.add("languageType", "and pe.language_type =?")
.add("categoryType", "and p.category_type = ?")
;
}
......
......@@ -10,7 +10,7 @@ public class FloorAreaReqVo extends FloorAreaVo {
private Integer languageType;
private FloorAreaExtendVo floorAreaExtendVo;
private FloorAreaExtendVo areaExtendVo;
private List<ImageVo> imageVoList;
......@@ -22,12 +22,12 @@ public class FloorAreaReqVo extends FloorAreaVo {
this.imageVoList = imageVoList;
}
public FloorAreaExtendVo getFloorAreaExtendVo() {
return floorAreaExtendVo;
public FloorAreaExtendVo getAreaExtendVo() {
return areaExtendVo;
}
public void setFloorAreaExtendVo(FloorAreaExtendVo floorAreaExtendVo) {
this.floorAreaExtendVo = floorAreaExtendVo;
public void setAreaExtendVo(FloorAreaExtendVo areaExtendVo) {
this.areaExtendVo = areaExtendVo;
}
public Integer getLanguageType() {
......
......@@ -9,6 +9,8 @@ public class ProductCategoryLoadPageReqVo extends PageSizeReqVo {
private String categoryId;
private Integer categoryType;
private String categoryName;
private Integer languageType;
......@@ -52,4 +54,12 @@ public class ProductCategoryLoadPageReqVo extends PageSizeReqVo {
public void setLanguageType(Integer 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