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