Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into feature/pg
This commit is contained in:
		
						commit
						24568e0f00
					
				| @ -54,3 +54,11 @@ ALTER TABLE li_goods RENAME COLUMN is_auth TO auth_flag; | ||||
| 
 | ||||
| ALTER TABLE li_goods_sku RENAME COLUMN is_promotion TO promotion_flag; | ||||
| ALTER TABLE li_goods_sku RENAME COLUMN is_auth TO auth_flag; | ||||
| 
 | ||||
| 
 | ||||
| -- 增加会员表索引 | ||||
| ALTER TABLE li_member ADD INDEX query_mobile (`mobile`) COMMENT 'query_member'; | ||||
| -- 会员签到唯一索引 惠券查询索引 | ||||
| ALTER TABLE li_member_sign ADD INDEX query_create_time (`create_time`) COMMENT 'query_create_time'; | ||||
| ALTER TABLE li_member_sign ADD INDEX query_member_id (`member_id`) COMMENT 'query_member_id'; | ||||
| ALTER TABLE li_member_sign add unique uk_member_day (member_id, create_time) COMMENT 'uk_member_day'; | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.distribution; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultCode; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.exception.ServiceException; | ||||
| @ -49,6 +50,7 @@ public class DistributionCashBuyerController { | ||||
|     private DistributionCashService distributorCashService; | ||||
| 
 | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "分销员提现") | ||||
