Commit 08c2af74 authored by libin's avatar libin

营地

parent 462f54e1
......@@ -13,6 +13,7 @@ import com.xxfc.platform.campsite.entity.CampsiteTag;
import com.xxfc.platform.campsite.mapper.CampsiteTagMapper;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
import java.util.Comparator;
import java.util.List;
/**
......
......@@ -31,7 +31,7 @@ public class CampsiteTagAdminController extends BaseController<CampsiteTagBiz,Ca
public ObjectRestResponse<CampsiteTag> remove(@PathVariable("id") int id) {
int effectRows = getBaseBiz().updateCampsiteTagStatus(id);
if (effectRows>0){
ObjectRestResponse.succ();
return ObjectRestResponse.succ();
}
return ObjectRestResponse.createDefaultFail();
}
......
......@@ -40,8 +40,9 @@
FROM `campsite_shop_tag` cst
left JOIN `campsite_shop` cs on cst.shop_id=cs.id
left JOIN `campsite_tag` ct on cst.tag_id=ct.id
where cs.sale_state=1
<if test="typeId!=null">
WHERE cst.tag_id=#{typeId}
and cst.tag_id=#{typeId}
</if>
</select>
......@@ -53,18 +54,18 @@
<select id="findCampsiteShops" parameterType="com.xxfc.platform.campsite.dto.CampsiteShopAdminFindDTO" resultType="com.xxfc.platform.campsite.dto.CampsiteShopAdminPageDTO">
SELECT `id`,`name`,`hot`,`crt_time` as `crtTime`,`sale_state` as
`saleState` FROM `campsite_shop`
<where>
where `is_del`=0
<if test="startTime != null || endTime!=null">
<choose>
<when test="startTime!=null and endTime!=null">
crt_time between #{startTime} and #{endTime}
and crt_time between #{startTime} and #{endTime}
</when>
<otherwise>
<if test="startTime!=null">
crt_time=#{startTime}
and crt_time=#{startTime}
</if>
<if test="endTime != null">
crt_time=#{endTime}
and crt_time=#{endTime}
</if>
</otherwise>
</choose>
......@@ -72,8 +73,6 @@
<if test="name != null and name != ''">
and `name` like concat('%',#{name},'%')
</if>
</where>
</select>
<update id="updateCampsiteStatus">
......
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