|
|
|
@@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Qualifier; |
|
|
|
import org.springframework.data.redis.core.RedisTemplate; |
|
|
|
import org.springframework.data.redis.core.ValueOperations; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
@@ -41,11 +42,11 @@ public class WxAppinfoServiceImpl implements WxAppinfoService { |
|
|
|
public WxAppinfo getCAppInfo(TenantEntity tenantEntity,EnumAppPlat appPlat) { |
|
|
|
WxAppinfo appInfo = null; |
|
|
|
WxAppinfo appinfoQ = new WxAppinfo(); |
|
|
|
if (null == appPlat) { |
|
|
|
appinfoQ.setPlat(EnumAppPlat.WX.getCode()); |
|
|
|
}else { |
|
|
|
appinfoQ.setPlat(appPlat.getCode()); |
|
|
|
} |
|
|
|
// if (null == appPlat) { |
|
|
|
// appinfoQ.setPlat(EnumAppPlat.WX.getCode()); |
|
|
|
// }else { |
|
|
|
// appinfoQ.setPlat(appPlat.getCode()); |
|
|
|
// } |
|
|
|
|
|
|
|
appinfoQ.updateTenantInfo(tenantEntity); |
|
|
|
appinfoQ.setType(EnumAppType.C.getCode()); |
|
|
|
@@ -164,6 +165,19 @@ public class WxAppinfoServiceImpl implements WxAppinfoService { |
|
|
|
return record; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = {Exception.class}) |
|
|
|
public void updateCMouldType(TenantEntity tenantEntity, Integer mouldType) { |
|
|
|
WxAppinfo appinfoQ = new WxAppinfo(); |
|
|
|
appinfoQ.updateTenantInfo(tenantEntity); |
|
|
|
appinfoQ.setType(EnumAppType.C.getCode()); |
|
|
|
List<WxAppinfo> appList = wxAppinfoMapper.selectList(new QueryWrapper(appinfoQ)); |
|
|
|
for (WxAppinfo appinfo:appList) { |
|
|
|
appinfo.setMouldType(mouldType); |
|
|
|
this.saveOrUpdate(appinfo); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void deleteRedis(Long id){ |
|
|
|
WxAppinfo record = this.getById(id); |
|
|
|
if(record != null){ |
|
|
|
@@ -174,6 +188,9 @@ public class WxAppinfoServiceImpl implements WxAppinfoService { |
|
|
|
String key3 = Constant.appinfoPrev + record.getTenantId() |
|
|
|
+ "-" + EnumAppPlat.getByCode(record.getPlat()) + "-" + record.getType(); |
|
|
|
RedisCacheUtils.removeCache(wxAppinfoRedisTemplate, key3); |
|
|
|
String key4 = Constant.appinfoPrev + record.getTenantId() |
|
|
|
+ "-" + null + "-" + record.getType(); |
|
|
|
RedisCacheUtils.removeCache(wxAppinfoRedisTemplate, key4); |
|
|
|
} |
|
|
|
} |
|
|
|
} |