瀏覽代碼

fix bug

master
lin 1 年之前
父節點
當前提交
a38d2237f0
共有 3 個檔案被更改,包括 17 行新增1 行删除
  1. +1
    -1
      gptService/src/main/java/com/iformall/domain/entity/PayExtraParam.java
  2. +15
    -0
      gptService/src/main/java/com/iformall/service/wx/WxWeappService.java
  3. +1
    -0
      gptService/src/main/java/com/iformall/utils/SysConfigConstant.java

+ 1
- 1
gptService/src/main/java/com/iformall/domain/entity/PayExtraParam.java 查看文件

@@ -1,4 +1,4 @@
package com.iformall.service.pay.entity;
package com.iformall.domain.entity;

import java.util.HashMap;
import java.util.Map;


+ 15
- 0
gptService/src/main/java/com/iformall/service/wx/WxWeappService.java 查看文件

@@ -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());


+ 1
- 0
gptService/src/main/java/com/iformall/utils/SysConfigConstant.java 查看文件

@@ -7,5 +7,6 @@ public class SysConfigConstant {
public static final String productImg="productImg";
public static final String expired_days = "expiredDays";
public static final String says_content_length = "saysContentLength";
public static final String freeDays="freeDays";

}

Loading…
取消
儲存