feat: 一些调整
This commit is contained in:
parent
7690c9128e
commit
7d43b5891f
|
|
@ -86,7 +86,6 @@ public class TicketController extends ControllerBase {
|
|||
|
||||
/**
|
||||
* 获取问题类型
|
||||
*
|
||||
* @return 问题类型列表
|
||||
*/
|
||||
@GetMapping("getQuestions")
|
||||
|
|
@ -263,7 +262,7 @@ public class TicketController extends ControllerBase {
|
|||
Ticket ticket = ticketService.getById(id);
|
||||
AppUser user = appUserService.getById(ticket.getUserId());
|
||||
AppArea appArea = appAreaService.getById(user.getAreaId());
|
||||
TBaseCustomer company = customerService.getById(Integer.valueOf(user.getCompanyId()));
|
||||
// TBaseCustomer company = customerService.getById(Integer.valueOf(user.getCompanyId()));
|
||||
DeviceInfoVO device = deviceService.getByDeviceNo(ticket.getDeviceNo());
|
||||
String warrantyStateDesc = "";
|
||||
if (Objects.nonNull(device.getWarrantyState())) {
|
||||
|
|
@ -278,6 +277,7 @@ public class TicketController extends ControllerBase {
|
|||
AppUser primaryUser = appUserService.getPrimaryByCompanyId(user.getCompanyId());
|
||||
TicketInfoVO vo = new TicketInfoVO()
|
||||
.setId(ticket.getId())
|
||||
.setNo(ticket.getNo())
|
||||
.setTitle(ticket.getTitle())
|
||||
.setDeviceNo(ticket.getDeviceNo())
|
||||
.setModelNo(device.getModelNo())
|
||||
|
|
@ -301,7 +301,7 @@ public class TicketController extends ControllerBase {
|
|||
.setCreateUserAvatar(user.getAvatar())
|
||||
.setCreateTime(ticket.getCreateTime())
|
||||
.setAreaName(appArea.getName())
|
||||
.setCompanyName(company.getAgencyCompanyName())
|
||||
.setCompanyName(device.getCustomerName())
|
||||
.setHandle(handle);
|
||||
return ApiResult.success(vo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.nflg.mobilebroken.cfs.controller;
|
|||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.nflg.mobilebroken.common.constant.Constant;
|
||||
import com.nflg.mobilebroken.common.constant.TicketState;
|
||||
import com.nflg.mobilebroken.common.pojo.ApiResult;
|
||||
import com.nflg.mobilebroken.common.pojo.PageData;
|
||||
|
|
@ -99,6 +100,21 @@ public class TiketController extends ControllerBase {
|
|||
return ApiResult.success(deviceService.getByDeviceNo(StrUtil.trim(deviceNo)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有设备部件
|
||||
*
|
||||
* @return 设备部件列表
|
||||
**/
|
||||
@GetMapping("getAllDeviceComponents")
|
||||
public ApiResult<List<String>> getAllDeviceComponents() {
|
||||
return ApiResult.success(
|
||||
dictionaryItemTranslateService.getAllByDictionaryCode(Constant.DICTIONARY_ITEM_DEVICECOMPONENT, MultilingualUtil.getLanguage())
|
||||
.stream()
|
||||
.map(DictionaryItemTranslateVO::getValue)
|
||||
.collect(Collectors.toList())
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工单状态
|
||||
* @return 工单状态列表
|
||||
|
|
@ -176,6 +192,7 @@ public class TiketController extends ControllerBase {
|
|||
}
|
||||
TicketInfoVO vo = new TicketInfoVO()
|
||||
.setId(ticket.getId())
|
||||
.setNo(ticket.getNo())
|
||||
.setTitle(ticket.getTitle())
|
||||
.setDeviceNo(ticket.getDeviceNo())
|
||||
.setModelNo(device.getModelNo())
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ public class Constant {
|
|||
|
||||
public static final String DICTIONARY_TYPE_TITLE_CQM = "CQM";
|
||||
|
||||
public static final String DICTIONARY_ITEM_DEVICECOMPONENT = "modelComponents";
|
||||
|
||||
public static final String REDIS_KEY_USER_RESETPASSWORD_RANDOM_CODE_APP = "app:kaptcha:user:resetpassword:{}";
|
||||
|
||||
public static final String REDIS_KEY_USER_UPDATE_KAPTCHA_APP = "app:kaptcha:user:update:{}";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
package com.nflg.mobilebroken.common.exception;
|
||||
|
||||
import com.nflg.mobilebroken.common.constant.STATE;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class NflgException extends RuntimeException{
|
||||
|
||||
private final STATE state;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.nflg.mobilebroken.common.pojo.request;
|
|||
import com.nflg.mobilebroken.common.pojo.dto.ChatMessageDTO;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -15,7 +14,6 @@ public class AddChatMessageRequest {
|
|||
private Integer ticketId;
|
||||
|
||||
//消息内容
|
||||
@NotBlank
|
||||
private String content;
|
||||
|
||||
//附件列表
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
package com.nflg.mobilebroken.common.pojo.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
|
|
@ -29,6 +31,10 @@ public class TicketSearchRequest extends PageRequest {
|
|||
//区域id
|
||||
private Integer areaId;
|
||||
|
||||
//区域ids
|
||||
@JsonIgnore
|
||||
private List<Integer> areaIds;
|
||||
|
||||
//开始日期
|
||||
private LocalDate startTime;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@ public class CompanySimpleVO {
|
|||
// 公司id
|
||||
private Long id;
|
||||
|
||||
// 公司编码
|
||||
private String code;
|
||||
|
||||
// 公司名称
|
||||
private String name;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,4 +44,7 @@ public class DeviceInfoVO {
|
|||
public List<String> getComponents(){
|
||||
return StrUtil.split(component,";");
|
||||
}
|
||||
|
||||
//客户名称
|
||||
private String customerName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,4 +15,13 @@ public class DictionaryItemTranslateVO {
|
|||
|
||||
//翻译内容
|
||||
private String value;
|
||||
|
||||
//字典值id
|
||||
private Integer dictionaryItemId;
|
||||
|
||||
//字典值编号
|
||||
private String dictionaryItemCode;
|
||||
|
||||
//字典值名称
|
||||
private String dictionaryItemName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ public class TicketInfoVO {
|
|||
//工单id
|
||||
private int id;
|
||||
|
||||
//工单编号
|
||||
private String no;
|
||||
|
||||
//工单标题
|
||||
private String title;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,4 +25,6 @@ public interface DictionaryItemTranslateMapper extends BaseMapper<DictionaryItem
|
|||
String getErrorMsg(String language, String errorCode);
|
||||
|
||||
List<TicketEvaluateItemVO> getListByDictionaryCode(String dictionaryCode, String language);
|
||||
|
||||
List<DictionaryItemTranslateVO> getAllByDictionaryCode(String code, String language);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import com.nflg.mobilebroken.common.pojo.request.AreaSearchRequest;
|
|||
import com.nflg.mobilebroken.common.pojo.vo.AreaVO;
|
||||
import com.nflg.mobilebroken.repository.entity.AppArea;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
|
|
@ -17,4 +19,6 @@ import com.nflg.mobilebroken.repository.entity.AppArea;
|
|||
public interface IAppAreaService extends IService<AppArea> {
|
||||
|
||||
IPage<AreaVO> search(AreaSearchRequest request);
|
||||
|
||||
List<Integer> getAllhildrens(Integer areaId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,4 +30,6 @@ public interface IDictionaryItemTranslateService extends IService<DictionaryItem
|
|||
String getErrorMsg(String language, String errorCode);
|
||||
|
||||
TicketEvaluateVO getTicketEvaluateSelect(String language);
|
||||
|
||||
List<DictionaryItemTranslateVO> getAllByDictionaryCode(String code, String language);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,6 +91,22 @@ public class AppAreaServiceImpl extends ServiceImpl<AppAreaMapper, AppArea> impl
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Integer> getAllhildrens(Integer areaId) {
|
||||
List<Integer> list = getChildrens(areaId).stream().map(AppArea::getId).collect(Collectors.toList());
|
||||
list.add(areaId);
|
||||
return list;
|
||||
}
|
||||
|
||||
private List<AppArea> getChildrens(Integer areaId) {
|
||||
List<AppArea> areas = lambdaQuery()
|
||||
.eq(AppArea::getEnable, true)
|
||||
.eq(AppArea::getParentId, areaId)
|
||||
.list();
|
||||
areas.addAll(areas.stream().map(a -> getChildrens(a.getId())).flatMap(List::stream).collect(Collectors.toList()));
|
||||
return areas;
|
||||
}
|
||||
|
||||
private IPage<AreaVO> convertToPage1(List<AppArea> list, Integer pageNum, Integer pageSize) {
|
||||
int num = (pageNum - 1) * pageSize;
|
||||
if (num >= list.size()) {
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper, AppUser> impl
|
|||
lambdaUpdate()
|
||||
.set(AppUser::getCompanyId, request.getCompanyId())
|
||||
.set(AppUser::getExpireTime, appUser.getExpireTime())
|
||||
.set(AppUser::getUpdateBy, AdminUserUtil.getUserId())
|
||||
// .set(AppUser::getUpdateBy, AdminUserUtil.getUserId())
|
||||
.set(AppUser::getUpdateTime, LocalDateTime.now())
|
||||
.eq(AppUser::getIsPrimary, false)
|
||||
.in(AppUser::getId, request.getUserIds())
|
||||
|
|
@ -250,7 +250,7 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper, AppUser> impl
|
|||
public void enable(EnableAppUserRequest request) {
|
||||
lambdaUpdate()
|
||||
.set(AppUser::getState, request.getEnable() ? UserState.Activated.getState() : UserState.Disabled.getState())
|
||||
.set(AppUser::getUpdateBy, AdminUserUtil.getUserId())
|
||||
// .set(AppUser::getUpdateBy, AdminUserUtil.getUserId())
|
||||
.set(AppUser::getUpdateTime, LocalDateTime.now())
|
||||
.in(AppUser::getId, request.getIds())
|
||||
.update();
|
||||
|
|
|
|||
|
|
@ -103,4 +103,9 @@ public class DictionaryItemTranslateServiceImpl extends ServiceImpl<DictionaryIt
|
|||
vo.setExperienceEvaluationSelect(baseMapper.getListByDictionaryCode(Constant.DICTIONARY_TYPE_EXPERIENCE_EVALUATION_SELECT, language));
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DictionaryItemTranslateVO> getAllByDictionaryCode(String code, String language) {
|
||||
return baseMapper.getAllByDictionaryCode(code, language);
|
||||
}
|
||||
}
|
||||
|
|
@ -50,7 +50,11 @@ public class TBaseCustomerServiceImpl extends ServiceImpl<TBaseCustomerMapper, T
|
|||
.eq(TBaseCustomer::getDelIs, 0)
|
||||
.in(TBaseCustomer::getId, StrUtil.split(appUser.getCompanyId(), ",").stream().map(Integer::parseInt).collect(Collectors.toList()))
|
||||
.list();
|
||||
return datas.stream().map(d -> new CompanySimpleVO().setId(d.getId()).setName(d.getAgencyCompanyName())).collect(Collectors.toList());
|
||||
return datas.stream()
|
||||
.map(d -> new CompanySimpleVO()
|
||||
.setId(d.getId())
|
||||
.setName(d.getAgencyCompanyName()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -59,6 +63,11 @@ public class TBaseCustomerServiceImpl extends ServiceImpl<TBaseCustomerMapper, T
|
|||
.eq(TBaseCustomer::getEnableState, 1)
|
||||
.eq(TBaseCustomer::getDelIs, 0)
|
||||
.list();
|
||||
return datas.stream().map(d -> new CompanySimpleVO().setId(d.getId()).setName(d.getAgencyCompanyName())).collect(Collectors.toList());
|
||||
return datas.stream()
|
||||
.map(d -> new CompanySimpleVO()
|
||||
.setId(d.getId())
|
||||
.setCode(d.getAgencyCompanyCode())
|
||||
.setName(d.getAgencyCompanyName()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import com.nflg.mobilebroken.common.util.TicketUtl;
|
|||
import com.nflg.mobilebroken.common.util.VUtils;
|
||||
import com.nflg.mobilebroken.repository.entity.Ticket;
|
||||
import com.nflg.mobilebroken.repository.mapper.TicketMapper;
|
||||
import com.nflg.mobilebroken.repository.service.IAdminUserService;
|
||||
import com.nflg.mobilebroken.repository.service.IAppAreaService;
|
||||
import com.nflg.mobilebroken.repository.service.ITicketService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ import java.util.Objects;
|
|||
public class TicketServiceImpl extends ServiceImpl<TicketMapper, Ticket> implements ITicketService {
|
||||
|
||||
@Resource
|
||||
private IAdminUserService adminUserService;
|
||||
private IAppAreaService appAreaService;
|
||||
|
||||
@Override
|
||||
public Integer add(TicketAddRequest request, Integer userId) {
|
||||
|
|
@ -65,6 +65,9 @@ public class TicketServiceImpl extends ServiceImpl<TicketMapper, Ticket> impleme
|
|||
|
||||
@Override
|
||||
public IPage<TicketVO> search(TicketSearchRequest request, UserDTO user) {
|
||||
if (Objects.nonNull(request.getAreaId())) {
|
||||
request.setAreaIds(appAreaService.getAllhildrens(request.getAreaId()));
|
||||
}
|
||||
if (request.getType()==1){
|
||||
return baseMapper.searchMy(new Page<>(request.getPage(), request.getPageSize()), request, user.getId());
|
||||
}else if (request.getType()==2){
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<select id="getByDeviceNo" resultType="com.nflg.mobilebroken.common.pojo.vo.DeviceInfoVO">
|
||||
SELECT d.device_no AS 'deviceNo',d.model_no AS 'modelNo',dc.component AS 'component',d.device_type AS 'deviceType'
|
||||
,d.device_type_sub AS 'deviceTypeSub',d.warranty_state AS 'warrantyState',d.shipment_date AS 'shipmentDate'
|
||||
,d.start_warranty_date AS 'startWarrantyDate',d.warranty_month AS 'warrantyMonth'
|
||||
,d.start_warranty_date AS 'startWarrantyDate',d.warranty_month AS 'warrantyMonth',d.customer_name AS 'customerName'
|
||||
FROM device d
|
||||
LEFT JOIN device_component dc ON d.model_no=dc.model_no AND dc.`enable`=1
|
||||
WHERE d.device_no=#{deviceNo}
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
<select id="searchDevice" resultType="com.nflg.mobilebroken.common.pojo.vo.DeviceVO">
|
||||
SELECT d.device_no AS 'deviceNo',d.device_name AS 'deviceName',d.model_no AS 'modelNo',d.device_type AS 'deviceType',d.shipment_date AS 'shipmentDate'
|
||||
FROM device d
|
||||
INNER JOIN t_base_customer c ON d.agent_code=c.sap_customer_no
|
||||
INNER JOIN t_base_customer c ON d.agent_code=c.agency_company_code
|
||||
WHERE d.data_valid_state=1 AND c.id IN
|
||||
<foreach collection="companyIds" open="(" close=")" item="companyId" separator=",">
|
||||
#{companyId}
|
||||
|
|
|
|||
|
|
@ -34,4 +34,14 @@
|
|||
LEFT JOIN dictionary_item_translate dit ON di.id=dit.dictionary_item_id AND dit.language_code=#{language}
|
||||
WHERE d.`code`=#{dictionaryCode}
|
||||
</select>
|
||||
|
||||
<select id="getAllByDictionaryCode" resultType="com.nflg.mobilebroken.common.pojo.vo.DictionaryItemTranslateVO">
|
||||
SELECT t.id,l.`code`,l.`name`,IFNULL(t.`value`,di.name) AS 'value',t.dictionary_item_id AS 'dictionaryItemId',di.`code` AS 'dictionaryItemCode'
|
||||
,di.`name` AS 'dictionaryItemName'
|
||||
FROM dictionary d
|
||||
INNER JOIN dictionary_item di ON d.id=di.dictionary_id
|
||||
LEFT JOIN dictionary_item_translate t ON t.dictionary_item_id=di.id AND t.language_code=#{language}
|
||||
LEFT JOIN `language` l ON t.language_code=l.`code`
|
||||
WHERE d.code=#{code}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,12 @@
|
|||
<mapper namespace="com.nflg.mobilebroken.repository.mapper.TicketMapper">
|
||||
|
||||
<sql id="searchWhereCondition">
|
||||
<if test="request.areaIds!=null">
|
||||
AND u.area_id IN
|
||||
<foreach collection="request.areaIds" item="areaId" open="(" separator="," close=")">
|
||||
#{areaId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.title!=null and request.title!=''">
|
||||
AND (t.title LIKE CONCAT('%', #{request.title}, '%') OR t.no LIKE CONCAT('%', #{request.title}, '%'))
|
||||
</if>
|
||||
|
|
@ -10,7 +16,7 @@
|
|||
AND t.device_no LIKE CONCAT('%', #{request.deviceNo}, '%')
|
||||
</if>
|
||||
<if test="request.component!=null and request.component!=''">
|
||||
AND t.component LIKE CONCAT('%', #{request.component}, '%')
|
||||
AND t.component=#{request.component}
|
||||
</if>
|
||||
<if test="request.state!=null">
|
||||
AND t.state=#{request.state}
|
||||
|
|
@ -98,7 +104,7 @@
|
|||
|
||||
<select id="searchFromAdmin" resultType="com.nflg.mobilebroken.common.pojo.vo.AdminTicketVO">
|
||||
SELECT t.id,t.`no`,t.title,t.state,t.urgency,t.component,t.question,t.solution,a.`name` AS 'areaName'
|
||||
,c.agency_company_name AS 'companyName',u.company_id AS 'companyId',u.`name` AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
||||
,d.customer_name AS 'companyName',u.company_id AS 'companyId',u.`name` AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
||||
,t.create_time AS 'createTime',t.handle,t.solve_time AS 'solveTime',di.name AS 'warrantyStatusDesc',d.device_type AS 'deviceType'
|
||||
,d.model_no AS 'equipmentModel',d.shipment_date AS 'shipmentDate',IF(tf.id IS NULL, false, true) AS 'followed'
|
||||
FROM ticket t
|
||||
|
|
@ -122,7 +128,7 @@
|
|||
|
||||
<select id="searchAllFromAdmin" resultType="com.nflg.mobilebroken.common.pojo.vo.AdminTicketVO">
|
||||
SELECT t.id,t.`no`,t.title,t.state,t.urgency,t.component,t.question,t.solution,a.`name` AS 'areaName'
|
||||
,c.agency_company_name AS 'companyName',u.company_id AS 'companyId',u.`name` AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
||||
,d.customer_name AS 'companyName',u.company_id AS 'companyId',u.`name` AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
||||
,t.create_time AS 'createTime',t.handle,t.solve_time AS 'solveTime',di.name AS 'warrantyStatusDesc'
|
||||
FROM ticket t
|
||||
LEFT JOIN app_user u ON t.user_id=u.id
|
||||
|
|
@ -135,7 +141,7 @@
|
|||
|
||||
<select id="searchFromAdminAndFollow" resultType="com.nflg.mobilebroken.common.pojo.vo.AdminTicketVO">
|
||||
SELECT t.id,t.`no`,t.title,t.state,t.urgency,t.component,t.question,t.solution,a.`name` AS 'areaName'
|
||||
,c.agency_company_name AS 'companyName',u.company_id AS 'companyId',u.`name` AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
||||
,d.customer_name AS 'companyName',u.company_id AS 'companyId',u.`name` AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
||||
,t.create_time AS 'createTime',t.handle,t.solve_time AS 'solveTime',di.name AS 'warrantyStatusDesc',d.device_type AS 'deviceType'
|
||||
,d.model_no AS 'equipmentModel',d.shipment_date AS 'shipmentDate',IF(tf.id IS NULL, false, true) AS 'followed'
|
||||
FROM ticket t
|
||||
|
|
@ -150,7 +156,7 @@
|
|||
|
||||
<select id="searchAllFromAdminAndFollow" resultType="com.nflg.mobilebroken.common.pojo.vo.AdminTicketVO">
|
||||
SELECT t.id,t.`no`,t.title,t.state,t.urgency,t.component,t.question,t.solution,a.`name` AS 'areaName'
|
||||
,c.agency_company_name AS 'companyName',u.company_id AS 'companyId',u.`name` AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
||||
,d.customer_name AS 'companyName',u.company_id AS 'companyId',u.`name` AS 'createBy',t.device_no AS 'deviceNo',t.use_time AS 'useTime'
|
||||
,t.create_time AS 'createTime',t.handle,t.solve_time AS 'solveTime',di.name AS 'warrantyStatusDesc',IF(tf.id IS NULL, false, true) AS 'followed'
|
||||
FROM ticket t
|
||||
LEFT JOIN app_user u ON t.user_id=u.id
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public class GlobalRestControllerAdvice {
|
|||
@ExceptionHandler(NflgException.class)
|
||||
public ApiResult<Void> handleNflgException(NflgException ex) {
|
||||
log.error("业务错误: ", ex);
|
||||
return ApiResult.error(STATE.BusinessError,ex.getMessage());
|
||||
return ApiResult.error(ex.getState(), ex.getMessage());
|
||||
}
|
||||
|
||||
@ExceptionHandler(ConstraintViolationException.class)
|
||||
|
|
|
|||
Loading…
Reference in New Issue