From f4f2fb7cbac7fea735d343ad465f7f1208a2fc3e Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 09 Apr 2021 14:41:52 +0800
Subject: [PATCH] 20210409 获取未领取的奖品
---
zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignReceiveRecordDao.xml | 14 ++++++++++++++
zq-erp/src/main/java/com/matrix/system/activity/dao/ActivitySignReceiveRecordDao.java | 5 +++--
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/activity/dao/ActivitySignReceiveRecordDao.java b/zq-erp/src/main/java/com/matrix/system/activity/dao/ActivitySignReceiveRecordDao.java
index 4256ea8..08dc623 100644
--- a/zq-erp/src/main/java/com/matrix/system/activity/dao/ActivitySignReceiveRecordDao.java
+++ b/zq-erp/src/main/java/com/matrix/system/activity/dao/ActivitySignReceiveRecordDao.java
@@ -1,8 +1,6 @@
package com.matrix.system.activity.dao;
-import org.apache.ibatis.annotations.Param;
-
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -13,6 +11,7 @@
import com.matrix.system.activity.vo.CouponVo;
import com.matrix.system.activity.vo.GoodsVo;
import com.matrix.system.activity.vo.SignReceiveListVo;
+import org.apache.ibatis.annotations.Param;
/**
* @author yourName
@@ -27,4 +26,6 @@
IPage<GoodsVo> selectGoodsList(Page<GoodsVo> page, @Param("record")GoodsDto goodsDto);
+ int getSignAwardReceiveCount(@Param("userId")Long userId, @Param("companyId")Long companyId);
+
}
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignReceiveRecordDao.xml b/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignReceiveRecordDao.xml
index d64c91f..9b584d0 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignReceiveRecordDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignReceiveRecordDao.xml
@@ -78,4 +78,18 @@
</if>
</select>
+ <select id="getSignAwardReceiveCount" resultType="int">
+ SELECT
+ count(a.id)
+ FROM
+ activity_sign_receive_record a
+ LEFT JOIN activity_sign_award_set b ON a.award_id = b.id
+ where
+ b.award_type = 1
+ and a.state = 1
+ and a.company_id = #{companyId}
+ and a.user_id = #{userId}
+
+ </select>
+
</mapper>
\ No newline at end of file
--
Gitblit v1.9.1