lyhzzz hace 1 año
padre
commit
cf6e3b7962

+ 2 - 1
src/main/java/com/fdkankan/agent/mapper/IUserIncrementMapper.java

@@ -7,6 +7,7 @@ import com.fdkankan.agent.request.CameraParam;
 import com.fdkankan.agent.request.IncrementParam;
 import com.fdkankan.agent.response.UserIncrementVo;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -23,5 +24,5 @@ public interface IUserIncrementMapper extends BaseMapper<UserIncrement> {
 
     Page<UserIncrementVo> pageList(Page<UserIncrement> page, IncrementParam param);
 
-    List<Long> getByAgentId(CameraParam param);
+    List<Long> getByAgentId(@Param("agentId") Integer agentId,@Param("incrementStatus") Integer incrementStatus,@Param("incrementTypeId") Integer incrementTypeId);
 }

+ 1 - 1
src/main/java/com/fdkankan/agent/service/impl/UserIncrementServiceImpl.java

@@ -199,6 +199,6 @@ public class UserIncrementServiceImpl extends ServiceImpl<IUserIncrementMapper,
 
     @Override
     public List<Long> getByAgentId(CameraParam param) {
-        return this.getBaseMapper().getByAgentId(param);
+        return this.getBaseMapper().getByAgentId(param.getAgentId(),param.getIncrementStatus(),param.getIncrementTypeId());
     }
 }

+ 7 - 7
src/main/resources/mapper/agent/UserIncrementMapper.xml

@@ -18,17 +18,17 @@
         </if>
         order by ui.create_time desc
     </select>
-    <select id="getByAgentId" resultType="java.lang.Long"  parameterType="com.fdkankan.agent.request.CameraParam">
+    <select id="getByAgentId" resultType="java.lang.Long" >
         select  ui.camera_id from  t_user_increment ui left join t_camera_detail d on ui.camera_id = d.camera_id
         where ui.rec_status = 'A' and d.rec_status = 'A'
-        <if test="param.agentId != null ">
-            and d.agent_id = #{param.agentId}
+        <if test="agentId != null ">
+            and d.agent_id = #{agentId}
         </if>
-        <if test="param.incrementStatus != null ">
-            and ui.is_expired = #{param.incrementStatus}
+        <if test="incrementStatus != null ">
+            and ui.is_expired = #{incrementStatus}
         </if>
-        <if test="param.incrementTypeId != null ">
-            and ui.increment_type_id = #{param.incrementTypeId}
+        <if test="incrementTypeId != null ">
+            and ui.increment_type_id = #{incrementTypeId}
         </if>
     </select>
 </mapper>