Преглед изворни кода

增加 卡信息查询接口

shilinxiao пре 4 година
родитељ
комит
5d02526d9b

+ 1 - 1
src/main/java/cn/com/ota/repository/AgentCardInfoRepository.java

@@ -8,5 +8,5 @@ import java.util.List;
 
 public interface AgentCardInfoRepository extends BaseRepository<AgentCardInfo, String> {
 
-    List<AgentCardInfo> findByCardStatusOrderByCreateDateAsc(int staus);
+    List<AgentCardInfo> findByCardStatusOrderByCreateDateAsc(String staus);
 }

+ 1 - 1
src/main/java/cn/com/ota/service/AgentCardInfoService.java

@@ -10,5 +10,5 @@ public interface AgentCardInfoService extends BaseService<AgentCardInfo, String>
     /**
      * @Description 根据状态 查询 卡信息
      **/
-    List<AgentCardInfo> findByCardStatusOrderByCreateDateAsc(int staus);
+    List<AgentCardInfo> findByCardStatusOrderByCreateDateAsc(String staus);
 }

+ 1 - 1
src/main/java/cn/com/ota/service/impl/AgentCardInfoServiceImpl.java

@@ -27,7 +27,7 @@ public class AgentCardInfoServiceImpl extends AbstractBaseService<AgentCardInfo,
 
 
     @Override
-    public List<AgentCardInfo> findByCardStatusOrderByCreateDateAsc(int staus) {
+    public List<AgentCardInfo> findByCardStatusOrderByCreateDateAsc(String staus) {
         return repository.findByCardStatusOrderByCreateDateAsc(staus);
     }
 }

+ 2 - 2
src/main/java/cn/com/ota/web/api/card/CardApi.java

@@ -46,9 +46,9 @@ public class CardApi extends BaseController {
     public DataResultForAPI storefrontAddCard(@RequestBody Map<String, String> mapData) {
         DataResultForAPI dataRet = new DataResultForAPI();
         try {
-            int staus = Integer.valueOf(mapData.get("staus"));
+            String status = mapData.get("status");
             int count = Integer.valueOf(mapData.get("count"));
-            List<AgentCardInfo> cardInfos = cardInfoService.findByCardStatusOrderByCreateDateAsc(staus);
+            List<AgentCardInfo> cardInfos = cardInfoService.findByCardStatusOrderByCreateDateAsc(status);
             List<CardApiVo> vos = Lists.newArrayList();
             if (CollectionUtils.isNotEmpty(cardInfos)) {
                 for (int i = 0; i < count; i++) {