|     @ApiImplicitParams({ | ||||
|             @ApiImplicitParam(name = "price", value = "申请金额", required = true, paramType = "query", dataType = "double") | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.distribution; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultCode; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.exception.ServiceException; | ||||
| @ -50,6 +51,7 @@ public class DistributionGoodsBuyerController { | ||||
|         return ResultUtil.data(distributionGoodsService.goodsPage(distributionGoodsSearchParams)); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "选择分销商品") | ||||
|     @ApiImplicitParams({ | ||||
|         @ApiImplicitParam(name = "distributionGoodsId", value = "分销ID", required = true, dataType = "String", paramType = "path"), | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.member; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.enums.SwitchEnum; | ||||
| import cn.lili.common.security.context.UserContext; | ||||
| @ -37,10 +38,11 @@ public class MemberEvaluationBuyerController { | ||||
|     @Autowired | ||||
|     private MemberEvaluationService memberEvaluationService; | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "添加会员评价") | ||||
|     @PostMapping | ||||
|     public ResultMessage<MemberEvaluationDTO> save(@Valid MemberEvaluationDTO memberEvaluationDTO) { | ||||
|         return ResultUtil.data(memberEvaluationService.addMemberEvaluation(memberEvaluationDTO)); | ||||
|         return ResultUtil.data(memberEvaluationService.addMemberEvaluation(memberEvaluationDTO, true)); | ||||
|     } | ||||
| 
 | ||||
|     @ApiOperation(value = "查看会员评价详情") | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.member; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.vo.ResultMessage; | ||||
| import cn.lili.modules.member.entity.dos.MemberSign; | ||||
| @ -27,6 +28,8 @@ public class MemberSignBuyerController { | ||||
|     @Autowired | ||||
|     private MemberSignService memberSignService; | ||||
| 
 | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @PostMapping | ||||
|     @ApiOperation(value = "会员签到") | ||||
|     public ResultMessage<Boolean> memberSign() { | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.order; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.security.OperationalJudgment; | ||||
| import cn.lili.common.vo.ResultMessage; | ||||
| @ -77,6 +78,7 @@ public class AfterSaleBuyerController { | ||||
|         return ResultUtil.data(afterSaleService.getAfterSaleVO(sn)); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @PostMapping(value = "/save/{orderItemSn}") | ||||
|     @ApiImplicitParam(name = "orderItemSn", value = "订单货物编号", required = true, paramType = "query") | ||||
|     @ApiOperation(value = "申请售后") | ||||
| @ -101,6 +103,7 @@ public class AfterSaleBuyerController { | ||||
|         return ResultUtil.data(afterSaleService.buyerDelivery(afterSaleSn, logisticsNo, logisticsId, mDeliverTime)); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "售后,取消售后") | ||||
|     @ApiImplicitParams({ | ||||
|             @ApiImplicitParam(name = "afterSaleSn", value = "售后sn", required = true, dataType = "String", paramType = "path") | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.order; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultCode; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.exception.ServiceException; | ||||
| @ -235,6 +236,7 @@ public class CartController { | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "创建交易") | ||||
|     @PostMapping(value = "/create/trade", consumes = "application/json", produces = "application/json") | ||||
|     public ResultMessage<Object> crateTrade(@RequestBody TradeParams tradeParams) { | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.order; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultCode; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.exception.ServiceException; | ||||
| @ -62,6 +63,7 @@ public class OrderBuyerController { | ||||
|         return ResultUtil.data(orderDetailVO); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "确认收货") | ||||
|     @ApiImplicitParams({ | ||||
|             @ApiImplicitParam(name = "orderSn", value = "订单编号", required = true, paramType = "path") | ||||
| @ -80,6 +82,7 @@ public class OrderBuyerController { | ||||
|         return ResultUtil.success(); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "取消订单") | ||||
|     @ApiImplicitParams({ | ||||
|             @ApiImplicitParam(name = "orderSn", value = "订单编号", required = true, dataType = "String", paramType = "path"), | ||||
| @ -91,6 +94,7 @@ public class OrderBuyerController { | ||||
|         return ResultUtil.success(); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "删除订单") | ||||
|     @ApiImplicitParams({ | ||||
|             @ApiImplicitParam(name = "orderSn", value = "订单编号", required = true, dataType = "String", paramType = "path") | ||||
| @ -113,6 +117,7 @@ public class OrderBuyerController { | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "开票") | ||||
|     @ApiImplicitParams({ | ||||
|             @ApiImplicitParam(name = "orderSn", value = "订单编号", required = true, dataType = "String", paramType = "path") | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.order; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.security.AuthUser; | ||||
| import cn.lili.common.security.OperationalJudgment; | ||||
| @ -66,6 +67,7 @@ public class OrderComplaintBuyerController { | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "添加交易投诉") | ||||
|     @PostMapping | ||||
|     public ResultMessage<OrderComplaint> add(@Valid OrderComplaintDTO orderComplaintDTO) { | ||||
| @ -85,6 +87,7 @@ public class OrderComplaintBuyerController { | ||||
|         return ResultUtil.data(communicationVO); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "取消售后") | ||||
|     @ApiImplicitParam(name = "id", value = "投诉单ID", required = true, paramType = "path") | ||||
|     @PutMapping(value = "/status/{id}") | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.order; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.vo.PageVO; | ||||
| import cn.lili.common.vo.ResultMessage; | ||||
| @ -41,6 +42,7 @@ public class ReceiptBuyerController { | ||||
|         return ResultUtil.data(this.receiptService.getReceiptData(searchParams, pageVO)); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "保存发票信息") | ||||
|     @PostMapping | ||||
|     public ResultMessage<Receipt> save(@Valid Receipt receipt) { | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.order; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.vo.ResultMessage; | ||||
| import cn.lili.modules.wallet.entity.dos.Recharge; | ||||
| @ -31,6 +32,7 @@ public class RechargeTradeBuyerController { | ||||
|     @Autowired | ||||
|     private RechargeService rechargeService; | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @PostMapping | ||||
|     @ApiOperation(value = "创建余额充值订单") | ||||
|     @ApiImplicitParams({ | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.other; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.security.context.UserContext; | ||||
| import cn.lili.common.vo.ResultMessage; | ||||
| @ -31,6 +32,7 @@ public class FeedbackBuyerController { | ||||
|     @Autowired | ||||
|     private FeedbackService feedbackService; | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "添加意见反馈") | ||||
|     @PostMapping() | ||||
|     public ResultMessage<Object> save(@Valid Feedback feedback) { | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.other.purchase; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultCode; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.security.context.UserContext; | ||||
| @ -48,6 +49,8 @@ public class PurchaseBuyerController { | ||||
|         return ResultUtil.data(goodsUnitService.page(PageUtil.initPage(pageVO))); | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "添加采购单") | ||||
|     @PostMapping | ||||
|     public ResultMessage<PurchaseOrderVO> addPurchaseOrderVO(@RequestBody PurchaseOrderVO purchaseOrderVO) { | ||||
| @ -74,6 +77,7 @@ public class PurchaseBuyerController { | ||||
|         return ResultUtil.data(purchaseOrderService.page(purchaseOrderSearchParams)); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "关闭采购单") | ||||
|     @ApiImplicitParam(name = "id", value = "采购单ID", required = true, dataType = "Long", paramType = "path") | ||||
|     @PutMapping("/{id}") | ||||
|  | ||||
| @ -1,6 +1,7 @@ | ||||
| package cn.lili.controller.wallet; | ||||
| 
 | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.security.context.UserContext; | ||||
| import cn.lili.common.vo.PageVO; | ||||
| @ -35,6 +36,7 @@ public class MemberReceiptController { | ||||
|         return ResultUtil.data(memberReceiptService.getPage(memberReceiptVO, page)); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "新增会员发票") | ||||
|     @PostMapping | ||||
|     public ResultMessage<Object> add(MemberReceiptAddVO memberReceiptAddVO) { | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.wallet; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultCode; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.exception.ServiceException; | ||||
| @ -120,6 +121,7 @@ public class MemberWalletBuyerController { | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @PostMapping(value = "/withdrawal") | ||||
|     @ApiOperation(value = "会员中心余额提现") | ||||
|     @ApiImplicitParams({ | ||||
|  | ||||
| @ -1,6 +1,7 @@ | ||||
| package cn.lili.controller.common; | ||||
| 
 | ||||
| import cn.lili.cache.limit.annotation.LimitPoint; | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.vo.ResultMessage; | ||||
| import cn.lili.modules.verification.entity.enums.VerificationEnums; | ||||
|  | ||||
| @ -183,7 +183,7 @@ mybatis-plus: | ||||
| logging: | ||||
|   # 输出级别 | ||||
|   level: | ||||
|     root: error | ||||
|     root: info | ||||
|   #    org.hibernate: debug | ||||
|   #    org.springframework: debug | ||||
|   #    org.springframework.data.mongodb.core: debug | ||||
|  | ||||
| @ -146,7 +146,7 @@ public class OrderEveryDayTaskExecute implements EveryDayExecute { | ||||
|                 memberEvaluationDTO.setDescriptionScore(5); | ||||
|                 memberEvaluationDTO.setServiceScore(5); | ||||
| 
 | ||||
|                 memberEvaluationService.addMemberEvaluation(memberEvaluationDTO); | ||||
|                 memberEvaluationService.addMemberEvaluation(memberEvaluationDTO, false); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|  | ||||
| @ -4,6 +4,7 @@ import cn.lili.cache.limit.enums.LimitTypeEnums; | ||||
| import cn.lili.cache.limit.annotation.LimitPoint; | ||||
| import cn.lili.common.enums.ResultCode; | ||||
| import cn.lili.common.exception.ServiceException; | ||||
| import cn.lili.common.utils.IpUtils; | ||||
| import com.google.common.collect.ImmutableList; | ||||
| import lombok.extern.slf4j.Slf4j; | ||||
| import org.apache.commons.lang3.StringUtils; | ||||
| @ -54,7 +55,8 @@ public class LimitInterceptor { | ||||
|                 key = limitPointAnnotation.key(); | ||||
|                 break; | ||||
|             default: | ||||
|                 key = limitPointAnnotation.key() + getIpAddress(); | ||||
|                 key = limitPointAnnotation.key() + IpUtils | ||||
|                         .getIpAddress(((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest()); | ||||
|         } | ||||
|         ImmutableList<String> keys = ImmutableList.of(StringUtils.join(limitPointAnnotation.prefix(), key)); | ||||
|         try { | ||||
| @ -71,32 +73,8 @@ public class LimitInterceptor { | ||||
|         } catch (ServiceException e) { | ||||
|             throw e; | ||||
|         } catch (Exception e) { | ||||
|             throw new RuntimeException("服务器异常,请稍后再试"); | ||||
|             throw new ServiceException(ResultCode.ERROR); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     /** | ||||
|      * 默认unknown常量值 | ||||
|      */ | ||||
|     private static final String UNKNOWN = "unknown"; | ||||
| 
 | ||||
|     /** | ||||
|      * 获取ip | ||||
|      * @return ip | ||||
|      */ | ||||
|     public String getIpAddress() { | ||||
|         HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); | ||||
|         String ip = request.getHeader("x-forwarded-for"); | ||||
|         if (ip == null || ip.length() == 0 || UNKNOWN.equalsIgnoreCase(ip)) { | ||||
|             ip = request.getHeader("Proxy-Client-IP"); | ||||
|         } | ||||
|         if (ip == null || ip.length() == 0 || UNKNOWN.equalsIgnoreCase(ip)) { | ||||
|             ip = request.getHeader("WL-Proxy-Client-IP"); | ||||
|         } | ||||
|         if (ip == null || ip.length() == 0 || UNKNOWN.equalsIgnoreCase(ip)) { | ||||
|             ip = request.getRemoteAddr(); | ||||
|         } | ||||
|         return ip; | ||||
|     } | ||||
| } | ||||
| @ -4,6 +4,8 @@ import java.lang.annotation.*; | ||||
| 
 | ||||
| /** | ||||
|  * 演示站点注解 | ||||
|  * <p> | ||||
|  * PS 此注解需要用户登录之后才可以使用 | ||||
|  * | ||||
|  * @author Bulbasaur | ||||
|  * @since 2021/7/9 1:40 上午 | ||||
|  | ||||
| @ -0,0 +1,25 @@ | ||||
| package cn.lili.common.aop.annotation; | ||||
| 
 | ||||
| import java.lang.annotation.*; | ||||
| import java.util.concurrent.TimeUnit; | ||||
| 
 | ||||
| /** | ||||
|  * 防止重复提交注解 | ||||
|  * | ||||
|  * @author liushuai(liushuai711 @ gmail.com) | ||||
|  * @version v4.0 | ||||
|  * @Description: | ||||
|  * @since 2022/1/25 09:17 | ||||
|  */ | ||||
| @Target(ElementType.METHOD) | ||||
| @Retention(RetentionPolicy.RUNTIME) | ||||
| @Documented | ||||
| @Inherited | ||||
| public @interface PreventDuplicateSubmissions { | ||||
| 
 | ||||
| 
 | ||||
|     /** | ||||
|      * 过期时间 | ||||
|      */ | ||||
|     long expire() default 3; | ||||
| } | ||||
| @ -0,0 +1,67 @@ | ||||
| package cn.lili.common.aop.interceptor; | ||||
| 
 | ||||
| /** | ||||
|  * 防重复提交业务 | ||||
|  * | ||||
|  * @author Chopper | ||||
|  * @version v1.0 | ||||
|  * 2022-01-25 09:20 | ||||
|  */ | ||||
| 
 | ||||
| import cn.lili.cache.Cache; | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultCode; | ||||
| import cn.lili.common.exception.ServiceException; | ||||
| import cn.lili.common.security.context.UserContext; | ||||
| import lombok.extern.slf4j.Slf4j; | ||||
| import org.aspectj.lang.annotation.Aspect; | ||||
| import org.aspectj.lang.annotation.Before; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Component; | ||||
| import org.springframework.web.context.request.RequestContextHolder; | ||||
| import org.springframework.web.context.request.ServletRequestAttributes; | ||||
| 
 | ||||
| import javax.servlet.http.HttpServletRequest; | ||||
| 
 | ||||
| @Aspect | ||||
| @Component | ||||
| @Slf4j | ||||
| public class PreventDuplicateSubmissionsInterceptor { | ||||
| 
 | ||||
|     @Autowired | ||||
|     private Cache<String> cache; | ||||
| 
 | ||||
| 
 | ||||
|     @Before("@annotation(preventDuplicateSubmissions)") | ||||
|     public void interceptor(PreventDuplicateSubmissions preventDuplicateSubmissions) { | ||||
| 
 | ||||
|         try { | ||||
|             Long count = cache.incr(getParams(), preventDuplicateSubmissions.expire()); | ||||
|             //如果超过1或者设置的参数,则表示重复提交了 | ||||
|             if (count.intValue() >= preventDuplicateSubmissions.expire()) { | ||||
|                 throw new ServiceException(ResultCode.LIMIT_ERROR); | ||||
|             } | ||||
|         } | ||||
|         //如果参数为空,则表示用户未登录,直接略过,不做处理 | ||||
|         catch (NullPointerException e) { | ||||
|             return; | ||||
|         } catch (ServiceException e) { | ||||
|             throw e; | ||||
|         } catch (Exception e) { | ||||
|             throw new ServiceException(ResultCode.ERROR); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * 获取表单参数 | ||||
|      * | ||||
|      * @return | ||||
|      */ | ||||
|     private String getParams() { | ||||
|         HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); | ||||
|         //请求地址 | ||||
|         return request.getRequestURI() + UserContext.getCurrentUser().getId() + UserContext.getCurrentUser().getUsername(); | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -41,9 +41,10 @@ public interface MemberEvaluationService extends IService<MemberEvaluation> { | ||||
|      * 4.发送用户评价消息修改商品的评价数量以及好评率 | ||||
|      * | ||||
|      * @param memberEvaluationDTO 评论 | ||||
|      * @param isSelf              是否自己操作(true:买家操作/false 系统操作) | ||||
|      * @return 操作状态 | ||||
|      */ | ||||
|     MemberEvaluationDTO addMemberEvaluation(MemberEvaluationDTO memberEvaluationDTO); | ||||
|     MemberEvaluationDTO addMemberEvaluation(MemberEvaluationDTO memberEvaluationDTO, Boolean isSelf); | ||||
| 
 | ||||
|     /** | ||||
|      * 根据ID查询会员评价 | ||||
|  | ||||
| @ -106,13 +106,15 @@ public class MemberEvaluationServiceImpl extends ServiceImpl<MemberEvaluationMap | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public MemberEvaluationDTO addMemberEvaluation(MemberEvaluationDTO memberEvaluationDTO) { | ||||
|     public MemberEvaluationDTO addMemberEvaluation(MemberEvaluationDTO memberEvaluationDTO, Boolean isSelf) { | ||||
|         //获取子订单信息 | ||||
|         OrderItem orderItem = orderItemService.getBySn(memberEvaluationDTO.getOrderItemSn()); | ||||
|         //获取订单信息 | ||||
|         Order order = orderService.getBySn(orderItem.getOrderSn()); | ||||
|         //检测是否可以添加会员评价 | ||||
|         if (isSelf) { | ||||
|             checkMemberEvaluation(orderItem, order); | ||||
|         } | ||||
|         //获取用户信息 | ||||
|         Member member = memberService.getUserInfo(); | ||||
|         //获取商品信息 | ||||
|  | ||||
| @ -67,14 +67,6 @@ public class MemberSignServiceImpl extends ServiceImpl<MemberSignMapper, MemberS | ||||
|         //获取当前会员信息 | ||||
|         AuthUser authUser = UserContext.getCurrentUser(); | ||||
|         if (authUser != null) { | ||||
|             QueryWrapper<MemberSign> queryWrapper = new QueryWrapper<>(); | ||||
|             queryWrapper.eq("member_id", authUser.getId()); | ||||
|             queryWrapper.between("create_time", new Date(DateUtil.startOfTodDay() * 1000), DateUtil.getCurrentDayEndTime()); | ||||
|             //校验今天是否已经签到 | ||||
|             List<MemberSign> todaySigns = this.baseMapper.getTodayMemberSign(queryWrapper); | ||||
|             if (todaySigns.size() > 0) { | ||||
|                 throw new ServiceException(ResultCode.MEMBER_SIGN_REPEAT); | ||||
|             } | ||||
|             //当前签到天数的前一天日期 | ||||
|             List<MemberSign> signs = this.baseMapper.getBeforeMemberSign(authUser.getId()); | ||||
|             //构建参数 | ||||
| @ -89,14 +81,17 @@ public class MemberSignServiceImpl extends ServiceImpl<MemberSignMapper, MemberS | ||||
|             } else { | ||||
|                 memberSign.setSignDay(1); | ||||
|             } | ||||
|             Integer result = this.baseMapper.insert(memberSign); | ||||
|             //手动写入创建时间,以保证唯一索引生效 | ||||
|             memberSign.setCreateTime(DateUtil.getCurrentDayEndTime()); | ||||
|             try { | ||||
|                 this.baseMapper.insert(memberSign); | ||||
|                 //签到成功后发送消息赠送积分 | ||||
|             if (result > 0) { | ||||
|                 String destination = rocketmqCustomProperties.getMemberTopic() + ":" + MemberTagsEnum.MEMBER_SING.name(); | ||||
|                 rocketMQTemplate.asyncSend(destination, memberSign, RocketmqSendCallbackBuilder.commonCallback()); | ||||
|                 return true; | ||||
|             } catch (Exception e) { | ||||
|                 throw new ServiceException(ResultCode.MEMBER_SIGN_REPEAT); | ||||
|             } | ||||
|             return false; | ||||
|         } | ||||
|         throw new ServiceException(ResultCode.USER_NOT_LOGIN); | ||||
|     } | ||||
|  | ||||
| @ -5,6 +5,8 @@ import cn.hutool.core.util.IdUtil; | ||||
| import cn.hutool.core.util.StrUtil; | ||||
| import cn.hutool.json.JSONObject; | ||||
| import cn.hutool.json.JSONUtil; | ||||
| import cn.lili.common.enums.ResultCode; | ||||
| import cn.lili.common.exception.ServiceException; | ||||
| import cn.lili.modules.payment.kit.core.PaymentHttpResponse; | ||||
| import cn.lili.modules.payment.kit.core.enums.RequestMethodEnums; | ||||
| import cn.lili.modules.payment.kit.core.enums.SignType; | ||||
| @ -114,6 +116,30 @@ public class WxPayKit { | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|      * APP 单独生成签名 | ||||
|      * app 支付环境中,如果遇到签名错误,百思不得其解,则可以使用这个方法调用签名尝试解决 | ||||
|      * | ||||
|      * @param params 需要签名的参数 | ||||
|      * @return 签名后的数据 | ||||
|      */ | ||||
|     public static String createAppSign(Map<String, String> params, String privateKey) { | ||||
| 
 | ||||
|         String appid = params.get("appid"); | ||||
|         String timestamp = params.get("timestamp"); | ||||
|         String noncestr = params.get("noncestr"); | ||||
|         String prepayid = params.get("prepayid"); | ||||
| 
 | ||||
|         String encrypt = appid + "\n" + timestamp + "\n" + noncestr + "\n" + prepayid + "\n"; | ||||
| 
 | ||||
|         try { | ||||
|             return PayKit.createSign(encrypt, privateKey); | ||||
|         } catch (Exception e) { | ||||
|             throw new ServiceException(ResultCode.ERROR); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     /** | ||||
|      * 生成签名 | ||||
|      * | ||||
| @ -351,6 +377,8 @@ public class WxPayKit { | ||||
|             signType = SignType.MD5; | ||||
|         } | ||||
|         String packageSign = createSign(packageParams, partnerKey, signType); | ||||
|         // 部分微信APP支付 提示签名错误 解开下方注释 替换上边的代码就好。 | ||||
|         //        String packageSign = createAppSign(packageParams, partnerKey); | ||||
|         packageParams.put("sign", packageSign); | ||||
|         return packageParams; | ||||
|     } | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.distribution; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.vo.ResultMessage; | ||||
| import cn.lili.modules.distribution.entity.dos.DistributionCash; | ||||
| @ -43,6 +44,7 @@ public class DistributionCashManagerController { | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "审核") | ||||
|     @ApiImplicitParams({ | ||||
|             @ApiImplicitParam(name = "id", value = "分销佣金ID", required = true, paramType = "path", dataType = "String"), | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.distribution; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultCode; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.exception.ServiceException; | ||||
| @ -39,6 +40,7 @@ public class DistributionManagerController { | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "清退分销商") | ||||
|     @PutMapping(value = "/retreat/{id}") | ||||
|     @ApiImplicitParams({ | ||||
| @ -53,6 +55,7 @@ public class DistributionManagerController { | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "恢复分销商") | ||||
|     @PutMapping(value = "/resume/{id}") | ||||
|     @ApiImplicitParams({ | ||||
| @ -67,6 +70,7 @@ public class DistributionManagerController { | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "审核分销商") | ||||
|     @PutMapping(value = "/audit/{id}") | ||||
|     @ApiImplicitParams({ | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.goods; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultCode; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.exception.ServiceException; | ||||
| @ -65,6 +66,7 @@ public class GoodsManagerController { | ||||
|         return goodsService.queryByParams(goodsSearchParams); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "管理员下架商品", notes = "管理员下架商品时使用") | ||||
|     @ApiImplicitParams({ | ||||
|             @ApiImplicitParam(name = "goodsId", value = "商品ID", required = true, paramType = "query", allowMultiple = true), | ||||
| @ -79,6 +81,7 @@ public class GoodsManagerController { | ||||
|         throw new ServiceException(ResultCode.GOODS_UNDER_ERROR); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "管理员审核商品", notes = "管理员审核商品") | ||||
|     @ApiImplicitParams({ | ||||
|             @ApiImplicitParam(name = "goodsIds", value = "商品ID", required = true, paramType = "path", allowMultiple = true, dataType = "int"), | ||||
| @ -94,6 +97,7 @@ public class GoodsManagerController { | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "管理员上架商品", notes = "管理员上架商品时使用") | ||||
|     @PutMapping(value = "/{goodsId}/up") | ||||
|     @ApiImplicitParams({ | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.member; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.vo.PageVO; | ||||
| import cn.lili.common.vo.ResultMessage; | ||||
| @ -33,6 +34,7 @@ public class MemberAddressManagerController { | ||||
|         return ResultUtil.data(memberAddressService.getAddressByMember(page, memberId)); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "删除会员收件地址") | ||||
|     @ApiImplicitParam(name = "id", value = "会员地址ID", dataType = "String", paramType = "path") | ||||
|     @DeleteMapping(value = "/delById/{id}") | ||||
| @ -48,6 +50,7 @@ public class MemberAddressManagerController { | ||||
|         return ResultUtil.data(memberAddressService.updateMemberAddress(shippingAddress)); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "新增会员收件地址") | ||||
|     @PostMapping | ||||
|     public ResultMessage<MemberAddress> addShippingAddress(@Valid MemberAddress shippingAddress) { | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.member; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.vo.PageVO; | ||||
| import cn.lili.common.vo.ResultMessage; | ||||
| @ -30,6 +31,7 @@ public class MemberEvaluationManagerController { | ||||
|     @Autowired | ||||
|     private MemberEvaluationService memberEvaluationService; | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "通过id获取评论") | ||||
|     @ApiImplicitParam(name = "id", value = "评价ID", required = true, dataType = "String", paramType = "path") | ||||
|     @GetMapping(value = "/get/{id}") | ||||
| @ -45,6 +47,7 @@ public class MemberEvaluationManagerController { | ||||
|         return ResultUtil.data(memberEvaluationService.queryPage(evaluationQueryParams)); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "修改评价状态") | ||||
|     @ApiImplicitParams({ | ||||
|             @ApiImplicitParam(name = "id", value = "评价ID", required = true, paramType = "path"), | ||||
|  | ||||
| @ -1,6 +1,7 @@ | ||||
| package cn.lili.controller.member; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.DemoSite; | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.vo.PageVO; | ||||
| import cn.lili.common.vo.ResultMessage; | ||||
| @ -56,20 +57,22 @@ public class MemberManagerController { | ||||
|         return ResultUtil.data(memberService.addMember(member)); | ||||
|     } | ||||
| 
 | ||||
|     @DemoSite | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "修改会员基本信息") | ||||
|     @PutMapping | ||||
|     @DemoSite | ||||
|     public ResultMessage<Member> update(@Valid ManagerMemberEditDTO managerMemberEditDTO) { | ||||
|         return ResultUtil.data(memberService.updateMember(managerMemberEditDTO)); | ||||
|     } | ||||
| 
 | ||||
|     @DemoSite | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "修改会员状态,开启关闭会员") | ||||
|     @ApiImplicitParams({ | ||||
|             @ApiImplicitParam(name = "memberIds", value = "会员ID", required = true, dataType = "String", allowMultiple = true, paramType = "query"), | ||||
|             @ApiImplicitParam(name = "disabled", required = true, dataType = "boolean", paramType = "query") | ||||
|     }) | ||||
|     @PutMapping("/updateMemberStatus") | ||||
|     @DemoSite | ||||
|     public ResultMessage<Object> updateMemberStatus(@RequestParam List<String> memberIds, @RequestParam Boolean disabled) { | ||||
|         memberService.updateMemberStatus(memberIds, disabled); | ||||
|         return ResultUtil.success(); | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.order; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.vo.ResultMessage; | ||||
| import cn.lili.modules.order.aftersale.entity.dos.AfterSale; | ||||
| @ -74,6 +75,7 @@ public class AfterSaleManagerController { | ||||
|         return ResultUtil.data(afterSaleService.refund(afterSaleSn, remark)); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "审核售后申请") | ||||
|     @ApiImplicitParams({ | ||||
|             @ApiImplicitParam(name = "afterSaleSn", value = "售后sn", required = true, paramType = "path"), | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.order; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.security.AuthUser; | ||||
| import cn.lili.common.security.context.UserContext; | ||||
| @ -79,6 +80,7 @@ public class OrderComplaintManagerController { | ||||
|         return ResultUtil.data(communicationVO); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "修改状态") | ||||
|     @PutMapping(value = "/status") | ||||
|     public ResultMessage<Object> updateStatus(OrderComplaintOperationParams orderComplainVO) { | ||||
| @ -87,6 +89,7 @@ public class OrderComplaintManagerController { | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "仲裁") | ||||
|     @ApiImplicitParams({ | ||||
|             @ApiImplicitParam(name = "id", value = "投诉单ID", required = true, paramType = "path"), | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.order; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.vo.ResultMessage; | ||||
| import cn.lili.modules.member.entity.dto.MemberAddressDTO; | ||||
| @ -68,6 +69,7 @@ public class OrderManagerController { | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "确认收款") | ||||
|     @ApiImplicitParam(name = "orderSn", value = "订单编号", required = true, dataType = "String", paramType = "path") | ||||
|     @PostMapping(value = "/{orderSn}/pay") | ||||
| @ -76,6 +78,7 @@ public class OrderManagerController { | ||||
|         return ResultUtil.success(); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "修改收货人信息") | ||||
|     @ApiImplicitParam(name = "orderSn", value = "订单sn", required = true, dataType = "String", paramType = "path") | ||||
|     @PostMapping(value = "/update/{orderSn}/consignee") | ||||
| @ -84,6 +87,7 @@ public class OrderManagerController { | ||||
|         return ResultUtil.data(orderService.updateConsignee(orderSn, memberAddressDTO)); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "修改订单价格") | ||||
|     @ApiImplicitParams({ | ||||
|             @ApiImplicitParam(name = "orderSn", value = "订单sn", required = true, dataType = "String", paramType = "path"), | ||||
| @ -96,6 +100,7 @@ public class OrderManagerController { | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "取消订单") | ||||
|     @ApiImplicitParams({ | ||||
|             @ApiImplicitParam(name = "orderSn", value = "订单编号", required = true, dataType = "String", paramType = "path"), | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.statistics; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.vo.ResultMessage; | ||||
| import cn.lili.modules.statistics.entity.dto.GoodsStatisticsQueryParam; | ||||
| @ -40,6 +41,7 @@ public class IndexStatisticsManagerController { | ||||
| 
 | ||||
|     @ApiOperation(value = "获取首页查询数据") | ||||
|     @GetMapping | ||||
|     @PreventDuplicateSubmissions | ||||
|     public ResultMessage<IndexStatisticsVO> index() { | ||||
|         try { | ||||
|             return ResultUtil.data(indexStatisticsService.indexStatistics()); | ||||
|  | ||||
| @ -1,6 +1,7 @@ | ||||
| package cn.lili.controller.wallet; | ||||
| 
 | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.vo.PageVO; | ||||
| import cn.lili.common.vo.ResultMessage; | ||||
| @ -43,6 +44,7 @@ public class MemberWithdrawApplyManagerController { | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "提现申请审核") | ||||
|     @PostMapping | ||||
|     @ApiImplicitParams({ | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.order; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.security.OperationalJudgment; | ||||
| import cn.lili.common.security.context.UserContext; | ||||
| @ -60,6 +61,7 @@ public class AfterSaleStoreController { | ||||
|         return ResultUtil.data(afterSaleService.exportAfterSaleOrder(searchParams)); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "审核售后申请") | ||||
|     @ApiImplicitParams({ | ||||
|             @ApiImplicitParam(name = "afterSaleSn", value = "售后sn", required = true, paramType = "path"), | ||||
| @ -76,6 +78,7 @@ public class AfterSaleStoreController { | ||||
|         return ResultUtil.data(afterSaleService.review(afterSaleSn, serviceStatus, remark,actualRefundPrice)); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "卖家确认收货") | ||||
|     @ApiImplicitParams({ | ||||
|             @ApiImplicitParam(name = "afterSaleSn", value = "售后sn", required = true, paramType = "path"), | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.order; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| import cn.lili.common.security.AuthUser; | ||||
| import cn.lili.common.security.OperationalJudgment; | ||||
| @ -81,6 +82,7 @@ public class OrderComplaintStoreController { | ||||
|         return ResultUtil.data(orderComplainVO); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "申诉") | ||||
|     @PutMapping("/appeal") | ||||
|     public ResultMessage<OrderComplaintVO> appeal(StoreAppealVO storeAppealVO) { | ||||
| @ -88,6 +90,7 @@ public class OrderComplaintStoreController { | ||||
|         return ResultUtil.data(orderComplaintService.getOrderComplainById(storeAppealVO.getOrderComplaintId())); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "修改状态") | ||||
|     @PutMapping(value = "/status") | ||||
|     public ResultMessage<Object> updateStatus(OrderComplaintOperationParams orderComplainVO) { | ||||
|  | ||||
| @ -1,5 +1,6 @@ | ||||
| package cn.lili.controller.order; | ||||
| 
 | ||||
| import cn.lili.common.aop.annotation.PreventDuplicateSubmissions; | ||||
| import cn.lili.common.context.ThreadContextHolder; | ||||
| import cn.lili.common.enums.ResultCode; | ||||
| import cn.lili.common.enums.ResultUtil; | ||||
| @ -86,6 +87,7 @@ public class OrderStoreController { | ||||
|         return ResultUtil.data(orderService.updateConsignee(orderSn, memberAddressDTO)); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "修改订单价格") | ||||
|     @ApiImplicitParams({ | ||||
|             @ApiImplicitParam(name = "orderSn", value = "订单sn", required = true, dataType = "String", paramType = "path"), | ||||
| @ -97,6 +99,7 @@ public class OrderStoreController { | ||||
|         return ResultUtil.data(orderPriceService.updatePrice(orderSn, orderPrice)); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "订单发货") | ||||
|     @ApiImplicitParams({ | ||||
|             @ApiImplicitParam(name = "orderSn", value = "订单sn", required = true, dataType = "String", paramType = "path"), | ||||
| @ -110,6 +113,7 @@ public class OrderStoreController { | ||||
|         return ResultUtil.data(orderService.delivery(orderSn, logisticsNo, logisticsId)); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "取消订单") | ||||
|     @ApiImplicitParams({ | ||||
|             @ApiImplicitParam(name = "orderSn", value = "订单编号", required = true, dataType = "String", paramType = "path"), | ||||
| @ -127,6 +131,7 @@ public class OrderStoreController { | ||||
|         return ResultUtil.data(orderService.getOrderByVerificationCode(verificationCode)); | ||||
|     } | ||||
| 
 | ||||
|     @PreventDuplicateSubmissions | ||||
|     @ApiOperation(value = "订单核验") | ||||
|     @ApiImplicitParams({ | ||||
|             @ApiImplicitParam(name = "orderSn", value = "订单号", required = true, paramType = "path"), | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 paulGao
						paulGao