[fix]优化pom和登录
This commit is contained in:
parent
19581d153a
commit
b09b6f7ece
@ -215,7 +215,7 @@ sms:
|
||||
supplier: tencent
|
||||
access-key-id: AKIDvhEVWHm0xe5JGxOZXGitnRovlKcfRzIN
|
||||
access-key-secret: qPhiTxA7oENFrCH5dvxiCQN4UdWAYgYA
|
||||
signature: 无终街科技
|
||||
signature: 无终街天津科技
|
||||
sdk-app-id: 1400966042
|
||||
|
||||
|
||||
|
@ -66,9 +66,9 @@ public class DivideController {
|
||||
|
||||
@Tag(name = "根据订单id分账")
|
||||
@Log(title = "分账", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/divide/{orderNo}")
|
||||
public R<Object> divide(@PathVariable String orderNo) {
|
||||
return R.ok(service.divide(orderNo));
|
||||
@GetMapping("/divide/{orderId}")
|
||||
public R<Object> divide(@PathVariable Long orderId) {
|
||||
return R.ok(service.divide(orderId));
|
||||
}
|
||||
|
||||
|
||||
|
@ -12,7 +12,7 @@ public interface IDivideService extends IService<Divide> {
|
||||
DivideVO getVOById( Long divideId);
|
||||
|
||||
|
||||
boolean divide(String orderNo);
|
||||
boolean divide(Long orderId);
|
||||
|
||||
boolean cancelDivide(String orderNo);
|
||||
|
||||
|
@ -141,18 +141,18 @@ public class DivideServiceImpl extends ServiceImpl<DivideMapper, Divide> impleme
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean divide(String orderNo) {
|
||||
public boolean divide(Long orderId) {
|
||||
//获取订单信息
|
||||
Order order = orderService.getByNo(orderNo);
|
||||
Order order = orderService.getById(orderId);
|
||||
|
||||
if (order == null) {
|
||||
throw new ServiceException("订单不存在");
|
||||
}
|
||||
if (order.getStatus() != 1) {
|
||||
if (order.getStatus() != 3) { //订单状态为已完成
|
||||
throw new ServiceException("订单状态不正确");
|
||||
}
|
||||
Divide divide = this.getByOrderNo(orderNo);
|
||||
if (divide == null) {
|
||||
Divide divide = this.getById(orderId);
|
||||
if (divide != null) {
|
||||
throw new ServiceException("已存在分账记录,无需再次分账");
|
||||
}
|
||||
//查找分账规则
|
||||
@ -175,7 +175,7 @@ public class DivideServiceImpl extends ServiceImpl<DivideMapper, Divide> impleme
|
||||
.orderMoney(totalAmount)
|
||||
.fee(totalFee)
|
||||
.actualMoney(totalAmount.subtract(totalFee))
|
||||
.orderSn(orderNo)
|
||||
.orderSn(order.getOrderSn())
|
||||
.status(DivideStatus.PENDING.getCode())
|
||||
.build();
|
||||
super.save(divide);
|
||||
@ -331,9 +331,10 @@ public class DivideServiceImpl extends ServiceImpl<DivideMapper, Divide> impleme
|
||||
}
|
||||
MemberAccount account = accountService.getMemberAccount(tenant.getId());
|
||||
|
||||
if (account == null) {
|
||||
return null;
|
||||
}
|
||||
// if (account == null)
|
||||
//
|
||||
// return null;
|
||||
// }
|
||||
return new HashMap<>() {{
|
||||
put("accountId", account.getId() + "");
|
||||
put("accountName", account.getName());
|
||||
|
Loading…
x
Reference in New Issue
Block a user