Bläddra i källkod

feat: 打卡由原先根据userid+名称,改为根据userid+医院/商业公司/药店id

lixuesong 3 år sedan
förälder
incheckning
4322661187

+ 3 - 5
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/service/impl/WmUserSignServiceImpl.java

@@ -101,11 +101,9 @@ public class WmUserSignServiceImpl extends ServiceImpl<WmUserSignMapper, WmUserS
 		}
 
 		// 一个用户,在同一打卡地点,4小时内只能打卡一次
-		WmUserSign singQuery = new WmUserSign();
-		singQuery.setSignUserid(wmUserSign.getSignUserid());
-		singQuery.setSignEntName(wmUserSign.getSignEntName());
-//		singQuery.setSignDate(LocalDateTime.now().minus(4, ChronoUnit.HOURS));
-		int total = this.count(Wrappers.query(singQuery).lambda()
+		int total = this.count(Wrappers.<WmUserSign>lambdaQuery()
+				.eq(WmUserSign::getSignUserid, wmUserSign.getSignUserid())
+				.eq(WmUserSign::getSignEntId, wmUserSign.getSignEntId())
 				.gt(WmUserSign::getSignDate, LocalDateTime.now().minus(4, ChronoUnit.HOURS)));
 		// 一个用户,半小时内只能打卡一次
 		int halfHourTotal = this.count(Wrappers.<WmUserSign>lambdaQuery()