lzy 7 hours ago
parent
commit
abcdc89488

+ 1 - 1
Marketplace/src/main/java/com/dt/child/dto/SelShiWuDto.java

@@ -8,6 +8,6 @@ public class SelShiWuDto {
 //    类型id
     private Long id;
 //  类型id
-    private Long type_id;
+    private Long typeId;
 
 }

+ 7 - 6
Marketplace/src/main/java/com/dt/child/service/impl/LzyShiwuServiceImpl.java

@@ -26,26 +26,27 @@ public class LzyShiwuServiceImpl extends ServiceImpl<LzyShiwuMapper, LzyShiwu>
         if (selShiWuDto.getId()==0L && selShiWuDto.getId()==null){
             selShiWuDto.setId(16L);
         }
-        if (selShiWuDto.getType_id()==0 && selShiWuDto.getType_id()==null){
-            selShiWuDto.setType_id(19L);
+        if (selShiWuDto.getTypeId()==0 && selShiWuDto.getTypeId()==null){
+            selShiWuDto.setTypeId(19L);
         }
 //      孕妇
         if (selShiWuDto.getId()==13){
-            List<LzyShiwu> lzyShiwus = this.baseMapper.selectList(new LambdaQueryWrapper<LzyShiwu>().eq(LzyShiwu::getIsPregnant, selShiWuDto.getType_id()));
+            List<LzyShiwu> lzyShiwus = this.baseMapper.selectList(new LambdaQueryWrapper<LzyShiwu>().eq(LzyShiwu::getIsPregnant, selShiWuDto.getTypeId()));
             return Result.ok(lzyShiwus,"查询成功");
         }
 //        月子期
         if (selShiWuDto.getId()==14){
-            List<LzyShiwu> lzyShiwus = this.baseMapper.selectList(new LambdaQueryWrapper<LzyShiwu>().eq(LzyShiwu::getIsPostpartum, selShiWuDto.getType_id()));
+            List<LzyShiwu> lzyShiwus = this.baseMapper.selectList(new LambdaQueryWrapper<LzyShiwu>().eq(LzyShiwu::getIsPostpartum, selShiWuDto.getTypeId()));
             return Result.ok(lzyShiwus,"查询成功");
         }
 //        哺乳期
         if (selShiWuDto.getId()==15){
-            List<LzyShiwu> lzyShiwus = this.baseMapper.selectList(new LambdaQueryWrapper<LzyShiwu>().eq(LzyShiwu::getIsBreastfeeding, selShiWuDto.getType_id()));
+            List<LzyShiwu> lzyShiwus = this.baseMapper.selectList(new LambdaQueryWrapper<LzyShiwu>().eq(LzyShiwu::getIsBreastfeeding, selShiWuDto.getTypeId()));
             return Result.ok(lzyShiwus,"查询成功");
         }
+//        婴幼儿
         if (selShiWuDto.getId()==16){
-            List<LzyShiwu> lzyShiwus = this.baseMapper.selectList(new LambdaQueryWrapper<LzyShiwu>().eq(LzyShiwu::getIsSixMonthOld, selShiWuDto.getType_id()));
+            List<LzyShiwu> lzyShiwus = this.baseMapper.selectList(new LambdaQueryWrapper<LzyShiwu>().eq(LzyShiwu::getIsSixMonthOld, selShiWuDto.getTypeId()));
             return Result.ok(lzyShiwus,"查询成功");
         }
         return Result.Err(null,"查询失败");