Showing
42 changed files
with
242 additions
and
278 deletions
| 1 | -package com.fedex.connect.customer.controller; | 1 | +package com.fedex.connect.customer.controller.base; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | -import com.fedex.connect.common.dependencies.date.vo.ResponseResultVo; | 4 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 5 | import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; | 5 | import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; |
| 6 | import com.fedex.connect.customer.service.biz.IAttachmentService; | 6 | import com.fedex.connect.customer.service.biz.IAttachmentService; |
| 7 | import com.fedex.connect.customer.service.biz.IConsignmentService; | 7 | import com.fedex.connect.customer.service.biz.IConsignmentService; |
| ... | @@ -20,7 +20,7 @@ import java.util.Objects; | ... | @@ -20,7 +20,7 @@ import java.util.Objects; |
| 20 | /** | 20 | /** |
| 21 | * @author EDY | 21 | * @author EDY |
| 22 | */ | 22 | */ |
| 23 | -public class AbstractEtController { | 23 | +public class BaseController { |
| 24 | 24 | ||
| 25 | @Resource | 25 | @Resource |
| 26 | protected LocaleMessageUtil localeMessageUtil; | 26 | protected LocaleMessageUtil localeMessageUtil; |
| ... | @@ -87,7 +87,7 @@ public class AbstractEtController { | ... | @@ -87,7 +87,7 @@ public class AbstractEtController { |
| 87 | * @param response | 87 | * @param response |
| 88 | * @return | 88 | * @return |
| 89 | */ | 89 | */ |
| 90 | - public HttpStatus errorMappingStatus(ResponseResultVo response) { | 90 | + public HttpStatus errorMappingStatus(ResponseVo response) { |
| 91 | if (Objects.isNull(response)) { | 91 | if (Objects.isNull(response)) { |
| 92 | return HttpStatus.BAD_REQUEST; //400 | 92 | return HttpStatus.BAD_REQUEST; //400 |
| 93 | } | 93 | } |
| ... | @@ -101,7 +101,7 @@ public class AbstractEtController { | ... | @@ -101,7 +101,7 @@ public class AbstractEtController { |
| 101 | * @param <T> | 101 | * @param <T> |
| 102 | * @return | 102 | * @return |
| 103 | */ | 103 | */ |
| 104 | - public <T> boolean isSuccess(ResponseEntity<ResponseResultVo<T>> responseEntity) { | 104 | + public <T> boolean isSuccess(ResponseEntity<ResponseVo<T>> responseEntity) { |
| 105 | return responseEntity != null && responseEntity.getBody() != null && responseEntity.getBody().isSuccess(); | 105 | return responseEntity != null && responseEntity.getBody() != null && responseEntity.getBody().isSuccess(); |
| 106 | } | 106 | } |
| 107 | 107 | ||
| ... | @@ -111,7 +111,7 @@ public class AbstractEtController { | ... | @@ -111,7 +111,7 @@ public class AbstractEtController { |
| 111 | * @param <T> | 111 | * @param <T> |
| 112 | * @return | 112 | * @return |
| 113 | */ | 113 | */ |
| 114 | - public <T> boolean isSuccess(ResponseResultVo<T> response) { | 114 | + public <T> boolean isSuccess(ResponseVo<T> response) { |
| 115 | return response != null && response.isSuccess(); | 115 | return response != null && response.isSuccess(); |
| 116 | } | 116 | } |
| 117 | 117 | ... | ... |
| 1 | package com.fedex.connect.customer.controller.biz; | 1 | package com.fedex.connect.customer.controller.biz; |
| 2 | 2 | ||
| 3 | -import com.fedex.connect.common.dependencies.date.vo.ResponseResultVo; | 3 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 4 | import com.fedex.connect.customer.data.bo.LongBo; | 4 | import com.fedex.connect.customer.data.bo.LongBo; |
| 5 | import org.springframework.web.bind.annotation.RequestBody; | 5 | import org.springframework.web.bind.annotation.RequestBody; |
| 6 | 6 | ||
| 7 | public interface IAttachmentController { | 7 | public interface IAttachmentController { |
| 8 | - ResponseResultVo findHistory(@RequestBody LongBo bo); | 8 | + ResponseVo findHistory(@RequestBody LongBo bo); |
| 9 | } | 9 | } | ... | ... |
| 1 | package com.fedex.connect.customer.controller.biz; | 1 | package com.fedex.connect.customer.controller.biz; |
| 2 | 2 | ||
| 3 | -import com.fedex.connect.common.dependencies.date.vo.ResponseResultVo; | 3 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 4 | import com.fedex.connect.customer.data.bo.AddBo; | 4 | import com.fedex.connect.customer.data.bo.AddBo; |
| 5 | import com.fedex.connect.customer.data.query.ConsignmentQuery; | 5 | import com.fedex.connect.customer.data.query.ConsignmentQuery; |
| 6 | import org.springframework.web.bind.annotation.RequestBody; | 6 | import org.springframework.web.bind.annotation.RequestBody; |
| 7 | 7 | ||
| 8 | public interface IConsignmentController { | 8 | public interface IConsignmentController { |
| 9 | - ResponseResultVo findConsignmentList(@RequestBody ConsignmentQuery consignmentQuery); | 9 | + ResponseVo findConsignmentList(@RequestBody ConsignmentQuery consignmentQuery); |
| 10 | 10 | ||
| 11 | - ResponseResultVo addConsignment(@RequestBody AddBo bo); | 11 | + ResponseVo addConsignment(@RequestBody AddBo bo); |
| 12 | } | 12 | } | ... | ... |
| 1 | package com.fedex.connect.customer.controller.biz.impl; | 1 | package com.fedex.connect.customer.controller.biz.impl; |
| 2 | 2 | ||
| 3 | import com.fedex.connect.common.dependencies.date.model.LogShowModel; | 3 | import com.fedex.connect.common.dependencies.date.model.LogShowModel; |
| 4 | -import com.fedex.connect.common.dependencies.date.vo.ResponseResultVo; | 4 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 5 | import com.fedex.connect.common.dependencies.enums.ResponseCode; | 5 | import com.fedex.connect.common.dependencies.enums.ResponseCode; |
| 6 | import com.fedex.connect.common.dependencies.util.CurrentUserInfo; | 6 | import com.fedex.connect.common.dependencies.util.CurrentUserInfo; |
| 7 | -import com.fedex.connect.customer.controller.AbstractEtController; | 7 | +import com.fedex.connect.customer.controller.base.BaseController; |
| 8 | import com.fedex.connect.customer.controller.biz.IAttachmentController; | 8 | import com.fedex.connect.customer.controller.biz.IAttachmentController; |
| 9 | import com.fedex.connect.customer.data.bo.LongBo; | 9 | import com.fedex.connect.customer.data.bo.LongBo; |
| 10 | import io.swagger.annotations.Api; | 10 | import io.swagger.annotations.Api; |
| 11 | import io.swagger.annotations.ApiOperation; | 11 | import io.swagger.annotations.ApiOperation; |
| 12 | -import org.slf4j.Logger; | 12 | +import lombok.extern.slf4j.Slf4j; |
| 13 | -import org.slf4j.LoggerFactory; | ||
| 14 | import org.springframework.web.bind.annotation.PostMapping; | 13 | import org.springframework.web.bind.annotation.PostMapping; |
| 15 | import org.springframework.web.bind.annotation.RequestBody; | 14 | import org.springframework.web.bind.annotation.RequestBody; |
| 16 | import org.springframework.web.bind.annotation.RequestMapping; | 15 | import org.springframework.web.bind.annotation.RequestMapping; |
| ... | @@ -21,16 +20,16 @@ import org.springframework.web.bind.annotation.RestController; | ... | @@ -21,16 +20,16 @@ import org.springframework.web.bind.annotation.RestController; |
| 21 | * @Description 类说明 附件相关 | 20 | * @Description 类说明 附件相关 |
| 22 | * @Date 2024/11/4 | 21 | * @Date 2024/11/4 |
| 23 | */ | 22 | */ |
| 23 | +@Slf4j | ||
| 24 | @RestController | 24 | @RestController |
| 25 | @RequestMapping(value = "/attachment", name = "附件相关") | 25 | @RequestMapping(value = "/attachment", name = "附件相关") |
| 26 | @Api(value = "AttachmentControllerImpl", tags = {"附件相关"}) | 26 | @Api(value = "AttachmentControllerImpl", tags = {"附件相关"}) |
| 27 | -public class AttachmentControllerImpl extends AbstractEtController implements IAttachmentController { | 27 | +public class AttachmentControllerImpl extends BaseController implements IAttachmentController { |
| 28 | - private static final Logger logger = LoggerFactory.getLogger(AttachmentControllerImpl.class); | ||
| 29 | 28 | ||
| 30 | @PostMapping("/find/history") | 29 | @PostMapping("/find/history") |
| 31 | @ApiOperation(value = "历史上传记录查询") | 30 | @ApiOperation(value = "历史上传记录查询") |
| 32 | - public ResponseResultVo findHistory(@RequestBody LongBo bo) { | 31 | + public ResponseVo findHistory(@RequestBody LongBo bo) { |
| 33 | - ResponseResultVo responseResultVo = attachmentValidate.preCheckForFindHistory(bo); | 32 | + ResponseVo responseResultVo = attachmentValidate.preCheckForFindHistory(bo); |
| 34 | if (responseResultVo != null){ | 33 | if (responseResultVo != null){ |
| 35 | return responseResultVo; | 34 | return responseResultVo; |
| 36 | } | 35 | } |
| ... | @@ -39,11 +38,8 @@ public class AttachmentControllerImpl extends AbstractEtController implements IA | ... | @@ -39,11 +38,8 @@ public class AttachmentControllerImpl extends AbstractEtController implements IA |
| 39 | userId = CurrentUserInfo.getUserId(); | 38 | userId = CurrentUserInfo.getUserId(); |
| 40 | //userId = 0L; | 39 | //userId = 0L; |
| 41 | } catch (Exception e) { | 40 | } catch (Exception e) { |
| 42 | - logger.error(LogShowModel.showException("Exception", e)); | 41 | + log.error(LogShowModel.showException("Exception", e)); |
| 43 | - return ResponseResultVo.fail(localeMessageUtil.getMessage(ResponseCode.TOKEN_FORMAT_ERROR.getMsg())); | 42 | + return ResponseVo.fail(localeMessageUtil.getMessage(ResponseCode.TOKEN_FORMAT_ERROR.getMsg())); |
| 44 | - } | ||
| 45 | - if (userId == null) { | ||
| 46 | - return ResponseResultVo.fail(localeMessageUtil.getMessage(ResponseCode.OVERDUE_TOKEN_CODE.getMsg())); | ||
| 47 | } | 43 | } |
| 48 | return attachmentService.findHistory(userId,bo.getId()); | 44 | return attachmentService.findHistory(userId,bo.getId()); |
| 49 | } | 45 | } | ... | ... |
| 1 | package com.fedex.connect.customer.controller.biz.impl; | 1 | package com.fedex.connect.customer.controller.biz.impl; |
| 2 | 2 | ||
| 3 | import com.fedex.connect.common.dependencies.date.model.LogShowModel; | 3 | import com.fedex.connect.common.dependencies.date.model.LogShowModel; |
| 4 | -import com.fedex.connect.common.dependencies.date.vo.ResponseResultVo; | 4 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 5 | import com.fedex.connect.common.dependencies.enums.ResponseCode; | 5 | import com.fedex.connect.common.dependencies.enums.ResponseCode; |
| 6 | import com.fedex.connect.common.dependencies.util.CurrentUserInfo; | 6 | import com.fedex.connect.common.dependencies.util.CurrentUserInfo; |
| 7 | import com.fedex.connect.common.model.sys.User; | 7 | import com.fedex.connect.common.model.sys.User; |
| 8 | -import com.fedex.connect.customer.controller.AbstractEtController; | 8 | +import com.fedex.connect.customer.controller.base.BaseController; |
| 9 | import com.fedex.connect.customer.controller.biz.IConsignmentController; | 9 | import com.fedex.connect.customer.controller.biz.IConsignmentController; |
| 10 | import com.fedex.connect.customer.data.bo.AddBo; | 10 | import com.fedex.connect.customer.data.bo.AddBo; |
| 11 | import com.fedex.connect.customer.data.query.ConsignmentQuery; | 11 | import com.fedex.connect.customer.data.query.ConsignmentQuery; |
| ... | @@ -26,23 +26,23 @@ import org.springframework.web.bind.annotation.RestController; | ... | @@ -26,23 +26,23 @@ import org.springframework.web.bind.annotation.RestController; |
| 26 | @RestController | 26 | @RestController |
| 27 | @RequestMapping(value = "/consignment", name = "运单相关") | 27 | @RequestMapping(value = "/consignment", name = "运单相关") |
| 28 | @Api(value = "ConsignmentController", tags = {"运单相关"}) | 28 | @Api(value = "ConsignmentController", tags = {"运单相关"}) |
| 29 | -public class ConsignmentControllerImpl extends AbstractEtController implements IConsignmentController { | 29 | +public class ConsignmentControllerImpl extends BaseController implements IConsignmentController { |
| 30 | private static final Logger logger = LoggerFactory.getLogger(ConsignmentControllerImpl.class); | 30 | private static final Logger logger = LoggerFactory.getLogger(ConsignmentControllerImpl.class); |
| 31 | 31 | ||
| 32 | 32 | ||
| 33 | @PostMapping("/find/list") | 33 | @PostMapping("/find/list") |
| 34 | @ApiOperation(value = "运单查询") | 34 | @ApiOperation(value = "运单查询") |
| 35 | - public ResponseResultVo findConsignmentList(@RequestBody ConsignmentQuery consignmentQuery) { | 35 | + public ResponseVo findConsignmentList(@RequestBody ConsignmentQuery consignmentQuery) { |
| 36 | User user = null; | 36 | User user = null; |
| 37 | try { | 37 | try { |
| 38 | user = CurrentUserInfo.getUser(); | 38 | user = CurrentUserInfo.getUser(); |
| 39 | //userId = 0L; | 39 | //userId = 0L; |
| 40 | } catch (Exception e) { | 40 | } catch (Exception e) { |
| 41 | logger.error(LogShowModel.showException("Exception", e)); | 41 | logger.error(LogShowModel.showException("Exception", e)); |
| 42 | - return ResponseResultVo.fail(localeMessageUtil.getMessage(ResponseCode.TOKEN_FORMAT_ERROR.getMsg())); | 42 | + return ResponseVo.fail(localeMessageUtil.getMessage(ResponseCode.TOKEN_FORMAT_ERROR.getMsg())); |
| 43 | } | 43 | } |
| 44 | if (user == null) { | 44 | if (user == null) { |
| 45 | - return ResponseResultVo.fail(localeMessageUtil.getMessage(ResponseCode.OVERDUE_TOKEN_CODE.getMsg())); | 45 | + return ResponseVo.fail(localeMessageUtil.getMessage(ResponseCode.OVERDUE_TOKEN_CODE.getMsg())); |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | ConsignmentQuery query = ConsignmentQuery.dataProcessing(consignmentQuery); | 48 | ConsignmentQuery query = ConsignmentQuery.dataProcessing(consignmentQuery); |
| ... | @@ -53,8 +53,8 @@ public class ConsignmentControllerImpl extends AbstractEtController implements I | ... | @@ -53,8 +53,8 @@ public class ConsignmentControllerImpl extends AbstractEtController implements I |
| 53 | 53 | ||
| 54 | @PostMapping("/add") | 54 | @PostMapping("/add") |
| 55 | @ApiOperation("上传运单") | 55 | @ApiOperation("上传运单") |
| 56 | - public ResponseResultVo addConsignment(@RequestBody AddBo bo){ | 56 | + public ResponseVo addConsignment(@RequestBody AddBo bo){ |
| 57 | - ResponseResultVo responseResultVo = consignmentValidate.preCheckAdd(bo); | 57 | + ResponseVo responseResultVo = consignmentValidate.preCheckAdd(bo); |
| 58 | if (responseResultVo != null){ | 58 | if (responseResultVo != null){ |
| 59 | return responseResultVo; | 59 | return responseResultVo; |
| 60 | } | 60 | } |
| ... | @@ -63,10 +63,10 @@ public class ConsignmentControllerImpl extends AbstractEtController implements I | ... | @@ -63,10 +63,10 @@ public class ConsignmentControllerImpl extends AbstractEtController implements I |
| 63 | user = CurrentUserInfo.getUser(); | 63 | user = CurrentUserInfo.getUser(); |
| 64 | } catch (Exception e) { | 64 | } catch (Exception e) { |
| 65 | logger.error(LogShowModel.showException("Exception", e)); | 65 | logger.error(LogShowModel.showException("Exception", e)); |
| 66 | - return ResponseResultVo.fail(localeMessageUtil.getMessage(ResponseCode.TOKEN_FORMAT_ERROR.getMsg())); | 66 | + return ResponseVo.fail(localeMessageUtil.getMessage(ResponseCode.TOKEN_FORMAT_ERROR.getMsg())); |
| 67 | } | 67 | } |
| 68 | if (user == null) { | 68 | if (user == null) { |
| 69 | - return ResponseResultVo.fail(localeMessageUtil.getMessage(ResponseCode.OVERDUE_TOKEN_CODE.getMsg())); | 69 | + return ResponseVo.fail(localeMessageUtil.getMessage(ResponseCode.OVERDUE_TOKEN_CODE.getMsg())); |
| 70 | } | 70 | } |
| 71 | return consignmentService.add(bo,user); | 71 | return consignmentService.add(bo,user); |
| 72 | } | 72 | } | ... | ... |
| 1 | -package com.fedex.connect.customer.service; | 1 | +package com.fedex.connect.customer.service.base; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; | 4 | import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; |
| ... | @@ -8,7 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired; | ... | @@ -8,7 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
| 8 | 8 | ||
| 9 | import javax.annotation.Resource; | 9 | import javax.annotation.Resource; |
| 10 | 10 | ||
| 11 | -public class AbstractEtService { | 11 | +public class BaseService { |
| 12 | 12 | ||
| 13 | @Resource | 13 | @Resource |
| 14 | protected LocaleMessageUtil localeMessageUtil; | 14 | protected LocaleMessageUtil localeMessageUtil; | ... | ... |
| 1 | package com.fedex.connect.customer.service.biz; | 1 | package com.fedex.connect.customer.service.biz; |
| 2 | 2 | ||
| 3 | -import com.fedex.connect.common.dependencies.date.vo.ResponseResultVo; | 3 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 4 | 4 | ||
| 5 | public interface IAttachmentService { | 5 | public interface IAttachmentService { |
| 6 | - ResponseResultVo findHistory(Long userId, Long bizId); | 6 | + ResponseVo findHistory(Long userId, Long bizId); |
| 7 | } | 7 | } | ... | ... |
| 1 | package com.fedex.connect.customer.service.biz; | 1 | package com.fedex.connect.customer.service.biz; |
| 2 | 2 | ||
| 3 | -import com.fedex.connect.common.dependencies.date.vo.ResponseResultVo; | 3 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 4 | import com.fedex.connect.common.model.sys.User; | 4 | import com.fedex.connect.common.model.sys.User; |
| 5 | import com.fedex.connect.customer.data.bo.AddBo; | 5 | import com.fedex.connect.customer.data.bo.AddBo; |
| 6 | import com.fedex.connect.customer.data.query.ConsignmentQuery; | 6 | import com.fedex.connect.customer.data.query.ConsignmentQuery; |
| ... | @@ -11,9 +11,9 @@ public interface IConsignmentService { | ... | @@ -11,9 +11,9 @@ public interface IConsignmentService { |
| 11 | * @Description 功能说明 运单查询 | 11 | * @Description 功能说明 运单查询 |
| 12 | * @Date 2024/11/5 | 12 | * @Date 2024/11/5 |
| 13 | * @param query | 13 | * @param query |
| 14 | - * @return com.fedex.connect.common.dependencies.date.vo.ResponseResultVo | 14 | + * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo |
| 15 | */ | 15 | */ |
| 16 | - ResponseResultVo findConsignments(ConsignmentQuery query); | 16 | + ResponseVo findConsignments(ConsignmentQuery query); |
| 17 | 17 | ||
| 18 | /** | 18 | /** |
| 19 | * @Author Szl | 19 | * @Author Szl |
| ... | @@ -21,7 +21,7 @@ public interface IConsignmentService { | ... | @@ -21,7 +21,7 @@ public interface IConsignmentService { |
| 21 | * @Date 2024/11/5 | 21 | * @Date 2024/11/5 |
| 22 | * @param bo | 22 | * @param bo |
| 23 | * @param user | 23 | * @param user |
| 24 | - * @return com.fedex.connect.common.dependencies.date.vo.ResponseResultVo | 24 | + * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo |
| 25 | */ | 25 | */ |
| 26 | - ResponseResultVo add(AddBo bo, User user); | 26 | + ResponseVo add(AddBo bo, User user); |
| 27 | } | 27 | } | ... | ... |
| ... | @@ -2,9 +2,9 @@ package com.fedex.connect.customer.service.biz.impl; | ... | @@ -2,9 +2,9 @@ package com.fedex.connect.customer.service.biz.impl; |
| 2 | 2 | ||
| 3 | import com.fedex.connect.common.dependencies.contants.DigitConstants; | 3 | import com.fedex.connect.common.dependencies.contants.DigitConstants; |
| 4 | import com.fedex.connect.common.dependencies.date.vo.PageResult; | 4 | import com.fedex.connect.common.dependencies.date.vo.PageResult; |
| 5 | -import com.fedex.connect.common.dependencies.date.vo.ResponseResultVo; | 5 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 6 | import com.fedex.connect.customer.data.dto.AttachmentHistoryDto; | 6 | import com.fedex.connect.customer.data.dto.AttachmentHistoryDto; |
| 7 | -import com.fedex.connect.customer.service.AbstractEtService; | 7 | +import com.fedex.connect.customer.service.base.BaseService; |
| 8 | import com.fedex.connect.customer.service.biz.IAttachmentService; | 8 | import com.fedex.connect.customer.service.biz.IAttachmentService; |
| 9 | import org.springframework.stereotype.Service; | 9 | import org.springframework.stereotype.Service; |
| 10 | 10 | ||
| ... | @@ -17,16 +17,16 @@ import java.util.List; | ... | @@ -17,16 +17,16 @@ import java.util.List; |
| 17 | * @Date 2024/11/4 | 17 | * @Date 2024/11/4 |
| 18 | */ | 18 | */ |
| 19 | @Service | 19 | @Service |
| 20 | -public class AttachmentServiceImpl extends AbstractEtService implements IAttachmentService { | 20 | +public class AttachmentServiceImpl extends BaseService implements IAttachmentService { |
| 21 | /** | 21 | /** |
| 22 | * @Author Szl | 22 | * @Author Szl |
| 23 | * @Description 功能说明 查询该运单历史数据 | 23 | * @Description 功能说明 查询该运单历史数据 |
| 24 | * @Date 2024/11/5 | 24 | * @Date 2024/11/5 |
| 25 | * @param userId | 25 | * @param userId |
| 26 | * @param bizId | 26 | * @param bizId |
| 27 | - * @return com.fedex.connect.common.dependencies.date.vo.ResponseResultVo | 27 | + * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo |
| 28 | */ | 28 | */ |
| 29 | - public ResponseResultVo findHistory(Long userId, Long bizId) { | 29 | + public ResponseVo findHistory(Long userId, Long bizId) { |
| 30 | List<AttachmentHistoryDto> history = attachmentRepository.findHistory(bizId); | 30 | List<AttachmentHistoryDto> history = attachmentRepository.findHistory(bizId); |
| 31 | 31 | ||
| 32 | if (history != null) { | 32 | if (history != null) { |
| ... | @@ -42,7 +42,7 @@ public class AttachmentServiceImpl extends AbstractEtService implements IAttachm | ... | @@ -42,7 +42,7 @@ public class AttachmentServiceImpl extends AbstractEtService implements IAttachm |
| 42 | PageResult pageResult = new PageResult(); | 42 | PageResult pageResult = new PageResult(); |
| 43 | pageResult.setList(history != null ? history : Collections.emptyList()); | 43 | pageResult.setList(history != null ? history : Collections.emptyList()); |
| 44 | 44 | ||
| 45 | - return ResponseResultVo.succ(pageResult); | 45 | + return ResponseVo.succ(pageResult); |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | } | 48 | } | ... | ... |
| ... | @@ -2,13 +2,13 @@ package com.fedex.connect.customer.service.biz.impl; | ... | @@ -2,13 +2,13 @@ package com.fedex.connect.customer.service.biz.impl; |
| 2 | 2 | ||
| 3 | import com.fedex.connect.common.dependencies.contants.GlobalConstantFedex; | 3 | import com.fedex.connect.common.dependencies.contants.GlobalConstantFedex; |
| 4 | import com.fedex.connect.common.dependencies.date.vo.PageResult; | 4 | import com.fedex.connect.common.dependencies.date.vo.PageResult; |
| 5 | -import com.fedex.connect.common.dependencies.date.vo.ResponseResultVo; | 5 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 6 | import com.fedex.connect.common.dependencies.util.Utils; | 6 | import com.fedex.connect.common.dependencies.util.Utils; |
| 7 | import com.fedex.connect.common.model.biz.Consignment; | 7 | import com.fedex.connect.common.model.biz.Consignment; |
| 8 | import com.fedex.connect.common.model.sys.User; | 8 | import com.fedex.connect.common.model.sys.User; |
| 9 | import com.fedex.connect.customer.data.bo.AddBo; | 9 | import com.fedex.connect.customer.data.bo.AddBo; |
| 10 | import com.fedex.connect.customer.data.query.ConsignmentQuery; | 10 | import com.fedex.connect.customer.data.query.ConsignmentQuery; |
| 11 | -import com.fedex.connect.customer.service.AbstractEtService; | 11 | +import com.fedex.connect.customer.service.base.BaseService; |
| 12 | import com.fedex.connect.customer.service.biz.IConsignmentService; | 12 | import com.fedex.connect.customer.service.biz.IConsignmentService; |
| 13 | import com.fedex.connect.customer.util.service.biz.ConsignmentUtil; | 13 | import com.fedex.connect.customer.util.service.biz.ConsignmentUtil; |
| 14 | import org.springframework.beans.factory.annotation.Autowired; | 14 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | @@ -22,7 +22,7 @@ import java.util.List; | ... | @@ -22,7 +22,7 @@ import java.util.List; |
| 22 | * @Date 2024/10/31 | 22 | * @Date 2024/10/31 |
| 23 | */ | 23 | */ |
| 24 | @Service | 24 | @Service |
| 25 | -public class ConsignmentServiceImpl extends AbstractEtService implements IConsignmentService { | 25 | +public class ConsignmentServiceImpl extends BaseService implements IConsignmentService { |
| 26 | 26 | ||
| 27 | @Autowired | 27 | @Autowired |
| 28 | private ConsignmentUtil consignmentUtil; | 28 | private ConsignmentUtil consignmentUtil; |
| ... | @@ -32,13 +32,13 @@ public class ConsignmentServiceImpl extends AbstractEtService implements IConsig | ... | @@ -32,13 +32,13 @@ public class ConsignmentServiceImpl extends AbstractEtService implements IConsig |
| 32 | * @Description 功能说明 运单查询 | 32 | * @Description 功能说明 运单查询 |
| 33 | * @Date 2024/11/5 | 33 | * @Date 2024/11/5 |
| 34 | * @param query | 34 | * @param query |
| 35 | - * @return com.fedex.connect.common.dependencies.date.vo.ResponseResultVo | 35 | + * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo |
| 36 | */ | 36 | */ |
| 37 | - public ResponseResultVo findConsignments(ConsignmentQuery query) { | 37 | + public ResponseVo findConsignments(ConsignmentQuery query) { |
| 38 | 38 | ||
| 39 | List<String> consignmentCodeList = query.getConsignmentCodeList(); | 39 | List<String> consignmentCodeList = query.getConsignmentCodeList(); |
| 40 | if (Utils.isNotEmpty(consignmentCodeList) && consignmentCodeList.size() > GlobalConstantFedex.DECLARE_COUNT) { | 40 | if (Utils.isNotEmpty(consignmentCodeList) && consignmentCodeList.size() > GlobalConstantFedex.DECLARE_COUNT) { |
| 41 | - return ResponseResultVo.fail(localeMessageUtil.getMessage("conl_cus_declare_count_max")); | 41 | + return ResponseVo.fail(localeMessageUtil.getMessage("conl_cus_declare_count_max")); |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | //查询数量 | 44 | //查询数量 |
| ... | @@ -54,7 +54,7 @@ public class ConsignmentServiceImpl extends AbstractEtService implements IConsig | ... | @@ -54,7 +54,7 @@ public class ConsignmentServiceImpl extends AbstractEtService implements IConsig |
| 54 | } | 54 | } |
| 55 | List<Consignment> consignments = consignmentExtRepository.findConsignments(query); | 55 | List<Consignment> consignments = consignmentExtRepository.findConsignments(query); |
| 56 | pageResult.setList(consignments); | 56 | pageResult.setList(consignments); |
| 57 | - return ResponseResultVo.succ(pageResult); | 57 | + return ResponseVo.succ(pageResult); |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | /** | 60 | /** |
| ... | @@ -63,14 +63,14 @@ public class ConsignmentServiceImpl extends AbstractEtService implements IConsig | ... | @@ -63,14 +63,14 @@ public class ConsignmentServiceImpl extends AbstractEtService implements IConsig |
| 63 | * @Date 2024/11/5 | 63 | * @Date 2024/11/5 |
| 64 | * @param bo | 64 | * @param bo |
| 65 | * @param user | 65 | * @param user |
| 66 | - * @return com.fedex.connect.common.dependencies.date.vo.ResponseResultVo | 66 | + * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo |
| 67 | */ | 67 | */ |
| 68 | - public ResponseResultVo add(AddBo bo, User user){ | 68 | + public ResponseVo add(AddBo bo, User user){ |
| 69 | //查询运单表是否存在已提交的运单 | 69 | //查询运单表是否存在已提交的运单 |
| 70 | Consignment consignment = consignmentExtRepository.findByConsignmentCode(bo.getConsignmentCode()); | 70 | Consignment consignment = consignmentExtRepository.findByConsignmentCode(bo.getConsignmentCode()); |
| 71 | if (consignment != null && consignment.getId() != null){ | 71 | if (consignment != null && consignment.getId() != null){ |
| 72 | //如果存在则进行bo基础校验 | 72 | //如果存在则进行bo基础校验 |
| 73 | - ResponseResultVo responseResultVo = consignmentUtil.consignmentCreatorCheck(consignment,bo); | 73 | + ResponseVo responseResultVo = consignmentUtil.consignmentCreatorCheck(consignment,bo); |
| 74 | if (responseResultVo != null){ | 74 | if (responseResultVo != null){ |
| 75 | return responseResultVo; | 75 | return responseResultVo; |
| 76 | } | 76 | } |
| ... | @@ -78,6 +78,6 @@ public class ConsignmentServiceImpl extends AbstractEtService implements IConsig | ... | @@ -78,6 +78,6 @@ public class ConsignmentServiceImpl extends AbstractEtService implements IConsig |
| 78 | 78 | ||
| 79 | } | 79 | } |
| 80 | //如果不存在直接返回 | 80 | //如果不存在直接返回 |
| 81 | - return ResponseResultVo.succ(null); | 81 | + return ResponseVo.succ(null); |
| 82 | } | 82 | } |
| 83 | } | 83 | } | ... | ... |
| 1 | package com.fedex.connect.customer.util.service.biz; | 1 | package com.fedex.connect.customer.util.service.biz; |
| 2 | 2 | ||
| 3 | -import com.fedex.connect.common.dependencies.date.vo.ResponseResultVo; | 3 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 4 | import com.fedex.connect.common.dependencies.enums.ResponseCode; | 4 | import com.fedex.connect.common.dependencies.enums.ResponseCode; |
| 5 | import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; | 5 | import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; |
| 6 | import com.fedex.connect.common.model.biz.Consignment; | 6 | import com.fedex.connect.common.model.biz.Consignment; |
| ... | @@ -25,9 +25,9 @@ public class ConsignmentUtil { | ... | @@ -25,9 +25,9 @@ public class ConsignmentUtil { |
| 25 | * @Description 功能说明 校验运单创建人 | 25 | * @Description 功能说明 校验运单创建人 |
| 26 | * @Date 2024/11/5 | 26 | * @Date 2024/11/5 |
| 27 | * @param consignment | 27 | * @param consignment |
| 28 | - * @return com.fedex.connect.common.dependencies.date.vo.ResponseResultVo | 28 | + * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo |
| 29 | */ | 29 | */ |
| 30 | - public ResponseResultVo consignmentCreatorCheck(Consignment consignment, AddBo bo) { | 30 | + public ResponseVo consignmentCreatorCheck(Consignment consignment, AddBo bo) { |
| 31 | List<String> errList = new ArrayList<>(); | 31 | List<String> errList = new ArrayList<>(); |
| 32 | 32 | ||
| 33 | // 校验字段是否匹配,并将错误信息添加到errList中 | 33 | // 校验字段是否匹配,并将错误信息添加到errList中 |
| ... | @@ -38,7 +38,7 @@ public class ConsignmentUtil { | ... | @@ -38,7 +38,7 @@ public class ConsignmentUtil { |
| 38 | if (!errList.isEmpty()) { | 38 | if (!errList.isEmpty()) { |
| 39 | String enumResCode601 = localeMessageUtil.getMessage("enum_res_code_601"); | 39 | String enumResCode601 = localeMessageUtil.getMessage("enum_res_code_601"); |
| 40 | String errResult = String.join(",", errList) + enumResCode601; | 40 | String errResult = String.join(",", errList) + enumResCode601; |
| 41 | - return ResponseResultVo.fail(ResponseCode.CONSIGNMENT_CREATOR_ERR.getCode(), errResult); | 41 | + return ResponseVo.fail(ResponseCode.CONSIGNMENT_CREATOR_ERR.getCode(), errResult); |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | return null; | 44 | return null; | ... | ... |
| 1 | package com.fedex.connect.customer.validate.controller.biz; | 1 | package com.fedex.connect.customer.validate.controller.biz; |
| 2 | 2 | ||
| 3 | -import com.fedex.connect.common.dependencies.date.vo.ResponseResultVo; | 3 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 4 | import com.fedex.connect.common.dependencies.enums.ResponseCode; | 4 | import com.fedex.connect.common.dependencies.enums.ResponseCode; |
| 5 | import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; | 5 | import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; |
| 6 | import com.fedex.connect.customer.data.bo.LongBo; | 6 | import com.fedex.connect.customer.data.bo.LongBo; |
| ... | @@ -23,11 +23,11 @@ public class AttachmentValidate { | ... | @@ -23,11 +23,11 @@ public class AttachmentValidate { |
| 23 | * @Description 功能说明 历史数据输入校验 | 23 | * @Description 功能说明 历史数据输入校验 |
| 24 | * @Date 2024/11/5 | 24 | * @Date 2024/11/5 |
| 25 | * @param bo | 25 | * @param bo |
| 26 | - * @return com.fedex.connect.common.dependencies.date.vo.ResponseResultVo | 26 | + * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo |
| 27 | */ | 27 | */ |
| 28 | - public ResponseResultVo preCheckForFindHistory(LongBo bo){ | 28 | + public ResponseVo preCheckForFindHistory(LongBo bo){ |
| 29 | if (bo == null || bo.getId() == null){ | 29 | if (bo == null || bo.getId() == null){ |
| 30 | - return ResponseResultVo.fail(localeMessageUtil.getMessage(ResponseCode.REQUEST_PARAM_NULL.getMsg())); | 30 | + return ResponseVo.fail(localeMessageUtil.getMessage(ResponseCode.REQUEST_PARAM_NULL.getMsg())); |
| 31 | } | 31 | } |
| 32 | return null; | 32 | return null; |
| 33 | } | 33 | } | ... | ... |
| 1 | package com.fedex.connect.customer.validate.controller.biz; | 1 | package com.fedex.connect.customer.validate.controller.biz; |
| 2 | 2 | ||
| 3 | -import com.fedex.connect.common.dependencies.date.vo.ResponseResultVo; | 3 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 4 | import com.fedex.connect.common.dependencies.enums.ResponseCode; | 4 | import com.fedex.connect.common.dependencies.enums.ResponseCode; |
| 5 | import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; | 5 | import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; |
| 6 | import com.fedex.connect.customer.data.bo.AddBo; | 6 | import com.fedex.connect.customer.data.bo.AddBo; |
| ... | @@ -24,13 +24,13 @@ public class ConsignmentValidate { | ... | @@ -24,13 +24,13 @@ public class ConsignmentValidate { |
| 24 | * @Description 功能说明 添加运单校验 | 24 | * @Description 功能说明 添加运单校验 |
| 25 | * @Date 2024/11/5 | 25 | * @Date 2024/11/5 |
| 26 | * @param bo | 26 | * @param bo |
| 27 | - * @return com.fedex.connect.common.dependencies.date.vo.ResponseResultVo | 27 | + * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo |
| 28 | */ | 28 | */ |
| 29 | - public ResponseResultVo preCheckAdd(AddBo bo){ | 29 | + public ResponseVo preCheckAdd(AddBo bo){ |
| 30 | if (bo == null || StringUtils.isEmpty(bo.getAccountNo()) || StringUtils.isEmpty(bo.getConsignmentCode()) || | 30 | if (bo == null || StringUtils.isEmpty(bo.getAccountNo()) || StringUtils.isEmpty(bo.getConsignmentCode()) || |
| 31 | StringUtils.isEmpty(bo.getRecipientCountry()) || StringUtils.isEmpty(bo.getShipperAccount()) || | 31 | StringUtils.isEmpty(bo.getRecipientCountry()) || StringUtils.isEmpty(bo.getShipperAccount()) || |
| 32 | StringUtils.isEmpty(bo.getShipperCountry())){ | 32 | StringUtils.isEmpty(bo.getShipperCountry())){ |
| 33 | - return ResponseResultVo.fail(localeMessageUtil.getMessage(ResponseCode.REQUEST_PARAM_NULL.getMsg())); | 33 | + return ResponseVo.fail(localeMessageUtil.getMessage(ResponseCode.REQUEST_PARAM_NULL.getMsg())); |
| 34 | } | 34 | } |
| 35 | return null; | 35 | return null; |
| 36 | } | 36 | } | ... | ... |
| 1 | package com.fedex.connect.common.dependencies.authentication.exception; | 1 | package com.fedex.connect.common.dependencies.authentication.exception; |
| 2 | 2 | ||
| 3 | -import com.fedex.connect.common.dependencies.date.vo.ResponseResultVo; | 3 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 4 | import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; | 4 | import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; |
| 5 | import com.fedex.connect.common.dependencies.util.SpringBeanUtil; | 5 | import com.fedex.connect.common.dependencies.util.SpringBeanUtil; |
| 6 | import com.google.gson.Gson; | 6 | import com.google.gson.Gson; |
| ... | @@ -24,7 +24,7 @@ public class JwtAccessDeniedHandler implements AccessDeniedHandler { | ... | @@ -24,7 +24,7 @@ public class JwtAccessDeniedHandler implements AccessDeniedHandler { |
| 24 | public void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException accessDeniedException) throws IOException { | 24 | public void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException accessDeniedException) throws IOException { |
| 25 | response.setCharacterEncoding("UTF-8"); | 25 | response.setCharacterEncoding("UTF-8"); |
| 26 | response.setContentType("application/json"); | 26 | response.setContentType("application/json"); |
| 27 | - ResponseResultVo result = new ResponseResultVo(); | 27 | + ResponseVo result = new ResponseVo(); |
| 28 | result.setCode(HttpServletResponse.SC_FORBIDDEN); | 28 | result.setCode(HttpServletResponse.SC_FORBIDDEN); |
| 29 | //使用context手动注入 | 29 | //使用context手动注入 |
| 30 | LocaleMessageUtil localeMessageUtil = SpringBeanUtil.getBean(LocaleMessageUtil.class); | 30 | LocaleMessageUtil localeMessageUtil = SpringBeanUtil.getBean(LocaleMessageUtil.class); | ... | ... |
| 1 | package com.fedex.connect.common.dependencies.authentication.exception; | 1 | package com.fedex.connect.common.dependencies.authentication.exception; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | -import com.fedex.connect.common.dependencies.date.vo.ResponseResultVo; | 4 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 5 | import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; | 5 | import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; |
| 6 | import com.fedex.connect.common.dependencies.util.SpringBeanUtil; | 6 | import com.fedex.connect.common.dependencies.util.SpringBeanUtil; |
| 7 | import com.google.gson.Gson; | 7 | import com.google.gson.Gson; |
| ... | @@ -26,7 +26,7 @@ public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint { | ... | @@ -26,7 +26,7 @@ public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint { |
| 26 | 26 | ||
| 27 | response.setCharacterEncoding("UTF-8"); | 27 | response.setCharacterEncoding("UTF-8"); |
| 28 | response.setContentType("application/json"); | 28 | response.setContentType("application/json"); |
| 29 | - ResponseResultVo result = new ResponseResultVo(); | 29 | + ResponseVo result = new ResponseVo(); |
| 30 | result.setCode(HttpServletResponse.SC_UNAUTHORIZED); | 30 | result.setCode(HttpServletResponse.SC_UNAUTHORIZED); |
| 31 | //使用context手动注入 | 31 | //使用context手动注入 |
| 32 | LocaleMessageUtil localeMessageUtil = SpringBeanUtil.getBean(LocaleMessageUtil.class); | 32 | LocaleMessageUtil localeMessageUtil = SpringBeanUtil.getBean(LocaleMessageUtil.class); | ... | ... |
| 1 | +package com.fedex.connect.common.dependencies.config; | ||
| 2 | + | ||
| 3 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; | ||
| 4 | +import com.fedex.connect.common.dependencies.exception.BaseException; | ||
| 5 | +import com.fedex.connect.common.dependencies.exception.OpErrorException; | ||
| 6 | +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | ||
| 7 | +import org.springframework.web.bind.annotation.ExceptionHandler; | ||
| 8 | +import org.springframework.web.bind.annotation.RestControllerAdvice; | ||
| 9 | + | ||
| 10 | +@ConditionalOnProperty(prefix = "common.exception-advice-webconfig", name = "enable", havingValue = "true") | ||
| 11 | +@RestControllerAdvice | ||
| 12 | +public class ControllerExceptionAdvice { | ||
| 13 | + | ||
| 14 | + @ExceptionHandler(Exception.class) | ||
| 15 | + public ResponseVo exceptionHandler(Exception ex) { | ||
| 16 | + ResponseVo res = new ResponseVo(); | ||
| 17 | + res.setSuccess(false); | ||
| 18 | + res.setCode(599); | ||
| 19 | + res.setMsg("system error"); | ||
| 20 | + return res; | ||
| 21 | + } | ||
| 22 | + | ||
| 23 | + @ExceptionHandler(BaseException.class) | ||
| 24 | + public ResponseVo baseExceptionHandler(BaseException ex) { | ||
| 25 | + ResponseVo res = new ResponseVo(); | ||
| 26 | + res.setSuccess(false); | ||
| 27 | + res.setCode(ex.getCode().intValue()); | ||
| 28 | + res.setMsg(ex.getMessage()); | ||
| 29 | + return res; | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + @ExceptionHandler(OpErrorException.class) | ||
| 33 | + public ResponseVo opErrorExceptionHandler(OpErrorException ex) { | ||
| 34 | + ResponseVo res = new ResponseVo(); | ||
| 35 | + res.setSuccess(false); | ||
| 36 | + res.setCode(ex.getCode()); | ||
| 37 | + res.setMsg(ex.getMessage()); | ||
| 38 | + return res; | ||
| 39 | + } | ||
| 40 | +} |
| 1 | -package com.fedex.connect.common.dependencies.config; | ||
| 2 | - | ||
| 3 | -import com.fedex.connect.common.model.bi.DictionaryEntries; | ||
| 4 | - | ||
| 5 | -import java.util.List; | ||
| 6 | - | ||
| 7 | -public class DictionaryProvider { | ||
| 8 | - // 用于存储字典数据的静态列表 | ||
| 9 | - private static List<DictionaryEntries> dictionaryData; | ||
| 10 | - | ||
| 11 | - // 设置字典数据的方法 | ||
| 12 | - public static void setDictionaryData(List<DictionaryEntries> data) { | ||
| 13 | - dictionaryData = data; | ||
| 14 | - } | ||
| 15 | - | ||
| 16 | - // 获取字典数据的方法 | ||
| 17 | - public static List<DictionaryEntries> getDictionaryData() { | ||
| 18 | - return dictionaryData; | ||
| 19 | - } | ||
| 20 | -} |
| ... | @@ -9,7 +9,7 @@ import javax.servlet.http.HttpServletResponse; | ... | @@ -9,7 +9,7 @@ import javax.servlet.http.HttpServletResponse; |
| 9 | * @Description 类说明 响应结果vo | 9 | * @Description 类说明 响应结果vo |
| 10 | * @Date 2024/10/30 | 10 | * @Date 2024/10/30 |
| 11 | */ | 11 | */ |
| 12 | -public class ResponseResultVo<T> { | 12 | +public class ResponseVo<T> { |
| 13 | 13 | ||
| 14 | private int code = HttpServletResponse.SC_BAD_REQUEST;; | 14 | private int code = HttpServletResponse.SC_BAD_REQUEST;; |
| 15 | private String msg; | 15 | private String msg; |
| ... | @@ -48,16 +48,16 @@ public class ResponseResultVo<T> { | ... | @@ -48,16 +48,16 @@ public class ResponseResultVo<T> { |
| 48 | this.data = data; | 48 | this.data = data; |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | - public static ResponseResultVo succ(Object data, String message) { | 51 | + public static ResponseVo succ(Object data, String message) { |
| 52 | return succ(ResponseCode.SUCCESS_CODE.getCode(), message, data); | 52 | return succ(ResponseCode.SUCCESS_CODE.getCode(), message, data); |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | - public static ResponseResultVo succ(Object data) { | 55 | + public static ResponseVo succ(Object data) { |
| 56 | return succ(ResponseCode.SUCCESS_CODE.getCode(), "SUCCESS", data); | 56 | return succ(ResponseCode.SUCCESS_CODE.getCode(), "SUCCESS", data); |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | - public static ResponseResultVo succ(int code, String msg, Object data) { | 59 | + public static ResponseVo succ(int code, String msg, Object data) { |
| 60 | - ResponseResultVo r = new ResponseResultVo(); | 60 | + ResponseVo r = new ResponseVo(); |
| 61 | r.setCode(code); | 61 | r.setCode(code); |
| 62 | r.setMsg(msg); | 62 | r.setMsg(msg); |
| 63 | r.setSuccess(true); | 63 | r.setSuccess(true); |
| ... | @@ -65,12 +65,12 @@ public class ResponseResultVo<T> { | ... | @@ -65,12 +65,12 @@ public class ResponseResultVo<T> { |
| 65 | return r; | 65 | return r; |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | - public static ResponseResultVo fail(String msg) { | 68 | + public static ResponseVo fail(String msg) { |
| 69 | return fail(ResponseCode.FAIL_CODE.getCode(), msg,null); | 69 | return fail(ResponseCode.FAIL_CODE.getCode(), msg,null); |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | - public static ResponseResultVo fail(int code, String msg, Object data) { | 72 | + public static ResponseVo fail(int code, String msg, Object data) { |
| 73 | - ResponseResultVo r = new ResponseResultVo(); | 73 | + ResponseVo r = new ResponseVo(); |
| 74 | r.setCode(code); | 74 | r.setCode(code); |
| 75 | r.setMsg(msg); | 75 | r.setMsg(msg); |
| 76 | r.setSuccess(false); | 76 | r.setSuccess(false); |
| ... | @@ -78,11 +78,11 @@ public class ResponseResultVo<T> { | ... | @@ -78,11 +78,11 @@ public class ResponseResultVo<T> { |
| 78 | return r; | 78 | return r; |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | - public static ResponseResultVo fail(ResponseCode resultCode) { | 81 | + public static ResponseVo fail(ResponseCode resultCode) { |
| 82 | return fail(resultCode.getCode(), resultCode.getMsg(), null); | 82 | return fail(resultCode.getCode(), resultCode.getMsg(), null); |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | - public static ResponseResultVo fail(ResponseCode resultCode, Object data) { | 85 | + public static ResponseVo fail(ResponseCode resultCode, Object data) { |
| 86 | return fail(resultCode.getCode(), resultCode.getMsg(), data); | 86 | return fail(resultCode.getCode(), resultCode.getMsg(), data); |
| 87 | } | 87 | } |
| 88 | } | 88 | } | ... | ... |
| 1 | +package com.fedex.connect.common.dependencies.exception; | ||
| 2 | + | ||
| 3 | +public class BaseException extends RuntimeException { | ||
| 4 | + private Integer code; | ||
| 5 | + | ||
| 6 | + public Integer getCode() { | ||
| 7 | + return code; | ||
| 8 | + } | ||
| 9 | + | ||
| 10 | + public BaseException(Integer code, String message) { | ||
| 11 | + super(message); | ||
| 12 | + this.code = code; | ||
| 13 | + } | ||
| 14 | +} |
| 1 | +package com.fedex.connect.common.dependencies.exception; | ||
| 2 | + | ||
| 3 | +public class OpErrorException extends RuntimeException { | ||
| 4 | + private int code; | ||
| 5 | + | ||
| 6 | + public int getCode() { | ||
| 7 | + return code; | ||
| 8 | + } | ||
| 9 | + | ||
| 10 | + public OpErrorException(int code, String message) { | ||
| 11 | + super(message); | ||
| 12 | + this.code = code; | ||
| 13 | + } | ||
| 14 | + | ||
| 15 | + public OpErrorException(int code, String message,Throwable e) { | ||
| 16 | + super(message,e); | ||
| 17 | + this.code = code; | ||
| 18 | + } | ||
| 19 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -19,7 +19,6 @@ public class LocaleMessageUtil { | ... | @@ -19,7 +19,6 @@ public class LocaleMessageUtil { |
| 19 | public LocaleMessageUtil() { | 19 | public LocaleMessageUtil() { |
| 20 | } | 20 | } |
| 21 | 21 | ||
| 22 | - | ||
| 23 | public String getMessage(String code) { | 22 | public String getMessage(String code) { |
| 24 | return this.getConnectorMessage(code, null); | 23 | return this.getConnectorMessage(code, null); |
| 25 | } | 24 | } | ... | ... |
| ... | @@ -8,7 +8,7 @@ import com.fedex.connect.kafka.repository.dao.CeInfoMapperExt; | ... | @@ -8,7 +8,7 @@ import com.fedex.connect.kafka.repository.dao.CeInfoMapperExt; |
| 8 | import com.fedex.connect.kafka.repository.dao.KafkaTemporaryStorageMapperExt; | 8 | import com.fedex.connect.kafka.repository.dao.KafkaTemporaryStorageMapperExt; |
| 9 | import org.springframework.beans.factory.annotation.Autowired; | 9 | import org.springframework.beans.factory.annotation.Autowired; |
| 10 | 10 | ||
| 11 | -public class AbstractDaoRepository { | 11 | +public class BaseRepository { |
| 12 | @Autowired | 12 | @Autowired |
| 13 | protected KafkaTemporaryStorageMapper kafkaTemporaryStorageMapper; | 13 | protected KafkaTemporaryStorageMapper kafkaTemporaryStorageMapper; |
| 14 | @Autowired | 14 | @Autowired | ... | ... |
| 1 | package com.fedex.connect.kafka.repository.repo.impl; | 1 | package com.fedex.connect.kafka.repository.repo.impl; |
| 2 | 2 | ||
| 3 | import com.fedex.connect.common.model.biz.CeInfo; | 3 | import com.fedex.connect.common.model.biz.CeInfo; |
| 4 | -import com.fedex.connect.kafka.repository.base.AbstractDaoRepository; | 4 | +import com.fedex.connect.kafka.repository.base.BaseRepository; |
| 5 | import com.fedex.connect.kafka.repository.repo.ICeInfoRepository; | 5 | import com.fedex.connect.kafka.repository.repo.ICeInfoRepository; |
| 6 | import org.springframework.stereotype.Repository; | 6 | import org.springframework.stereotype.Repository; |
| 7 | 7 | ||
| ... | @@ -15,7 +15,7 @@ import java.util.List; | ... | @@ -15,7 +15,7 @@ import java.util.List; |
| 15 | * @Date 2024/4/22 | 15 | * @Date 2024/4/22 |
| 16 | */ | 16 | */ |
| 17 | @Repository | 17 | @Repository |
| 18 | -public class CeInfoRepositoryImpl extends AbstractDaoRepository implements ICeInfoRepository { | 18 | +public class CeInfoRepositoryImpl extends BaseRepository implements ICeInfoRepository { |
| 19 | @Override | 19 | @Override |
| 20 | public CeInfo save(CeInfo entity) { | 20 | public CeInfo save(CeInfo entity) { |
| 21 | if(entity != null) { | 21 | if(entity != null) { | ... | ... |
| ... | @@ -3,7 +3,7 @@ package com.fedex.connect.kafka.repository.repo.impl; | ... | @@ -3,7 +3,7 @@ package com.fedex.connect.kafka.repository.repo.impl; |
| 3 | import com.fedex.connect.common.dependencies.util.Utils; | 3 | import com.fedex.connect.common.dependencies.util.Utils; |
| 4 | import com.fedex.connect.common.model.biz.Consignment; | 4 | import com.fedex.connect.common.model.biz.Consignment; |
| 5 | import com.fedex.connect.common.model.biz.ConsignmentExample; | 5 | import com.fedex.connect.common.model.biz.ConsignmentExample; |
| 6 | -import com.fedex.connect.kafka.repository.base.AbstractDaoRepository; | 6 | +import com.fedex.connect.kafka.repository.base.BaseRepository; |
| 7 | import com.fedex.connect.kafka.repository.repo.IConsignmentRepository; | 7 | import com.fedex.connect.kafka.repository.repo.IConsignmentRepository; |
| 8 | import lombok.extern.slf4j.Slf4j; | 8 | import lombok.extern.slf4j.Slf4j; |
| 9 | import org.springframework.stereotype.Repository; | 9 | import org.springframework.stereotype.Repository; |
| ... | @@ -14,7 +14,7 @@ import java.util.List; | ... | @@ -14,7 +14,7 @@ import java.util.List; |
| 14 | 14 | ||
| 15 | @Slf4j | 15 | @Slf4j |
| 16 | @Repository | 16 | @Repository |
| 17 | -public class ConsignmentRepositoryImpl extends AbstractDaoRepository implements IConsignmentRepository { | 17 | +public class ConsignmentRepositoryImpl extends BaseRepository implements IConsignmentRepository { |
| 18 | @Override | 18 | @Override |
| 19 | public Consignment save(Consignment entity) { | 19 | public Consignment save(Consignment entity) { |
| 20 | if(entity != null) { | 20 | if(entity != null) { | ... | ... |
| 1 | package com.fedex.connect.kafka.repository.repo.impl; | 1 | package com.fedex.connect.kafka.repository.repo.impl; |
| 2 | 2 | ||
| 3 | import com.fedex.connect.common.model.sys.KafkaStorageHistory; | 3 | import com.fedex.connect.common.model.sys.KafkaStorageHistory; |
| 4 | -import com.fedex.connect.kafka.repository.base.AbstractDaoRepository; | 4 | +import com.fedex.connect.kafka.repository.base.BaseRepository; |
| 5 | import com.fedex.connect.kafka.repository.repo.IKafkaStorageHistoryRepository; | 5 | import com.fedex.connect.kafka.repository.repo.IKafkaStorageHistoryRepository; |
| 6 | import org.springframework.stereotype.Repository; | 6 | import org.springframework.stereotype.Repository; |
| 7 | 7 | ||
| ... | @@ -13,7 +13,7 @@ import java.util.List; | ... | @@ -13,7 +13,7 @@ import java.util.List; |
| 13 | * 2022年11月3日15:30:53 | 13 | * 2022年11月3日15:30:53 |
| 14 | */ | 14 | */ |
| 15 | @Repository | 15 | @Repository |
| 16 | -public class KafkaStorageHistoryRepositoryImpl extends AbstractDaoRepository implements IKafkaStorageHistoryRepository { | 16 | +public class KafkaStorageHistoryRepositoryImpl extends BaseRepository implements IKafkaStorageHistoryRepository { |
| 17 | @Override | 17 | @Override |
| 18 | public KafkaStorageHistory save(KafkaStorageHistory entity){ | 18 | public KafkaStorageHistory save(KafkaStorageHistory entity){ |
| 19 | if(entity != null) { | 19 | if(entity != null) { | ... | ... |
| 1 | package com.fedex.connect.kafka.repository.repo.impl; | 1 | package com.fedex.connect.kafka.repository.repo.impl; |
| 2 | 2 | ||
| 3 | import com.fedex.connect.common.model.sys.KafkaTemporaryStorage; | 3 | import com.fedex.connect.common.model.sys.KafkaTemporaryStorage; |
| 4 | -import com.fedex.connect.kafka.repository.base.AbstractDaoRepository; | 4 | +import com.fedex.connect.kafka.repository.base.BaseRepository; |
| 5 | import com.fedex.connect.kafka.repository.repo.IKafkaTemporaryStorageRepository; | 5 | import com.fedex.connect.kafka.repository.repo.IKafkaTemporaryStorageRepository; |
| 6 | import org.springframework.stereotype.Repository; | 6 | import org.springframework.stereotype.Repository; |
| 7 | 7 | ||
| ... | @@ -13,7 +13,7 @@ import java.util.List; | ... | @@ -13,7 +13,7 @@ import java.util.List; |
| 13 | * 2022年11月3日15:30:53 | 13 | * 2022年11月3日15:30:53 |
| 14 | */ | 14 | */ |
| 15 | @Repository | 15 | @Repository |
| 16 | -public class KafkaTemporaryStorageRepositoryImpl extends AbstractDaoRepository implements IKafkaTemporaryStorageRepository { | 16 | +public class KafkaTemporaryStorageRepositoryImpl extends BaseRepository implements IKafkaTemporaryStorageRepository { |
| 17 | 17 | ||
| 18 | @Override | 18 | @Override |
| 19 | public void updateKafkaTemporaryStorageById(String consCode, String remark, Long id) { | 19 | public void updateKafkaTemporaryStorageById(String consCode, String remark, Long id) { | ... | ... |
| 1 | package com.fedex.connect.kafka.util; | 1 | package com.fedex.connect.kafka.util; |
| 2 | 2 | ||
| 3 | -import com.fedex.connect.common.dependencies.config.CacheSystem; | 3 | +import com.fedex.connect.common.dependencies.cache.CacheSystem; |
| 4 | import com.fedex.connect.common.dependencies.enums.biz.ConsignmentStatusEnum; | 4 | import com.fedex.connect.common.dependencies.enums.biz.ConsignmentStatusEnum; |
| 5 | import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils; | 5 | import com.fedex.connect.common.dependencies.util.AssignmentFieldUtils; |
| 6 | import com.fedex.connect.common.dependencies.util.DateUtil; | 6 | import com.fedex.connect.common.dependencies.util.DateUtil; | ... | ... |
| 1 | -package com.fedex.connect.manager.controller; | ||
| 2 | - | ||
| 3 | - | ||
| 4 | -import com.fedex.connect.common.dependencies.date.vo.ResponseResultVo; | ||
| 5 | -import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; | ||
| 6 | -import com.fedex.connect.manager.config.PropertiesConfig; | ||
| 7 | -import com.fedex.connect.manager.controller.log.ILogLoginService; | ||
| 8 | -import com.fedex.connect.manager.service.sys.ISysAuthService; | ||
| 9 | -import com.fedex.connect.manager.service.sys.ISysUserService; | ||
| 10 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 11 | -import org.springframework.http.HttpHeaders; | ||
| 12 | -import org.springframework.http.HttpStatus; | ||
| 13 | -import org.springframework.http.ResponseEntity; | ||
| 14 | -import org.springframework.util.MultiValueMap; | ||
| 15 | - | ||
| 16 | -import javax.annotation.Resource; | ||
| 17 | -import java.net.URI; | ||
| 18 | -import java.util.Objects; | ||
| 19 | - | ||
| 20 | -/** | ||
| 21 | - * @author EDY | ||
| 22 | - */ | ||
| 23 | -public class AbstractEtController { | ||
| 24 | - | ||
| 25 | - @Resource | ||
| 26 | - protected LocaleMessageUtil localeMessageUtil; | ||
| 27 | - | ||
| 28 | - @Autowired | ||
| 29 | - protected PropertiesConfig propertiesConfig; | ||
| 30 | - | ||
| 31 | - @Autowired | ||
| 32 | - protected ISysUserService sysUserService; | ||
| 33 | - | ||
| 34 | - @Autowired | ||
| 35 | - protected ISysAuthService sysAuthService; | ||
| 36 | - | ||
| 37 | - @Autowired | ||
| 38 | - protected ILogLoginService logLoginService; | ||
| 39 | - | ||
| 40 | - public <T> ResponseEntity<T> seeOther(String url) { | ||
| 41 | - HttpHeaders httpHeaders = new HttpHeaders(); | ||
| 42 | - httpHeaders.setLocation(URI.create(url)); | ||
| 43 | - return result(HttpStatus.SEE_OTHER, httpHeaders); | ||
| 44 | - } | ||
| 45 | - | ||
| 46 | - public <T> ResponseEntity<T> temporaryRedirect(String url) { | ||
| 47 | - HttpHeaders httpHeaders = new HttpHeaders(); | ||
| 48 | - httpHeaders.setLocation(URI.create(url)); | ||
| 49 | - return result(HttpStatus.TEMPORARY_REDIRECT, httpHeaders); | ||
| 50 | - } | ||
| 51 | - | ||
| 52 | - public <T> ResponseEntity<T> permanentRedirect(String url) { | ||
| 53 | - HttpHeaders httpHeaders = new HttpHeaders(); | ||
| 54 | - httpHeaders.setLocation(URI.create(url)); | ||
| 55 | - return result(HttpStatus.PERMANENT_REDIRECT, httpHeaders); | ||
| 56 | - } | ||
| 57 | - | ||
| 58 | - public <T> ResponseEntity<T> result(HttpStatus status, T data) { | ||
| 59 | - return new ResponseEntity<>(data, status); | ||
| 60 | - } | ||
| 61 | - | ||
| 62 | - public <T> ResponseEntity<T> result(HttpStatus status, HttpHeaders headers) { | ||
| 63 | - return new ResponseEntity<>(headers, status); | ||
| 64 | - } | ||
| 65 | - | ||
| 66 | - public <T> ResponseEntity<T> ok(T data) { | ||
| 67 | - return new ResponseEntity<>(data, HttpStatus.OK); | ||
| 68 | - } | ||
| 69 | - | ||
| 70 | - public <T> ResponseEntity<T> ok(MultiValueMap<String, String> headers, T data) { | ||
| 71 | - return new ResponseEntity<>(data, headers, HttpStatus.OK); | ||
| 72 | - } | ||
| 73 | - | ||
| 74 | - public <T> ResponseEntity<T> error(HttpStatus code) { | ||
| 75 | - return new ResponseEntity<>(code); | ||
| 76 | - } | ||
| 77 | - | ||
| 78 | - | ||
| 79 | - public <T> ResponseEntity<T> error(HttpStatus code, MultiValueMap<String, String> headers) { | ||
| 80 | - return new ResponseEntity<>(headers, code); | ||
| 81 | - } | ||
| 82 | - | ||
| 83 | - | ||
| 84 | - /** | ||
| 85 | - * 通过自定义的错误码,转换为对应的HttpStatus | ||
| 86 | - * @param response | ||
| 87 | - * @return | ||
| 88 | - */ | ||
| 89 | - public HttpStatus errorMappingStatus(ResponseResultVo response) { | ||
| 90 | - if (Objects.isNull(response)) { | ||
| 91 | - return HttpStatus.BAD_REQUEST; //400 | ||
| 92 | - } | ||
| 93 | - return HttpStatus.BAD_REQUEST; //400 | ||
| 94 | - } | ||
| 95 | - | ||
| 96 | - | ||
| 97 | - /** | ||
| 98 | - * 判定是否返回成功 | ||
| 99 | - * @param responseEntity | ||
| 100 | - * @param <T> | ||
| 101 | - * @return | ||
| 102 | - */ | ||
| 103 | - public <T> boolean isSuccess(ResponseEntity<ResponseResultVo<T>> responseEntity) { | ||
| 104 | - return responseEntity != null && responseEntity.getBody() != null && responseEntity.getBody().isSuccess(); | ||
| 105 | - } | ||
| 106 | - | ||
| 107 | - /** | ||
| 108 | - * 判定是否返回成功 | ||
| 109 | - * @param response | ||
| 110 | - * @param <T> | ||
| 111 | - * @return | ||
| 112 | - */ | ||
| 113 | - public <T> boolean isSuccess(ResponseResultVo<T> response) { | ||
| 114 | - return response != null && response.isSuccess(); | ||
| 115 | - } | ||
| 116 | - | ||
| 117 | -} |
server/manager-server/src/main/java/com/fedex/connect/manager/controller/base/BaseController.java
0 → 100644
| 1 | +package com.fedex.connect.manager.controller.base; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import com.fedex.connect.common.dependencies.i18n.LocaleMessageUtil; | ||
| 5 | +import com.fedex.connect.manager.config.PropertiesConfig; | ||
| 6 | +import com.fedex.connect.manager.service.log.ILogLoginService; | ||
| 7 | +import com.fedex.connect.manager.service.sys.ISysAuthService; | ||
| 8 | +import com.fedex.connect.manager.service.sys.ISysUserService; | ||
| 9 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 10 | + | ||
| 11 | +import javax.annotation.Resource; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * @author EDY | ||
| 15 | + */ | ||
| 16 | +public class BaseController { | ||
| 17 | + @Resource | ||
| 18 | + protected LocaleMessageUtil localeMessageUtil; | ||
| 19 | + @Autowired | ||
| 20 | + protected PropertiesConfig propertiesConfig; | ||
| 21 | + @Autowired | ||
| 22 | + protected ISysUserService sysUserService; | ||
| 23 | + @Autowired | ||
| 24 | + protected ISysAuthService sysAuthService; | ||
| 25 | + @Autowired | ||
| 26 | + protected ILogLoginService logLoginService; | ||
| 27 | +} |
| 1 | package com.fedex.connect.manager.controller.bi.impl; | 1 | package com.fedex.connect.manager.controller.bi.impl; |
| 2 | 2 | ||
| 3 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; | ||
| 3 | import io.swagger.annotations.Api; | 4 | import io.swagger.annotations.Api; |
| 5 | +import io.swagger.annotations.ApiOperation; | ||
| 6 | +import org.springframework.web.bind.annotation.PostMapping; | ||
| 4 | import org.springframework.web.bind.annotation.RequestMapping; | 7 | import org.springframework.web.bind.annotation.RequestMapping; |
| 5 | import org.springframework.web.bind.annotation.RestController; | 8 | import org.springframework.web.bind.annotation.RestController; |
| 6 | 9 | ||
| ... | @@ -9,4 +12,9 @@ import org.springframework.web.bind.annotation.RestController; | ... | @@ -9,4 +12,9 @@ import org.springframework.web.bind.annotation.RestController; |
| 9 | @Api(value="DicEntriesController",tags={"字典相关操作"}) | 12 | @Api(value="DicEntriesController",tags={"字典相关操作"}) |
| 10 | public class DicEntriesController { | 13 | public class DicEntriesController { |
| 11 | 14 | ||
| 15 | + @PostMapping("/init") | ||
| 16 | + @ApiOperation(value = "初始化进入首页获取FCL登录地址") | ||
| 17 | + public ResponseVo init(){ | ||
| 18 | + return ResponseVo.succ(fclIndexLoginUrl); | ||
| 19 | + } | ||
| 12 | } | 20 | } | ... | ... |
| ... | @@ -2,13 +2,13 @@ package com.fedex.connect.manager.controller.sys.impl; | ... | @@ -2,13 +2,13 @@ package com.fedex.connect.manager.controller.sys.impl; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | import com.fedex.connect.common.dependencies.contants.DatabaseConstants; | 4 | import com.fedex.connect.common.dependencies.contants.DatabaseConstants; |
| 5 | -import com.fedex.connect.common.dependencies.date.vo.ResponseResultVo; | 5 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 6 | import com.fedex.connect.common.dependencies.util.GsonUtils; | 6 | import com.fedex.connect.common.dependencies.util.GsonUtils; |
| 7 | import com.fedex.connect.common.dependencies.util.StringExtUtil; | 7 | import com.fedex.connect.common.dependencies.util.StringExtUtil; |
| 8 | import com.fedex.connect.common.dependencies.util.Utils; | 8 | import com.fedex.connect.common.dependencies.util.Utils; |
| 9 | import com.fedex.connect.common.model.sys.User; | 9 | import com.fedex.connect.common.model.sys.User; |
| 10 | import com.fedex.connect.manager.common.enums.FCLSessionInfoEnum; | 10 | import com.fedex.connect.manager.common.enums.FCLSessionInfoEnum; |
| 11 | -import com.fedex.connect.manager.controller.AbstractEtController; | 11 | +import com.fedex.connect.manager.controller.base.BaseController; |
| 12 | import com.fedex.connect.manager.controller.sys.ISysAuthController; | 12 | import com.fedex.connect.manager.controller.sys.ISysAuthController; |
| 13 | import com.fedex.connect.manager.data.dto.LogLoginDto; | 13 | import com.fedex.connect.manager.data.dto.LogLoginDto; |
| 14 | import com.fedex.connect.manager.data.dto.LoginRequest; | 14 | import com.fedex.connect.manager.data.dto.LoginRequest; |
| ... | @@ -18,8 +18,6 @@ import io.swagger.annotations.Api; | ... | @@ -18,8 +18,6 @@ import io.swagger.annotations.Api; |
| 18 | import io.swagger.annotations.ApiOperation; | 18 | import io.swagger.annotations.ApiOperation; |
| 19 | import lombok.extern.slf4j.Slf4j; | 19 | import lombok.extern.slf4j.Slf4j; |
| 20 | import org.apache.commons.lang3.StringUtils; | 20 | import org.apache.commons.lang3.StringUtils; |
| 21 | -import org.slf4j.Logger; | ||
| 22 | -import org.slf4j.LoggerFactory; | ||
| 23 | import org.springframework.beans.factory.annotation.Value; | 21 | import org.springframework.beans.factory.annotation.Value; |
| 24 | import org.springframework.web.bind.annotation.GetMapping; | 22 | import org.springframework.web.bind.annotation.GetMapping; |
| 25 | import org.springframework.web.bind.annotation.PostMapping; | 23 | import org.springframework.web.bind.annotation.PostMapping; |
| ... | @@ -37,7 +35,7 @@ import java.util.*; | ... | @@ -37,7 +35,7 @@ import java.util.*; |
| 37 | @RestController | 35 | @RestController |
| 38 | @RequestMapping(value = "/auth", name = "权鉴操作相关请求") | 36 | @RequestMapping(value = "/auth", name = "权鉴操作相关请求") |
| 39 | @Api(value="SysAuthController",tags={"用户相关请求(无需token)"}) | 37 | @Api(value="SysAuthController",tags={"用户相关请求(无需token)"}) |
| 40 | -public class SysAuthControllerImpl extends AbstractEtController implements ISysAuthController { | 38 | +public class SysAuthControllerImpl extends BaseController implements ISysAuthController { |
| 41 | 39 | ||
| 42 | 40 | ||
| 43 | @Value("${fcl.interface.logurl}") | 41 | @Value("${fcl.interface.logurl}") |
| ... | @@ -45,8 +43,8 @@ public class SysAuthControllerImpl extends AbstractEtController implements ISysA | ... | @@ -45,8 +43,8 @@ public class SysAuthControllerImpl extends AbstractEtController implements ISysA |
| 45 | 43 | ||
| 46 | @PostMapping("/init") | 44 | @PostMapping("/init") |
| 47 | @ApiOperation(value = "初始化进入首页获取FCL登录地址") | 45 | @ApiOperation(value = "初始化进入首页获取FCL登录地址") |
| 48 | - public ResponseResultVo init(){ | 46 | + public ResponseVo init(){ |
| 49 | - return ResponseResultVo.succ(fclIndexLoginUrl); | 47 | + return ResponseVo.succ(fclIndexLoginUrl); |
| 50 | } | 48 | } |
| 51 | 49 | ||
| 52 | 50 | ||
| ... | @@ -80,7 +78,7 @@ public class SysAuthControllerImpl extends AbstractEtController implements ISysA | ... | @@ -80,7 +78,7 @@ public class SysAuthControllerImpl extends AbstractEtController implements ISysA |
| 80 | if (cookiesList.size() > 0 && cookiesList.size() == saveKeyList.size()){ | 78 | if (cookiesList.size() > 0 && cookiesList.size() == saveKeyList.size()){ |
| 81 | JsonObject jsonObject = GsonUtils.stringToBean("{"+String.join(",",cookiesList)+"}",JsonObject.class); | 79 | JsonObject jsonObject = GsonUtils.stringToBean("{"+String.join(",",cookiesList)+"}",JsonObject.class); |
| 82 | //set cookie by fcl_key | 80 | //set cookie by fcl_key |
| 83 | - ResponseResultVo tokenResult = sysAuthService.createFclToken(jsonObject); | 81 | + ResponseVo tokenResult = sysAuthService.createFclToken(jsonObject); |
| 84 | if (tokenResult.isSuccess()){ | 82 | if (tokenResult.isSuccess()){ |
| 85 | String fcl_token_key = String.valueOf(tokenResult.getData()); | 83 | String fcl_token_key = String.valueOf(tokenResult.getData()); |
| 86 | String redirectUrl = String.format("%s?token=%s", propertiesConfig.getFclLoginUrl(), fcl_token_key); | 84 | String redirectUrl = String.format("%s?token=%s", propertiesConfig.getFclLoginUrl(), fcl_token_key); |
| ... | @@ -138,7 +136,7 @@ public class SysAuthControllerImpl extends AbstractEtController implements ISysA | ... | @@ -138,7 +136,7 @@ public class SysAuthControllerImpl extends AbstractEtController implements ISysA |
| 138 | //创建token | 136 | //创建token |
| 139 | LoginRequest loginRequest = new LoginRequest(); | 137 | LoginRequest loginRequest = new LoginRequest(); |
| 140 | loginRequest.setRememberMe(true); | 138 | loginRequest.setRememberMe(true); |
| 141 | - ResponseResultVo tokenResult = sysAuthService.createAccessToken(loginRequest, loginUser); | 139 | + ResponseVo tokenResult = sysAuthService.createAccessToken(loginRequest, loginUser); |
| 142 | 140 | ||
| 143 | //记录日志 | 141 | //记录日志 |
| 144 | LogLoginDto dto = new LogLoginDto(loginUser.getId(), DatabaseConstants.USER_OPER_FCL_REGISTER, | 142 | LogLoginDto dto = new LogLoginDto(loginUser.getId(), DatabaseConstants.USER_OPER_FCL_REGISTER, | ... | ... |
| 1 | package com.fedex.connect.manager.data.dto; | 1 | package com.fedex.connect.manager.data.dto; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | -import com.fedex.connect.common.dependencies.date.vo.ResponseResultVo; | 4 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 5 | import com.fedex.connect.common.dependencies.enums.ResponseCode; | 5 | import com.fedex.connect.common.dependencies.enums.ResponseCode; |
| 6 | import com.fedex.connect.common.dependencies.util.Utils; | 6 | import com.fedex.connect.common.dependencies.util.Utils; |
| 7 | import org.apache.commons.lang3.StringUtils; | 7 | import org.apache.commons.lang3.StringUtils; |
| ... | @@ -26,17 +26,17 @@ public class LoginRequest implements Serializable { | ... | @@ -26,17 +26,17 @@ public class LoginRequest implements Serializable { |
| 26 | * @param dto | 26 | * @param dto |
| 27 | * @return | 27 | * @return |
| 28 | */ | 28 | */ |
| 29 | - public static ResponseResultVo validate(LoginRequest dto){ | 29 | + public static ResponseVo validate(LoginRequest dto){ |
| 30 | if (dto == null){ | 30 | if (dto == null){ |
| 31 | - ResponseResultVo.fail(ResponseCode.REQUEST_PARAM_NULL.getMsg()); | 31 | + ResponseVo.fail(ResponseCode.REQUEST_PARAM_NULL.getMsg()); |
| 32 | } | 32 | } |
| 33 | if (StringUtils.isBlank(dto.getAccNo())){ | 33 | if (StringUtils.isBlank(dto.getAccNo())){ |
| 34 | - ResponseResultVo.fail("auth_login_accno_null"); | 34 | + ResponseVo.fail("auth_login_accno_null"); |
| 35 | } | 35 | } |
| 36 | if (StringUtils.isBlank(dto.getPassword())){ | 36 | if (StringUtils.isBlank(dto.getPassword())){ |
| 37 | - ResponseResultVo.fail("auth_login_pwd_null"); | 37 | + ResponseVo.fail("auth_login_pwd_null"); |
| 38 | } | 38 | } |
| 39 | - return ResponseResultVo.succ(null); | 39 | + return ResponseVo.succ(null); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | /** | 42 | /** | ... | ... |
| ... | @@ -12,7 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired; | ... | @@ -12,7 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
| 12 | 12 | ||
| 13 | import javax.annotation.Resource; | 13 | import javax.annotation.Resource; |
| 14 | 14 | ||
| 15 | -public class AbstractEtService { | 15 | +public class BaseService { |
| 16 | 16 | ||
| 17 | @Resource | 17 | @Resource |
| 18 | protected LocaleMessageUtil localeMessageUtil; | 18 | protected LocaleMessageUtil localeMessageUtil; | ... | ... |
| 1 | -package com.fedex.connect.manager.controller.log.impl; | 1 | +package com.fedex.connect.manager.service.log.impl; |
| 2 | 2 | ||
| 3 | -import com.fedex.connect.manager.controller.log.ILogLoginService; | ||
| 4 | import com.fedex.connect.manager.data.dto.LogLoginDto; | 3 | import com.fedex.connect.manager.data.dto.LogLoginDto; |
| 5 | import com.fedex.connect.manager.data.model.LogShowModel; | 4 | import com.fedex.connect.manager.data.model.LogShowModel; |
| 6 | -import com.fedex.connect.manager.service.base.AbstractEtService; | 5 | +import com.fedex.connect.manager.service.base.BaseService; |
| 6 | +import com.fedex.connect.manager.service.log.ILogLoginService; | ||
| 7 | import org.slf4j.Logger; | 7 | import org.slf4j.Logger; |
| 8 | import org.slf4j.LoggerFactory; | 8 | import org.slf4j.LoggerFactory; |
| 9 | import org.springframework.stereotype.Service; | 9 | import org.springframework.stereotype.Service; |
| ... | @@ -14,7 +14,7 @@ import org.springframework.transaction.annotation.Transactional; | ... | @@ -14,7 +14,7 @@ import org.springframework.transaction.annotation.Transactional; |
| 14 | * @author EDY | 14 | * @author EDY |
| 15 | */ | 15 | */ |
| 16 | @Service | 16 | @Service |
| 17 | -public class LogLoginServiceImpl extends AbstractEtService implements ILogLoginService { | 17 | +public class LogLoginServiceImpl extends BaseService implements ILogLoginService { |
| 18 | 18 | ||
| 19 | private Logger logger = LoggerFactory.getLogger(LogLoginServiceImpl.class); | 19 | private Logger logger = LoggerFactory.getLogger(LogLoginServiceImpl.class); |
| 20 | 20 | ... | ... |
| 1 | package com.fedex.connect.manager.service.sys; | 1 | package com.fedex.connect.manager.service.sys; |
| 2 | 2 | ||
| 3 | -import com.fedex.connect.common.dependencies.date.vo.ResponseResultVo; | 3 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 4 | import com.fedex.connect.common.model.sys.User; | 4 | import com.fedex.connect.common.model.sys.User; |
| 5 | import com.fedex.connect.manager.data.dto.LoginRequest; | 5 | import com.fedex.connect.manager.data.dto.LoginRequest; |
| 6 | import com.google.gson.JsonObject; | 6 | import com.google.gson.JsonObject; |
| 7 | 7 | ||
| 8 | public interface ISysAuthService { | 8 | public interface ISysAuthService { |
| 9 | - ResponseResultVo createAccessToken(LoginRequest loginRequest, User user); | 9 | + ResponseVo createAccessToken(LoginRequest loginRequest, User user); |
| 10 | 10 | ||
| 11 | - ResponseResultVo createFclToken(JsonObject token); | 11 | + ResponseVo createFclToken(JsonObject token); |
| 12 | 12 | ||
| 13 | JsonObject getFclToken(String tokenKey); | 13 | JsonObject getFclToken(String tokenKey); |
| 14 | } | 14 | } | ... | ... |
| ... | @@ -4,7 +4,7 @@ import com.fedex.connect.common.dependencies.util.GsonUtils; | ... | @@ -4,7 +4,7 @@ import com.fedex.connect.common.dependencies.util.GsonUtils; |
| 4 | import com.fedex.connect.common.model.sys.RedisSlab; | 4 | import com.fedex.connect.common.model.sys.RedisSlab; |
| 5 | import com.fedex.connect.common.model.sys.RedisSlabExample; | 5 | import com.fedex.connect.common.model.sys.RedisSlabExample; |
| 6 | import com.fedex.connect.manager.data.bo.RedisSlabBo; | 6 | import com.fedex.connect.manager.data.bo.RedisSlabBo; |
| 7 | -import com.fedex.connect.manager.service.base.AbstractEtService; | 7 | +import com.fedex.connect.manager.service.base.BaseService; |
| 8 | import com.fedex.connect.manager.service.sys.IRedisUtilService; | 8 | import com.fedex.connect.manager.service.sys.IRedisUtilService; |
| 9 | import com.google.gson.Gson; | 9 | import com.google.gson.Gson; |
| 10 | import org.slf4j.Logger; | 10 | import org.slf4j.Logger; |
| ... | @@ -17,7 +17,7 @@ import java.util.Optional; | ... | @@ -17,7 +17,7 @@ import java.util.Optional; |
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | @Service | 19 | @Service |
| 20 | -public class RedisUtilServiceImpl extends AbstractEtService implements IRedisUtilService { | 20 | +public class RedisUtilServiceImpl extends BaseService implements IRedisUtilService { |
| 21 | 21 | ||
| 22 | private static Logger logger = LoggerFactory.getLogger(RedisUtilServiceImpl.class); | 22 | private static Logger logger = LoggerFactory.getLogger(RedisUtilServiceImpl.class); |
| 23 | 23 | ... | ... |
| ... | @@ -3,7 +3,7 @@ package com.fedex.connect.manager.service.sys.impl; | ... | @@ -3,7 +3,7 @@ package com.fedex.connect.manager.service.sys.impl; |
| 3 | 3 | ||
| 4 | import com.fedex.connect.common.dependencies.contants.DatabaseConstants; | 4 | import com.fedex.connect.common.dependencies.contants.DatabaseConstants; |
| 5 | import com.fedex.connect.common.dependencies.contants.RedisConstants; | 5 | import com.fedex.connect.common.dependencies.contants.RedisConstants; |
| 6 | -import com.fedex.connect.common.dependencies.date.vo.ResponseResultVo; | 6 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 7 | import com.fedex.connect.common.dependencies.enums.ResponseCode; | 7 | import com.fedex.connect.common.dependencies.enums.ResponseCode; |
| 8 | import com.fedex.connect.common.dependencies.util.GsonUtils; | 8 | import com.fedex.connect.common.dependencies.util.GsonUtils; |
| 9 | import com.fedex.connect.common.dependencies.util.JwtTokenUtils; | 9 | import com.fedex.connect.common.dependencies.util.JwtTokenUtils; |
| ... | @@ -11,7 +11,7 @@ import com.fedex.connect.common.model.sys.RedisSlab; | ... | @@ -11,7 +11,7 @@ import com.fedex.connect.common.model.sys.RedisSlab; |
| 11 | import com.fedex.connect.common.model.sys.Role; | 11 | import com.fedex.connect.common.model.sys.Role; |
| 12 | import com.fedex.connect.common.model.sys.User; | 12 | import com.fedex.connect.common.model.sys.User; |
| 13 | import com.fedex.connect.manager.data.dto.LoginRequest; | 13 | import com.fedex.connect.manager.data.dto.LoginRequest; |
| 14 | -import com.fedex.connect.manager.service.base.AbstractEtService; | 14 | +import com.fedex.connect.manager.service.base.BaseService; |
| 15 | import com.fedex.connect.manager.service.sys.IRedisUtilService; | 15 | import com.fedex.connect.manager.service.sys.IRedisUtilService; |
| 16 | import com.fedex.connect.manager.service.sys.ISysAuthService; | 16 | import com.fedex.connect.manager.service.sys.ISysAuthService; |
| 17 | import com.google.gson.JsonObject; | 17 | import com.google.gson.JsonObject; |
| ... | @@ -31,7 +31,7 @@ import java.util.UUID; | ... | @@ -31,7 +31,7 @@ import java.util.UUID; |
| 31 | * @author EDY | 31 | * @author EDY |
| 32 | */ | 32 | */ |
| 33 | @Service | 33 | @Service |
| 34 | -public class SysAuthServiceImpl extends AbstractEtService implements ISysAuthService { | 34 | +public class SysAuthServiceImpl extends BaseService implements ISysAuthService { |
| 35 | 35 | ||
| 36 | private Logger logger = LoggerFactory.getLogger(SysAuthServiceImpl.class); | 36 | private Logger logger = LoggerFactory.getLogger(SysAuthServiceImpl.class); |
| 37 | 37 | ||
| ... | @@ -47,7 +47,7 @@ public class SysAuthServiceImpl extends AbstractEtService implements ISysAuthSer | ... | @@ -47,7 +47,7 @@ public class SysAuthServiceImpl extends AbstractEtService implements ISysAuthSer |
| 47 | * @param user | 47 | * @param user |
| 48 | * @return | 48 | * @return |
| 49 | */ | 49 | */ |
| 50 | - public ResponseResultVo createAccessToken(LoginRequest loginRequest, User user) { | 50 | + public ResponseVo createAccessToken(LoginRequest loginRequest, User user) { |
| 51 | //2、创建token | 51 | //2、创建token |
| 52 | List<String> roleCodeList = new ArrayList<>(); | 52 | List<String> roleCodeList = new ArrayList<>(); |
| 53 | Role roleInfo = sysRoleInfoService.findRoleByUserId(user.getId()); | 53 | Role roleInfo = sysRoleInfoService.findRoleByUserId(user.getId()); |
| ... | @@ -65,10 +65,10 @@ public class SysAuthServiceImpl extends AbstractEtService implements ISysAuthSer | ... | @@ -65,10 +65,10 @@ public class SysAuthServiceImpl extends AbstractEtService implements ISysAuthSer |
| 65 | redisUtilService.set(RedisConstants.REDIS_KEY_TOKEN + user.getId(), token, redisExpireTime); | 65 | redisUtilService.set(RedisConstants.REDIS_KEY_TOKEN + user.getId(), token, redisExpireTime); |
| 66 | } catch (NullPointerException e) { | 66 | } catch (NullPointerException e) { |
| 67 | logger.error("***************** redis 异常:{} *********************", e); | 67 | logger.error("***************** redis 异常:{} *********************", e); |
| 68 | - return ResponseResultVo.fail(ResponseCode.SYSTEM_EXECEPTION_CODE.getCode(), localeMessageUtil.getMessage("service_auth_token_reeids"), null); | 68 | + return ResponseVo.fail(ResponseCode.SYSTEM_EXECEPTION_CODE.getCode(), localeMessageUtil.getMessage("service_auth_token_reeids"), null); |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | - return ResponseResultVo.succ(token); | 71 | + return ResponseVo.succ(token); |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | 74 | ||
| ... | @@ -77,17 +77,17 @@ public class SysAuthServiceImpl extends AbstractEtService implements ISysAuthSer | ... | @@ -77,17 +77,17 @@ public class SysAuthServiceImpl extends AbstractEtService implements ISysAuthSer |
| 77 | * @param token token信息 | 77 | * @param token token信息 |
| 78 | * @return token key | 78 | * @return token key |
| 79 | */ | 79 | */ |
| 80 | - public ResponseResultVo createFclToken(JsonObject token) { | 80 | + public ResponseVo createFclToken(JsonObject token) { |
| 81 | String tokenKey ="" + UUID.randomUUID(); | 81 | String tokenKey ="" + UUID.randomUUID(); |
| 82 | try { | 82 | try { |
| 83 | /*redisUtilService.set(RedisConstants.REDIS_KEY_TOKEN + tokenKey, GsonUtils.beanToString(token), RedisConstants.REDIS_EXPRIE_TIME_1W);*/ | 83 | /*redisUtilService.set(RedisConstants.REDIS_KEY_TOKEN + tokenKey, GsonUtils.beanToString(token), RedisConstants.REDIS_EXPRIE_TIME_1W);*/ |
| 84 | redisUtilService.set(RedisConstants.REDIS_KEY_TOKEN + tokenKey, GsonUtils.beanToString(token), 1); | 84 | redisUtilService.set(RedisConstants.REDIS_KEY_TOKEN + tokenKey, GsonUtils.beanToString(token), 1); |
| 85 | } catch (NullPointerException e) { | 85 | } catch (NullPointerException e) { |
| 86 | logger.error("***************** redis 异常:{} *********************", e); | 86 | logger.error("***************** redis 异常:{} *********************", e); |
| 87 | - return ResponseResultVo.fail(ResponseCode.SYSTEM_EXECEPTION_CODE.getCode(), localeMessageUtil.getMessage("service_auth_token_reeids"), null); | 87 | + return ResponseVo.fail(ResponseCode.SYSTEM_EXECEPTION_CODE.getCode(), localeMessageUtil.getMessage("service_auth_token_reeids"), null); |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | - return ResponseResultVo.succ(tokenKey); | 90 | + return ResponseVo.succ(tokenKey); |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | /** | 93 | /** | ... | ... |
| 1 | package com.fedex.connect.manager.service.sys.impl; | 1 | package com.fedex.connect.manager.service.sys.impl; |
| 2 | 2 | ||
| 3 | -import com.fedex.connect.common.dependencies.config.CacheSystem; | 3 | +import com.fedex.connect.common.dependencies.cache.CacheSystem; |
| 4 | import com.fedex.connect.common.dependencies.contants.DatabaseConstants; | 4 | import com.fedex.connect.common.dependencies.contants.DatabaseConstants; |
| 5 | import com.fedex.connect.common.dependencies.util.Utils; | 5 | import com.fedex.connect.common.dependencies.util.Utils; |
| 6 | import com.fedex.connect.common.model.bi.DictionaryEntries; | 6 | import com.fedex.connect.common.model.bi.DictionaryEntries; |
| ... | @@ -9,7 +9,7 @@ import com.fedex.connect.common.model.sys.RoleExample; | ... | @@ -9,7 +9,7 @@ import com.fedex.connect.common.model.sys.RoleExample; |
| 9 | import com.fedex.connect.common.model.sys.UserRole; | 9 | import com.fedex.connect.common.model.sys.UserRole; |
| 10 | import com.fedex.connect.common.model.sys.UserRoleExample; | 10 | import com.fedex.connect.common.model.sys.UserRoleExample; |
| 11 | import com.fedex.connect.manager.data.model.LogShowModel; | 11 | import com.fedex.connect.manager.data.model.LogShowModel; |
| 12 | -import com.fedex.connect.manager.service.base.AbstractEtService; | 12 | +import com.fedex.connect.manager.service.base.BaseService; |
| 13 | import com.fedex.connect.manager.service.sys.ISysRoleService; | 13 | import com.fedex.connect.manager.service.sys.ISysRoleService; |
| 14 | import org.slf4j.Logger; | 14 | import org.slf4j.Logger; |
| 15 | import org.slf4j.LoggerFactory; | 15 | import org.slf4j.LoggerFactory; |
| ... | @@ -27,7 +27,7 @@ import java.util.stream.Collectors; | ... | @@ -27,7 +27,7 @@ import java.util.stream.Collectors; |
| 27 | * @author EDY | 27 | * @author EDY |
| 28 | */ | 28 | */ |
| 29 | @Service | 29 | @Service |
| 30 | -public class SysRoleServiceImpl extends AbstractEtService implements ISysRoleService { | 30 | +public class SysRoleServiceImpl extends BaseService implements ISysRoleService { |
| 31 | 31 | ||
| 32 | private static Logger log = LoggerFactory.getLogger(SysRoleServiceImpl.class); | 32 | private static Logger log = LoggerFactory.getLogger(SysRoleServiceImpl.class); |
| 33 | 33 | ... | ... |
| ... | @@ -3,7 +3,7 @@ package com.fedex.connect.manager.service.sys.impl; | ... | @@ -3,7 +3,7 @@ package com.fedex.connect.manager.service.sys.impl; |
| 3 | import com.fedex.connect.common.dependencies.contants.DatabaseConstants; | 3 | import com.fedex.connect.common.dependencies.contants.DatabaseConstants; |
| 4 | import com.fedex.connect.common.model.sys.UserRole; | 4 | import com.fedex.connect.common.model.sys.UserRole; |
| 5 | import com.fedex.connect.manager.data.model.LogShowModel; | 5 | import com.fedex.connect.manager.data.model.LogShowModel; |
| 6 | -import com.fedex.connect.manager.service.base.AbstractEtService; | 6 | +import com.fedex.connect.manager.service.base.BaseService; |
| 7 | import com.fedex.connect.manager.service.sys.ISysUserRoleService; | 7 | import com.fedex.connect.manager.service.sys.ISysUserRoleService; |
| 8 | import org.slf4j.Logger; | 8 | import org.slf4j.Logger; |
| 9 | import org.slf4j.LoggerFactory; | 9 | import org.slf4j.LoggerFactory; |
| ... | @@ -17,7 +17,7 @@ import java.util.Date; | ... | @@ -17,7 +17,7 @@ import java.util.Date; |
| 17 | * @author EDY | 17 | * @author EDY |
| 18 | */ | 18 | */ |
| 19 | @Service | 19 | @Service |
| 20 | -public class SysUserRoleServiceImpl extends AbstractEtService implements ISysUserRoleService { | 20 | +public class SysUserRoleServiceImpl extends BaseService implements ISysUserRoleService { |
| 21 | 21 | ||
| 22 | private static Logger log = LoggerFactory.getLogger(SysUserRoleServiceImpl.class); | 22 | private static Logger log = LoggerFactory.getLogger(SysUserRoleServiceImpl.class); |
| 23 | 23 | ... | ... |
| ... | @@ -2,7 +2,7 @@ package com.fedex.connect.manager.service.sys.impl; | ... | @@ -2,7 +2,7 @@ package com.fedex.connect.manager.service.sys.impl; |
| 2 | 2 | ||
| 3 | import com.fedex.connect.common.dependencies.arithmetic.AESUtil; | 3 | import com.fedex.connect.common.dependencies.arithmetic.AESUtil; |
| 4 | import com.fedex.connect.common.dependencies.authentication.EncryptProvider; | 4 | import com.fedex.connect.common.dependencies.authentication.EncryptProvider; |
| 5 | -import com.fedex.connect.common.dependencies.config.CacheSystem; | 5 | +import com.fedex.connect.common.dependencies.cache.CacheSystem; |
| 6 | import com.fedex.connect.common.dependencies.contants.DatabaseConstants; | 6 | import com.fedex.connect.common.dependencies.contants.DatabaseConstants; |
| 7 | import com.fedex.connect.common.dependencies.util.Utils; | 7 | import com.fedex.connect.common.dependencies.util.Utils; |
| 8 | import com.fedex.connect.common.model.bi.DictionaryEntries; | 8 | import com.fedex.connect.common.model.bi.DictionaryEntries; |
| ... | @@ -11,7 +11,7 @@ import com.fedex.connect.common.model.sys.User; | ... | @@ -11,7 +11,7 @@ import com.fedex.connect.common.model.sys.User; |
| 11 | import com.fedex.connect.common.model.sys.UserExample; | 11 | import com.fedex.connect.common.model.sys.UserExample; |
| 12 | import com.fedex.connect.manager.data.dto.SysUserDto; | 12 | import com.fedex.connect.manager.data.dto.SysUserDto; |
| 13 | import com.fedex.connect.manager.data.model.LogShowModel; | 13 | import com.fedex.connect.manager.data.model.LogShowModel; |
| 14 | -import com.fedex.connect.manager.service.base.AbstractEtService; | 14 | +import com.fedex.connect.manager.service.base.BaseService; |
| 15 | import com.fedex.connect.manager.service.sys.ISysRoleService; | 15 | import com.fedex.connect.manager.service.sys.ISysRoleService; |
| 16 | import com.fedex.connect.manager.service.sys.ISysUserRoleService; | 16 | import com.fedex.connect.manager.service.sys.ISysUserRoleService; |
| 17 | import com.fedex.connect.manager.service.sys.ISysUserService; | 17 | import com.fedex.connect.manager.service.sys.ISysUserService; |
| ... | @@ -32,7 +32,7 @@ import java.util.stream.Collectors; | ... | @@ -32,7 +32,7 @@ import java.util.stream.Collectors; |
| 32 | * 用户相关操作 | 32 | * 用户相关操作 |
| 33 | */ | 33 | */ |
| 34 | @Service | 34 | @Service |
| 35 | -public class SysUserServiceImpl extends AbstractEtService implements ISysUserService { | 35 | +public class SysUserServiceImpl extends BaseService implements ISysUserService { |
| 36 | 36 | ||
| 37 | private static Logger log = LoggerFactory.getLogger(SysUserServiceImpl.class); | 37 | private static Logger log = LoggerFactory.getLogger(SysUserServiceImpl.class); |
| 38 | 38 | ... | ... |
-
Please register or login to post a comment