fix bug
This commit is contained in:
11
sql/20240223_recharge_config_update_mysql.sql
Normal file
11
sql/20240223_recharge_config_update_mysql.sql
Normal file
@ -0,0 +1,11 @@
|
||||
INSERT INTO `yshop_recharge_config` (`id`, `custom_switch`, `custom_min`, `content`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1, 1, 1, '<p style=\"text-align: left;\"><br></p><p style=\"text-align: left;\">操作步骤:</p><ol><li style=\"text-align: left;\">登录用户中心。</li><li style=\"text-align: left;\">单击充值汇款,进入充值汇款页面。</li><li style=\"text-align: left;\">输入充值金额,阅读并勾选我已了解,单击立即充值。<br></li></ol><p style=\"text-align: left;\">说明:</p><p style=\"text-align: left;\">充值金额输入整数,并且最低充值不得小于1元。</p><p style=\"text-align: left;\">使用支持的付款方式,完成支付即可。</p><p><br></p><p style=\"text-align: left;\">您可以使用微信P进行线上充值。</p><p style=\"text-align: left;\"><br></p><p style=\"text-align: left;\"><br></p>', '', '2024-01-25 20:52:51', '1', '2024-02-23 11:23:02', b'0');
|
||||
INSERT INTO `yshop_recharge_package` (`id`, `recharge_amount`, `gift_amount`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1, 0, 0, 0, '', '2024-01-25 20:53:15', '1', '2024-02-23 11:23:02', b'0');
|
||||
INSERT INTO `yshop_recharge_package` (`id`, `recharge_amount`, `gift_amount`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2, 0, 0, 0, '', '2024-01-25 20:53:17', '1', '2024-02-23 11:23:02', b'0');
|
||||
INSERT INTO `yshop_recharge_package` (`id`, `recharge_amount`, `gift_amount`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (3, 0, 0, 0, '', '2024-01-25 20:53:18', '1', '2024-02-23 11:23:02', b'0');
|
||||
INSERT INTO `yshop_recharge_package` (`id`, `recharge_amount`, `gift_amount`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (4, 0, 0, 0, '', '2024-01-25 20:53:19', '1', '2024-02-23 11:23:02', b'0');
|
||||
INSERT INTO `yshop_recharge_package` (`id`, `recharge_amount`, `gift_amount`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (5, 0, 0, 0, '', '2024-01-25 20:53:20', '1', '2024-02-23 11:23:02', b'0');
|
||||
INSERT INTO `yshop_recharge_package` (`id`, `recharge_amount`, `gift_amount`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (6, 0, 0, 0, '', '2024-01-25 20:53:22', '1', '2024-02-23 11:23:02', b'0');
|
||||
INSERT INTO `yshop_recharge_package` (`id`, `recharge_amount`, `gift_amount`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (7, 0, 0, 0, '', '2024-01-25 20:53:23', '1', '2024-02-23 11:23:02', b'0');
|
||||
INSERT INTO `yshop_recharge_package` (`id`, `recharge_amount`, `gift_amount`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (8, 0, 0, 0, '', '2024-01-25 20:53:25', '1', '2024-02-23 11:23:02', b'0');
|
||||
INSERT INTO `yshop_recharge_package` (`id`, `recharge_amount`, `gift_amount`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (9, 0, 0, 0, '', '2024-01-25 20:53:26', '1', '2024-02-23 11:23:02', b'0');
|
||||
INSERT INTO `yshop_recharge_package` (`id`, `recharge_amount`, `gift_amount`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (10, 0, 0, 0, '', '2024-01-25 20:53:28', '1', '2024-02-23 11:23:02', b'0');
|
@ -7,5 +7,7 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode EXPRESS_NOT_EXISTS = new ErrorCode(1008008000, "快递公司不存在");
|
||||
// ========== 电子面单 ==========
|
||||
ErrorCode ELECTRONICS_ORDER_NOT_EXISTS = new ErrorCode(1008009000, "电子面单不存在");
|
||||
// ========== 快递配置 ==========
|
||||
ErrorCode EXPRESS_CONFIG_NOT_EXISTS = new ErrorCode(1008001000, "快递鸟未配置!");
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package co.yixiang.yshop.module.express.controller.admin.express;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.crypto.digest.BCrypt;
|
||||
import co.yixiang.yshop.framework.common.pojo.CommonResult;
|
||||
import co.yixiang.yshop.framework.common.pojo.PageResult;
|
||||
@ -29,8 +30,11 @@ import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import static co.yixiang.yshop.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static co.yixiang.yshop.framework.common.pojo.CommonResult.success;
|
||||
import static co.yixiang.yshop.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static co.yixiang.yshop.module.express.enums.ErrorCodeConstants.EXPRESS_CONFIG_NOT_EXISTS;
|
||||
import static co.yixiang.yshop.module.express.enums.ErrorCodeConstants.EXPRESS_NOT_EXISTS;
|
||||
|
||||
@Tag(name = "管理后台 - 快递公司")
|
||||
@RestController
|
||||
@ -138,6 +142,7 @@ public class ExpressController {
|
||||
public CommonResult<KdniaoApiVO> getLogistic(@RequestParam(value = "shipperCode") String shipperCode,
|
||||
@RequestParam("logisticCode") String logisticCode) {
|
||||
KdniaoApiBaseDTO kdniaoApiBaseDTO = expressRedisDAO.get();
|
||||
if(ObjectUtil.isEmpty(kdniaoApiBaseDTO)) throw exception(EXPRESS_CONFIG_NOT_EXISTS);
|
||||
KdniaoApiDTO params = new KdniaoApiDTO();
|
||||
params.setLogisticCode(logisticCode);
|
||||
params.setShipperCode(shipperCode);
|
||||
|
@ -8,6 +8,7 @@
|
||||
*/
|
||||
package co.yixiang.yshop.module.order.controller.app.order;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.yixiang.yshop.framework.common.pojo.CommonResult;
|
||||
import co.yixiang.yshop.framework.security.core.annotations.PreAuthenticated;
|
||||
@ -48,6 +49,7 @@ import java.util.Objects;
|
||||
import static co.yixiang.yshop.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static co.yixiang.yshop.framework.common.pojo.CommonResult.success;
|
||||
import static co.yixiang.yshop.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
import static co.yixiang.yshop.module.express.enums.ErrorCodeConstants.EXPRESS_CONFIG_NOT_EXISTS;
|
||||
import static co.yixiang.yshop.module.order.enums.ErrorCodeConstants.PARAM_ERROR;
|
||||
|
||||
/**
|
||||
@ -290,8 +292,8 @@ public class AppOrderController {
|
||||
@PostMapping("/order/express")
|
||||
@Operation(summary = "获取物流信息")
|
||||
public CommonResult<KdniaoApiVO> express(@RequestBody AppExpressParam appExpressParam) {
|
||||
|
||||
KdniaoApiBaseDTO kdniaoApiBaseDTO = expressRedisDAO.get();
|
||||
if(ObjectUtil.isEmpty(kdniaoApiBaseDTO)) throw exception(EXPRESS_CONFIG_NOT_EXISTS);
|
||||
KdniaoApiDTO params = new KdniaoApiDTO();
|
||||
params.setLogisticCode(appExpressParam.getLogisticCode());
|
||||
params.setShipperCode(appExpressParam.getShipperCode());
|
||||
|
Reference in New Issue
Block a user