权限修改

dev
liuguijing 1 year ago
parent e236fdd87f
commit b3bc3d41d6

@ -0,0 +1,641 @@
package com.shxy.xymanager_common.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class TerminalChannelsExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public TerminalChannelsExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Byte value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Byte value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Byte value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Byte value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Byte value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Byte value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Byte> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Byte> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Byte value1, Byte value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Byte value1, Byte value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andChannelNameIsNull() {
addCriterion("channel_name is null");
return (Criteria) this;
}
public Criteria andChannelNameIsNotNull() {
addCriterion("channel_name is not null");
return (Criteria) this;
}
public Criteria andChannelNameEqualTo(String value) {
addCriterion("channel_name =", value, "channelName");
return (Criteria) this;
}
public Criteria andChannelNameNotEqualTo(String value) {
addCriterion("channel_name <>", value, "channelName");
return (Criteria) this;
}
public Criteria andChannelNameGreaterThan(String value) {
addCriterion("channel_name >", value, "channelName");
return (Criteria) this;
}
public Criteria andChannelNameGreaterThanOrEqualTo(String value) {
addCriterion("channel_name >=", value, "channelName");
return (Criteria) this;
}
public Criteria andChannelNameLessThan(String value) {
addCriterion("channel_name <", value, "channelName");
return (Criteria) this;
}
public Criteria andChannelNameLessThanOrEqualTo(String value) {
addCriterion("channel_name <=", value, "channelName");
return (Criteria) this;
}
public Criteria andChannelNameLike(String value) {
addCriterion("channel_name like", value, "channelName");
return (Criteria) this;
}
public Criteria andChannelNameNotLike(String value) {
addCriterion("channel_name not like", value, "channelName");
return (Criteria) this;
}
public Criteria andChannelNameIn(List<String> values) {
addCriterion("channel_name in", values, "channelName");
return (Criteria) this;
}
public Criteria andChannelNameNotIn(List<String> values) {
addCriterion("channel_name not in", values, "channelName");
return (Criteria) this;
}
public Criteria andChannelNameBetween(String value1, String value2) {
addCriterion("channel_name between", value1, value2, "channelName");
return (Criteria) this;
}
public Criteria andChannelNameNotBetween(String value1, String value2) {
addCriterion("channel_name not between", value1, value2, "channelName");
return (Criteria) this;
}
public Criteria andMaxResolutionWidthIsNull() {
addCriterion("max_resolution_width is null");
return (Criteria) this;
}
public Criteria andMaxResolutionWidthIsNotNull() {
addCriterion("max_resolution_width is not null");
return (Criteria) this;
}
public Criteria andMaxResolutionWidthEqualTo(Integer value) {
addCriterion("max_resolution_width =", value, "maxResolutionWidth");
return (Criteria) this;
}
public Criteria andMaxResolutionWidthNotEqualTo(Integer value) {
addCriterion("max_resolution_width <>", value, "maxResolutionWidth");
return (Criteria) this;
}
public Criteria andMaxResolutionWidthGreaterThan(Integer value) {
addCriterion("max_resolution_width >", value, "maxResolutionWidth");
return (Criteria) this;
}
public Criteria andMaxResolutionWidthGreaterThanOrEqualTo(Integer value) {
addCriterion("max_resolution_width >=", value, "maxResolutionWidth");
return (Criteria) this;
}
public Criteria andMaxResolutionWidthLessThan(Integer value) {
addCriterion("max_resolution_width <", value, "maxResolutionWidth");
return (Criteria) this;
}
public Criteria andMaxResolutionWidthLessThanOrEqualTo(Integer value) {
addCriterion("max_resolution_width <=", value, "maxResolutionWidth");
return (Criteria) this;
}
public Criteria andMaxResolutionWidthIn(List<Integer> values) {
addCriterion("max_resolution_width in", values, "maxResolutionWidth");
return (Criteria) this;
}
public Criteria andMaxResolutionWidthNotIn(List<Integer> values) {
addCriterion("max_resolution_width not in", values, "maxResolutionWidth");
return (Criteria) this;
}
public Criteria andMaxResolutionWidthBetween(Integer value1, Integer value2) {
addCriterion("max_resolution_width between", value1, value2, "maxResolutionWidth");
return (Criteria) this;
}
public Criteria andMaxResolutionWidthNotBetween(Integer value1, Integer value2) {
addCriterion("max_resolution_width not between", value1, value2, "maxResolutionWidth");
return (Criteria) this;
}
public Criteria andMaxResolutionHeightIsNull() {
addCriterion("max_resolution_height is null");
return (Criteria) this;
}
public Criteria andMaxResolutionHeightIsNotNull() {
addCriterion("max_resolution_height is not null");
return (Criteria) this;
}
public Criteria andMaxResolutionHeightEqualTo(Integer value) {
addCriterion("max_resolution_height =", value, "maxResolutionHeight");
return (Criteria) this;
}
public Criteria andMaxResolutionHeightNotEqualTo(Integer value) {
addCriterion("max_resolution_height <>", value, "maxResolutionHeight");
return (Criteria) this;
}
public Criteria andMaxResolutionHeightGreaterThan(Integer value) {
addCriterion("max_resolution_height >", value, "maxResolutionHeight");
return (Criteria) this;
}
public Criteria andMaxResolutionHeightGreaterThanOrEqualTo(Integer value) {
addCriterion("max_resolution_height >=", value, "maxResolutionHeight");
return (Criteria) this;
}
public Criteria andMaxResolutionHeightLessThan(Integer value) {
addCriterion("max_resolution_height <", value, "maxResolutionHeight");
return (Criteria) this;
}
public Criteria andMaxResolutionHeightLessThanOrEqualTo(Integer value) {
addCriterion("max_resolution_height <=", value, "maxResolutionHeight");
return (Criteria) this;
}
public Criteria andMaxResolutionHeightIn(List<Integer> values) {
addCriterion("max_resolution_height in", values, "maxResolutionHeight");
return (Criteria) this;
}
public Criteria andMaxResolutionHeightNotIn(List<Integer> values) {
addCriterion("max_resolution_height not in", values, "maxResolutionHeight");
return (Criteria) this;
}
public Criteria andMaxResolutionHeightBetween(Integer value1, Integer value2) {
addCriterion("max_resolution_height between", value1, value2, "maxResolutionHeight");
return (Criteria) this;
}
public Criteria andMaxResolutionHeightNotBetween(Integer value1, Integer value2) {
addCriterion("max_resolution_height not between", value1, value2, "maxResolutionHeight");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("status is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("status is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(String value) {
addCriterion("status =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(String value) {
addCriterion("status <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(String value) {
addCriterion("status >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(String value) {
addCriterion("status >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(String value) {
addCriterion("status <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(String value) {
addCriterion("status <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLike(String value) {
addCriterion("status like", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotLike(String value) {
addCriterion("status not like", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<String> values) {
addCriterion("status in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<String> values) {
addCriterion("status not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(String value1, String value2) {
addCriterion("status between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(String value1, String value2) {
addCriterion("status not between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

@ -13,10 +13,6 @@ public interface TerminalChannelMapperDao {
List<TerminalChannelMapper> selectTermAndMapByTowerId(@Param("status") Integer status, @Param("towerlist") List<Integer> towerlist); List<TerminalChannelMapper> selectTermAndMapByTowerId(@Param("status") Integer status, @Param("towerlist") List<Integer> towerlist);
List<TerminalChannelMapper> selectByTermid(Integer id);
TerminalChannelMapper selectByTermidAndChannelid(@Param("termid") Integer termid, @Param("channelid")Integer channelid, @Param("status") Integer status);
List<TerminalChannelMapper> selectAll(); List<TerminalChannelMapper> selectAll();
List<TerminalChannelMapper> selectAllByPhotoTime(@Param("status") Integer status,@Param("list")List termlist); List<TerminalChannelMapper> selectAllByPhotoTime(@Param("status") Integer status,@Param("list")List termlist);

@ -4,6 +4,7 @@ import com.shxy.xymanager_common.dto.DyLineAndTerminalAndChannelDto;
import com.shxy.xymanager_common.dto.TermAndChannelDto; import com.shxy.xymanager_common.dto.TermAndChannelDto;
import com.shxy.xymanager_common.dto.TermChannelAndMapperDto; import com.shxy.xymanager_common.dto.TermChannelAndMapperDto;
import com.shxy.xymanager_common.entity.TerminalChannels; import com.shxy.xymanager_common.entity.TerminalChannels;
import com.shxy.xymanager_common.entity.TerminalChannelsExample;
import com.shxy.xymanager_common.vo.TerminalChannelVo; import com.shxy.xymanager_common.vo.TerminalChannelVo;
import com.shxy.xymanager_common.vo.UpdateTerminalChannelVo; import com.shxy.xymanager_common.vo.UpdateTerminalChannelVo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -13,8 +14,6 @@ import java.util.List;
public interface TerminalChannelsDao { public interface TerminalChannelsDao {
int deleteByPrimaryKey(Integer id);
int insertList(@Param("list") List<TerminalChannels> record,@Param("status") Integer status, @Param("createat") Date create, @Param("updateat") Date update); int insertList(@Param("list") List<TerminalChannels> record,@Param("status") Integer status, @Param("createat") Date create, @Param("updateat") Date update);
List<TerminalChannels> selectChannelList(@Param("status") Integer status); List<TerminalChannels> selectChannelList(@Param("status") Integer status);
@ -23,20 +22,37 @@ public interface TerminalChannelsDao {
List<TermAndChannelDto> selectTermChannelList(@Param("status") Integer status); List<TermAndChannelDto> selectTermChannelList(@Param("status") Integer status);
List<TermChannelAndMapperDto> selectChannelByTowerId(@Param("towerid") Integer towerid, @Param("status") Integer status);
List<TermChannelAndMapperDto> selectByTermid(@Param("termid") Integer termid, @Param("status") Integer status); List<TermChannelAndMapperDto> selectByTermid(@Param("termid") Integer termid, @Param("status") Integer status);
TerminalChannels selectByPrimaryKey(@Param("id") Integer id, @Param("status") Integer status);
List<DyLineAndTerminalAndChannelDto> selectAllAndChannelByTermid(@Param("termid") Integer termid, @Param("status") Integer status); List<DyLineAndTerminalAndChannelDto> selectAllAndChannelByTermid(@Param("termid") Integer termid, @Param("status") Integer status);
int updateByPrimaryKeySelective(@Param("data") TerminalChannels record,@Param("updateat") Date update);
int deleteList(@Param("list") List<TerminalChannels> list,@Param("status") Integer status,@Param("updateat") Date update); int deleteList(@Param("list") List<TerminalChannels> list,@Param("status") Integer status,@Param("updateat") Date update);
int selectChannelCount(List<TerminalChannelVo.ChannelItem> list); int selectChannelCount(List<TerminalChannelVo.ChannelItem> list);
int selectChannelCountById(UpdateTerminalChannelVo vo);
long countByExample(TerminalChannelsExample example);
int deleteByExample(TerminalChannelsExample example);
int deleteByPrimaryKey(Integer id);
int insert(TerminalChannels record);
int insertSelective(TerminalChannels record);
List<TerminalChannels> selectByExample(TerminalChannelsExample example);
TerminalChannels selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") TerminalChannels record, @Param("example") TerminalChannelsExample example);
int updateByExample(@Param("record") TerminalChannels record, @Param("example") TerminalChannelsExample example);
int updateByPrimaryKeySelective(TerminalChannels record);
int updateByPrimaryKey(TerminalChannels record);
} }

@ -18,7 +18,6 @@ public interface TerminalsDao {
List<ChannelAndTermDto> selectByIdList(@Param("list") List<RelateTerminalListRuleIdVo.Items> list, @Param("status") Integer status); List<ChannelAndTermDto> selectByIdList(@Param("list") List<RelateTerminalListRuleIdVo.Items> list, @Param("status") Integer status);
List<TerminalsAndStatusDto> selectList(@Param("dyid") List<Integer> dyplist, @Param("lineid") List<Integer> lineplist, @Param("towerid") List<Integer> towplist, @Param("termid") List<Integer> termid,@Param("isSuper") Integer isSuper);
long countByExample(TerminalsExample example); long countByExample(TerminalsExample example);

@ -84,11 +84,11 @@
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;--> <!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>--> <!-- </table>-->
<table tableName="terminal_basic_info_history" <!-- <table tableName="terminal_basic_info_history"-->
domainObjectName="TerminalBasicInfoHistory" <!-- domainObjectName="TerminalBasicInfoHistory"-->
mapperName="TerminalBasicInfoHistoryDao"> <!-- mapperName="TerminalBasicInfoHistoryDao">-->
<!-- <property name="useActualColumnNames" value="false"/>--> <!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
</table> <!-- </table>-->
<!-- <table tableName="terminal_upload"--> <!-- <table tableName="terminal_upload"-->
<!-- domainObjectName="TerminalUpload"--> <!-- domainObjectName="TerminalUpload"-->
@ -102,13 +102,12 @@
<!-- mapperName="TowersDao">--> <!-- mapperName="TowersDao">-->
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;--> <!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;-->
<!-- </table>--> <!-- </table>-->
<!-- <table tableName="terminal_channels"--> <table tableName="terminal_channels"
<!-- domainObjectName="TerminalChannels"--> domainObjectName="TerminalChannels"
<!-- mapperName="TerminalChannelsDao"--> mapperName="TerminalChannelsDao"
<!-- enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"--> >
<!-- enableSelectByExample="false" selectByExampleQueryId="false">--> <!-- <property name="useActualColumnNames" value="false"/>-->
<!-- &lt;!&ndash; <property name="useActualColumnNames" value="false"/>&ndash;&gt;--> </table>
<!-- </table>-->
<!-- <table tableName="terminal_params"--> <!-- <table tableName="terminal_params"-->
<!-- domainObjectName="TerminalParams"--> <!-- domainObjectName="TerminalParams"-->
<!-- mapperName="TerminalParamsDao"--> <!-- mapperName="TerminalParamsDao"-->

@ -277,24 +277,12 @@
</update> </update>
<select id="selectByTermid" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from terminal_channel_mapper
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap"> <select id="selectAll" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from terminal_channel_mapper from terminal_channel_mapper
</select> </select>
<select id="selectByTermidAndChannelid" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from terminal_channel_mapper
where term_id = #{termid} and channel_id = #{channelid}
</select>
<select id="selectAllByPhotoTime" resultMap="BaseResultMap"> <select id="selectAllByPhotoTime" resultMap="BaseResultMap">
select select

@ -1,59 +1,298 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.shxy.xymanager_dao.dao.TerminalChannelsDao"> <mapper namespace="com.shxy.xymanager_dao.dao.TerminalChannelsDao">
<resultMap id="BaseResultMap" type="com.shxy.xymanager_common.entity.TerminalChannels">
<id column="id" jdbcType="TINYINT" property="id" />
<result column="channel_name" jdbcType="VARCHAR" property="channelName" />
<result column="max_resolution_width" jdbcType="INTEGER" property="maxResolutionWidth" />
<result column="max_resolution_height" jdbcType="INTEGER" property="maxResolutionHeight" />
<result column="status" jdbcType="VARCHAR" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, channel_name, max_resolution_width, max_resolution_height, status, create_time,
update_time
</sql>
<select id="selectByExample" parameterType="com.shxy.xymanager_common.entity.TerminalChannelsExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from terminal_channels
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from terminal_channels
where id = #{id}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from terminal_channels
where id = #{id,jdbcType=TINYINT}
</delete>
<delete id="deleteByExample" parameterType="com.shxy.xymanager_common.entity.TerminalChannelsExample">
delete from terminal_channels
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.TerminalChannels">
insert into terminal_channels (id, channel_name, max_resolution_width,
max_resolution_height, status, create_time,
update_time)
values (#{id,jdbcType=TINYINT}, #{channelName,jdbcType=VARCHAR}, #{maxResolutionWidth,jdbcType=INTEGER},
#{maxResolutionHeight,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.TerminalChannels">
insert into terminal_channels
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="channelName != null">
channel_name,
</if>
<if test="maxResolutionWidth != null">
max_resolution_width,
</if>
<if test="maxResolutionHeight != null">
max_resolution_height,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=TINYINT},
</if>
<if test="channelName != null">
#{channelName,jdbcType=VARCHAR},
</if>
<if test="maxResolutionWidth != null">
#{maxResolutionWidth,jdbcType=INTEGER},
</if>
<if test="maxResolutionHeight != null">
#{maxResolutionHeight,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.shxy.xymanager_common.entity.TerminalChannelsExample" resultType="java.lang.Long">
select count(*) from terminal_channels
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update terminal_channels
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=TINYINT},
</if>
<if test="record.channelName != null">
channel_name = #{record.channelName,jdbcType=VARCHAR},
</if>
<if test="record.maxResolutionWidth != null">
max_resolution_width = #{record.maxResolutionWidth,jdbcType=INTEGER},
</if>
<if test="record.maxResolutionHeight != null">
max_resolution_height = #{record.maxResolutionHeight,jdbcType=INTEGER},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update terminal_channels
set id = #{record.id,jdbcType=TINYINT},
channel_name = #{record.channelName,jdbcType=VARCHAR},
max_resolution_width = #{record.maxResolutionWidth,jdbcType=INTEGER},
max_resolution_height = #{record.maxResolutionHeight,jdbcType=INTEGER},
status = #{record.status,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.shxy.xymanager_common.entity.TerminalChannels">
update terminal_channels
<set>
<if test="channelName != null">
channel_name = #{channelName,jdbcType=VARCHAR},
</if>
<if test="maxResolutionWidth != null">
max_resolution_width = #{maxResolutionWidth,jdbcType=INTEGER},
</if>
<if test="maxResolutionHeight != null">
max_resolution_height = #{maxResolutionHeight,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=TINYINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.shxy.xymanager_common.entity.TerminalChannels">
update terminal_channels
set channel_name = #{channelName,jdbcType=VARCHAR},
max_resolution_width = #{maxResolutionWidth,jdbcType=INTEGER},
max_resolution_height = #{maxResolutionHeight,jdbcType=INTEGER},
status = #{status,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=TINYINT}
</update>
<resultMap id="BaseResultMap" type="com.shxy.xymanager_common.entity.TerminalChannels"> <resultMap id="BaseResultMap" type="com.shxy.xymanager_common.entity.TerminalChannels">
<id column="id" jdbcType="INTEGER" property="id"/> <id column="id" jdbcType="INTEGER" property="id" />
<result column="channel_name" jdbcType="VARCHAR" property="channelName"/> <result column="channel_name" jdbcType="VARCHAR" property="channelName" />
<result column="max_resolution_width" jdbcType="INTEGER" property="maxResolutionWidth"/> <result column="max_resolution_width" jdbcType="INTEGER" property="maxResolutionWidth" />
<result column="max_resolution_height" jdbcType="INTEGER" property="maxResolutionHeight"/> <result column="max_resolution_height" jdbcType="INTEGER" property="maxResolutionHeight" />
<result column="status" jdbcType="INTEGER" property="status"/> <result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<resultMap id="TerminalAndMapperMap" type="com.shxy.xymanager_common.dto.TermChannelAndMapperDto"> <resultMap id="TerminalAndMapperMap" type="com.shxy.xymanager_common.dto.TermChannelAndMapperDto">
<id column="id" jdbcType="INTEGER" property="id"/> <id column="id" jdbcType="INTEGER" property="id" />
<result column="termid" jdbcType="INTEGER" property="termid"/> <result column="termid" jdbcType="INTEGER" property="termid" />
<result column="alias" jdbcType="VARCHAR" property="alias"/> <result column="alias" jdbcType="VARCHAR" property="alias" />
<result column="channel_id" jdbcType="INTEGER" property="channelid"/> <result column="channel_id" jdbcType="INTEGER" property="channelid" />
<result column="channel_name" jdbcType="VARCHAR" property="channelname"/> <result column="channel_name" jdbcType="VARCHAR" property="channelname" />
<result column="max_resolution_width" jdbcType="INTEGER" property="maxResolutionWidth"/> <result column="max_resolution_width" jdbcType="INTEGER" property="maxResolutionWidth" />
<result column="max_resolution_height" jdbcType="INTEGER" property="maxResolutionHeight"/> <result column="max_resolution_height" jdbcType="INTEGER" property="maxResolutionHeight" />
<result column="status" jdbcType="INTEGER" property="status"/> <result column="status" jdbcType="INTEGER" property="status" />
</resultMap> </resultMap>
<resultMap id="TermAndChannelMap" type="com.shxy.xymanager_common.dto.TermAndChannelDto"> <resultMap id="TermAndChannelMap" type="com.shxy.xymanager_common.dto.TermAndChannelDto">
<result column="termid" jdbcType="INTEGER" property="termid"/> <result column="termid" jdbcType="INTEGER" property="termid" />
<collection property="list" javaType="list" ofType="com.shxy.xymanager_common.dto.TermChannelAndMapperDto"> <collection javaType="list" ofType="com.shxy.xymanager_common.dto.TermChannelAndMapperDto" property="list">
<id column="id" jdbcType="INTEGER" property="id"/> <id column="id" jdbcType="INTEGER" property="id" />
<result column="termid" jdbcType="INTEGER" property="termid"/> <result column="termid" jdbcType="INTEGER" property="termid" />
<result column="alias" jdbcType="VARCHAR" property="alias"/> <result column="alias" jdbcType="VARCHAR" property="alias" />
<result column="channel_id" jdbcType="INTEGER" property="channelid"/> <result column="channel_id" jdbcType="INTEGER" property="channelid" />
<result column="channel_name" jdbcType="VARCHAR" property="channelname"/> <result column="channel_name" jdbcType="VARCHAR" property="channelname" />
<result column="max_resolution_width" jdbcType="INTEGER" property="maxResolutionWidth"/> <result column="max_resolution_width" jdbcType="INTEGER" property="maxResolutionWidth" />
<result column="max_resolution_height" jdbcType="INTEGER" property="maxResolutionHeight"/> <result column="max_resolution_height" jdbcType="INTEGER" property="maxResolutionHeight" />
<result column="status" jdbcType="INTEGER" property="status"/> <result column="status" jdbcType="INTEGER" property="status" />
</collection> </collection>
</resultMap> </resultMap>
<resultMap id="LineAndTerminalMap" type="com.shxy.xymanager_common.dto.DyLineAndTerminalAndChannelDto"> <resultMap id="LineAndTerminalMap" type="com.shxy.xymanager_common.dto.DyLineAndTerminalAndChannelDto">
<id column="id" jdbcType="INTEGER" property="id"/> <id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name"/> <result column="name" jdbcType="VARCHAR" property="name" />
<result column="dyvalue" jdbcType="INTEGER" property="dyValue"/> <result column="dyvalue" jdbcType="INTEGER" property="dyValue" />
<collection property="list" javaType="list" ofType="com.shxy.xymanager_common.dto.LineAndTerminalAndChannelDto"> <collection javaType="list" ofType="com.shxy.xymanager_common.dto.LineAndTerminalAndChannelDto" property="list">
<id column="line_id" jdbcType="INTEGER" property="id"/> <id column="line_id" jdbcType="INTEGER" property="id" />
<result column="line_name" jdbcType="VARCHAR" property="name"/> <result column="line_name" jdbcType="VARCHAR" property="name" />
<result column="bs_manufacturer" jdbcType="VARCHAR" property="bsManufacturer"/> <result column="bs_manufacturer" jdbcType="VARCHAR" property="bsManufacturer" />
<collection property="list" javaType="list" ofType="com.shxy.xymanager_common.dto.TerminalsAndChannelDto"> <collection javaType="list" ofType="com.shxy.xymanager_common.dto.TerminalsAndChannelDto" property="list">
<result column="term_id" jdbcType="INTEGER" property="id"/> <result column="term_id" jdbcType="INTEGER" property="id" />
<result column="tower_id" jdbcType="INTEGER" property="towerid"/> <result column="tower_id" jdbcType="INTEGER" property="towerid" />
<result column="cmdid" jdbcType="VARCHAR" property="cmdid"/> <result column="cmdid" jdbcType="VARCHAR" property="cmdid" />
<result column="display_name" jdbcType="VARCHAR" property="name"/> <result column="display_name" jdbcType="VARCHAR" property="name" />
<collection property="list" javaType="list" <collection javaType="list" ofType="com.shxy.xymanager_common.dto.TerminalChannelsAndScheduleDto" property="list">
ofType="com.shxy.xymanager_common.dto.TerminalChannelsAndScheduleDto"> <result column="channel_id" jdbcType="INTEGER" property="id" />
<result column="channel_id" jdbcType="INTEGER" property="id"/> <result column="channel_name" jdbcType="VARCHAR" property="name" />
<result column="channel_name" jdbcType="VARCHAR" property="name"/> <result column="schedule_id" jdbcType="INTEGER" property="scheduleid" />
<result column="schedule_id" jdbcType="INTEGER" property="scheduleid"/>
</collection> </collection>
</collection> </collection>
</collection> </collection>
@ -62,15 +301,9 @@
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, channel_name, max_resolution_width, max_resolution_height,status,create_time,update_time id, channel_name, max_resolution_width, max_resolution_height,status,create_time,update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from terminal_channels
where id = #{id} and status = #{status}
</select>
<select id="selectChannelList" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectChannelList" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List" />
from terminal_channels from terminal_channels
<if test="status != null"> <if test="status != null">
where status = #{status} where status = #{status}
@ -96,35 +329,26 @@
order by y.id asc order by y.id asc
</select> </select>
<select id="selectChannelCount" parameterType="com.shxy.xymanager_common.vo.TerminalChannelVo" <select id="selectChannelCount" parameterType="com.shxy.xymanager_common.vo.TerminalChannelVo" resultType="java.lang.Integer">
resultType="java.lang.Integer">
select select
count(1) count(1)
from terminal_channels from terminal_channels
where where
id in id in
<foreach collection="list" item="item" index="index" open="(" close=")" separator=","> <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
#{item.id} #{item.id}
</foreach> </foreach>
or or
channel_name in channel_name in
<foreach collection="list" item="item" index="index" open="(" close=")" separator=","> <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
#{item.channelname} #{item.channelname}
</foreach> </foreach>
</select> </select>
<select id="selectChannelCountById" parameterType="com.shxy.xymanager_common.vo.UpdateTerminalChannelVo"
resultType="java.lang.Integer">
select
count(1)
from terminal_channels
where
id = #{id} and channel_name = #{channelname}
</select>
<select id="selectAllChannelList" resultMap="BaseResultMap"> <select id="selectAllChannelList" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List" />
from terminal_channels from terminal_channels
</select> </select>
@ -174,27 +398,6 @@
</if> </if>
</select> </select>
<select id="selectChannelByTowerId" resultMap="TerminalAndMapperMap">
select
x.id as termid,
x.tower_id as id,
z.id as channel_id,
z.channel_name as channel_name,
z.max_resolution_width as max_resolution_width,
z.max_resolution_height as max_resolution_height,
x.status as status
from
terminals x,
terminal_channel_mapper y,
terminal_channels z
where x.id = y.term_id and y.channel_id = z.id and x.status = #{status}
and x.tower_id = #{towerid}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from terminal_channels
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.TerminalChannels"> <insert id="insert" parameterType="com.shxy.xymanager_common.entity.TerminalChannels">
insert into terminal_channels (id, term_id, insert into terminal_channels (id, term_id,
channel_name, max_resolution_width, max_resolution_height channel_name, max_resolution_width, max_resolution_height
@ -256,28 +459,6 @@
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective">
update terminal_channels
<set>
<if test="data.channelName != null">
channel_name = #{data.channelName},
</if>
<if test="data.maxResolutionWidth != null">
max_resolution_width = #{data.maxResolutionWidth},
</if>
<if test="data.maxResolutionHeight != null">
max_resolution_height = #{data.maxResolutionHeight},
</if>
<if test="data.status != null">
status = #{data.status,jdbcType=INTEGER},
</if>
<if test="updateat != null">
update_time = #{updateat},
</if>
</set>
where id = #{data.id}
</update>
<update id="deleteList"> <update id="deleteList">
update terminal_channels update terminal_channels
<set> <set>
@ -289,7 +470,7 @@
</if> </if>
</set> </set>
where id in where id in
<foreach collection="list" item="item" index="index" open="(" close=")" separator=","> <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
#{item.id} #{item.id}
</foreach> </foreach>
</update> </update>

@ -717,72 +717,6 @@
</select> </select>
<select id="selectList" resultMap="TermAndStatusMap">
select
d.id as id,
a.id as dy_id,
a.name as dy_name,
b.id as line_id,
b.name as line_name,
b.bs_manufacturer as line_bs_manufacturer,
c.id as tower_id,
c.name as tower_name,
d.cmdid as cmdid,
d.org_id as org_id,
d.equip_name as equip_name,
d.display_name as display_name,
d.model as model,
d.essential_info_version as essential_info_version,
d.has_pan as has_pan,
d.bs_manufacturer as bs_manufacturer,
d.bs_production_date as bs_production_date,
d.bs_identifier as bs_identifier,
d.latitude as latitude,
d.longitude as longitude,
d.status as status,
d.protocol as protocol,
d.sim as sim,
d.working_date as working_date,
d.net_type as net_type,
d.dev_type as dev_type,
d.phase as phase,
d.equipment_type as equipment_type
from (((dy_level a left join `lines` b on a.id = b.dy_level_id )
left join towers c on b.id = c.line_id )
inner join terminals d on c.id = d.tower_id )
<where>
<if test="isSuper != 1">
(
false
<if test="dyid != null and dyid.size &gt; 0">
or a.id in
<foreach close=")" collection="dyid" index="index" item="id" open="(" separator=",">
#{id}
</foreach>
</if>
<if test="lineid != null and lineid.size &gt; 0">
or b.id in
<foreach close=")" collection="lineid" index="index" item="id" open="(" separator=",">
#{id}
</foreach>
</if>
<if test="towerid != null and towerid.size &gt; 0">
or c.id in
<foreach close=")" collection="towerid" index="index" item="id" open="(" separator=",">
#{id}
</foreach>
</if>
<if test="termid != null and termid.size &gt; 0">
or d.id in
<foreach close=")" collection="termid" index="index" item="id" open="(" separator=",">
#{id}
</foreach>
</if>
)
</if>
</where>
order by d.create_time desc
</select>
<select id="selectTermAndStatusStatisticsList" resultMap="TermAndStatusMap"> <select id="selectTermAndStatusStatisticsList" resultMap="TermAndStatusMap">
select select

@ -25,10 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.CacheEvict;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.*;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
/** /**
@ -53,19 +50,14 @@ public class LineServiceImpl implements LineService {
private TerminalsDao terminalsDao; private TerminalsDao terminalsDao;
@Autowired @Autowired
private TerminalChannelsDao terminalChannelsDao; private TerminalChannelMapperDao terminalChannelMapperDao;
@Autowired @Autowired
private CacheService cacheService; private CacheService cacheService;
@Autowired
private NewCacheService newCacheService;
@Autowired @Autowired
private UserService userService; private UserService userService;
@Autowired
private View_Dy_Line_Tower_TerminalsDao view_dy_line_tower_terminalsDao;
/** /**
* 线 * 线
@ -188,25 +180,17 @@ public class LineServiceImpl implements LineService {
*/ */
@Override @Override
public ServiceBody<LineAndGtAndChannelListModel> getLineAndGt(LineAndGtAndChannelVo vo) { public ServiceBody<LineAndGtAndChannelListModel> getLineAndGt(LineAndGtAndChannelVo vo) {
PermissionDetail permissionDetail = new PermissionDetail(); Map<Integer, TerminalChannels> termChannelMap = cacheService.getTermChannelMap();
try { PermissionDetail permissionDetail = userService.getPermissionListOver();
permissionDetail = userService.getPermissionListFull();
} catch (Exception e) {
Asserts.fail("权限解析错误");
e.printStackTrace();
}
Integer aSuper = permissionDetail.getIsSuper(); Integer aSuper = permissionDetail.getIsSuper();
Integer type = vo.getType(); Integer type = vo.getType();
if (BeanUtil.isEmpty(type)) { if (BeanUtil.isEmpty(type)) {
Asserts.fail("请求参数出错"); Asserts.fail("请求参数出错");
} }
List<Integer> dypList = permissionDetail.getDypList(); List<Integer> dypList = permissionDetail.getDypList();
List<Integer> linepList = permissionDetail.getLinepList(); List<Integer> linepList = permissionDetail.getLinepList();
List<Integer> towerpList = permissionDetail.getTowerpList(); List<Integer> towerpList = permissionDetail.getTowerpList();
List<Integer> termpList = permissionDetail.getTermpList(); List<Integer> termpList = permissionDetail.getTermpList();
LineAndGtAndChannelListModel model = new LineAndGtAndChannelListModel(); LineAndGtAndChannelListModel model = new LineAndGtAndChannelListModel();
Integer id = vo.getId(); Integer id = vo.getId();
if (id != null && id.intValue() == 0) { if (id != null && id.intValue() == 0) {
@ -242,6 +226,13 @@ public class LineServiceImpl implements LineService {
} else if (type == 3) { } else if (type == 3) {
if (id != null) { if (id != null) {
TowersExample example = new TowersExample(); TowersExample example = new TowersExample();
if (CommonStatus.DELETE.value().equals(aSuper)) {
if (CollectionUtil.isNotEmpty(towerpList)) {
example.createCriteria().andIdIn(towerpList);
} else {
return Asserts.success(model);
}
}
example.createCriteria().andLineIdEqualTo(id); example.createCriteria().andLineIdEqualTo(id);
List<Towers> list = towerDao.selectByExample(example); List<Towers> list = towerDao.selectByExample(example);
beans = BeanUtil.copyToList(list, LineAndGtAndChannelListModel.Bean.class); beans = BeanUtil.copyToList(list, LineAndGtAndChannelListModel.Bean.class);
@ -249,6 +240,13 @@ public class LineServiceImpl implements LineService {
} else if (type == 4) { } else if (type == 4) {
if (id != null) { if (id != null) {
TerminalsExample example = new TerminalsExample(); TerminalsExample example = new TerminalsExample();
if (CommonStatus.DELETE.value().equals(aSuper)) {
if (CollectionUtil.isNotEmpty(termpList)) {
example.createCriteria().andIdIn(termpList);
} else {
return Asserts.success(model);
}
}
example.createCriteria().andTowerIdEqualTo(id); example.createCriteria().andTowerIdEqualTo(id);
List<Terminals> list = terminalsDao.selectByExample(example); List<Terminals> list = terminalsDao.selectByExample(example);
for (Terminals item : list) { for (Terminals item : list) {
@ -265,12 +263,18 @@ public class LineServiceImpl implements LineService {
} }
} else if (type == 5) { } else if (type == 5) {
if (id != null) { if (id != null) {
List<TermChannelAndMapperDto> list = terminalChannelsDao.selectByTermid(id, CommonStatus.EFFECTIVE.value()); TerminalChannelMapperExample example = new TerminalChannelMapperExample();
for (TermChannelAndMapperDto item : list) { example.createCriteria().andTermIdEqualTo(id);
List<TerminalChannelMapper> list = terminalChannelMapperDao.selectByExample(example);
for (TerminalChannelMapper item : list) {
LineAndGtAndChannelListModel.Bean bean = new LineAndGtAndChannelListModel.Bean(); LineAndGtAndChannelListModel.Bean bean = new LineAndGtAndChannelListModel.Bean();
bean.setId(item.getChannelid()); Integer channelId = item.getChannelId();
bean.setId(channelId);
bean.setAlias(item.getAlias()); bean.setAlias(item.getAlias());
bean.setName(item.getChannelname()); TerminalChannels terminalChannels = termChannelMap.get(channelId);
if (terminalChannels!=null) {
bean.setName(terminalChannels.getChannelName());
}
beans.add(bean); beans.add(bean);
} }
} }

@ -86,13 +86,10 @@ public class TerminalChannelServiceImpl implements TerminalChannelService {
*/ */
@Override @Override
public ServiceBody<String> updateChannelList(UpdateTerminalChannelVo vo) { public ServiceBody<String> updateChannelList(UpdateTerminalChannelVo vo) {
// int count = terminalChannelsDao.selectChannelCountById(vo);
// if(count>0){
// return Asserts.success("通道重复");
// }
TerminalChannels bean = new TerminalChannels(); TerminalChannels bean = new TerminalChannels();
BeanUtil.copyProperties(vo, bean, CopyOptions.create().ignoreCase()); BeanUtil.copyProperties(vo, bean, CopyOptions.create().ignoreCase());
int i = terminalChannelsDao.updateByPrimaryKeySelective(bean, new Date()); bean.setUpdateTime(new Date());
int i = terminalChannelsDao.updateByPrimaryKeySelective(bean);
if (i != 0) { if (i != 0) {
return Asserts.success("修改成功"); return Asserts.success("修改成功");
} else { } else {

@ -7,6 +7,7 @@ import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.shxy.xymanager_common.bean.PermissionDetail;
import com.shxy.xymanager_common.bean.ServiceBody; import com.shxy.xymanager_common.bean.ServiceBody;
import com.shxy.xymanager_common.constant.Constants; import com.shxy.xymanager_common.constant.Constants;
import com.shxy.xymanager_common.dto.*; import com.shxy.xymanager_common.dto.*;
@ -568,12 +569,16 @@ public class TerminalPhotoServiceImpl implements TerminalPhotoService {
@Override @Override
public ServiceBody<TerminalPhotosModel> getPhotoBanner(String requestIp, PageVo vo) { public ServiceBody<TerminalPhotosModel> getPhotoBanner(String requestIp, PageVo vo) {
TerminalPhotosModel model = new TerminalPhotosModel(); TerminalPhotosModel model = new TerminalPhotosModel();
List<Integer> permssionTermIdList = userService.getPermssionTermIdList(); PermissionDetail permissionListFull = userService.getPermissionListFull();
List<Integer> termpList = permissionListFull.getTermpList();
if (CommonStatus.EFFECTIVE.value().equals(permissionListFull.getIsSuper())) {
termpList = new ArrayList<>();
}
int pageindex = vo.getPageindex(); int pageindex = vo.getPageindex();
int pagesize = vo.getPagesize(); int pagesize = vo.getPagesize();
PageUtils.SetPage(pageindex, pagesize); PageUtils.SetPage(pageindex, pagesize);
List<TerminalChannelMapper> list = terminalChannelMapperDao.selectAllByPhotoTime(CommonStatus.EFFECTIVE.value(),permssionTermIdList); List<TerminalChannelMapper> list = terminalChannelMapperDao.selectAllByPhotoTime(CommonStatus.EFFECTIVE.value(),termpList);
ArrayList<BigInteger> photolist = new ArrayList<>(); ArrayList<BigInteger> photolist = new ArrayList<>();
List<TerminalPhotosModel.PhotosBean> beans = new ArrayList<>(); List<TerminalPhotosModel.PhotosBean> beans = new ArrayList<>();

@ -97,7 +97,7 @@ public class UserServiceImpl implements UserService {
} }
@Override @Override
public PermissionDetail getPermissionListFull() throws Exception { public PermissionDetail getPermissionListFull() {
PermissionDetail permissionDetail = new PermissionDetail(); PermissionDetail permissionDetail = new PermissionDetail();
SysUser sysUser = UserContextHolder.currentUserInfo(); SysUser sysUser = UserContextHolder.currentUserInfo();
if (sysUser == null) { if (sysUser == null) {
@ -117,28 +117,27 @@ public class UserServiceImpl implements UserService {
return permissionDetail; return permissionDetail;
} }
@Override @Override
public List<Integer> getPermssionTermIdList() { public PermissionDetail getPermissionListOver() {
SysUser user = UserContextHolder.currentUserInfo(); PermissionDetail permissionDetail = new PermissionDetail();
if (user == null) { SysUser sysUser = UserContextHolder.currentUserInfo();
if (sysUser == null) {
Asserts.fail("未获取到当前用户信息"); Asserts.fail("未获取到当前用户信息");
} }
PermissionDetail permissionDetail = permissionService.getPermissionDetail(user.getUid()); Integer uid = sysUser.getUid();
if (uid == null) {
List<Integer> dypList = permissionDetail.getDypList(); Asserts.fail("用户不存在");
List<Integer> linepList = permissionDetail.getLinepList(); }
List<Integer> towerpList = permissionDetail.getTowerpList(); permissionDetail.setUid(uid);
List<Integer> termpList = permissionDetail.getTermpList(); Integer role = sysUser.getRole();
Integer aSuper = permissionDetail.getIsSuper(); if (role != SUPER_ADMIN) {
List<TerminalsAndStatusDto> lists = terminalsDao.selectList(dypList, linepList, towerpList, termpList, aSuper); return newCacheService.getPermissionDetailOver(sysUser.getUid());
ArrayList<Integer> termidlist = new ArrayList<>(); } else {
if (CollectionUtil.isNotEmpty(lists)) { permissionDetail.setIsSuper(CommonStatus.EFFECTIVE.value());
for (TerminalsAndStatusDto item : lists) {
termidlist.add(item.getId());
}
} }
return termidlist; return permissionDetail;
} }
} }

@ -11,8 +11,7 @@ public interface UserService {
PermissionDetail getPermissionList() throws Exception; PermissionDetail getPermissionList() throws Exception;
PermissionDetail getPermissionListFull() throws Exception; PermissionDetail getPermissionListFull();
List<Integer> getPermssionTermIdList();
PermissionDetail getPermissionListOver();
} }

Loading…
Cancel
Save