Compare commits

...

2 Commits

Author SHA1 Message Date
曹鹏飞 ce910e28d0 fix: 修复一个小问题 2025-12-02 15:03:55 +08:00
曹鹏飞 de13d0881f refactor: 优化设备类型服务实现并增强日志 2025-12-01 10:56:05 +08:00
3 changed files with 20 additions and 9 deletions

View File

@ -1,5 +1,6 @@
package com.nflg.mobilebroken.common.pojo.request;
import cn.hutool.core.util.StrUtil;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@ -28,6 +29,13 @@ public class TicketCallHangUpRequest {
@NotNull
private Integer fromUserId;
public Integer getFromUserId() {
if (fromUserId < 2000000) {
return fromUserId;
}
return Integer.valueOf(StrUtil.removePrefix(String.valueOf(fromUserId).substring(1), "0"));
}
/**
* 是否拒绝接听
*/

View File

@ -9,9 +9,11 @@ import com.nflg.mobilebroken.common.pojo.vo.CqmPersonVO;
import com.nflg.mobilebroken.repository.entity.TBaseDeviceType;
import com.nflg.mobilebroken.repository.mapper.TBaseDeviceTypeMapper;
import com.nflg.mobilebroken.repository.service.ITBaseDeviceTypeService;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
@ -19,37 +21,38 @@ import java.util.stream.Collectors;
* <p>
* 设备类型 服务实现类
* </p>
*
* @author 曹鹏飞
* @since 2025-01-24
*/
@Slf4j
@Service
public class TBaseDeviceTypeServiceImpl extends ServiceImpl<TBaseDeviceTypeMapper, TBaseDeviceType> implements ITBaseDeviceTypeService {
@Override
public Page<TBaseDeviceType> getList(Page<PageBaseQuery> page, PageBaseQuery query) {
return this.getBaseMapper().getList(page, query);
return this.getBaseMapper().getList(page, query);
}
public List<String> getDistinctDeviceType(){
public List<String> getDistinctDeviceType() {
return this.getBaseMapper().getDistinctDeviceType();
}
public List<CqmPersonVO> getCqmPersonList(@Param("cqms") List<String> cqms){
public List<CqmPersonVO> getCqmPersonList(@Param("cqms") List<String> cqms) {
return this.getBaseMapper().getCqmPersonList(cqms);
}
@Override
public List<Integer> getCqmsByDeviceType(String deviceNo) {
String cqms=this.getBaseMapper().getCqmsByDeviceType(deviceNo);
if (StrUtil.isBlank(cqms)){
return null;
String cqms = this.getBaseMapper().getCqmsByDeviceType(deviceNo);
if (StrUtil.isBlank(cqms)) {
log.warn("设备{}未设置CQM", deviceNo);
return Collections.emptyList();
}
return StrUtil.split(cqms, ",").stream().map(Integer::parseInt).collect(Collectors.toList());
}
public List<CqmPersionResultVO> getDeviceTypeCqmList(@Param("ids") List<Integer> ids){
public List<CqmPersionResultVO> getDeviceTypeCqmList(@Param("ids") List<Integer> ids) {
return this.getBaseMapper().getDeviceTypeCqmList(ids);
}
}

View File

@ -155,7 +155,7 @@
,IF(aua.is_primary,fun_getPrimaryUserArea(aua.company_id),aa.`name`) AS 'areaName'
,null AS 'userState',null AS 'expireTime',0 AS 'state',au.name AS 'createBy',aua.create_time,null AS 'updateBy'
,null AS 'updateTime',null AS 'lastLoginTime',aua.is_primary,aua.company_id,aua.user_phone AS 'phone',aua.area_id
,aua.language_code,p.position_name AS 'title',aua.title_id,au.type
,aua.language_code,p.position_name AS 'title',aua.title_id,au.type,au.customer_name
FROM app_user_applyfor aua
LEFT JOIN app_user au ON au.id=aua.create_by
LEFT JOIN app_area aa ON aua.area_id=aa.id