Showing
8 changed files
with
101 additions
and
42 deletions
| 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.ResponseVo; | ||
| 4 | -import com.fedex.connect.customer.data.bo.LongBo; | ||
| 5 | -import org.springframework.web.bind.annotation.RequestBody; | ||
| 6 | - | ||
| 7 | public interface IAttachmentController { | 3 | public interface IAttachmentController { |
| 8 | - ResponseVo findHistory(@RequestBody LongBo bo); | ||
| 9 | } | 4 | } | ... | ... |
| ... | @@ -2,11 +2,8 @@ package com.fedex.connect.customer.controller.biz; | ... | @@ -2,11 +2,8 @@ package com.fedex.connect.customer.controller.biz; |
| 2 | 2 | ||
| 3 | import com.fedex.connect.common.dependencies.date.vo.ResponseVo; | 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; | ||
| 6 | import org.springframework.web.bind.annotation.RequestBody; | 5 | import org.springframework.web.bind.annotation.RequestBody; |
| 7 | 6 | ||
| 8 | public interface IConsignmentController { | 7 | public interface IConsignmentController { |
| 9 | - ResponseVo findConsignmentList(@RequestBody ConsignmentQuery consignmentQuery); | ||
| 10 | - | ||
| 11 | ResponseVo addConsignment(@RequestBody AddBo bo); | 8 | ResponseVo addConsignment(@RequestBody AddBo bo); |
| 12 | } | 9 | } | ... | ... |
| 1 | +package com.fedex.connect.customer.controller.biz; | ||
| 2 | + | ||
| 3 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; | ||
| 4 | +import com.fedex.connect.customer.data.query.ConsignmentQuery; | ||
| 5 | +import org.springframework.web.bind.annotation.RequestBody; | ||
| 6 | + | ||
| 7 | +public interface IConsignmentQueryController { | ||
| 8 | + ResponseVo findConsignmentList(@RequestBody ConsignmentQuery consignmentQuery); | ||
| 9 | +} |
| 1 | +package com.fedex.connect.customer.controller.biz.impl; | ||
| 2 | + | ||
| 3 | +import com.fedex.connect.common.dependencies.date.model.LogShowModel; | ||
| 4 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; | ||
| 5 | +import com.fedex.connect.common.dependencies.enums.ResponseCode; | ||
| 6 | +import com.fedex.connect.common.dependencies.util.CurrentUserInfo; | ||
| 7 | +import com.fedex.connect.customer.controller.base.BaseController; | ||
| 8 | +import com.fedex.connect.customer.controller.biz.IAttachmentController; | ||
| 9 | +import com.fedex.connect.customer.data.bo.LongBo; | ||
| 10 | +import io.swagger.annotations.Api; | ||
| 11 | +import io.swagger.annotations.ApiOperation; | ||
| 12 | +import lombok.extern.slf4j.Slf4j; | ||
| 13 | +import org.springframework.web.bind.annotation.PostMapping; | ||
| 14 | +import org.springframework.web.bind.annotation.RequestBody; | ||
| 15 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 16 | +import org.springframework.web.bind.annotation.RestController; | ||
| 17 | + | ||
| 18 | +/** | ||
| 19 | + * @Author Szl | ||
| 20 | + * @Description 类说明 附件相关 | ||
| 21 | + * @Date 2024/11/4 | ||
| 22 | + */ | ||
| 23 | +@Slf4j | ||
| 24 | +@RestController | ||
| 25 | +@RequestMapping(value = "/attachment", name = "附件操作相关") | ||
| 26 | +@Api(value = "AttachmentControllerImpl", tags = {"附件操作相关"}) | ||
| 27 | +public class AttachmentController extends BaseController implements IAttachmentController { | ||
| 28 | + | ||
| 29 | +} |
| ... | @@ -17,16 +17,16 @@ import org.springframework.web.bind.annotation.RestController; | ... | @@ -17,16 +17,16 @@ import org.springframework.web.bind.annotation.RestController; |
| 17 | 17 | ||
| 18 | /** | 18 | /** |
| 19 | * @Author Szl | 19 | * @Author Szl |
| 20 | - * @Description 类说明 附件相关 | 20 | + * @Description 附件查询相关 |
| 21 | * @Date 2024/11/4 | 21 | * @Date 2024/11/4 |
| 22 | */ | 22 | */ |
| 23 | @Slf4j | 23 | @Slf4j |
| 24 | @RestController | 24 | @RestController |
| 25 | -@RequestMapping(value = "/attachment", name = "附件相关") | 25 | +@RequestMapping(value = "/attachment/query", name = "附件查询相关") |
| 26 | -@Api(value = "AttachmentControllerImpl", tags = {"附件相关"}) | 26 | +@Api(value = "AttachmentQueryController", tags = {"附件查询相关"}) |
| 27 | -public class AttachmentControllerImpl extends BaseController implements IAttachmentController { | 27 | +public class AttachmentQueryController extends BaseController implements IAttachmentController { |
| 28 | 28 | ||
| 29 | - @PostMapping("/find/history") | 29 | + @PostMapping("/history") |
| 30 | @ApiOperation(value = "历史上传记录查询") | 30 | @ApiOperation(value = "历史上传记录查询") |
| 31 | public ResponseVo findHistory(@RequestBody LongBo bo) { | 31 | public ResponseVo findHistory(@RequestBody LongBo bo) { |
| 32 | ResponseVo responseResultVo = attachmentValidate.preCheckForFindHistory(bo); | 32 | ResponseVo responseResultVo = attachmentValidate.preCheckForFindHistory(bo); | ... | ... |
| ... | @@ -8,7 +8,6 @@ import com.fedex.connect.common.model.sys.User; | ... | @@ -8,7 +8,6 @@ import com.fedex.connect.common.model.sys.User; |
| 8 | import com.fedex.connect.customer.controller.base.BaseController; | 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; | ||
| 12 | import io.swagger.annotations.Api; | 11 | import io.swagger.annotations.Api; |
| 13 | import io.swagger.annotations.ApiOperation; | 12 | import io.swagger.annotations.ApiOperation; |
| 14 | import org.slf4j.Logger; | 13 | import org.slf4j.Logger; |
| ... | @@ -20,39 +19,18 @@ import org.springframework.web.bind.annotation.RestController; | ... | @@ -20,39 +19,18 @@ import org.springframework.web.bind.annotation.RestController; |
| 20 | 19 | ||
| 21 | /** | 20 | /** |
| 22 | * @Author Szl | 21 | * @Author Szl |
| 23 | - * @Description 类说明 运单相关接口 | 22 | + * @Description 类说明 运单操作相关接口 |
| 24 | * @Date 2024/10/30 | 23 | * @Date 2024/10/30 |
| 25 | */ | 24 | */ |
| 26 | @RestController | 25 | @RestController |
| 27 | -@RequestMapping(value = "/consignment", name = "运单相关") | 26 | +@RequestMapping(value = "/consignment", name = "运单操作相关") |
| 28 | -@Api(value = "ConsignmentController", tags = {"运单相关"}) | 27 | +@Api(value = "ConsignmentController", tags = {"运单操作相关"}) |
| 29 | -public class ConsignmentControllerImpl extends BaseController implements IConsignmentController { | 28 | +public class ConsignmentController extends BaseController implements IConsignmentController { |
| 30 | - private static final Logger logger = LoggerFactory.getLogger(ConsignmentControllerImpl.class); | 29 | + private static final Logger logger = LoggerFactory.getLogger(ConsignmentController.class); |
| 31 | - | ||
| 32 | - | ||
| 33 | - @PostMapping("/find/list") | ||
| 34 | - @ApiOperation(value = "运单查询") | ||
| 35 | - public ResponseVo findConsignmentList(@RequestBody ConsignmentQuery consignmentQuery) { | ||
| 36 | - User user = null; | ||
| 37 | - try { | ||
| 38 | - user = CurrentUserInfo.getUser(); | ||
| 39 | - //userId = 0L; | ||
| 40 | - } catch (Exception e) { | ||
| 41 | - logger.error(LogShowModel.showException("Exception", e)); | ||
| 42 | - return ResponseVo.fail(localeMessageUtil.getMessage(ResponseCode.TOKEN_FORMAT_ERROR.getMsg())); | ||
| 43 | - } | ||
| 44 | - if (user == null) { | ||
| 45 | - return ResponseVo.fail(localeMessageUtil.getMessage(ResponseCode.OVERDUE_TOKEN_CODE.getMsg())); | ||
| 46 | - } | ||
| 47 | - | ||
| 48 | - ConsignmentQuery query = ConsignmentQuery.dataProcessing(consignmentQuery); | ||
| 49 | - query.setUserId(user.getId()); | ||
| 50 | - query.setUuid(user.getUserUuid()); | ||
| 51 | - return consignmentService.findConsignments(query); | ||
| 52 | - } | ||
| 53 | 30 | ||
| 54 | @PostMapping("/add") | 31 | @PostMapping("/add") |
| 55 | @ApiOperation("上传运单") | 32 | @ApiOperation("上传运单") |
| 33 | +// @OperationMethodLog() | ||
| 56 | public ResponseVo addConsignment(@RequestBody AddBo bo){ | 34 | public ResponseVo addConsignment(@RequestBody AddBo bo){ |
| 57 | ResponseVo responseResultVo = consignmentValidate.preCheckAdd(bo); | 35 | ResponseVo responseResultVo = consignmentValidate.preCheckAdd(bo); |
| 58 | if (responseResultVo != null){ | 36 | if (responseResultVo != null){ | ... | ... |
| 1 | +package com.fedex.connect.customer.controller.biz.impl; | ||
| 2 | + | ||
| 3 | +import com.fedex.connect.common.dependencies.date.model.LogShowModel; | ||
| 4 | +import com.fedex.connect.common.dependencies.date.vo.ResponseVo; | ||
| 5 | +import com.fedex.connect.common.dependencies.enums.ResponseCode; | ||
| 6 | +import com.fedex.connect.common.dependencies.util.CurrentUserInfo; | ||
| 7 | +import com.fedex.connect.common.model.sys.User; | ||
| 8 | +import com.fedex.connect.customer.controller.base.BaseController; | ||
| 9 | +import com.fedex.connect.customer.controller.biz.IConsignmentQueryController; | ||
| 10 | +import com.fedex.connect.customer.data.query.ConsignmentQuery; | ||
| 11 | +import io.swagger.annotations.Api; | ||
| 12 | +import io.swagger.annotations.ApiOperation; | ||
| 13 | +import org.slf4j.Logger; | ||
| 14 | +import org.slf4j.LoggerFactory; | ||
| 15 | +import org.springframework.web.bind.annotation.PostMapping; | ||
| 16 | +import org.springframework.web.bind.annotation.RequestBody; | ||
| 17 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 18 | +import org.springframework.web.bind.annotation.RestController; | ||
| 19 | + | ||
| 20 | +/** | ||
| 21 | + * @Author Szl | ||
| 22 | + * @Description 类说明 运单查询相关接口 | ||
| 23 | + * @Date 2024/10/30 | ||
| 24 | + */ | ||
| 25 | +@RestController | ||
| 26 | +@RequestMapping(value = "/consignment/query", name = "运单查询相关") | ||
| 27 | +@Api(value = "ConsignmentQueryController", tags = {"运单查询相关"}) | ||
| 28 | +public class ConsignmentQueryController extends BaseController implements IConsignmentQueryController { | ||
| 29 | + private static final Logger logger = LoggerFactory.getLogger(ConsignmentQueryController.class); | ||
| 30 | + | ||
| 31 | + @PostMapping("/list") | ||
| 32 | + @ApiOperation(value = "运单查询") | ||
| 33 | + public ResponseVo findConsignmentList(@RequestBody ConsignmentQuery consignmentQuery) { | ||
| 34 | + User user = null; | ||
| 35 | + try { | ||
| 36 | + user = CurrentUserInfo.getUser(); | ||
| 37 | + //userId = 0L; | ||
| 38 | + } catch (Exception e) { | ||
| 39 | + logger.error(LogShowModel.showException("Exception", e)); | ||
| 40 | + return ResponseVo.fail(localeMessageUtil.getMessage(ResponseCode.TOKEN_FORMAT_ERROR.getMsg())); | ||
| 41 | + } | ||
| 42 | + if (user == null) { | ||
| 43 | + return ResponseVo.fail(localeMessageUtil.getMessage(ResponseCode.OVERDUE_TOKEN_CODE.getMsg())); | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + ConsignmentQuery query = ConsignmentQuery.dataProcessing(consignmentQuery); | ||
| 47 | + query.setUserId(user.getId()); | ||
| 48 | + query.setUuid(user.getUserUuid()); | ||
| 49 | + return consignmentService.findConsignments(query); | ||
| 50 | + } | ||
| 51 | +} |
| ... | @@ -35,7 +35,7 @@ import java.util.*; | ... | @@ -35,7 +35,7 @@ import java.util.*; |
| 35 | @RestController | 35 | @RestController |
| 36 | @RequestMapping(value = "/auth", name = "权鉴操作相关请求") | 36 | @RequestMapping(value = "/auth", name = "权鉴操作相关请求") |
| 37 | @Api(value="SysAuthController",tags={"用户相关请求(无需token)"}) | 37 | @Api(value="SysAuthController",tags={"用户相关请求(无需token)"}) |
| 38 | -public class SysAuthControllerImpl extends BaseController implements ISysAuthController { | 38 | +public class SysAuthController extends BaseController implements ISysAuthController { |
| 39 | 39 | ||
| 40 | 40 | ||
| 41 | @Value("${fcl.interface.logurl}") | 41 | @Value("${fcl.interface.logurl}") | ... | ... |
-
Please register or login to post a comment