提交 fc6cb356 authored 作者: huyufan's avatar huyufan

Merge remote-tracking branch 'origin/v7.0_small_version_fix_20231120' into test

......@@ -109,6 +109,7 @@ public enum PerformanceResultEnum implements ResultEnum {
BUSINESS_NO_FAIL(1907, "营业执照校验不一致,请重新输入"),
TOKEN_IS_FAIL(1908, "token失效,请重新获取token"),
PASSWORD_RESET_IS_FAIL(1909, "重置密码出现异常"),
PASSWORD_CHECK_FAIL(1910, "交易密码填写错误,请重新输入"),
;
private final int code;
......
......@@ -35,4 +35,7 @@ public class OwnerCaseOutParam {
@ApiModelProperty(value = "提现银行卡号", example = "62213545878787")
private String ownerBankAccount;
@ApiModelProperty(value = "交易密码")
private String accountPassword;
}
\ No newline at end of file
......@@ -38,6 +38,19 @@ public class OwnerTopUpParam {
@ApiModelProperty(value = "打款凭证", example = "/a.png")
private String drawingProof;
@ApiModelProperty(value = "收款人企业信息", example = "收款人企业信息")
private String enterpriseName;
@ApiModelProperty(value = "收款人开户行", example = "62213545878787")
private String openAccountBank;
@ApiModelProperty(value = "收款人开户行银行代码", example = "收款人开户行银行代码")
private String openAccountBankNumber;
@ApiModelProperty(value = "收款人账户账号", example = "")
private String accountNumber;
@ApiModelProperty(value = "交易密码")
private String accountPassword;
}
\ No newline at end of file
package com.clx.performance.vo.pc;
import com.msl.common.convertor.field.Converted;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class OwnerAccountAllVO {
@ApiModelProperty("保证金账户")
@Converted(isDynamic = true)
private OwnerAccountVO marginAccount;
@ApiModelProperty("预付运费账户")
@Converted(isDynamic = true)
private OwnerAccountVO prepaidFreightAccount;
@ApiModelProperty("0:没有交易密码 1:有交易密码")
private Integer ownerAccountPassword;
}
......@@ -91,4 +91,10 @@ public class OwnerTopUpVO {
@ApiModelProperty(value = "审批拒绝")
private String approvalTurnDown;
@ApiModelProperty(value = "收款人企业信息")
private String enterpriseName;
@ApiModelProperty(value = "收款人账户账号")
private String accountNumber;
}
\ No newline at end of file
......@@ -42,84 +42,31 @@ public class RabbitBeanConfig {
@Bean
public Queue orderOnQueue() {
Map<String, Object> params = new HashMap<>(6);
params.put("x-dead-letter-exchange", RabbitKeyConstants.ORDER_ON_DEAD_EXCHANGE);
params.put("x-dead-letter-routing-key", RabbitKeyConstants.ORDER_ON_DEAD_ROUTE_KEY);
return new Queue(RabbitKeyConstants.ORDER_ON_QUEUE, true, false, false, params);
return new Queue(RabbitKeyConstants.ORDER_ON_QUEUE, true, false, false);
}
/**
* 订单挂单中交换机
**/
@Bean
public DirectExchange orderOnExchange() {
return new DirectExchange(RabbitKeyConstants.ORDER_ON_EXCHANGE);
public CustomExchange orderOnExchange() {
Map<String, Object> arguments = new HashMap<>();
//设置路由模式 direct模式
arguments.put("x-delayed-type", "direct");
return new CustomExchange(RabbitKeyConstants.ORDER_ON_EXCHANGE,"x-delayed-message", true, false, arguments);
}
/**
* 订单挂单中绑定
*/
@Bean
public Binding orderOnExchangeBind() {
return BindingBuilder.bind(orderOnQueue()).to(orderOnExchange()).with(RabbitKeyConstants.ORDER_ON_ROUTE_KEY);
public Binding orderOnExchangeBind(@Qualifier("orderOnQueue")Queue queue,@Qualifier("orderOnExchange")CustomExchange customExchange) {
return BindingBuilder.bind(queue).to(customExchange).with(RabbitKeyConstants.ORDER_ON_ROUTE_KEY).noargs();
}
/**
* 死信队列:死信队列处理延迟消息
* @return
*/
@Bean
public Queue orderOnDeadQueue() {
return new Queue(RabbitKeyConstants.ORDER_ON_DEAD_QUEUE, true, false, false);
}
/**
* 订单挂单中交换机:死信队列处理延迟消息
**/
@Bean
public DirectExchange orderOnDeadExchange() {
return new DirectExchange(RabbitKeyConstants.ORDER_ON_DEAD_EXCHANGE);
}
/**
* 订单挂单中绑定:死信队列处理延迟消息
*/
@Bean
public Binding orderDeadExchangeBind() {
return BindingBuilder.bind(orderOnDeadQueue()).to(orderOnDeadExchange()).with(RabbitKeyConstants.ORDER_ON_DEAD_ROUTE_KEY);
}
/**
// * 货单挂单队列
// * @return
// */
// @Bean
// public Queue orderGoodsOnQueue() {
// Map<String, Object> params = new HashMap<>(6);
// params.put("x-dead-letter-exchange", RabbitKeyConstants.ORDER_GOODS_ON_DEAD_EXCHANGE);
// params.put("x-dead-letter-routing-key", RabbitKeyConstants.ORDER_GOODS_ON_DEAD_ROUTE_KEY);
// return new Queue(RabbitKeyConstants.ORDER_GOODS_ON_QUEUE, true, false, false, params);
// }
//
// /**
// * 货单挂单中交换机
// **/
// @Bean
// public DirectExchange orderGoodsOnExchange() {
// return new DirectExchange(RabbitKeyConstants.ORDER_GOODS_ON_EXCHANGE);
// }
//
// /**
// * 货单挂单中绑定
// */
// @Bean
// public Binding orderGoodsOnExchangeBind() {
// return BindingBuilder.bind(orderGoodsOnQueue()).to(orderGoodsOnExchange()).with(RabbitKeyConstants.ORDER_GOODS_ON_ROUTE_KEY);
// }
/**
* 死信队列:死信队列处理延迟消息货单挂单
* 处理延迟消息货单挂单
* @return
*/
@Bean
......@@ -128,7 +75,7 @@ public class RabbitBeanConfig {
}
/**
* 货单挂单中交换机:死信队列处理延迟消息
* 货单挂单中交换机:处理延迟消息
**/
@Bean
public CustomExchange orderGoodsOnDeadExchange() {
......@@ -138,13 +85,6 @@ public class RabbitBeanConfig {
return new CustomExchange(RabbitKeyConstants.ORDER_GOODS_ON_DEAD_EXCHANGE,"x-delayed-message", true, false, arguments);
}
/**
* 货单挂单中绑定:死信队列处理延迟消息
*/
// @Bean
// public Binding orderGoodsDeadExchangeBind() {
// return BindingBuilder.bind(orderGoodsOnDeadQueue()).to(orderGoodsOnDeadExchange()).with(RabbitKeyConstants.ORDER_GOODS_ON_DEAD_ROUTE_KEY);
// }
//绑定交换机,队列和routingKey
@Bean
public Binding delayedQueueBindingDelayedExchange(@Qualifier("orderGoodsOnDeadQueue")Queue queue,@Qualifier("orderGoodsOnDeadExchange")CustomExchange customExchange) {
......
......@@ -100,6 +100,31 @@ public class OwnerTopUp implements HasKey<Integer> {
*/
@TableField("modified_time")
private LocalDateTime modifiedTime;
/**
* 收款人企业信息
*/
@TableField("enterprise_name")
private String enterpriseName;
/**
*收款人开户行
*/
@TableField("open_account_bank")
private String openAccountBank;
/**
* 收款人开户行银行代码
*/
@TableField("open_account_bank_number")
private String openAccountBankNumber;
/**
* 收款人账户账号
*/
@TableField("account_number")
private String accountNumber;
@KeyColumn("id")
@Override
public Integer gainKey() {
......
......@@ -96,6 +96,7 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
private final OwnerAccountPasswordDao ownerAccountPasswordDao;
@Override
public IPage<OwnerAccountVO> pageList(PageOwnerAccountListParam param) {
return ownerAccountDao.pageList(param);
......@@ -127,12 +128,30 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
result.setPrepaidFreightAccount(ownerAccountVO);
}
}
OwnerAccountPassword entityByUserNo = ownerAccountPasswordDao.findEntityByUserNo(ownerUserNo);
if (null != entityByUserNo) {
result.setOwnerAccountPassword(1);
} else {
result.setOwnerAccountPassword(0);
}
return result;
}
@Override
public Long accountTopUp(OwnerTopUpParam param) {
UserSessionData loginUserInfo = TokenUtil.getLoginUserInfo();
if (StringUtils.equals(loginUserInfo.getProductCode(), "carrier-owner-app")) {
OwnerAccountPassword entity = ownerAccountPasswordDao.findEntityByUserNo(loginUserInfo.getUserNo());
try {
boolean b = MyMD5Util.validPassword(param.getAccountPassword(), entity.getPassword());
if (!b) {
throw new ServiceSystemException(PerformanceResultEnum.PASSWORD_CHECK_FAIL);
}
} catch (Exception e) {
throw new ServiceSystemException(PerformanceResultEnum.PASSWORD_CHECK_FAIL);
}
}
param.setOwnerUserNo(loginUserInfo.getUserNo());
OwnerTopUp entity = new OwnerTopUp();
......@@ -144,6 +163,11 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
entity.setDrawingBankNumber(param.getDrawingBankNumber());
entity.setDrawingProof(param.getDrawingProof());
entity.setCreateBy(loginUserInfo.getUserName());
entity.setEnterpriseName(param.getEnterpriseName());
entity.setOpenAccountBank(param.getOpenAccountBank());
entity.setOpenAccountBankNumber(param.getOpenAccountBankNumber());
entity.setAccountNumber(param.getAccountNumber());
//充值编号
entity.setTopUpNo(idGenerateSnowFlake.nextId(IdTypeEnum.Type.TOP_UP.getCode()));
......@@ -173,6 +197,17 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
public Long accountCaseOut(OwnerCaseOutParam param) {
BigDecimal caseOutBalance = param.getCaseOutBalance();
UserSessionData loginUserInfo = TokenUtil.getLoginUserInfo();
if (StringUtils.equals(loginUserInfo.getProductCode(), "carrier-owner-app")) {
OwnerAccountPassword entity = ownerAccountPasswordDao.findEntityByUserNo(loginUserInfo.getUserNo());
try {
boolean b = MyMD5Util.validPassword(param.getAccountPassword(), entity.getPassword());
if (!b) {
throw new ServiceSystemException(PerformanceResultEnum.PASSWORD_CHECK_FAIL);
}
} catch (Exception e) {
throw new ServiceSystemException(PerformanceResultEnum.PASSWORD_CHECK_FAIL);
}
}
param.setOwnerUserNo(loginUserInfo.getUserNo());
LocalDateTime now = LocalDateTime.now();
......
......@@ -13,7 +13,7 @@ public class OwnerTopUpProvider {
String sql = new SQL() {{
SELECT("a.id, a.owner_user_no," +
" a.top_up_no, a.top_up_balance, a.account_type, " +
" a.status,a.drawing_bank, a.drawing_bank_number,a.drawing_proof,date_format(a.approval_time, '%Y-%m-%d %H:%i:%s') as approval_time,a.approval_by,a.approval_turn_down,a.create_by,date_format(a.create_time, '%Y-%m-%d %H:%i:%s') as create_time,a.modified_time");
" a.status,a.drawing_bank,a.enterprise_name,a.account_number,a.drawing_bank_number,a.drawing_proof,date_format(a.approval_time, '%Y-%m-%d %H:%i:%s') as approval_time,a.approval_by,a.approval_turn_down,a.create_by,date_format(a.create_time, '%Y-%m-%d %H:%i:%s') as create_time,a.modified_time");
FROM("owner_top_up a");
if (StringUtils.isNotBlank(param.getBeginTime()) && StringUtils.isNotBlank(param.getEndTime())) {
WHERE("a.create_time >= #{param.beginTime} and a.create_time <= #{param.endTime}");
......
......@@ -87,7 +87,8 @@ public abstract class GoodsOrderStrategy {
log.info("执行订单状态更改,epochMilli时间不为0,时间为:{}", epochMilli);
rabbitTemplate.send(RabbitKeyConstants.ORDER_POSTED_EXCHANGE, RabbitKeyConstants.ORDER_POSTED_ROUTE_KEY, MessageBuilder.withBody(orderNo.getBytes()).build());
message.getMessageProperties().setExpiration(String.valueOf(epochMilli));
message.getMessageProperties().setHeader("x-delay", epochMilli);
rabbitTemplate.send(
RabbitKeyConstants.ORDER_ON_EXCHANGE, RabbitKeyConstants.ORDER_ON_ROUTE_KEY, message
);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论