mirror of
https://gitee.com/dromara/dax-pay
synced 2026-08-06 13:16:26 +08:00
feat 默认分账组功能
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
- [x] 分账组管理
|
||||
- [x] 管理
|
||||
- [x] 绑定
|
||||
- [ ] 默认分账组
|
||||
- [x] 默认分账组
|
||||
- [ ] 分账订单管理
|
||||
- [x] 订单创建
|
||||
- [ ] 发起分账
|
||||
|
||||
@@ -98,4 +98,18 @@ public class AllocationGroupController {
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@Operation(summary = "设置默认分账组")
|
||||
@PostMapping("/setDefault")
|
||||
public ResResult<Void> setDefault(Long id){
|
||||
allocationGroupService.setUpDefault(id);
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@Operation(summary = "清除默认分账组")
|
||||
@PostMapping("/clearDefault")
|
||||
public ResResult<Void> clearDefault(Long id){
|
||||
allocationGroupService.clearDefault(id);
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ public class AllocationGroupService {
|
||||
* 设置默认分账组
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void setDefault(Long id){
|
||||
public void setUpDefault(Long id){
|
||||
// 分账组
|
||||
AllocationGroup group = groupManager.findById(id)
|
||||
.orElseThrow(() -> new DataNotExistException("未找到分账组"));
|
||||
@@ -113,6 +113,17 @@ public class AllocationGroupService {
|
||||
groupManager.updateById(group);
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除默认分账组
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void clearDefault(Long id){
|
||||
AllocationGroup group = groupManager.findById(id)
|
||||
.orElseThrow(() -> new DataNotExistException("未找到分账组"));
|
||||
group.setDefaultGroup(false);
|
||||
groupManager.updateById(group);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新分账组
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user