You've already forked FrameTour-BE
jackson
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package com.ycwl.basic.profitsharing.entity;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.ycwl.basic.utils.JacksonUtil;
|
||||
import com.ycwl.basic.profitsharing.enums.ProfitSharingWxPayType;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -29,10 +29,10 @@ public class ProfitSharingUser {
|
||||
private BigDecimal realRate;
|
||||
|
||||
public void setWxPayConfig(String wxPayConfig) {
|
||||
this.wxPayConfig = JSON.parseObject(wxPayConfig, Map.class);
|
||||
this.wxPayConfig = JacksonUtil.parseObject(wxPayConfig, Map.class);
|
||||
}
|
||||
|
||||
public String getWxPayConfig() {
|
||||
return JSON.toJSONString(wxPayConfig);
|
||||
return JacksonUtil.toJSONString(wxPayConfig);
|
||||
}
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
package com.ycwl.basic.profitsharing.repository;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ycwl.basic.utils.JacksonUtil;
|
||||
import com.ycwl.basic.profitsharing.entity.ProfitSharingConfig;
|
||||
import com.ycwl.basic.profitsharing.mapper.ProfitSharingConfigMapper;
|
||||
import com.ycwl.basic.profitsharing.mapper.ProfitSharingUserMapper;
|
||||
@@ -20,12 +20,12 @@ public class ProfitSharingRepository {
|
||||
|
||||
public ProfitSharingConfig getScenicConfig(Long id) {
|
||||
if (redisTemplate.hasKey(String.format(PROFIT_SHARING_SCENIC_CONFIG_CACHE_KEY, id))) {
|
||||
return JSONObject.parseObject(redisTemplate.opsForValue().get(String.format(PROFIT_SHARING_SCENIC_CONFIG_CACHE_KEY, id)), ProfitSharingConfig.class);
|
||||
return JacksonUtil.parseObject(redisTemplate.opsForValue().get(String.format(PROFIT_SHARING_SCENIC_CONFIG_CACHE_KEY, id)), ProfitSharingConfig.class);
|
||||
}
|
||||
ProfitSharingConfig scenicConfig = configMapper.findByScenicId(id);
|
||||
if (scenicConfig != null) {
|
||||
scenicConfig.setUsers(userMapper.findByConfigId(scenicConfig.getId()));
|
||||
redisTemplate.opsForValue().set(String.format(PROFIT_SHARING_SCENIC_CONFIG_CACHE_KEY, id), JSONObject.toJSONString(scenicConfig));
|
||||
redisTemplate.opsForValue().set(String.format(PROFIT_SHARING_SCENIC_CONFIG_CACHE_KEY, id), JacksonUtil.toJSONString(scenicConfig));
|
||||
}
|
||||
return scenicConfig;
|
||||
}
|
||||
|
Reference in New Issue
Block a user