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