Commit 1ff1d410 authored by libin's avatar libin

旅游标签

parent 015f6679
......@@ -128,12 +128,12 @@ public class TourTagBiz extends BaseBiz<TourTagMapper,TourTag> {
List<TourTagBannerDTO> tourTagBannerDTOS = tourTagAndBannerDTO.getTourTagBannerDTOS();
//设置标签创建的相关信息
tourTagDTO.setCtrTime(Instant.now().toEpochMilli());
tourTagDTO.setIsDel(0);
tourTagDTO.setRank(tourTagDTO.getRank()==null?0:tourTagDTO.getRank());
tourTagDTO.setIsHot(0);
//保存标签
TourTag tag = new TourTag();
BeanUtils.copyProperties(tourTagDTO,tag);
int effectRows = mapper.insertSelective(tag);
/* TourTag tourTag = new TourTag();
BeanUtils.copyProperties(tourTagDTO,tourTag);*/
int effectRows = mapper.save(tourTagDTO);
if (effectRows==0){
return effectRows;
}
......
......@@ -7,7 +7,6 @@ import com.xxfc.platform.tour.common.TourBaseController;
import com.xxfc.platform.tour.dto.TourTagAndBannerDTO;
import com.xxfc.platform.tour.entity.TourTag;
import io.swagger.annotations.*;
import org.apache.commons.collections4.Put;
import org.springframework.web.bind.annotation.*;
......
......@@ -19,8 +19,8 @@
</resultMap>
<insert id="save" useGeneratedKeys="true" keyProperty="id" keyColumn="id" parameterType="com.xxfc.platform.tour.dto.TourTagDTO">
insert tour_tag(`name`,`img`,`describe`,`link`,`is_hot`,`count`,`rank`,`ctr_time`,`upd_time`,`is_del`)
values(#{name},#{img},#{describe},#{link},#{isHot},#{count},#{rank},#{ctrTime},#{updTime},#{isDel})
insert tour_tag(`name`,`img`,`describe`,`rank`,`ctr_time`)
values(#{name},#{img},#{describe},#{rank},#{ctrTime})
</insert>
</mapper>
\ No newline at end of file
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