| | |
| | | /** |
| | | * 间隔时间(ms),小于此时间视为重复提交 |
| | | */ |
| | | int interval() default 800; |
| | | int interval() default 2000; |
| | | |
| | | /** |
| | | * 错误消息 |
| | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.utils.Utils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.DigestUtils; |
| | |
| | | if(user !=null){ |
| | | signString.append("loginuserId").append("=").append(user.getId()).append(";"); |
| | | } |
| | | <<<<<<< HEAD |
| | | |
| | | ======= |
| | | String apiToken = String.valueOf(request.getHeader("token")); |
| | | if(StringUtils.isNotBlank(apiToken)){ |
| | | signString.append("apiToken").append("=").append(apiToken).append(";"); |
| | | } |
| | | >>>>>>> 7f2749f8bb57290104636f50de4824ad1f13cdd5 |
| | | // 参数签名 |
| | | return DigestUtils.md5DigestAsHex(signString.toString().getBytes()); |
| | | } |
| | |
| | | HashMap<String, Object> paramMap = new HashMap<>(); |
| | | paramMap.put("REQUEST_URI", request.getRequestURI()); |
| | | paramMap.put("USER_TOKEN", String.valueOf(request.getHeader("eva-auth-token"))); |
| | | paramMap.put("API_TOKEN", String.valueOf(request.getHeader("token"))); |
| | | paramMap.put("IP", Utils.User_Client.getIP(request)); |
| | | return paramMap; |
| | | } |
| | |
| | | //交易类型 0租车押金 1结算实际消费 2结算退款 3平台退款" |
| | | DEPOSIT(0,"租车押金", "租车押金"), |
| | | |
| | | CONSUMPTION(1,"结算实际消费", "结算实际消费"), |
| | | CONSUMPTION(1,"订单消费结算", "订单消费结算"), |
| | | |
| | | REFUND(2,"结算退款", "结算退款"), |
| | | REFUND(2,"结算退押金", "结算退押金"), |
| | | |
| | | PLATFORMREFUND(3,"平台退款", "平台退款") |
| | | PLATFORMREFUND(3,"平台退押金", "平台退押金") |
| | | |
| | | ; |
| | | String name; |
| | |
| | | |
| | | public enum REFUND_TYPE{ |
| | | // '退款类型 0用户结算退款 1平台自动结算退款 2强制结算退款 3结算后退款' |
| | | NORMAL( 0,"用户结算退款",""), |
| | | NORMAL( 0,"用户结算退款","结算退押金"), |
| | | |
| | | PLAT_AUTO( 1,"平台自动结算退款",""), |
| | | PLAT_AUTO( 1,"平台自动结算退款","平台退押金"), |
| | | |
| | | PLAT_FORCE( 2,"强制结算退款",""), |
| | | PLAT_FORCE( 2,"强制结算退款","平台退押金"), |
| | | |
| | | BACK( 3,"结算后退款",""), |
| | | BACK( 3,"结算后退款","平台退款"), |
| | | |
| | | ; |
| | | String name; |
| | |
| | | transactions.setIsdeleted(Constants.ZERO); |
| | | transactions.setOrderId(refundDTO.getOrderId()); |
| | | transactions.setMoney(refundDTO.getRefundAmount()); |
| | | transactions.setType(refundDTO.getType()==Constants.TRANSACTIONS_TYPE.REFUND.getKey()?Constants.TRANSACTIONS_TYPE.PLATFORMREFUND.getKey():Constants.REFUND_TYPE.BACK.getKey()); |
| | | transactions.setPreOrderid(refundDTO.getOrderId()); |
| | | transactions.setOnlineOrderid(refNum); |
| | | transactions.setDoneDate(new Date()); |
| | | transactions.setTitle(Constants.TRANSACTIONS_TYPE.get(transactions.getType()).getName()); |
| | | transactions.setContent(Constants.TRANSACTIONS_TYPE.get(transactions.getType()).getInfo()); |
| | | if(refund.getType().equals(Constants.REFUND_TYPE.PLAT_AUTO.getKey())||refund.getType().equals(Constants.REFUND_TYPE.PLAT_FORCE.getKey())){ |
| | | //平台自动退款 或 强制退款 |
| | | transactions.setType(Constants.TRANSACTIONS_TYPE.REFUND.getKey()); |
| | | transactions.setTitle(Constants.REFUND_TYPE.PLAT_AUTO.getInfo()); |
| | | transactions.setContent(Constants.REFUND_TYPE.PLAT_AUTO.getInfo()); |
| | | }else if(refund.getType().equals(Constants.REFUND_TYPE.NORMAL.getKey())){ |
| | | //用户主动退款 |
| | | transactions.setType(Constants.TRANSACTIONS_TYPE.REFUND.getKey()); |
| | | transactions.setTitle(Constants.REFUND_TYPE.NORMAL.getInfo()); |
| | | transactions.setContent(Constants.REFUND_TYPE.NORMAL.getInfo()); |
| | | }else if(refund.getType().equals(Constants.REFUND_TYPE.BACK.getKey())){ |
| | | //结算后退款 |
| | | transactions.setType(Constants.TRANSACTIONS_TYPE.REFUND.getKey()); |
| | | transactions.setTitle(Constants.REFUND_TYPE.BACK.getInfo()); |
| | | transactions.setContent(Constants.REFUND_TYPE.BACK.getInfo()); |
| | | } |
| | | transactions.setBalance(BigDecimal.ZERO); |
| | | transactions.setObjId(refund.getId()); |
| | | transactions.setObjType(Constants.ONE); |
| | |
| | | @Override |
| | | public void closeGoodsorder( Goodsorder goodsorder ,int type ) { |
| | | |
| | | // |
| | | List<MemberRides> memberRides = getMemberRidesForClose(goodsorder.getId()); |
| | | //默认结算为押金金额 |
| | | BigDecimal closeMoney = new BigDecimal(0.00); |
| | |
| | | <artifactId>services</artifactId> |
| | | <version>1.0.0-SNAPSHOT</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-aop</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | |
| | | package com.doumee.api.web; |
| | | |
| | | import com.doumee.api.Repeat.RepeatSubmit; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.annotation.LoginRequired; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @PreventRepeat |
| | | @LoginRequired |
| | | @ApiOperation(value = "押金支付", notes = "小程序端") |
| | | @GetMapping("/createGoodsOrderPay") |
| | |
| | | } |
| | | |
| | | |
| | | @PreventRepeat |
| | | @LoginRequired |
| | | @ApiOperation(value = "扫码解锁", notes = "小程序端") |
| | | @GetMapping("/openLock") |
| | |
| | | package com.doumee.api.web; |
| | | |
| | | import com.doumee.core.annotation.LoginRequired; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.dao.business.web.response.HomeResponse; |