|
@@ -2,6 +2,7 @@ package com.njyunzhi.pet_identity.service.impl;
|
2
|
2
|
|
3
|
3
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
4
|
4
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
5
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
5
|
6
|
import com.njyunzhi.pet_identity.common.Constants;
|
6
|
7
|
import com.njyunzhi.pet_identity.common.DateUtils;
|
7
|
8
|
import com.njyunzhi.pet_identity.entity.SysSetting;
|
|
@@ -71,23 +72,6 @@ public class TaPetIdentityServiceImpl extends BaseServiceImpl<TaPetIdentityMappe
|
71
|
72
|
return taPetIdentity;
|
72
|
73
|
}
|
73
|
74
|
|
74
|
|
- @Override
|
75
|
|
- public boolean updateCardDate(String cardNo) throws Exception {
|
76
|
|
- SysSetting sysSetting = sysSettingMapper.selectById(Constants.SYSSETTING_CARD_EXPIRE);
|
77
|
|
- // 北京时间
|
78
|
|
- LocalDateTime now = LocalDateTime.now(ZoneId.of("Asia/Shanghai"));
|
79
|
|
- LocalDateTime expire = now.plusDays(Long.parseLong(sysSetting.getContent()));
|
80
|
|
-
|
81
|
|
-
|
82
|
|
- UpdateWrapper<TaPetIdentity> updateWrapper = new UpdateWrapper<>();
|
83
|
|
- updateWrapper.set("start_date", now);
|
84
|
|
- updateWrapper.set("expire_date", expire);
|
85
|
|
- updateWrapper.eq("card_no", cardNo);
|
86
|
|
-
|
87
|
|
- return update(updateWrapper);
|
88
|
|
- }
|
89
|
|
-
|
90
|
|
-
|
91
|
75
|
@Override
|
92
|
76
|
public boolean extendDate(TaPetIdentity taPetIdentity) throws Exception {
|
93
|
77
|
|
|
@@ -123,4 +107,9 @@ public class TaPetIdentityServiceImpl extends BaseServiceImpl<TaPetIdentityMappe
|
123
|
107
|
public List<TaPetIdentity> getListByCard(List<String> cardNoList) {
|
124
|
108
|
return baseMapper.getListByCard(cardNoList);
|
125
|
109
|
}
|
|
110
|
+
|
|
111
|
+ @Override
|
|
112
|
+ public IPage<TaPetIdentity> getMineCards(IPage<TaPetIdentity> pg, String personId) {
|
|
113
|
+ return baseMapper.getMineCards(pg, personId);
|
|
114
|
+ }
|
126
|
115
|
}
|