package com.nuvole.four.mapper;
|
|
import com.nuvole.four.domain.StoreIndustryManage;
|
import com.nuvole.four.domain.query.StoreIndustryManageQuery;
|
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Select;
|
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* @Description 行业管理Mapper
|
* @Author dqh
|
* @Date 2024-04-12 17:41:29
|
*/
|
@Mapper
|
public interface StoreIndustryManageMapper {
|
int deleteByPrimaryKey(Long id);
|
|
int insert(StoreIndustryManage record);
|
|
int insertSelective(StoreIndustryManage record);
|
|
StoreIndustryManage selectByPrimaryKey(Long id);
|
|
int updateByPrimaryKeySelective(StoreIndustryManage record);
|
|
int updateByPrimaryKey(StoreIndustryManage record);
|
|
/**
|
* 查询列表
|
*
|
* @param query
|
* @return 查询结果
|
*/
|
List<StoreIndustryManage> selectList(StoreIndustryManageQuery query);
|
|
/**
|
* 方法描述: 查询max(sortNo)的序号信息
|
* 返回 = max(sortNo) + 10
|
*
|
* @date 2024-04-12 18:17
|
**/
|
@Select("select (max(sort_no) + 10) sortNo from store_industry_manage")
|
Integer getSort();
|
|
/**
|
* 方法描述:根据ID查询对应层级level;并自动+1得出下级level
|
*
|
* @date 2024-04-12 18:40
|
**/
|
@Select("select (`level` + 1) from store_industry_manage where id = #{id} ")
|
Integer getLevel(Long id);
|
|
/**
|
* 方法描述:查询列表默认方法
|
**/
|
List<StoreIndustryManage> selectAll(Map map);
|
|
/**
|
* 方法描述:查询当前节点是否包含子节点
|
*
|
**/
|
@Select("select count(1) from store_industry_manage where p_id = #{id} and deleted=0")
|
int selectByPid(Long id);
|
|
/**
|
* 方法描述: 查询同级最大的code
|
*
|
* @date 2024-04-13 21:51
|
**/
|
@Select("select max(industry_code) from store_industry_manage where p_id = #{pid} and industry_code = #{industryCode}")
|
String getMaxCode(@Param("pid") Long pid, @Param("industryCode") String industryCode);
|
}
|