分配规则
This commit is contained in:
@@ -55,6 +55,13 @@ public class HyOpenAreaInfoDAO {
|
||||
return hyOpenAreaInfoMapper.getChildrenList(type,parentId);
|
||||
}
|
||||
|
||||
public Integer getChildrenCount(String type ,Long parentId){
|
||||
if (parentId==null){
|
||||
return 0;
|
||||
}
|
||||
return hyOpenAreaInfoMapper.getChildrenCount(type,parentId);
|
||||
}
|
||||
|
||||
|
||||
public int batchUpdateById(String backgroundBanner,String detailBanner,String areaStatus,String updateUserId,List<Long> ids){
|
||||
if (StringUtils.isEmpty(areaStatus)){
|
||||
@@ -77,4 +84,12 @@ public class HyOpenAreaInfoDAO {
|
||||
}
|
||||
return hyOpenAreaInfoMapper.selectByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
public HyOpenAreaInfoDO selectById(Long id){
|
||||
if (id==null){
|
||||
return null;
|
||||
}
|
||||
return hyOpenAreaInfoMapper.selectById(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.cool.store.dto.partner.ApplyReservationProvinceDTO;
|
||||
import com.cool.store.entity.HyOpenAreaInfoDO;
|
||||
import com.cool.store.entity.HyPartnerBaseInfoDO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.models.auth.In;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@@ -69,6 +70,9 @@ public interface HyOpenAreaInfoMapper {
|
||||
List<HyOpenAreaInfoDO> getChildrenList(@Param("type") String type ,
|
||||
@Param("parentId") Long parentId);
|
||||
|
||||
Integer getChildrenCount(@Param("type") String type ,
|
||||
@Param("parentId") Long parentId);
|
||||
|
||||
|
||||
/**
|
||||
* 更新城市昨天
|
||||
@@ -98,7 +102,7 @@ public interface HyOpenAreaInfoMapper {
|
||||
*/
|
||||
List<HyOpenAreaInfoDO> selectByIds(@Param("idList") List<Long> idList);
|
||||
|
||||
|
||||
HyOpenAreaInfoDO selectById(@Param("id") Long id);
|
||||
|
||||
|
||||
}
|
||||
@@ -18,6 +18,11 @@
|
||||
id, parent_id, area_name, area_path, background_banner, detail_banner, area_status,
|
||||
deleted, create_time, update_time, update_user_id
|
||||
</sql>
|
||||
<select id="selectById" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"></include>
|
||||
from id = #{id}
|
||||
</select>
|
||||
<insert id="insertSelective" parameterType="com.cool.store.entity.HyOpenAreaInfoDO" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into hy_open_area_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@@ -242,6 +247,22 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getChildrenCount" resultType="java.lang.Integer">
|
||||
select count(1) from
|
||||
hy_open_area_info
|
||||
<where>
|
||||
<if test="parentId!=null">
|
||||
and parent_id = #{parentId}
|
||||
</if>
|
||||
<if test="type!=null and type == 'apply'">
|
||||
and (area_status = 'open' or area_status = 'keyOpen')
|
||||
</if>
|
||||
<if test="type!=null and type == 'reservation'">
|
||||
and (area_status='notOpen' or area_status = 'saturated')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByIds" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"></include>
|
||||
|
||||
Reference in New Issue
Block a user