Bläddra i källkod

fix:发票管理

CAYK\miaosen.zhao 6 månader sedan
förälder
incheckning
cff30f0098

+ 2 - 1
src/main/java/com/sunxung/factoring/mapper/invoicemanage/InvoiceBasicInfoMapper.java

@@ -10,6 +10,7 @@ import com.sunxung.factoring.entity.project.vo.SearchBusinessProcessingTask;
 import com.sunxung.factoring.entity.settlement.SettlementBasicInfo;
 import com.sunxung.factoring.entity.settlement.SettlementBasicInfo;
 import com.sunxung.factoring.entity.settlement.SettlementGoodsInfo;
 import com.sunxung.factoring.entity.settlement.SettlementGoodsInfo;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 
 import java.math.BigDecimal;
 import java.math.BigDecimal;
 import java.util.List;
 import java.util.List;
@@ -27,7 +28,7 @@ public interface InvoiceBasicInfoMapper extends BaseMapper<InvoiceBasicInfo> {
      * @param id
      * @param id
      * @return
      * @return
      */
      */
-    InvoiceBasicInfo getListInfo(Long id,Long userId);
+    InvoiceBasicInfo getListInfo(@Param("id") Long id,@Param("userId") Long userId);
 
 
     /**
     /**
      * 查询我已处理列表页
      * 查询我已处理列表页

+ 8 - 2
src/main/resources/mapper/invoicemanage/InvoiceBasicInfoMapper.xml

@@ -78,8 +78,14 @@
 				LEFT JOIN c_enterprise t7 ON t6.c_enterprise_id = t7.id
 				LEFT JOIN c_enterprise t7 ON t6.c_enterprise_id = t7.id
 		left join trading_platform t8 on t1.trading_platform_id = t8.id
 		left join trading_platform t8 on t1.trading_platform_id = t8.id
 		left join c_sys_user t9 on (t9.login_name = t1.user_create or  t9.user_name = t1.user_create)
 		left join c_sys_user t9 on (t9.login_name = t1.user_create or  t9.user_name = t1.user_create)
-		WHERE t1.id = #{id}
-		AND (t9.project_manager = #{userId} or t9.project_manager is null )
+		<where>
+			<if test="id != null">
+				AND t1.id = #{id}
+			</if>
+			<if test="userId != null">
+				AND (t9.project_manager = #{userId} or t9.project_manager is null )
+			</if>
+		</where>
 		ORDER BY t1.gmt_modified Desc
 		ORDER BY t1.gmt_modified Desc
 	</select>
 	</select>