|
@@ -1,10 +1,14 @@
|
|
|
package org.dromara.backstage.cardCenter.service.impl;
|
|
package org.dromara.backstage.cardCenter.service.impl;
|
|
|
|
|
|
|
|
|
|
+import cn.hutool.core.convert.Convert;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import org.dromara.backstage.payment.domain.PtUserAccount;
|
|
import org.dromara.backstage.payment.domain.PtUserAccount;
|
|
|
|
|
+import org.dromara.backstage.payment.domain.bo.PtBagBo;
|
|
|
|
|
+import org.dromara.backstage.payment.domain.vo.PtBagVo;
|
|
|
import org.dromara.common.core.utils.DateUtils;
|
|
import org.dromara.common.core.utils.DateUtils;
|
|
|
import org.dromara.common.core.utils.MapstructUtils;
|
|
import org.dromara.common.core.utils.MapstructUtils;
|
|
|
|
|
+import org.dromara.common.core.utils.SpringUtils;
|
|
|
import org.dromara.common.core.utils.StringUtils;
|
|
import org.dromara.common.core.utils.StringUtils;
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
@@ -19,9 +23,8 @@ import org.dromara.backstage.cardCenter.domain.PtCard;
|
|
|
import org.dromara.backstage.cardCenter.mapper.PtCardMapper;
|
|
import org.dromara.backstage.cardCenter.mapper.PtCardMapper;
|
|
|
import org.dromara.backstage.cardCenter.service.IPtCardService;
|
|
import org.dromara.backstage.cardCenter.service.IPtCardService;
|
|
|
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
-import java.util.Map;
|
|
|
|
|
-import java.util.Collection;
|
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 账户卡片Service业务层处理
|
|
* 账户卡片Service业务层处理
|
|
@@ -185,4 +188,29 @@ public class PtCardServiceImpl implements IPtCardService {
|
|
|
}
|
|
}
|
|
|
return userIds.length;
|
|
return userIds.length;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 根据Id获取账户发信息
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param userIds id串,英文逗号隔开
|
|
|
|
|
+ * @return 发卡信息串,英文逗号隔开
|
|
|
|
|
+ */
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public String selectAccountCardByIds(String userIds) {
|
|
|
|
|
+ List<String> list = new ArrayList<>();
|
|
|
|
|
+ for (Long id : StringUtils.splitTo(userIds, Convert::toLong)) {
|
|
|
|
|
+ PtCardBo bo = new PtCardBo();
|
|
|
|
|
+ bo.setStatus("1");
|
|
|
|
|
+ bo.setUserId(id);
|
|
|
|
|
+
|
|
|
|
|
+ List<PtCardVo> listVo = SpringUtils.getAopProxy(this).queryList(bo);
|
|
|
|
|
+ if(listVo.isEmpty()){
|
|
|
|
|
+ list.add("未发卡");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ String cardInfo = listVo.stream().anyMatch(p -> p.getFactoryId() == 0) ? "虚拟卡" : "实体卡";
|
|
|
|
|
+ list.add(cardInfo);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return String.join(StringUtils.SEPARATOR, list);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|