feat:移动端订单分开
This commit is contained in:
1 parent
a11438a3cd
commit
5f0fee0917
13 files changed
+51
-28
No files matched your search
+20
@@ -100,6 +100,26 @@ public class HardOrderController {
|
||||
return R.ok(hardwareOrderService.pagejoin(page, dto));
|
||||
}
|
||||
|
||||
@Operation(summary = "app查询超市订单列表", description = "app查询订单列表")
|
||||
@GetMapping("/app/sup-page-join")
|
||||
public R appSupPageJoin(@ParameterObject Page page, @ParameterObject HardOrderDto dto) {
|
||||
PjcloudUser user = SecurityUtils.getUser();
|
||||
dto.setUserId(user.getId());
|
||||
dto.setIsFindCarList(true);
|
||||
dto.setMchTypeCodes(List.of(MerchantTypeEnum.SUPERMARKET.getType(), MerchantTypeEnum.SELF_SUPERMARKET.getType()));
|
||||
return R.ok(hardwareOrderService.pagejoin(page, dto));
|
||||
}
|
||||
|
||||
@Operation(summary = "app查询食堂订单列表", description = "app查询订单列表")
|
||||
@GetMapping("/app/caneen-page-join")
|
||||
public R appCaneenPageJoin(@ParameterObject Page page, @ParameterObject HardOrderDto dto) {
|
||||
PjcloudUser user = SecurityUtils.getUser();
|
||||
dto.setUserId(user.getId());
|
||||
dto.setIsFindCarList(true);
|
||||
dto.setMchTypeCodes(List.of(MerchantTypeEnum.CANTEEN.getType()));
|
||||
return R.ok(hardwareOrderService.pagejoin(page, dto));
|
||||
}
|
||||
|
||||
@Operation(summary = "app商户查询订单列表", description = "app商户查询订单列表")
|
||||
@GetMapping("/app/mch-page-join")
|
||||
public R appMchPageJoin(@ParameterObject Page page, @ParameterObject HardOrderDto dto) {
|
||||
|
||||
+1
@@ -37,6 +37,7 @@ public class WalletDataUtil {
|
||||
v.setWalletTypeName(vo.getName());
|
||||
v.setWalletTypeUniqueCode(vo.getUniqueCode());
|
||||
v.setWalletTypeIcon(vo.getIcon());
|
||||
v.setIsRule(vo.getIsRule());
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
+7
-2
@@ -10,8 +10,9 @@ import java.util.List;
|
||||
@Data
|
||||
public class MchManageVo extends MchManageEntity implements BaseDeptInterface, BaseWalletTypeInterface {
|
||||
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 钱包类型相关
|
||||
*/
|
||||
private Long walletTypeId;
|
||||
|
||||
private String walletTypeName;
|
||||
@@ -20,6 +21,10 @@ public class MchManageVo extends MchManageEntity implements BaseDeptInterface, B
|
||||
|
||||
private String walletTypeIcon;
|
||||
|
||||
private String isRule;
|
||||
|
||||
private String deptName;
|
||||
|
||||
private List<MchManageVo> children;
|
||||
|
||||
}
|
||||
+2
@@ -41,4 +41,6 @@ public class WalletActiveVo extends WalletActiveEntity implements BaseUserInterf
|
||||
private String walletTypeUniqueCode;
|
||||
|
||||
private String walletTypeIcon;
|
||||
|
||||
private String isRule;
|
||||
}
|
||||
+2
@@ -24,6 +24,8 @@ public class WalletManageVo extends WalletManageEntity implements BaseUserInterf
|
||||
|
||||
private String walletTypeIcon;
|
||||
|
||||
private String isRule;
|
||||
|
||||
/**
|
||||
* 用户相关
|
||||
*/
|
||||
|
||||
+4
@@ -17,4 +17,8 @@ public interface BaseWalletTypeInterface {
|
||||
String getWalletTypeIcon();
|
||||
|
||||
void setWalletTypeIcon(String walletTypeIcon);
|
||||
|
||||
String getIsRule();
|
||||
|
||||
void setIsRule(String isRule);
|
||||
}
|
||||
+2
@@ -19,6 +19,8 @@ public class WalletRechargeApplyVo extends WalletRechargeApplyEntity implements
|
||||
|
||||
private String walletTypeIcon;
|
||||
|
||||
private String isRule;
|
||||
|
||||
/**
|
||||
* 用户相关
|
||||
*/
|
||||
|
||||
+2
@@ -57,6 +57,8 @@ public class WalletRechargeImportVo extends WalletRechargeImportEntity implement
|
||||
|
||||
private String importTimeStr;
|
||||
|
||||
private String isRule;
|
||||
|
||||
/**
|
||||
* 导出相关
|
||||
*/
|
||||
|
||||
+2
@@ -71,6 +71,8 @@ public class WalletTransactionVo extends WalletTransactionEntity implements Base
|
||||
|
||||
private String walletTypeIcon;
|
||||
|
||||
private String isRule;
|
||||
|
||||
/**
|
||||
* 订单相关
|
||||
*/
|
||||
|
||||
+7
@@ -190,6 +190,13 @@ public class WalletManageController {
|
||||
return R.ok(walletManageService.getWallet(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "通过id查询", description = "通过id查询")
|
||||
@GetMapping("/join/{id}")
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletManage_view')")
|
||||
public R<WalletManageVo> joinDetail(@PathVariable("id") Long id) {
|
||||
return R.ok(walletManageService.join(null, id));
|
||||
}
|
||||
|
||||
@Operation(summary = "新增钱包管理", description = "新增钱包管理")
|
||||
@SysLog("新增钱包管理")
|
||||
@PostMapping
|
||||
|
||||
-25
@@ -17,67 +17,42 @@ public interface WalletManageService extends IService<WalletManageEntity> {
|
||||
|
||||
/**
|
||||
* 创建钱包
|
||||
*
|
||||
* @param userId
|
||||
* @param checkPermission
|
||||
*/
|
||||
void createWallet(@NotNull Long userId, @NotNull Boolean checkPermission);
|
||||
|
||||
/**
|
||||
* 创建钱包
|
||||
*
|
||||
* @param userId
|
||||
*/
|
||||
void createWallet(@NotNull Long userId);
|
||||
|
||||
/**
|
||||
* 获取钱包没有就创建用户钱包(没有缓存)
|
||||
*
|
||||
* @param userId
|
||||
*/
|
||||
WalletManageEntity getOrCreateWallet(@NotNull Long userId, @NotNull WalletTypeEnum walletTypeCode);
|
||||
|
||||
/**
|
||||
* 获取钱包(没有缓存)
|
||||
*
|
||||
* @param userId
|
||||
* @param walletTypeCode
|
||||
* @return
|
||||
*/
|
||||
WalletManageEntity getWallet(@NotNull Long userId, @NotNull WalletTypeEnum walletTypeCode);
|
||||
|
||||
|
||||
/**
|
||||
* 获取钱包(没有缓存)
|
||||
*
|
||||
* @param cardNumber
|
||||
* @return
|
||||
*/
|
||||
WalletManageEntity getWallet(@NotNull String cardNumber);
|
||||
|
||||
|
||||
/**
|
||||
* 获取钱包(没有缓存)
|
||||
*
|
||||
* @param userId
|
||||
* @param walletTypeId
|
||||
* @return
|
||||
*/
|
||||
WalletManageEntity getWallet(@NotNull Long userId, @NotNull Long walletTypeId);
|
||||
|
||||
/**
|
||||
* 获取钱包(有缓存)
|
||||
*
|
||||
* @param walletId
|
||||
* @return
|
||||
*/
|
||||
WalletManageEntity getWallet(@NotNull Long walletId);
|
||||
|
||||
/**
|
||||
* 根据用户id删除用户钱包
|
||||
*
|
||||
* @param userIds
|
||||
* @return
|
||||
*/
|
||||
Boolean delWalletByUserIds(List<@NotNull Long> userIds);
|
||||
|
||||
|
||||
+1
-1
@@ -254,7 +254,7 @@ public class WalletManageServiceImpl extends ServiceImpl<WalletManageMapper, Wal
|
||||
WalletManageVo detail = baseMapper.join(walletId);
|
||||
if (ObjectUtil.isNotEmpty(detail)) {
|
||||
// 用户
|
||||
UserInfo userInfo = userService.getByUserId(userId).getData();
|
||||
UserInfo userInfo = userService.getByUserId(detail.getUserId()).getData();
|
||||
if (ObjectUtil.isNotEmpty(userInfo)) {
|
||||
DataUtil.convertUser(detail, userInfo.getSysUser());
|
||||
}
|
||||
|
||||
+1
@@ -138,6 +138,7 @@ public class WalletRuleJoinServiceImpl extends ServiceImpl<WalletRuleJoinMapper,
|
||||
private void disposeList(List<WalletRuleJoinVo> list, WalletRuleJoinDto dto) {
|
||||
if (ObjectUtil.isEmpty(list)) return;
|
||||
// 部门
|
||||
list.forEach(v -> v.setDeptId(v.getTargetDeptId()));
|
||||
List<Long> deptIds = list.stream().map(WalletRuleJoinVo::getTargetDeptId).distinct().toList();
|
||||
R<Map<Long, SysDept>> deptList = remoteDeptService.getDeptByDeptIds(deptIds);
|
||||
if (ObjectUtil.isNotEmpty(deptList.getData())) {
|
||||
|
||||
Reference in new issue
Block a user