|
@@ -86,11 +86,22 @@ public class TOrderController {
|
|
|
public ResponseModel<IPage<?>> pageOrder(String adminId,String adminType,String type,String sn,String status,String userName,String payType,String productNo,String clientId,String trxNo,String dateType, String startDate, String endDate, long current, long size ) {
|
|
|
//判断当前账号状态
|
|
|
TAdmin admin = R.getDataIfSuccess(szwlFeign.getAdmin(adminId));
|
|
|
+ if(StringUtils.isEmpty(type)){
|
|
|
+ if(StringUtils.isNotEmpty(admin.getIfForeign())){
|
|
|
+ type = admin.getIfForeign();
|
|
|
+ }else {
|
|
|
+ if(!admin.getIsAdmined()){
|
|
|
+ TAdmin parentDate = R.getDataIfSuccess(szwlFeign.getAdmin(String.valueOf(admin.getParentId())));
|
|
|
+ if(StringUtils.isNotEmpty(parentDate.getIfForeign())){
|
|
|
+ type = parentDate.getIfForeign();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
//类型
|
|
|
//0,线上
|
|
|
if(type.equals("0")){
|
|
|
LambdaQueryWrapper<TOrder> query = Wrappers.lambdaQuery();
|
|
|
-
|
|
|
if(!userName.equals("admin")){
|
|
|
if(StringUtils.isNotEmpty(userName)){
|
|
|
ResponseModel<TAdmin> adminByUsername = szwlFeign.getAdminByUsername(userName);
|
|
@@ -98,7 +109,14 @@ public class TOrderController {
|
|
|
if(data==null||data.getId()==null){
|
|
|
return R.fail(ResponseCodesEnum.A0001,"找不到商家");
|
|
|
}
|
|
|
- query.eq(TOrder::getAdminId,data.getId());
|
|
|
+ if(data.getIsAdmined()){
|
|
|
+ query.eq(TOrder::getAdminId,data.getId());
|
|
|
+ }else {
|
|
|
+ if(data.getParentId()!=1){
|
|
|
+ query.eq(TOrder::getAdminId,data.getParentId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}else {
|
|
|
//adminType="all"时,代表查全部下级 子账户没有这个权限 公司人员默认查所有人
|
|
|
if(StringUtils.isNotEmpty(adminType)){
|