java110
2021-09-14 b2e0ee0c4ad5d3422208081772bc2faeadc8b7ea
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.java110.dev.cmd.cache;
 
import com.alibaba.fastjson.JSONObject;
import com.java110.core.annotation.Java110Cmd;
import com.java110.core.annotation.Java110Transactional;
import com.java110.core.context.ICmdDataFlowContext;
import com.java110.core.event.cmd.AbstractServiceCmdListener;
import com.java110.core.event.cmd.CmdEvent;
import com.java110.dev.smo.IDevServiceCacheSMO;
import com.java110.service.context.DataQuery;
import com.java110.service.context.DataQueryFactory;
import com.java110.utils.exception.CmdException;
import com.java110.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
 
import java.util.Map;
 
/**
 * 保存编码映射处理类
 */
@Java110Cmd(serviceCode = "flush.center.cache")
public class FlushCacheCmd extends AbstractServiceCmdListener {
 
    @Autowired
    IDevServiceCacheSMO devServiceCacheSMOImpl;
 
    @Override
    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
 
    }
 
    @Override
    @Java110Transactional
    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
 
        devServiceCacheSMOImpl.flush(reqJson.toJavaObject(Map.class));
 
        cmdDataFlowContext.setResponseEntity(ResultVo.success());
    }
}