| | |
| | | import com.sandu.ximon.admin.utils.VnnoxAPIUtil; |
| | | import com.sandu.ximon.admin.vo.EquipmentInfomation; |
| | | import com.sandu.ximon.dao.domain.LedPlayerEntity; |
| | | import com.sandu.ximon.dao.enums.OrderByEnums; |
| | | import com.sandu.ximon.dao.mapper.LedPlayerEntityMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | } |
| | | |
| | | |
| | | public List<LedPlayerEntity> ledPlayerEntityList(BaseConditionVO baseConditionVO, String keyword) { |
| | | public List<LedPlayerEntity> ledPlayerEntityList(BaseConditionVO baseConditionVO, String keyword, Integer order, Integer seq) { |
| | | //排序字段 |
| | | String orderByResult = OrderByEnums.VNNOX_ID.getCode(); |
| | | //正序、倒叙 |
| | | String orderBySeq = OrderByEnums.ASC.getCode(); |
| | | if (order != null) { |
| | | switch (order) { |
| | | case 1: |
| | | orderByResult = OrderByEnums.VNNOX_POLE_NAME.getCode(); |
| | | break; |
| | | case 2: |
| | | orderByResult = OrderByEnums.VNNOX_CREATE_TIMESTAMP.getCode(); |
| | | break; |
| | | default: |
| | | } |
| | | } |
| | | if (seq != null) { |
| | | switch (seq) { |
| | | case 1: |
| | | orderBySeq = OrderByEnums.ASC.getCode(); |
| | | break; |
| | | case 2: |
| | | orderBySeq = OrderByEnums.DESC.getCode(); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | //排序方式 |
| | | String orderBy = orderByResult + " " + orderBySeq; |
| | | |
| | | |
| | | if (baseConditionVO != null) { |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize(), orderBy); |
| | | } |
| | | List<LedPlayerEntity> list; |
| | | //超管 |
| | |
| | | return SpringContextHolder.getBean(VnnoxService.class).setCacheInfo(vnnoxAPIUtil.syncCurrentInfo(list)); |
| | | } |
| | | |
| | | public List<LedPlayerEntity> ledPlayerEntityListOnBinding(String keyword) { |
| | | |
| | | List<LedPlayerEntity> list; |
| | | //超管 |
| | | if (SecurityUtils.getClientId() == null) { |
| | | list = ledPlayerEntityMapper.ledPlayerEntityListOnBinding(keyword, null); |
| | | } else { |
| | | list = ledPlayerEntityMapper.ledPlayerEntityListOnBinding(keyword, SecurityUtils.getUserId()); |
| | | } |
| | | return SpringContextHolder.getBean(VnnoxService.class).setCacheInfo(vnnoxAPIUtil.syncCurrentInfo(list)); |
| | | } |
| | | |
| | | } |