Browse Source

深光相机相机类型

lyhzzz 2 years ago
parent
commit
1c132178d2

+ 1 - 1
src/main/java/com/fdkankan/ucenter/controller/CameraController.java

@@ -150,7 +150,7 @@ public class CameraController extends BaseController {
         User user = userService.getByToken(getToken());
         LambdaQueryWrapper<CameraDetail> condition = new LambdaQueryWrapper<>();
         condition.eq(CameraDetail::getCooperationUser,user.getId());
-        condition.eq(CameraDetail::getGoodsId,10);
+        condition.eq(CameraDetail::getType,10);
         List<CameraDetail> list = cameraDetailService.list(condition);
         if(CollectionUtils.isEmpty(list)){
             return Result.success();

+ 1 - 1
src/main/java/com/fdkankan/ucenter/service/impl/CameraDetailServiceImpl.java

@@ -74,7 +74,7 @@ public class CameraDetailServiceImpl extends ServiceImpl<ICameraDetailMapper, Ca
         LambdaQueryWrapper<CameraDetail> wrapper = new LambdaQueryWrapper<>();
         wrapper.eq(CameraDetail::getUserId,userId);
         if(type != null){
-            wrapper.eq(CameraDetail::getGoodsId,type);
+            wrapper.eq(CameraDetail::getType,type);
         }
         return this.count(wrapper);
     }

+ 2 - 4
src/main/resources/mapper/ucenter/CameraDetailMapper.xml

@@ -5,22 +5,20 @@
     <select id="getListByUserAndType" resultType="com.fdkankan.ucenter.vo.response.CameraAppVo">
      SELECT * FROM t_camera_detail d
         LEFT JOIN t_camera c on d.camera_id = c.id
-        LEFT JOIN t_goods g on d.goods_id = g.id
         WHERE d.rec_status = 'A'
         and d.user_id = #{userId}
-        and d.goods_id = #{cameraType}
+        and d.type = #{cameraType}
     </select>
 
     <select id="getListByUserIdsAndType" resultType="com.fdkankan.ucenter.vo.response.CameraAppVo">
         SELECT * FROM t_camera_detail d
             LEFT JOIN t_camera c on d.camera_id = c.id
-              LEFT JOIN t_goods g on d.goods_id = g.id
         WHERE d.rec_status = 'A'
           and d.user_id in
         <foreach item="userId" collection="userIds" open="(" separator="," close=")">
             #{userId}
         </foreach>
-          and d.goods_id = #{cameraType}
+          and d.type = #{cameraType}
     </select>
 
     <select id="getListByUserAndTypeEx" resultType="com.fdkankan.ucenter.vo.response.CameraExcelVo">

+ 1 - 3
src/main/resources/mapper/ucenter/CameraMapper.xml

@@ -4,11 +4,10 @@
 
     <select id="pageList" resultType="com.fdkankan.ucenter.vo.response.CameraVo">
         select c.id,c.sn_code,c.child_name ,d.balance,d.type , d.total_space,d.used_space,
-        u.id as cooperationUser,u.user_name as cooperationUserName,g.pic,d.goods_id
+        u.id as cooperationUser,u.user_name as cooperationUserName
         from t_camera c
         left join t_camera_detail d on c.id = d.camera_id
         left join t_user u on d.cooperation_user = u.id
-        left join t_goods g on d.goods_id = g.id
         WHERE c.rec_status = 'A'
         <if test="param.selecttype !=null and param.selecttype == 2 and param.childName !=null and param.childName!='' ">
             and c.child_name like CONCAT('%',#{param.childName},'%')
@@ -30,7 +29,6 @@
     <select id="getCameraInfo" resultType="com.fdkankan.ucenter.vo.response.CameraAppVo">
          select * from  t_camera c
         left join t_camera_detail d on c.id = d.camera_id
-        left join t_goods g on d.goods_id = g.id
         left join t_user u on d.user_id = u.id
         where c.rec_status = 'A'
         and c.child_name = #{childName}

+ 2 - 2
src/main/resources/mapper/ucenter/ScenePlusMapper.xml

@@ -58,7 +58,7 @@
             and  p.scene_type  = #{param.sceneType}
         </if>
         <if test= 'param.cameraType != null' >
-            and tcd.goods_id = #{param.cameraType}
+            and tcd.type = #{param.cameraType}
         </if>
     </sql>
 
@@ -66,7 +66,7 @@
     <select id="getCountByUserId" resultType="java.lang.Long">
         select count(*) from t_scene_plus s left join t_camera_detail d on s.camera_id = d.camera_id
         where s.rec_status = 'A'
-          and s.user_id = #{userId} and d.goods_id = #{cameraType}
+          and s.user_id = #{userId} and d.type = #{cameraType}
     </select>
 
 </mapper>

+ 1 - 1
src/main/resources/mapper/ucenter/SceneProMapper.xml

@@ -60,7 +60,7 @@
     <select id="getCountByUserId" resultType="java.lang.Long">
            select count(*) from t_scene_pro s left join t_camera_detail d on s.camera_id = d.camera_id
         where s.rec_status = 'A' and s.is_upgrade = 0
-        and s.user_id = #{userId} and d.goods_id = #{cameraType}
+        and s.user_id = #{userId} and d.type = #{cameraType}
     </select>
 
     <sql id="HasFolder">