误删恢复
This commit is contained in:
parent
762eab8fd1
commit
d494eaf218
@ -14,14 +14,37 @@ import com.fastbee.ggroup.domain.GSiteGroups;
|
||||
public interface GSiteGroupsMapper extends BaseMapper<GSiteGroups>
|
||||
{
|
||||
|
||||
/**
|
||||
* 查询站点组关系
|
||||
*
|
||||
* @param id 站点组关系主键
|
||||
* @return 站点组关系
|
||||
*/
|
||||
public GSiteGroups selectGSiteGroupsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询站点组关系列表
|
||||
*
|
||||
* @param gSiteGroups 站点组关系
|
||||
* @return 站点组关系集合
|
||||
*/
|
||||
public List<GSiteGroups> selectGSiteGroupsList(GSiteGroups gSiteGroups);
|
||||
|
||||
/**
|
||||
* 新增站点组关系
|
||||
*
|
||||
* @param gSiteGroups 站点组关系
|
||||
* @return 结果
|
||||
*/
|
||||
int insertGSiteGroups(GSiteGroups gSiteGroups);
|
||||
public int insertGSiteGroups(GSiteGroups gSiteGroups);
|
||||
|
||||
/**
|
||||
* 修改站点组关系
|
||||
*
|
||||
* @param gSiteGroups 站点组关系
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateGSiteGroups(GSiteGroups gSiteGroups);
|
||||
|
||||
/**
|
||||
* 删除站点组关系
|
||||
@ -29,6 +52,13 @@ public interface GSiteGroupsMapper extends BaseMapper<GSiteGroups>
|
||||
* @param id 站点组关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteGSiteGroupsById(Long id);
|
||||
public int deleteGSiteGroupsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除站点组关系
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteGSiteGroupsByIds(Long[] ids);
|
||||
}
|
||||
|
@ -25,7 +25,13 @@ public interface GSitesMapper extends BaseMapper<GSites>
|
||||
*/
|
||||
public GSites selectGSitesById(Long id);
|
||||
|
||||
|
||||
/**
|
||||
* 查询站点列表
|
||||
*
|
||||
* @param gSites 站点
|
||||
* @return 站点集合
|
||||
*/
|
||||
public List<GSites> selectGSitesList(GSites gSites);
|
||||
|
||||
/**
|
||||
* 新增站点
|
||||
@ -52,6 +58,7 @@ public interface GSitesMapper extends BaseMapper<GSites>
|
||||
* @return 结果
|
||||
*/
|
||||
|
||||
// @Delete("delete from g_site_groups where id= #{id}")
|
||||
public int deleteGSitesById(@Param("id") Long id);
|
||||
|
||||
/**
|
||||
|
@ -55,7 +55,7 @@ public class GSitesServiceImpl implements IGSitesService
|
||||
@Override
|
||||
public List<GSites> selectGSitesList(GSites gSites)
|
||||
{
|
||||
return gSitesMapper.selectGSitesList(gSites);
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -20,6 +20,21 @@
|
||||
select id, site_id, parent_id, create_by, create_time, update_time, update_by, project_id, order_num from g_site_groups
|
||||
</sql>
|
||||
|
||||
<select id="selectGSiteGroupsList" parameterType="GSiteGroups" resultMap="GSiteGroupsResult">
|
||||
<include refid="selectGSiteGroupsVo"/>
|
||||
<where>
|
||||
<if test="siteId != null "> and site_id = #{siteId}</if>
|
||||
<if test="parentId != null "> and parent_id = #{parentId}</if>
|
||||
<if test="projectId != null "> and project_id = #{projectId}</if>
|
||||
<if test="orderNum != null "> and order_num = #{orderNum}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectGSiteGroupsById" parameterType="Long" resultMap="GSiteGroupsResult">
|
||||
<include refid="selectGSiteGroupsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertGSiteGroups" parameterType="GSiteGroups" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into g_site_groups
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@ -44,8 +59,29 @@
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateGSiteGroups" parameterType="GSiteGroups">
|
||||
update g_site_groups
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="siteId != null">site_id = #{siteId},</if>
|
||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="orderNum != null">order_num = #{orderNum},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteGSiteGroupsById" parameterType="Long">
|
||||
delete from g_site_groups where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteGSiteGroupsByIds" parameterType="String">
|
||||
delete from g_site_groups where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -20,14 +20,44 @@
|
||||
select id, name, icon, type, create_by, create_time, update_time, update_by, space from g_sites
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectGSitesList" parameterType="GSites" resultMap="GSitesResult">
|
||||
<include refid="selectGSitesVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="icon != null and icon != ''"> and icon = #{icon}</if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="space != null and space != ''"> and space = #{space}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectGSitesById" parameterType="Long" resultMap="GSitesResult">
|
||||
<include refid="selectGSitesVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<!-- <insert id="insertGSites" parameterType="GSites" useGeneratedKeys="true" keyProperty="id">-->
|
||||
<!-- insert into g_sites-->
|
||||
<!-- <trim prefix="(" suffix=")" suffixOverrides=",">-->
|
||||
<!-- <if test="name != null and name != ''">name,</if>-->
|
||||
<!-- <if test="icon != null">icon,</if>-->
|
||||
<!-- <if test="type != null">type,</if>-->
|
||||
<!-- <if test="createBy != null">create_by,</if>-->
|
||||
<!-- <if test="createTime != null">create_time,</if>-->
|
||||
<!-- <if test="updateTime != null">update_time,</if>-->
|
||||
<!-- <if test="updateBy != null">update_by,</if>-->
|
||||
<!-- <if test="space != null">space,</if>-->
|
||||
<!-- </trim>-->
|
||||
<!-- <trim prefix="values (" suffix=")" suffixOverrides=",">-->
|
||||
<!-- <if test="name != null and name != ''">#{name},</if>-->
|
||||
<!-- <if test="icon != null">#{icon},</if>-->
|
||||
<!-- <if test="type != null">#{type},</if>-->
|
||||
<!-- <if test="createBy != null">#{createBy},</if>-->
|
||||
<!-- <if test="createTime != null">#{createTime},</if>-->
|
||||
<!-- <if test="updateTime != null">#{updateTime},</if>-->
|
||||
<!-- <if test="updateBy != null">#{updateBy},</if>-->
|
||||
<!-- <if test="space != null">#{space},</if>-->
|
||||
<!-- </trim>-->
|
||||
<!-- </insert>-->
|
||||
|
||||
<update id="updateGSites" parameterType="GSitesEditDto">
|
||||
update g_sites
|
||||
|
Loading…
x
Reference in New Issue
Block a user