Commit 2a91cf1d authored by dmy's avatar dmy

中医药小程序代码提交

parent 7f2a75e9
......@@ -10,6 +10,7 @@ import com.tcm.util.common.req.CarouselLoadPageReqVo;
import com.tcm.util.common.req.CarouselReqVo;
import com.tcm.util.common.req.ImageReqVo;
import com.tcm.util.common.res.CarouselResVo;
import com.tcm.util.common.res.ImageResVo;
import com.yanzuoguang.util.base.ObjectHelper;
import com.yanzuoguang.util.helper.DateHelper;
import com.yanzuoguang.util.helper.StringHelper;
......@@ -35,6 +36,10 @@ public class CarouselServiceImpl implements CarouselService {
public CarouselResVo load(CarouselReqVo req) {
CarouselResVo load = carouselDao.loadInfo(req);
if (load != null) {
CarouselExtendVo carouselExtend = new CarouselExtendVo();
carouselExtend.setCarouselId(load.getCarouselId());
carouselExtend.setLanguageType(req.getLanguageType());
load.setCarouselExtendVo(carouselExtendDao.load(carouselExtend, CarouselExtendVo.class));
ImageReqVo imageReqVo = new ImageReqVo();
imageReqVo.setRelationId(load.getCarouselId());
......@@ -50,8 +55,9 @@ public class CarouselServiceImpl implements CarouselService {
String carouselId = StringHelper.getNewID();
ObjectHelper.writeWithFrom(carousel, req);
carousel.setCarouselId(carouselId);
carousel.setPushTime(DateHelper.getNow());
carousel.setCreateTime(DateHelper.getNow());
carouselDao.create(req);
carouselDao.create(carousel);
CarouselExtendVo carouselExtend = new CarouselExtendVo();
carouselExtend.setCarouselId(carouselId);
......@@ -71,7 +77,7 @@ public class CarouselServiceImpl implements CarouselService {
CarouselVo load = carouselDao.load(carousel, CarouselVo.class);
ObjectHelper.writeWithFrom(load, req);
load.setUpdateTime(DateHelper.getNow());
carouselDao.update(carousel);
carouselDao.update(load);
CarouselExtendVo carouselExtend = new CarouselExtendVo();
carouselExtend.setCarouselId(req.getCarouselId());
......
......@@ -54,9 +54,19 @@ public class ImageServiceImpl implements ImageService {
@Override
public String remove(ImageReqVo req) {
ImageVo image = new ImageVo();
if (!StringHelper.isEmpty(req.getImageId())) {
image.setImageId(req.getImageId());
}
if (!StringHelper.isEmpty(req.getRelationId())) {
image.setRelationId(req.getRelationId());
}
if (StringHelper.isEmpty(req.getImageId())
&& StringHelper.isEmpty(req.getRelationId())) {
return "fail";
}
imageDao.remove(image);
return image.getImageId();
return "success";
}
@Override
......
......@@ -30,6 +30,13 @@ public class FloorAreaExtendVo {
@TableAnnotation("area_name")
@ApiModelProperty(notes = "区域名称")
private String areaName;
/**
* 区域标签
*/
@TableAnnotation("label")
@ApiModelProperty(notes = "区域标签")
private String label;
/**
* 区域描述
*/
......@@ -93,4 +100,12 @@ public class FloorAreaExtendVo {
public void setPosition(String position) {
this.position = position;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
}
......@@ -24,6 +24,13 @@ public class FloorExtendVo {
@TableAnnotation("floor_name")
@ApiModelProperty(notes = "楼层名称")
private String floorName;
/**
* 楼层标签
*/
@TableAnnotation("label")
@ApiModelProperty(notes = "楼层标签")
private String label;
/**
* 语言类型
*/
......@@ -79,4 +86,12 @@ public class FloorExtendVo {
public void setFloorDesc(String floorDesc) {
this.floorDesc = floorDesc;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
}
......@@ -3,7 +3,6 @@ package com.tcm.util.common.req;
import com.tcm.util.common.CarouselExtendVo;
import com.tcm.util.common.CarouselVo;
import com.tcm.util.common.ImageVo;
import com.tcm.util.common.res.ImageResVo;
import java.util.ArrayList;
import java.util.List;
......
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