Showing
1 changed file
with
3 additions
and
2 deletions
| @@ -4,6 +4,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; | @@ -4,6 +4,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; | ||
| 4 | import com.fasterxml.jackson.databind.ObjectMapper; | 4 | import com.fasterxml.jackson.databind.ObjectMapper; |
| 5 | import com.lframework.starter.bpm.service.FlowTaskService; | 5 | import com.lframework.starter.bpm.service.FlowTaskService; |
| 6 | import com.lframework.starter.web.core.annotations.oplog.OpLog; | 6 | import com.lframework.starter.web.core.annotations.oplog.OpLog; |
| 7 | +import com.lframework.starter.web.core.utils.JsonUtil; | ||
| 7 | import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; | 8 | import com.lframework.starter.web.inner.components.oplog.OtherOpLogType; |
| 8 | import com.lframework.xingyun.sc.service.customer.CustomerCreditService; | 9 | import com.lframework.xingyun.sc.service.customer.CustomerCreditService; |
| 9 | import com.lframework.xingyun.sc.vo.customer.credit.*; | 10 | import com.lframework.xingyun.sc.vo.customer.credit.*; |
| @@ -29,11 +30,11 @@ public class FlowTaskServiceImpl implements FlowTaskService { | @@ -29,11 +30,11 @@ public class FlowTaskServiceImpl implements FlowTaskService { | ||
| 29 | try { | 30 | try { |
| 30 | // 方法1:先将 Map 序列化为 JSON 字符串,再反序列化为目标对象 | 31 | // 方法1:先将 Map 序列化为 JSON 字符串,再反序列化为目标对象 |
| 31 | String json = objectMapper.writeValueAsString(map); | 32 | String json = objectMapper.writeValueAsString(map); |
| 32 | - UpdateCustomerCreditVo updateCustomerCreditVo = objectMapper.readValue(json, UpdateCustomerCreditVo.class); | 33 | + UpdateCustomerCreditVo updateCustomerCreditVo = JsonUtil.parseObject(json, UpdateCustomerCreditVo.class); |
| 33 | // 使用转换后的对象 | 34 | // 使用转换后的对象 |
| 34 | System.out.println(updateCustomerCreditVo); | 35 | System.out.println(updateCustomerCreditVo); |
| 35 | customerCreditService.updateNoFlowInstance(updateCustomerCreditVo); | 36 | customerCreditService.updateNoFlowInstance(updateCustomerCreditVo); |
| 36 | - | 37 | + customerCreditService.cleanCacheByKey(updateCustomerCreditVo.getId()); |
| 37 | } catch (JsonProcessingException e) { | 38 | } catch (JsonProcessingException e) { |
| 38 | e.printStackTrace(); | 39 | e.printStackTrace(); |
| 39 | } | 40 | } |