diff --git a/DB/version4.2.5toMASTER.sql b/DB/version4.2.5toMASTER.sql index 1a211ecd..2225ac59 100644 --- a/DB/version4.2.5toMASTER.sql +++ b/DB/version4.2.5toMASTER.sql @@ -79,4 +79,12 @@ ALTER TABLE li_store ADD `self_pick_flag` bit(1) DEFAULT NULL; /** 历史足迹增加店铺Id */ -ALTER TABLE li_foot_print ADD `store_id` varchar(255) DEFAULT NULL COMMENT '店铺ID'; \ No newline at end of file +ALTER TABLE li_foot_print ADD `store_id` varchar(255) DEFAULT NULL COMMENT '店铺ID'; + + + +/** + 订单增加自提信息 + */ +ALTER TABLE li_member_withdraw_apply ADD `real_name` varchar(255) DEFAULT NULL; +ALTER TABLE li_member_withdraw_apply ADD `connect_number` varchar(255) DEFAULT NULL; diff --git a/buyer-api/src/main/java/cn/lili/controller/order/RechargeTradeBuyerController.java b/buyer-api/src/main/java/cn/lili/controller/order/RechargeTradeBuyerController.java index e85cddbf..7ea39171 100644 --- a/buyer-api/src/main/java/cn/lili/controller/order/RechargeTradeBuyerController.java +++ b/buyer-api/src/main/java/cn/lili/controller/order/RechargeTradeBuyerController.java @@ -10,6 +10,7 @@ import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -26,6 +27,7 @@ import javax.validation.constraints.Min; @RestController @Api(tags = "买家端,预存款充值记录接口") @RequestMapping("/buyer/trade/recharge") +@Validated public class RechargeTradeBuyerController { @Autowired @@ -37,7 +39,10 @@ public class RechargeTradeBuyerController { @ApiImplicitParams({ @ApiImplicitParam(name = "price", value = "充值金额", required = true, dataType = "double", paramType = "query") }) - public ResultMessage create(@Max(value = 10000, message = "充值金额单次最多允许充值10000元") @Min(value = 1, message = "充值金额单次最少充值金额为1元") Double price) { + public ResultMessage create( + @Max(value = 10000, message = "充值金额单次最多允许充值10000元") + @Min(value = 1, message = "充值金额单次最少充值金额为1元") + Double price) { Recharge recharge = this.rechargeService.recharge(price); return ResultUtil.data(recharge); } diff --git a/buyer-api/src/main/java/cn/lili/controller/wallet/MemberWalletBuyerController.java b/buyer-api/src/main/java/cn/lili/controller/wallet/MemberWalletBuyerController.java index 52328e6f..7ce8061b 100644 --- a/buyer-api/src/main/java/cn/lili/controller/wallet/MemberWalletBuyerController.java +++ b/buyer-api/src/main/java/cn/lili/controller/wallet/MemberWalletBuyerController.java @@ -21,6 +21,7 @@ import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.validation.constraints.Max; @@ -36,6 +37,7 @@ import javax.validation.constraints.Pattern; @RestController @Api(tags = "买家端,会员余额接口") @RequestMapping("/buyer/wallet/wallet") +@Validated public class MemberWalletBuyerController { /** @@ -127,7 +129,10 @@ public class MemberWalletBuyerController { @ApiImplicitParams({ @ApiImplicitParam(name = "price", value = "提现金额", required = true, dataType = "double", paramType = "query") }) - public ResultMessage withdrawal(@Max(value = 9999, message = "充值金额单次最多允许提现9999元") @Min(value = 1, message = "充值金额单次最少提现金额为1元") Double price) { + public ResultMessage withdrawal( + @Max(value = 9999, message = "提现金额单次最多允许提现9999元") + @Min(value = 1, message = "提现金额单次最少提现金额为1元") + Double price) { return ResultUtil.data(memberWalletService.applyWithdrawal(price)); } diff --git a/docs/diagram/OrderComplaintBuyerController.uml b/docs/diagram/OrderComplaintBuyerController.uml new file mode 100644 index 00000000..03d08218 --- /dev/null +++ b/docs/diagram/OrderComplaintBuyerController.uml @@ -0,0 +1,50 @@ + + + JAVA + cn.lili.controller.order.OrderComplaintBuyerController + + cn.lili.modules.order.order.service.OrderComplaintCommunicationService + cn.lili.controller.order.OrderComplaintStoreController + cn.lili.modules.order.order.service.OrderComplaintService + cn.lili.controller.order.OrderComplaintBuyerController + cn.lili.controller.order.OrderComplaintManagerController + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Inner Classes + Methods + Properties + + All + private + + diff --git a/docs/uml/AfterSaleRefundGodos.puml b/docs/uml/AfterSaleRefundGodos.puml new file mode 100644 index 00000000..17092a7e --- /dev/null +++ b/docs/uml/AfterSaleRefundGodos.puml @@ -0,0 +1,20 @@ +@startuml +'https://plantuml.com/sequence-diagram + +actor user +actor seller +actor manager + +user --> 平台: 申请售后 +seller -> 平台: 审核售后申请 +activate 平台 +平台 -> 平台: 更新售后状态 +return 售后审核响应 + +user -> 平台: 填写物流信息 +seller->平台: 确认收货 +activate 平台 +平台 -> 平台: 自动退款 +return 售后审核响应 +平台 -> user: 售后结束 +@enduml \ No newline at end of file diff --git a/docs/uml/AfterSaleRefundMoney.puml b/docs/uml/AfterSaleRefundMoney.puml new file mode 100644 index 00000000..2b75c663 --- /dev/null +++ b/docs/uml/AfterSaleRefundMoney.puml @@ -0,0 +1,16 @@ +@startuml +'https://plantuml.com/sequence-diagram + +actor user +actor seller +actor manager + +user --> 平台: 申请售后 +seller -> 平台: 审核售后申请 +activate 平台 +平台 -> 平台: 通过审核,自动退款 +manager --> 平台: 审核阶段可介入操作 +return 售后审核响应 + +user -> 平台: 查询售后结果 +@enduml \ No newline at end of file diff --git a/docs/uml/Complaint.puml b/docs/uml/Complaint.puml new file mode 100644 index 00000000..eb768b2e --- /dev/null +++ b/docs/uml/Complaint.puml @@ -0,0 +1,21 @@ +@startuml +'https://plantuml.com/sequence-diagram + +actor user +actor seller +actor manager + +activate 平台 +user -> 平台: 输入原因,发起投诉 +user --> 平台: 多次输出对话 +seller --> 平台: 多次输出对话 +manager --> 平台: 多次输出对话 +manager -> 平台: 根据各方意见,仲裁投诉结果 +activate 平台 +平台->平台: 仲裁结果,更新状态 + +平台 -> seller: 根据平台仲裁结果进行处理 +平台 -> user: 根据平台仲裁结果进行处理 +deactivate 平台 + +@enduml \ No newline at end of file diff --git a/framework/src/main/java/cn/lili/common/enums/ResultCode.java b/framework/src/main/java/cn/lili/common/enums/ResultCode.java index b93239fb..6e52986f 100644 --- a/framework/src/main/java/cn/lili/common/enums/ResultCode.java +++ b/framework/src/main/java/cn/lili/common/enums/ResultCode.java @@ -221,7 +221,7 @@ public enum ResultCode { PAY_POINT_ENOUGH(32010, "积分不足,不能兑换"), PAY_NOT_EXIST_ORDER(32011, "支付订单不存在"), CAN_NOT_RECHARGE_WALLET(32012, "不能使用余额进行充值"), - + RECHARGE_PRICE_ERROR(32013, "充值金额错误"), /** * 售后 @@ -259,7 +259,7 @@ public enum ResultCode { WALLET_REMARK_ERROR(34004, "请填写审核备注!"), WALLET_EXIT_ERROR(34000, "钱包已存在,无法重复创建"), WALLET_APPLY_ERROR(34005, "提现申请异常!"), - + WALLET_WITHDRAWAL_AMOUNT_ERROR(34006, "申请提现金额异常!"), /** * 评价 */ @@ -502,6 +502,7 @@ public enum ResultCode { PURCHASE_ORDER_DEADLINE_ERROR(90004, "供求单,已超过报名截止时间"), INDEX_BUILDING(90005, "索引正在生成"); + private final Integer code; private final String message; diff --git a/framework/src/main/java/cn/lili/modules/wallet/serviceimpl/MemberWalletServiceImpl.java b/framework/src/main/java/cn/lili/modules/wallet/serviceimpl/MemberWalletServiceImpl.java index 4ea20933..9d838430 100644 --- a/framework/src/main/java/cn/lili/modules/wallet/serviceimpl/MemberWalletServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/wallet/serviceimpl/MemberWalletServiceImpl.java @@ -257,6 +257,11 @@ public class MemberWalletServiceImpl extends ServiceImpl 1000000) { + throw new ServiceException(ResultCode.WALLET_WITHDRAWAL_AMOUNT_ERROR); + } + MemberWithdrawalMessage memberWithdrawalMessage = new MemberWithdrawalMessage(); AuthUser authUser = UserContext.getCurrentUser(); //构建审核参数 @@ -307,7 +312,7 @@ public class MemberWalletServiceImpl extends ServiceImpl i @Override public Recharge recharge(Double price) { + + if (price == null || price <= 0 || price > 1000000) { + throw new ServiceException(ResultCode.RECHARGE_PRICE_ERROR); + } + //获取当前登录的会员 AuthUser authUser = UserContext.getCurrentUser(); //构建sn