分配规则

This commit is contained in:
苏竹红
2023-06-19 19:57:53 +08:00
parent 3b8a34e766
commit 0bd2f2b96a
8 changed files with 171 additions and 10 deletions

View File

@@ -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);
}
}

View File

@@ -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);
}

View File

@@ -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>