parent
77d0b15152
commit
9b7626fc33
@ -0,0 +1,29 @@ |
||||
package com.bellmann.common.enums; |
||||
|
||||
import com.bellmann.common.base.IBaseEnum; |
||||
import lombok.Getter; |
||||
|
||||
public enum DevAccessTypeEnum implements IBaseEnum<String> { |
||||
|
||||
G_PON("1","GPON"), |
||||
|
||||
FOUR_IN_ONE_G_PON("2","四合一GPON"), |
||||
|
||||
XG_PON("3","XGPON"), |
||||
|
||||
XGS_PON("4","XGSPON"), |
||||
|
||||
OTHER("10","OTHER"), |
||||
; |
||||
|
||||
@Getter |
||||
private String value; |
||||
|
||||
@Getter |
||||
private String label; |
||||
|
||||
DevAccessTypeEnum(String value, String label){ |
||||
this.label = label; |
||||
this.value = value; |
||||
} |
||||
} |
@ -0,0 +1,23 @@ |
||||
package com.bellmann.common.enums; |
||||
|
||||
import com.bellmann.common.base.IBaseEnum; |
||||
import lombok.Getter; |
||||
|
||||
public enum DevOnlineEnum implements IBaseEnum<String> { |
||||
|
||||
ONLINE("0","在线"), |
||||
|
||||
OFF_LINE("1","离线"), |
||||
; |
||||
|
||||
@Getter |
||||
private String value; |
||||
|
||||
@Getter |
||||
private String label; |
||||
|
||||
DevOnlineEnum(String value, String label){ |
||||
this.label = label; |
||||
this.value = value; |
||||
} |
||||
} |
@ -0,0 +1,27 @@ |
||||
package com.bellmann.common.enums; |
||||
|
||||
import com.bellmann.common.base.IBaseEnum; |
||||
import lombok.Getter; |
||||
|
||||
public enum DevStatusEnum implements IBaseEnum<String> { |
||||
|
||||
NORMAL("0","正常"), |
||||
|
||||
VER_NOT_COMPLIANT("1","版本不合规"), |
||||
|
||||
SIGN_OUT("2","注销"), |
||||
|
||||
CHANGE("3","更换") |
||||
; |
||||
|
||||
@Getter |
||||
private String value; |
||||
|
||||
@Getter |
||||
private String label; |
||||
|
||||
DevStatusEnum(String value,String label){ |
||||
this.label = label; |
||||
this.value = value; |
||||
} |
||||
} |
@ -0,0 +1,21 @@ |
||||
package com.bellmann.common.enums; |
||||
|
||||
import com.bellmann.common.base.IBaseEnum; |
||||
import lombok.Getter; |
||||
|
||||
public enum OldCASeparationEnum implements IBaseEnum<String> { |
||||
|
||||
NEW_CAR("0", "新卡"), |
||||
OLD_CAR ("1", "旧卡"); |
||||
|
||||
@Getter |
||||
private String value; |
||||
|
||||
@Getter |
||||
private String label; |
||||
|
||||
OldCASeparationEnum(String value, String label) { |
||||
this.value = value; |
||||
this.label = label; |
||||
} |
||||
} |
@ -0,0 +1,40 @@ |
||||
package com.bellmann.controller; |
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.bellmann.common.result.PageResult; |
||||
import com.bellmann.common.result.Result; |
||||
import com.bellmann.model.query.SelectQuery; |
||||
import com.bellmann.model.vo.EquipmentVO; |
||||
import com.bellmann.service.DeviceStaticService; |
||||
import io.swagger.v3.oas.annotations.Operation; |
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import lombok.RequiredArgsConstructor; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import java.util.Map; |
||||
|
||||
@Tag(name = "16.设备管理") |
||||
@RestController |
||||
@RequiredArgsConstructor |
||||
@RequestMapping("/api/equipment/v1") |
||||
public class DeviceStaticController { |
||||
|
||||
private final DeviceStaticService deviceStaticService; |
||||
|
||||
//--------------资源管理API开始-------------------
|
||||
|
||||
@PostMapping("resource-page") |
||||
@Operation(summary = "资源管理-设备管理表格接口") |
||||
public PageResult<EquipmentVO> resourcePage(@RequestBody SelectQuery query){ |
||||
Page<EquipmentVO> page = deviceStaticService.resourcePage(query); |
||||
return PageResult.success(page); |
||||
} |
||||
|
||||
@PostMapping("resource-detail/{devId}") |
||||
@Operation(summary = "资源管理-设备管理详细信息接口") |
||||
public Result<Map<Object,Object>> resourceDeviceDetail(@PathVariable Long devId){ |
||||
Map<Object,Object> map = deviceStaticService.resourceDeviceDetail(devId); |
||||
return Result.success(map); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,12 @@ |
||||
package com.bellmann.converter; |
||||
|
||||
import com.bellmann.model.entity.Customer; |
||||
import com.bellmann.model.vo.EquipmentCustomerVO; |
||||
import org.mapstruct.Mapper; |
||||
|
||||
|
||||
@Mapper(componentModel = "spring") |
||||
public interface CustomerConverter { |
||||
|
||||
EquipmentCustomerVO entityE2EquipmentVO(Customer customer); |
||||
} |
@ -0,0 +1,23 @@ |
||||
package com.bellmann.converter; |
||||
|
||||
import com.bellmann.model.bo.EquipmentBO; |
||||
import com.bellmann.model.vo.EquipmentVO; |
||||
import org.mapstruct.Mapper; |
||||
import org.mapstruct.Mapping; |
||||
import org.mapstruct.Mappings; |
||||
|
||||
import java.util.List; |
||||
|
||||
|
||||
@Mapper(componentModel = "spring") |
||||
public interface DeviceStaticConverter { |
||||
|
||||
@Mappings({ |
||||
@Mapping(target = "devStatus", expression = "java(com.bellmann.common.base.IBaseEnum.getLabelByValue(bo.getDevStatus(), com.bellmann.common.enums.DevStatusEnum.class))"), |
||||
@Mapping(target = "devTypeNameNew", expression = "java(com.bellmann.common.base.IBaseEnum.getLabelByValue(bo.getDevTypeNameNew(), com.bellmann.common.enums.DevTypeNameNewEnum.class))"), |
||||
@Mapping(target = "devOnline", expression = "java(com.bellmann.common.base.IBaseEnum.getLabelByValue(bo.getDevOnline(), com.bellmann.common.enums.DevOnlineEnum.class))") |
||||
|
||||
}) |
||||
EquipmentVO resourceBOList2VOList(EquipmentBO bo); |
||||
List<EquipmentVO> resourceBOList2VOList(List<EquipmentBO> list); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.bellmann.manger; |
||||
|
||||
import com.bellmann.model.vo.EquipmentCustomerVO; |
||||
|
||||
public interface CustomerManager { |
||||
EquipmentCustomerVO equipmentCustomer(Long customId); |
||||
} |
@ -1,7 +1,10 @@ |
||||
package com.bellmann.manger; |
||||
|
||||
import com.bellmann.model.entity.DeviceType; |
||||
import com.bellmann.model.vo.EquipmentTypeVO; |
||||
|
||||
public interface DeviceTypeManager { |
||||
DeviceType findDeviceTypeById(Long devTypeId); |
||||
|
||||
EquipmentTypeVO findEquipmentType(Long typeAndVerId); |
||||
} |
||||
|
@ -0,0 +1,26 @@ |
||||
package com.bellmann.manger.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
import com.bellmann.converter.CustomerConverter; |
||||
import com.bellmann.manger.CustomerManager; |
||||
import com.bellmann.mapper.CustomerMapper; |
||||
import com.bellmann.model.entity.Customer; |
||||
import com.bellmann.model.vo.EquipmentCustomerVO; |
||||
import lombok.RequiredArgsConstructor; |
||||
import org.springframework.stereotype.Component; |
||||
|
||||
@Component |
||||
@RequiredArgsConstructor |
||||
public class CustomerManagerImpl implements CustomerManager { |
||||
|
||||
private final CustomerMapper customerMapper; |
||||
|
||||
private final CustomerConverter customerConverter; |
||||
@Override |
||||
public EquipmentCustomerVO equipmentCustomer(Long customId) { |
||||
Customer customer = customerMapper.selectOne(new LambdaQueryWrapper<Customer>() |
||||
.eq(Customer::getCustId, customId) |
||||
); |
||||
return customerConverter.entityE2EquipmentVO(customer); |
||||
} |
||||
} |
@ -0,0 +1,9 @@ |
||||
package com.bellmann.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.bellmann.model.entity.Customer; |
||||
import org.apache.ibatis.annotations.Mapper; |
||||
|
||||
@Mapper |
||||
public interface CustomerMapper extends BaseMapper<Customer> { |
||||
} |
@ -1,9 +1,18 @@ |
||||
package com.bellmann.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.bellmann.model.bo.EquipmentBO; |
||||
import com.bellmann.model.entity.DeviceStatic; |
||||
import com.bellmann.model.vo.EquipmentDetailVO; |
||||
import org.apache.ibatis.annotations.Mapper; |
||||
import org.apache.ibatis.annotations.Param; |
||||
|
||||
import java.util.List; |
||||
|
||||
@Mapper |
||||
public interface DeviceStaticMapper extends BaseMapper<DeviceStatic> { |
||||
List<EquipmentBO> resourcePage(Page<EquipmentBO> page, @Param("column") String column, @Param("value") String value); |
||||
|
||||
EquipmentDetailVO detailInfo(@Param("devId") Long devId); |
||||
} |
||||
|
@ -0,0 +1,37 @@ |
||||
package com.bellmann.model.bo; |
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.time.LocalDateTime; |
||||
|
||||
@Data |
||||
public class EquipmentBO { |
||||
|
||||
private Long devId; |
||||
|
||||
private String devSno; |
||||
|
||||
private String devAdNo; |
||||
|
||||
private String devPppoe; |
||||
|
||||
private String devStatus; |
||||
|
||||
private String softVer; |
||||
|
||||
private Long devTypeId; |
||||
|
||||
private String devVendorName; |
||||
|
||||
private String devVendorOui; |
||||
|
||||
private String devTypeName; |
||||
|
||||
private String devHardVer; |
||||
|
||||
private String devTypeNameNew; |
||||
|
||||
private String devOnline; |
||||
|
||||
private LocalDateTime devOnlineTime; |
||||
} |
@ -0,0 +1,62 @@ |
||||
package com.bellmann.model.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
import java.time.LocalDateTime; |
||||
|
||||
@Data |
||||
@TableName("itms_customer") |
||||
public class Customer implements Serializable { |
||||
|
||||
private static final long serialVersionUID = -1469464375841714308L; |
||||
|
||||
@TableId(type = IdType.AUTO) |
||||
private Long custId; |
||||
|
||||
private Long regionAreaId; |
||||
|
||||
private Long corpAreaId; |
||||
|
||||
@TableField(value = "cust_account") |
||||
private String customAccount; |
||||
|
||||
@TableField(value = "cust_name") |
||||
private String customName; |
||||
|
||||
@TableField(value = "cust_addr") |
||||
private String customAddr; |
||||
|
||||
private String contactType; |
||||
|
||||
@TableField(value = "cust_type") |
||||
private String customType; |
||||
|
||||
@TableField(value = "cust_status") |
||||
private String customStatus; |
||||
|
||||
@TableField(value = "cust_create_time") |
||||
private LocalDateTime customCreateTime; |
||||
|
||||
@TableField(value = "cust_modify_time") |
||||
private LocalDateTime customModifyTime; |
||||
|
||||
@TableField(value = "cust_remark1") |
||||
private String customRemark1; |
||||
|
||||
@TableField(value = "cust_remark2") |
||||
private String customRemark2; |
||||
|
||||
@TableField(value = "cust_remark3") |
||||
private String customRemark3; |
||||
|
||||
@TableField(value = "cust_remark4") |
||||
private String customRemark4; |
||||
|
||||
@TableField(value = "cust_remark5") |
||||
private String customRemark5; |
||||
} |
@ -0,0 +1,14 @@ |
||||
package com.bellmann.model.query; |
||||
|
||||
import com.bellmann.common.base.BasePageQuery; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
|
||||
@EqualsAndHashCode(callSuper = true) |
||||
@Data |
||||
public class SelectQuery extends BasePageQuery { |
||||
|
||||
private String selectName; |
||||
|
||||
private String selectValue; |
||||
} |
@ -0,0 +1,34 @@ |
||||
package com.bellmann.model.vo; |
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.time.LocalDateTime; |
||||
|
||||
@Data |
||||
public class EquipmentCustomerVO { |
||||
|
||||
private Long custId; |
||||
|
||||
private Long regionAreaId; |
||||
|
||||
private Long corpAreaId; |
||||
|
||||
private String customAccount; |
||||
|
||||
private String customAddr; |
||||
|
||||
private String contactType; |
||||
|
||||
private String customType; |
||||
|
||||
private String customStatus; |
||||
|
||||
private LocalDateTime customCreateTime; |
||||
|
||||
private LocalDateTime customModifyTime; |
||||
|
||||
private String customRemark1; |
||||
|
||||
private String customRemark2; |
||||
|
||||
} |
@ -0,0 +1,57 @@ |
||||
package com.bellmann.model.vo; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
|
||||
import java.time.LocalDateTime; |
||||
|
||||
@Data |
||||
@Schema(description = "设备详细信息视图") |
||||
public class EquipmentDetailVO { |
||||
|
||||
private Long devId; |
||||
|
||||
private String devSno; |
||||
|
||||
private String devAdNo; |
||||
|
||||
private String devPppoe; |
||||
|
||||
private String devStatus; |
||||
|
||||
private Long typeAndVerId; |
||||
|
||||
private Long customId; |
||||
|
||||
private Long regionAreaId; |
||||
|
||||
private Long corpAreaId; |
||||
|
||||
private String devMac; |
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss") |
||||
private LocalDateTime devCreateTime; |
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss") |
||||
private LocalDateTime devModifyTime; |
||||
|
||||
private String devSoapFlag; |
||||
|
||||
private String devInformFlag; |
||||
|
||||
private String devRemark1; |
||||
|
||||
private String devRemark4; |
||||
|
||||
private String connectReqUrl; |
||||
|
||||
private String devIp; |
||||
|
||||
private String devOnline; |
||||
|
||||
private String loginId; |
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss") |
||||
private LocalDateTime devOnlineTime; |
||||
} |
@ -0,0 +1,33 @@ |
||||
package com.bellmann.model.vo; |
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
|
||||
@Data |
||||
@Schema(description = "设备管理详情中设备类型信息") |
||||
public class EquipmentTypeVO { |
||||
|
||||
@Schema(description = "设备类型ID") |
||||
private Long devTypeId; |
||||
|
||||
@Schema(description = "设备供应商") |
||||
private String devVendorName; |
||||
|
||||
@Schema(description = "设备OUI") |
||||
private String devVendorOui; |
||||
|
||||
@Schema(description = "设备型号") |
||||
private String devTypeName; |
||||
|
||||
@Schema(description = "设备硬件版本") |
||||
private String devHardVer; |
||||
|
||||
@Schema(description = "设备类型软件版本名称") |
||||
private String softVer; |
||||
|
||||
@Schema(description = "是否机卡分离") |
||||
private String oldCASeparation; |
||||
|
||||
@Schema(description = "设备网络侧接口") |
||||
private String devAccessType; |
||||
} |
@ -0,0 +1,41 @@ |
||||
package com.bellmann.model.vo; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
|
||||
import java.time.LocalDateTime; |
||||
|
||||
@Data |
||||
@Schema(description = "设备管理表格视图") |
||||
public class EquipmentVO { |
||||
|
||||
private Long devId; |
||||
|
||||
private String devSno; |
||||
|
||||
private String devAdNo; |
||||
|
||||
private String devPppoe; |
||||
|
||||
private String devStatus; |
||||
|
||||
private String softVer; |
||||
|
||||
private Long devTypeId; |
||||
|
||||
private String devVendorName; |
||||
|
||||
private String devVendorOui; |
||||
|
||||
private String devTypeName; |
||||
|
||||
private String devHardVer; |
||||
|
||||
private String devTypeNameNew; |
||||
|
||||
private String devOnline; |
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss") |
||||
private LocalDateTime devOnlineTime; |
||||
} |
@ -0,0 +1,4 @@ |
||||
package com.bellmann.service; |
||||
|
||||
public interface CustomerService { |
||||
} |
@ -1,4 +1,13 @@ |
||||
package com.bellmann.service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.bellmann.model.query.SelectQuery; |
||||
import com.bellmann.model.vo.EquipmentVO; |
||||
|
||||
import java.util.Map; |
||||
|
||||
public interface DeviceStaticService { |
||||
Page<EquipmentVO> resourcePage(SelectQuery query); |
||||
|
||||
Map<Object, Object> resourceDeviceDetail(Long devId); |
||||
} |
||||
|
@ -0,0 +1,10 @@ |
||||
package com.bellmann.service.impl; |
||||
|
||||
import com.bellmann.service.CustomerService; |
||||
import lombok.RequiredArgsConstructor; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
@Service |
||||
@RequiredArgsConstructor |
||||
public class CustomerServiceImpl implements CustomerService { |
||||
} |
@ -1,10 +1,75 @@ |
||||
package com.bellmann.service.impl; |
||||
|
||||
import cn.hutool.core.map.MapUtil; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.bellmann.common.base.IBaseEnum; |
||||
import com.bellmann.common.constant.StringUtilsConstants; |
||||
import com.bellmann.common.enums.DevOnlineEnum; |
||||
import com.bellmann.common.enums.DevStatusEnum; |
||||
import com.bellmann.converter.DeviceStaticConverter; |
||||
import com.bellmann.manger.CustomerManager; |
||||
import com.bellmann.manger.DeviceTypeManager; |
||||
import com.bellmann.mapper.DeviceStaticMapper; |
||||
import com.bellmann.model.bo.EquipmentBO; |
||||
import com.bellmann.model.query.SelectQuery; |
||||
import com.bellmann.model.vo.EquipmentCustomerVO; |
||||
import com.bellmann.model.vo.EquipmentDetailVO; |
||||
import com.bellmann.model.vo.EquipmentTypeVO; |
||||
import com.bellmann.model.vo.EquipmentVO; |
||||
import com.bellmann.service.DeviceStaticService; |
||||
import lombok.RequiredArgsConstructor; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
@Service |
||||
@RequiredArgsConstructor |
||||
public class DeviceStaticServiceImpl implements DeviceStaticService { |
||||
private final DeviceStaticMapper deviceStaticMapper; |
||||
|
||||
private final DeviceStaticConverter deviceStaticConverter; |
||||
|
||||
private final DeviceTypeManager deviceTypeManager; |
||||
|
||||
private final CustomerManager customerManager; |
||||
@Override |
||||
public Page<EquipmentVO> resourcePage(SelectQuery query) { |
||||
int pageNum = query.getPageNum(); |
||||
int pageSize = query.getPageSize(); |
||||
Page<EquipmentBO> page = new Page<>(pageNum,pageSize); |
||||
List<EquipmentBO> list = deviceStaticMapper.resourcePage(page,query.getSelectName(),query.getSelectValue()); |
||||
List<EquipmentVO> voList = deviceStaticConverter.resourceBOList2VOList(list); |
||||
Page<EquipmentVO> vp = new Page<>(pageNum,pageSize); |
||||
vp.setTotal(page.getTotal()); |
||||
vp.setRecords(voList); |
||||
return vp; |
||||
} |
||||
|
||||
@Override |
||||
public Map<Object, Object> resourceDeviceDetail(Long devId) { |
||||
EquipmentDetailVO detailVO = deviceStaticMapper.detailInfo(devId); |
||||
|
||||
EquipmentTypeVO typeVO = deviceTypeManager.findEquipmentType(detailVO.getTypeAndVerId()); |
||||
|
||||
EquipmentCustomerVO customerVO = customerManager.equipmentCustomer(detailVO.getCustomId()); |
||||
|
||||
detailVO.setDevOnline(IBaseEnum.getLabelByValue(detailVO.getDevOnline(), DevOnlineEnum.class)); |
||||
detailVO.setDevStatus(IBaseEnum.getLabelByValue(detailVO.getDevStatus(), DevStatusEnum.class)); |
||||
String devRemark4 = detailVO.getDevRemark4(); |
||||
detailVO.setDevRemark4(StringUtilsConstants.STRING_BLANK); |
||||
boolean contains = devRemark4.contains("^"); |
||||
if (contains){ |
||||
detailVO.setLoginId(devRemark4.split("\\^")[0]); |
||||
}else { |
||||
detailVO.setLoginId(detailVO.getDevRemark4()); |
||||
} |
||||
return MapUtil |
||||
.builder() |
||||
.put("detailVO",detailVO) |
||||
.put("typeVO",typeVO) |
||||
.put("customerVO",customerVO) |
||||
.build(); |
||||
|
||||
} |
||||
} |
||||
|
@ -0,0 +1,70 @@ |
||||
<?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"> |
||||
<mapper namespace="com.bellmann.mapper.DeviceStaticMapper"> |
||||
|
||||
<select id="resourcePage" resultType="com.bellmann.model.bo.EquipmentBO"> |
||||
SELECT |
||||
s.dev_id, |
||||
s.dev_sno, |
||||
s.dev_ad_no, |
||||
s.dev_pppoe, |
||||
s.dev_status, |
||||
v.soft_ver, |
||||
T.dev_hard_ver, |
||||
T.dev_type_id, |
||||
T.dev_type_name, |
||||
T.dev_vendor_name, |
||||
T.dev_vendor_oui, |
||||
d.dev_type_name_new, |
||||
dy.dev_online, |
||||
dy.dev_online_time |
||||
FROM |
||||
itms_device_static s |
||||
LEFT JOIN ITMS_DEVICE_DYNAMIC dy ON s.DEV_ID = dy.DEV_ID |
||||
LEFT JOIN itms_device_type_ver v ON s.type_and_ver_id = v.type_and_ver_id |
||||
LEFT JOIN itms_device_type T ON v.dev_type_id = T.dev_type_id |
||||
LEFT JOIN itms_device_type_ver_detail d ON v.type_and_ver_id = d.type_and_ver_id |
||||
<where> |
||||
<if test="column=='devAdNo' and column!=null and column!=''"> |
||||
and s.dev_ad_no = #{value} |
||||
</if> |
||||
</where> |
||||
</select> |
||||
|
||||
<select id="detailInfo" resultType="com.bellmann.model.vo.EquipmentDetailVO"> |
||||
SELECT DISTINCT |
||||
s.DEV_ID, |
||||
s.TYPE_AND_VER_ID, |
||||
s.CUST_ID as customId, |
||||
s.REGION_AREA_ID, |
||||
s.CORP_AREA_ID, |
||||
s.DEV_SNO, |
||||
s.DEV_MAC, |
||||
s.DEV_PPPOE, |
||||
s.DEV_AD_NO, |
||||
s.DEV_STATUS, |
||||
s.DEV_CREATE_TIME, |
||||
s.DEV_MODIFY_TIME, |
||||
s.DEV_SOAP_FLAG, |
||||
s.DEV_INFORM_FLAG, |
||||
s.DEV_REMARK1, |
||||
s.DEV_REMARK2, |
||||
s.DEV_REMARK3, |
||||
s.DEV_REMARK4, |
||||
s.DEV_REMARK5, |
||||
d.CONNECT_REQ_URL, |
||||
d.DEV_IP, |
||||
d.DEV_ONLINE, |
||||
d.DEV_ONLINE_TIME, |
||||
e.band_access, |
||||
e.iptv_access |
||||
FROM |
||||
ITMS_DEVICE_STATIC s |
||||
LEFT JOIN ITMS_DEVICE_DYNAMIC d ON s.DEV_ID = d.DEV_ID |
||||
LEFT JOIN itms_device_static_detail e on e.dev_id=s.dev_id |
||||
WHERE |
||||
s.DEV_ID = #{devId}; |
||||
</select> |
||||
</mapper> |
Loading…
Reference in new issue