|
|
@@ -10,11 +10,14 @@ import com.iformall.domain.po.*; |
|
|
|
import com.iformall.domain.po.base.TenantEntity; |
|
|
|
import com.iformall.mapper.WxAppinfoMapper; |
|
|
|
import com.iformall.mapper.WxCUserMapper; |
|
|
|
import com.iformall.service.SysConfigService; |
|
|
|
import com.iformall.service.WxAppinfoService; |
|
|
|
import com.iformall.service.cache.WxAppInfoCache; |
|
|
|
import com.iformall.service.cache.WxCUserCache; |
|
|
|
import com.iformall.utils.Constant; |
|
|
|
import com.iformall.utils.DateUtils; |
|
|
|
import com.iformall.utils.MaUtil; |
|
|
|
import com.iformall.utils.SysConfigConstant; |
|
|
|
import com.iformall.utils.sign.AppUtils; |
|
|
|
import lombok.SneakyThrows; |
|
|
|
import me.chanjar.weixin.common.error.WxErrorException; |
|
|
@@ -45,6 +48,9 @@ public class WxWeappService { |
|
|
|
@Autowired |
|
|
|
WxCUserMapper wxCUserMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
SysConfigService sysConfigService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
@Qualifier("objectCommonRedisTemplate") |
|
|
|
RedisTemplate<String, Object> redisTemplate; |
|
|
@@ -68,6 +74,15 @@ public class WxWeappService { |
|
|
|
updateUser.updateTenantInfo(cUser); |
|
|
|
updateUser.setPhone(phoneNoInfo.getPhoneNumber()); |
|
|
|
updateUser.setUpdateDate(new Date()); |
|
|
|
if (null == updateUser.getValidStartTime() && null == updateUser.getValidEndTime()) { |
|
|
|
SysConfig config = sysConfigService.getByKey(SysConfigConstant.freeDays, cUser); |
|
|
|
int freeDays = Integer.parseInt(config.getConfigItemValue()); |
|
|
|
if (freeDays > 0 ) { |
|
|
|
Date curr = new Date(); |
|
|
|
updateUser.setValidStartTime(curr); |
|
|
|
updateUser.setValidEndTime(DateUtils.getTimeAfterDays(freeDays, curr)); |
|
|
|
} |
|
|
|
} |
|
|
|
wxCUserMapper.updateById(updateUser); |
|
|
|
|
|
|
|
cUser.setPhone(updateUser.getPhone()); |
|
|
|