getCodeMappingByDomainAndPCode(CodeMapping codeMapping) throws Exception;
-
-
-}
diff --git a/CodeService/src/main/java/com/java110/code/dao/IPrimaryKeyServiceDao.java b/CodeService/src/main/java/com/java110/code/dao/IPrimaryKeyServiceDao.java
deleted file mode 100644
index eb7dbfe641..0000000000
--- a/CodeService/src/main/java/com/java110/code/dao/IPrimaryKeyServiceDao.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.java110.code.dao;
-
-import java.util.Map;
-
-/**
- * 主键查询操作数据类
- *
- * Created by wuxw on 2016/12/27.
- */
-public interface IPrimaryKeyServiceDao {
-
- /**
- * 根据主键name查询主键生成ID
- * map 中必须包含name字段
- *
- * @param primaryKey 主键name信息
- * @return 返回map中为 targetId 字段
- */
- public Map queryPrimaryKey(Map primaryKey) throws RuntimeException;
-
-
-}
\ No newline at end of file
diff --git a/CodeService/src/main/java/com/java110/code/dao/impl/CommonServiceDaoImpl.java b/CodeService/src/main/java/com/java110/code/dao/impl/CommonServiceDaoImpl.java
deleted file mode 100644
index 50b39a0441..0000000000
--- a/CodeService/src/main/java/com/java110/code/dao/impl/CommonServiceDaoImpl.java
+++ /dev/null
@@ -1,155 +0,0 @@
-package com.java110.code.dao.impl;
-
-import com.java110.code.dao.ICommonServiceDao;
-import com.java110.common.util.SerializeUtil;
-import com.java110.core.base.dao.BaseServiceDao;
-import com.java110.entity.mapping.CodeMapping;
-import org.springframework.cache.annotation.Cacheable;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import redis.clients.jedis.Jedis;
-
-import java.util.List;
-
-/**
- * 公用处理,与数据库交互 实现类
- * 如:映射关系加载
- * Created by wuxw on 2017/3/2.
- * version:1.0
- */
-@Service("commonServiceDaoImpl")
-@Transactional
-public class CommonServiceDaoImpl extends BaseServiceDao implements ICommonServiceDao {
-
- /**
- * 查询所有有效的映射数据
- *
- * @return
- */
- @Override
- @Cacheable(key= "CodeMappingAll")
- public List getCodeMappingAll() throws Exception{
- Jedis jedis = this.getJedis();
-
- List codeMappings = null;
- if(jedis.exists("CodeMappingAll".getBytes())){
- codeMappings = SerializeUtil.unserializeList(jedis.get("CodeMappingAll".getBytes()),CodeMapping.class);
- }else{
- codeMappings = sqlSessionTemplate.selectList("commonServiceDaoImpl.getCodeMappingAll");
-
- jedis.set("CodeMappingAll".getBytes(),SerializeUtil.serializeList(codeMappings));
- }
- return codeMappings;
- }
-
- /**
- * 根据域查询对应的映射关系
- *
- * @param codeMapping
- * @return
- */
-
- @Override
- @Cacheable(key= "CodeMappingByDomain")
- public List getCodeMappingByDomain(CodeMapping codeMapping) throws Exception{
-
- Jedis jedis = this.getJedis();
- List codeMappings = null;
- if(jedis.exists("CodeMappingByDomain".getBytes())){
- codeMappings = SerializeUtil.unserializeList(jedis.get("CodeMappingByDomain".getBytes()),CodeMapping.class);
- }else{
- codeMappings = sqlSessionTemplate.selectList("commonServiceDaoImpl.getCodeMappingByDomain", codeMapping);
-
- jedis.set("CodeMappingByDomain".getBytes(),SerializeUtil.serializeList(codeMappings));
- }
- return codeMappings;
- }
-
- /**
- * 根据HCode查询映射关系
- *
- * @param codeMapping
- * @return
- */
- @Override
- @Cacheable(key= "CodeMappingByHCode")
- public List getCodeMappingByHCode(CodeMapping codeMapping) throws Exception{
-
- Jedis jedis = this.getJedis();
- List codeMappings = null;
- if(jedis.exists("CodeMappingByHCode".getBytes())){
- codeMappings = SerializeUtil.unserializeList(jedis.get("CodeMappingByHCode".getBytes()),CodeMapping.class);
- }else{
- codeMappings = sqlSessionTemplate.selectList("commonServiceDaoImpl.getCodeMappingByHCode", codeMapping);
-
- jedis.set("CodeMappingByHCode".getBytes(),SerializeUtil.serializeList(codeMappings));
- }
- return codeMappings;
- }
-
- /**
- * 根据PCode查询映射关系
- *
- * @param codeMapping
- * @return
- */
- @Override
- @Cacheable(key= "CodeMappingByPCode")
- public List getCodeMappingByPCode(CodeMapping codeMapping) throws Exception{
-
- Jedis jedis = this.getJedis();
- List codeMappings = null;
- if(jedis.exists("CodeMappingByPCode".getBytes())){
- codeMappings = SerializeUtil.unserializeList(jedis.get("CodeMappingByPCode".getBytes()),CodeMapping.class);
- }else{
- codeMappings = sqlSessionTemplate.selectList("commonServiceDaoImpl.getCodeMappingByPCode", codeMapping);
-
- jedis.set("CodeMappingByPCode".getBytes(),SerializeUtil.serializeList(codeMappings));
- }
- return codeMappings;
- }
-
- /**
- * 根据domain 和 hcode 查询映射关系
- *
- * @param codeMapping
- * @return
- */
- @Override
- @Cacheable(key= "CodeMappingByDomainAndHCode")
- public List getCodeMappingByDomainAndHCode(CodeMapping codeMapping) throws Exception{
-
- Jedis jedis = this.getJedis();
- List codeMappings = null;
- if(jedis.exists("CodeMappingByDomainAndHCode".getBytes())){
- codeMappings = SerializeUtil.unserializeList(jedis.get("CodeMappingByDomainAndHCode".getBytes()),CodeMapping.class);
- }else{
- codeMappings = sqlSessionTemplate.selectList("commonServiceDaoImpl.getCodeMappingByDomainAndHCode", codeMapping);
-
- jedis.set("CodeMappingByDomainAndHCode".getBytes(),SerializeUtil.serializeList(codeMappings));
- }
- return codeMappings;
- }
-
- /**
- * 根据domain 和 pcode 查询映射关系
- *
- * @param codeMapping
- * @return
- */
- @Override
- @Cacheable(key= "CodeMappingByDomainAndPCode")
- public List getCodeMappingByDomainAndPCode(CodeMapping codeMapping) throws Exception{
-
- Jedis jedis = this.getJedis();
- List codeMappings = null;
- if(jedis.exists("CodeMappingByDomainAndPCode".getBytes())){
- codeMappings = SerializeUtil.unserializeList(jedis.get("CodeMappingByDomainAndPCode".getBytes()),CodeMapping.class);
- }else{
- codeMappings = sqlSessionTemplate.selectList("commonServiceDaoImpl.getCodeMappingByDomainAndPCode", codeMapping);
-
- jedis.set("CodeMappingByDomainAndPCode".getBytes(),SerializeUtil.serializeList(codeMappings));
- }
- return codeMappings;
- }
-}
diff --git a/CodeService/src/main/java/com/java110/code/dao/impl/PrimaryKeyServiceDaoImpl.java b/CodeService/src/main/java/com/java110/code/dao/impl/PrimaryKeyServiceDaoImpl.java
deleted file mode 100644
index 4ded93324b..0000000000
--- a/CodeService/src/main/java/com/java110/code/dao/impl/PrimaryKeyServiceDaoImpl.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.java110.code.dao.impl;
-
-import com.java110.code.dao.IPrimaryKeyServiceDao;
-import com.java110.common.log.LoggerEngine;
-import com.java110.core.base.dao.BaseServiceDao;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.Map;
-
-/**
- * 用户服务 与数据库交互
- * Created by wuxw on 2017/4/5.
- */
-
-/**
- * 用户信息实现工程
- * Created by wuxw on 2016/12/27.
- */
-@Service("primaryKeyServiceDaoImpl")
-@Transactional
-public class PrimaryKeyServiceDaoImpl extends BaseServiceDao implements IPrimaryKeyServiceDao {
-
-
- /**
- * 根据主键name查询主键生成ID
- *
- * @param primaryKey 主键name信息
- * @return
- */
- @Override
- public Map queryPrimaryKey(Map primaryKey) {
-
- LoggerEngine.debug("----【PrimaryKeyServiceDaoImpl.queryPrimaryKey】入参 : " + primaryKey);
- return sqlSessionTemplate.selectOne("primaryKeyServiceDaoImpl.queryPrimaryKey", primaryKey);
- }
-}
diff --git a/CodeService/src/main/java/com/java110/code/rest/CommonServiceRest.java b/CodeService/src/main/java/com/java110/code/rest/CommonServiceRest.java
deleted file mode 100644
index fa8df03756..0000000000
--- a/CodeService/src/main/java/com/java110/code/rest/CommonServiceRest.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package com.java110.code.rest;
-
-import com.java110.code.smo.ICommonServiceSmo;
-import com.java110.core.base.controller.BaseController;
-import com.java110.entity.mapping.CodeMapping;
-import com.java110.feign.base.ICommonService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.List;
-
-/**
- * Created by wuxw on 2017/7/25.
- */
-//@RestController
-public class CommonServiceRest extends BaseController implements ICommonService{
-
- @Autowired
- ICommonServiceSmo commonServiceSmoImpl;
-
- @Override
- @RequestMapping("/commonService/getCodeMappingAll")
- public List getCodeMappingAll() throws Exception{
- return commonServiceSmoImpl.getCodeMappingAll();
- }
-
- @Override
- @RequestMapping("/commonService/getCodeMappingByDomain")
- public List getCodeMappingByDomain(@RequestParam("domain") String domain) throws Exception{
- CodeMapping codeMapping = new CodeMapping();
- codeMapping.setDomain(domain);
- return commonServiceSmoImpl.getCodeMappingByDomain(codeMapping);
- }
-
- @Override
- @RequestMapping("/commonService/getCodeMappingByHCode")
- public List getCodeMappingByHCode(@RequestParam("hCode") String hCode) throws Exception{
- CodeMapping codeMapping = new CodeMapping();
- codeMapping.setH_code(hCode);
- return commonServiceSmoImpl.getCodeMappingByHCode(codeMapping);
- }
-
- @Override
- @RequestMapping("/commonService/getCodeMappingByPCode")
- public List getCodeMappingByPCode(@RequestParam("pCode") String pCode) throws Exception{
- CodeMapping codeMapping = new CodeMapping();
- codeMapping.setP_code(pCode);
- return commonServiceSmoImpl.getCodeMappingByPCode(codeMapping);
- }
-
- @Override
- @RequestMapping("/commonService/getCodeMappingByDomainAndHCode")
- public List getCodeMappingByDomainAndHCode(@RequestParam("hCode") String hCode,@RequestParam("pCode") String pCode) throws Exception{
- CodeMapping codeMapping = new CodeMapping();
- codeMapping.setH_code(hCode);
- codeMapping.setP_code(pCode);
- return commonServiceSmoImpl.getCodeMappingByDomainAndHCode(codeMapping);
- }
-
- @Override
- @RequestMapping("/commonService/getCodeMappingByDomainAndPCode")
- public List getCodeMappingByDomainAndPCode(@RequestParam("domain") String domain, @RequestParam("pCode") String pCode) throws Exception{
- CodeMapping codeMapping = new CodeMapping();
- codeMapping.setDomain(domain);
- codeMapping.setP_code(pCode);
- return commonServiceSmoImpl.getCodeMappingByDomainAndPCode(codeMapping);
- }
-
-
- /**
- * 常量域和h_code 查询
- * @param hCode
- * @return
- * @throws Exception
- */
- @RequestMapping("/commonService/getDynamicConstantValueByHCode")
- public List getDynamicConstantValueByHCode(@RequestParam("hCode") String hCode) throws Exception{
- return getCodeMappingByDomainAndHCode("DynamicConstant",hCode);
- }
-
- /**
- * 常量域和h_code 查询
- * @param pCode
- * @return
- * @throws Exception
- */
- @RequestMapping("/commonService/getDynamicConstantValueByPCode")
- public List getDynamicConstantValueByPCode(@RequestParam("pCode") String pCode) throws Exception{
- return getCodeMappingByDomainAndPCode("DynamicConstant",pCode);
- }
-
- public ICommonServiceSmo getCommonServiceSmoImpl() {
- return commonServiceSmoImpl;
- }
-
- public void setCommonServiceSmoImpl(ICommonServiceSmo commonServiceSmoImpl) {
- this.commonServiceSmoImpl = commonServiceSmoImpl;
- }
-}
diff --git a/CodeService/src/main/java/com/java110/code/rest/PrimaryKeyServiceRest.java b/CodeService/src/main/java/com/java110/code/rest/PrimaryKeyServiceRest.java
deleted file mode 100644
index f6d3c1a321..0000000000
--- a/CodeService/src/main/java/com/java110/code/rest/PrimaryKeyServiceRest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package com.java110.code.rest;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.code.smo.IPrimaryKeyServiceSMO;
-import com.java110.common.log.LoggerEngine;
-import com.java110.common.util.ProtocolUtil;
-import com.java110.core.base.controller.BaseController;
-import com.java110.feign.base.IPrimaryKeyService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * 主键信息查询
- * Created by wuxw on 2017/4/5.
- */
-//@RestController
-public class PrimaryKeyServiceRest extends BaseController implements IPrimaryKeyService {
-
- @Autowired
- IPrimaryKeyServiceSMO iPrimaryKeyServiceSMO;
-
- /**
- * 查询主键
- * 协议 :
- * {'type':'CUST'}
- * 返回:
- *
- * 成功
- * {'RESULT_CODE':'0000','RESULT_MSG':'成功','RESULT_INFO':{'CUST':'710170410001'}}
- * 失败
- * {'RESULT_CODE':'1999','RESULT_MSG':'失败原因','RESULT_INFO':{}}
- *
- * @param data
- * @return
- */
- @RequestMapping("/primaryKeyService/queryPrimaryKey")
- public String queryPrimaryKey(@RequestParam("data") String data) {
-
- JSONObject requestJson = null;
-
- String responseParam = "";
- try {
- requestJson = this.simpleValidateJSON(data);
-
- if (requestJson == null || !requestJson.containsKey("type")) {
- throw new IllegalArgumentException("查询主键入参data[" + data + "]出错");
- }
-
- requestJson.put("name", requestJson.getString("type"));
- JSONObject returnPrimaryKey = iPrimaryKeyServiceSMO.queryPrimaryKey(requestJson);
- String targetId = returnPrimaryKey.getString("targetId");
-
- returnPrimaryKey.clear();
-
- returnPrimaryKey.put(requestJson.getString("type"), targetId);
-
- responseParam = ProtocolUtil.createResultMsg(ProtocolUtil.RETURN_MSG_SUCCESS, "成功", returnPrimaryKey);
- } catch (Exception e) {
- LoggerEngine.error("查询主键失败,请求参数为【" + data + "】 ", e);
- responseParam = ProtocolUtil.createResultMsg(ProtocolUtil.RETURN_MSG_ERROR, "查询主键失败:" + e, null);
- } finally {
- return responseParam;
- }
- }
-
-
- public IPrimaryKeyServiceSMO getiPrimaryKeyServiceSMO() {
- return iPrimaryKeyServiceSMO;
- }
-
- public void setiPrimaryKeyServiceSMO(IPrimaryKeyServiceSMO iPrimaryKeyServiceSMO) {
- this.iPrimaryKeyServiceSMO = iPrimaryKeyServiceSMO;
- }
-}
diff --git a/CodeService/src/main/java/com/java110/code/rest/ServiceConfigServiceRest.java b/CodeService/src/main/java/com/java110/code/rest/ServiceConfigServiceRest.java
deleted file mode 100644
index fc57f55c30..0000000000
--- a/CodeService/src/main/java/com/java110/code/rest/ServiceConfigServiceRest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package com.java110.code.rest;
-
-import com.java110.core.base.controller.BaseController;
-
-/**
- *
- * 服务配置信息查询接口
- *
- * 实现原理:
- *
- * 首先从redis中查找是否有记录,如果没有记录再查询数据库,然后缓存redis中
- *
- * 将查询到的数据返回
- *
- * Created by wuxw on 2017/10/9.
- */
-public class ServiceConfigServiceRest extends BaseController {
-
-
-}
diff --git a/CodeService/src/main/java/com/java110/code/smo/ICommonServiceSmo.java b/CodeService/src/main/java/com/java110/code/smo/ICommonServiceSmo.java
deleted file mode 100644
index 759f33469d..0000000000
--- a/CodeService/src/main/java/com/java110/code/smo/ICommonServiceSmo.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package com.java110.code.smo;
-
-import com.java110.entity.mapping.CodeMapping;
-
-import java.util.List;
-
-/**
- * Created by wuxw on 2017/7/25.
- */
-public interface ICommonServiceSmo {
-
- /**
- * 查询所有有效的映射数据
- *
- * @return
- */
- public List getCodeMappingAll() throws Exception;
-
- /**
- * 根据域查询对应的映射关系
- *
- * @param codeMapping
- * @return
- */
- public List getCodeMappingByDomain(CodeMapping codeMapping) throws Exception;
-
- /**
- * 根据HCode查询映射关系
- *
- * @param codeMapping
- * @return
- */
- public List getCodeMappingByHCode(CodeMapping codeMapping) throws Exception;
-
-
- /**
- * 根据PCode查询映射关系
- *
- * @param codeMapping
- * @return
- */
- public List getCodeMappingByPCode(CodeMapping codeMapping) throws Exception;
-
- /**
- * 根据domain 和 hcode 查询映射关系
- *
- * @param codeMapping
- * @return
- */
- public List getCodeMappingByDomainAndHCode(CodeMapping codeMapping) throws Exception;
-
- /**
- * 根据domain 和 pcode 查询映射关系
- *
- * @param codeMapping
- * @return
- */
- public List getCodeMappingByDomainAndPCode(CodeMapping codeMapping) throws Exception;
-
-
-
-}
diff --git a/CodeService/src/main/java/com/java110/code/smo/IPrimaryKeyServiceSMO.java b/CodeService/src/main/java/com/java110/code/smo/IPrimaryKeyServiceSMO.java
deleted file mode 100644
index 533aa0df21..0000000000
--- a/CodeService/src/main/java/com/java110/code/smo/IPrimaryKeyServiceSMO.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.java110.code.smo;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.common.exception.SMOException;
-import com.java110.core.context.CodeDataFlow;
-
-/**
- * 用户信息管理,服务
- * Created by wuxw on 2017/4/5.
- */
-public interface IPrimaryKeyServiceSMO {
-
- /**
- * 根据sequence 表中name 查询ID
- *
- * @param primaryKeyInfo name信息封装
- * @return
- */
- public JSONObject queryPrimaryKey(JSONObject primaryKeyInfo) throws Exception;
-
- /**
- * 生成编码
- * @param dataFlow
- * @throws SMOException
- */
- public void generateCode(CodeDataFlow dataFlow) throws SMOException;
-}
diff --git a/CodeService/src/main/java/com/java110/code/smo/impl/CommonServiceSmoImpl.java b/CodeService/src/main/java/com/java110/code/smo/impl/CommonServiceSmoImpl.java
deleted file mode 100644
index 3b763fd265..0000000000
--- a/CodeService/src/main/java/com/java110/code/smo/impl/CommonServiceSmoImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package com.java110.code.smo.impl;
-
-import com.java110.code.dao.ICommonServiceDao;
-import com.java110.code.smo.ICommonServiceSmo;
-import com.java110.entity.mapping.CodeMapping;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * Created by wuxw on 2017/7/25.
- */
-@Service("commonServiceSmoImpl")
-public class CommonServiceSmoImpl implements ICommonServiceSmo {
-
- @Autowired
- ICommonServiceDao commonServiceDaoImpl;
-
- @Override
- public List getCodeMappingAll() throws Exception{
- return commonServiceDaoImpl.getCodeMappingAll();
- }
-
- @Override
- public List getCodeMappingByDomain(CodeMapping codeMapping) throws Exception{
- return commonServiceDaoImpl.getCodeMappingByDomain(codeMapping);
- }
-
- @Override
- public List getCodeMappingByHCode(CodeMapping codeMapping) throws Exception{
- return commonServiceDaoImpl.getCodeMappingByHCode(codeMapping);
- }
-
- @Override
- public List getCodeMappingByPCode(CodeMapping codeMapping) throws Exception{
- return commonServiceDaoImpl.getCodeMappingByPCode(codeMapping);
- }
-
- @Override
- public List getCodeMappingByDomainAndHCode(CodeMapping codeMapping) throws Exception{
- return commonServiceDaoImpl.getCodeMappingByDomainAndHCode(codeMapping);
- }
-
- @Override
- public List getCodeMappingByDomainAndPCode(CodeMapping codeMapping) throws Exception{
- return commonServiceDaoImpl.getCodeMappingByDomainAndPCode(codeMapping);
- }
-
-
- public ICommonServiceDao getCommonServiceDaoImpl() {
- return commonServiceDaoImpl;
- }
-
- public void setCommonServiceDaoImpl(ICommonServiceDao commonServiceDaoImpl) {
- this.commonServiceDaoImpl = commonServiceDaoImpl;
- }
-}
diff --git a/CodeService/src/main/java/com/java110/code/smo/impl/PrimaryKeyServiceSMOImpl.java b/CodeService/src/main/java/com/java110/code/smo/impl/PrimaryKeyServiceSMOImpl.java
deleted file mode 100644
index c3973a8ea9..0000000000
--- a/CodeService/src/main/java/com/java110/code/smo/impl/PrimaryKeyServiceSMOImpl.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package com.java110.code.smo.impl;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.code.dao.IPrimaryKeyServiceDao;
-import com.java110.code.dao.ISnowflakeldWorker;
-import com.java110.code.smo.IPrimaryKeyServiceSMO;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.core.base.smo.BaseServiceSMO;
-import com.java110.core.context.CodeDataFlow;
-import com.java110.core.factory.DataTransactionFactory;
-import com.java110.service.init.ServiceInfoListener;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.Map;
-
-/**
- * 用户服务信息管理业务信息实现
- * Created by wuxw on 2017/4/5.
- */
-@Service("primaryKeyServiceSMOImpl")
-public class PrimaryKeyServiceSMOImpl extends BaseServiceSMO implements IPrimaryKeyServiceSMO {
-
-
- @Autowired
- IPrimaryKeyServiceDao iPrimaryKeyServiceDao;
-
- @Autowired
- ISnowflakeldWorker snowflakeIdWorkerImpl;
-
- @Autowired
- private ServiceInfoListener serviceInfoListener;
-
- /**
- * 根据sequence 表中name 查询ID
- *
- * @param primaryKeyInfo name信息封装
- * @return
- */
- public JSONObject queryPrimaryKey(JSONObject primaryKeyInfo) throws Exception {
- Map paramIn = JSONObject.toJavaObject(primaryKeyInfo, Map.class);
- Map primaryKey = iPrimaryKeyServiceDao.queryPrimaryKey(paramIn);
- JSONObject returnPrimaryKey = new JSONObject();
- if (primaryKey != null && primaryKey.containsKey("targetId")) {
- returnPrimaryKey.put("targetId", primaryKey.get("targetId"));
- } else {
- //如果没定义相应name的键序列,直接返回-1 表示 自己系统需要自己生成
- returnPrimaryKey.put("targetId", "-1");
- }
- return returnPrimaryKey;
- }
-
- public void generateCode(CodeDataFlow dataFlow){
- String code = snowflakeIdWorkerImpl.getIdByPrefix(dataFlow.getPrefix(),serviceInfoListener.getWorkId());
-
- JSONObject resJson = DataTransactionFactory.createCodeResponseJson(dataFlow.getTransactionId(),code, ResponseConstant.RESULT_CODE_SUCCESS,"成功");
-
- dataFlow.setResJson(resJson);
- }
-
- public ServiceInfoListener getServiceInfoListener() {
- return serviceInfoListener;
- }
-
- public void setServiceInfoListener(ServiceInfoListener serviceInfoListener) {
- this.serviceInfoListener = serviceInfoListener;
- }
-
-
- public ISnowflakeldWorker getSnowflakeIdWorkerImpl() {
- return snowflakeIdWorkerImpl;
- }
-
- public void setSnowflakeIdWorkerImpl(ISnowflakeldWorker snowflakeIdWorkerImpl) {
- this.snowflakeIdWorkerImpl = snowflakeIdWorkerImpl;
- }
-}
diff --git a/CodeService/src/main/resources/application-dev.yml b/CodeService/src/main/resources/application-dev.yml
deleted file mode 100644
index 7a1cefb84e..0000000000
--- a/CodeService/src/main/resources/application-dev.yml
+++ /dev/null
@@ -1,92 +0,0 @@
-jedis:
- pool:
- config:
- maxTotal: 100
- maxIdle: 20
- maxWaitMillis: 20000
- host: 192.168.31.199
- port: 6379
-
-eureka:
- instance:
- leaseRenewalIntervalInSeconds: 10
- leaseExpirationDurationInSeconds: 30
- client:
- serviceUrl:
- defaultZone: http://192.168.31.199:8761/eureka/
- #defaultZone: http://localhost:8761/eureka/
-server:
- port: 8003
- tomcat:
- uri-encoding: UTF-8
-
-spring:
- http:
- encoding:
- charset: UTF-8
- enabled: true
- force: true
- application:
- name: code-service
- redis:
- database: 0
- host: 192.168.31.199
- port: 6379
- pool:
- max-active: 300
- max-wait: 10000
- max-idle: 100
- min-idle: 0
- timeout: 0
- datasource:
- connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
- minIdle: 5
- validationQuery: SELECT 1 FROM DUAL
- initialSize: 5
- maxWait: 60000
- filters: stat,wall,log4j
- poolPreparedStatements: true
- type: com.alibaba.druid.pool.DruidDataSource
- url: jdbc:mysql://192.168.31.199:3306/TT?useUnicode=true&characterEncoding=utf-8
- maxPoolPreparedStatementPerConnectionSize: 20
- password: TT@12345678
- testOnBorrow: false
- testWhileIdle: true
- minEvictableIdleTimeMillis: 300000
- timeBetweenEvictionRunsMillis: 60000
- testOnReturn: false
- driverClassName: com.mysql.jdbc.Driver
- maxActive: 20
- username: TT
-
-#============== kafka ===================
-kafka:
- consumer:
- zookeeper:
- connect: 192.168.31.199:2181
- servers: 192.168.31.199:9092
- enable:
- auto:
- commit: true
- session:
- timeout: 6000
- auto:
- commit:
- interval: 100
- offset:
- reset: latest
- topic: test
- group:
- id: codeServiceStatus
- concurrency: 10
-
- producer:
- zookeeper:
- connect: 192.168.31.199:2181
- servers: 192.168.31.199:9092
- retries: 0
- batch:
- size: 4096
- linger: 1
- buffer:
- memory: 40960
\ No newline at end of file
diff --git a/CodeService/src/main/resources/application-prod.yml b/CodeService/src/main/resources/application-prod.yml
deleted file mode 100644
index 5ed59dd378..0000000000
--- a/CodeService/src/main/resources/application-prod.yml
+++ /dev/null
@@ -1,92 +0,0 @@
-jedis:
- pool:
- config:
- maxTotal: 100
- maxIdle: 20
- maxWaitMillis: 20000
- host: 135.192.86.200
- port: 6379
-
-eureka:
- instance:
- leaseRenewalIntervalInSeconds: 10
- leaseExpirationDurationInSeconds: 30
- client:
- serviceUrl:
- defaultZone: http://135.192.86.200:8761/eureka/
- #defaultZone: http://localhost:8761/eureka/
-server:
- port: 8003
- tomcat:
- uri-encoding: UTF-8
-
-spring:
- http:
- encoding:
- charset: UTF-8
- enabled: true
- force: true
- application:
- name: code-service
- redis:
- database: 0
- host: 135.192.86.200
- port: 6379
- pool:
- max-active: 300
- max-wait: 10000
- max-idle: 100
- min-idle: 0
- timeout: 0
- datasource:
- connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
- minIdle: 5
- validationQuery: SELECT 1 FROM DUAL
- initialSize: 5
- maxWait: 60000
- filters: stat,wall,log4j
- poolPreparedStatements: true
- type: com.alibaba.druid.pool.DruidDataSource
- url: jdbc:mysql://135.192.86.200:3306/TT?useUnicode=true&characterEncoding=utf-8
- maxPoolPreparedStatementPerConnectionSize: 20
- password: TT@12345678
- testOnBorrow: false
- testWhileIdle: true
- minEvictableIdleTimeMillis: 300000
- timeBetweenEvictionRunsMillis: 60000
- testOnReturn: false
- driverClassName: com.mysql.jdbc.Driver
- maxActive: 20
- username: TT
-
-#============== kafka ===================
-kafka:
- consumer:
- zookeeper:
- connect: 135.192.86.200:2181
- servers: 135.192.86.200:9092
- enable:
- auto:
- commit: true
- session:
- timeout: 6000
- auto:
- commit:
- interval: 100
- offset:
- reset: latest
- topic: test
- group:
- id: codeServiceStatus
- concurrency: 10
-
- producer:
- zookeeper:
- connect: 135.192.86.200:2181
- servers: 135.192.86.200:9092
- retries: 0
- batch:
- size: 4096
- linger: 1
- buffer:
- memory: 40960
\ No newline at end of file
diff --git a/CodeService/src/main/resources/application-test.yml b/CodeService/src/main/resources/application-test.yml
deleted file mode 100644
index 5ed59dd378..0000000000
--- a/CodeService/src/main/resources/application-test.yml
+++ /dev/null
@@ -1,92 +0,0 @@
-jedis:
- pool:
- config:
- maxTotal: 100
- maxIdle: 20
- maxWaitMillis: 20000
- host: 135.192.86.200
- port: 6379
-
-eureka:
- instance:
- leaseRenewalIntervalInSeconds: 10
- leaseExpirationDurationInSeconds: 30
- client:
- serviceUrl:
- defaultZone: http://135.192.86.200:8761/eureka/
- #defaultZone: http://localhost:8761/eureka/
-server:
- port: 8003
- tomcat:
- uri-encoding: UTF-8
-
-spring:
- http:
- encoding:
- charset: UTF-8
- enabled: true
- force: true
- application:
- name: code-service
- redis:
- database: 0
- host: 135.192.86.200
- port: 6379
- pool:
- max-active: 300
- max-wait: 10000
- max-idle: 100
- min-idle: 0
- timeout: 0
- datasource:
- connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
- minIdle: 5
- validationQuery: SELECT 1 FROM DUAL
- initialSize: 5
- maxWait: 60000
- filters: stat,wall,log4j
- poolPreparedStatements: true
- type: com.alibaba.druid.pool.DruidDataSource
- url: jdbc:mysql://135.192.86.200:3306/TT?useUnicode=true&characterEncoding=utf-8
- maxPoolPreparedStatementPerConnectionSize: 20
- password: TT@12345678
- testOnBorrow: false
- testWhileIdle: true
- minEvictableIdleTimeMillis: 300000
- timeBetweenEvictionRunsMillis: 60000
- testOnReturn: false
- driverClassName: com.mysql.jdbc.Driver
- maxActive: 20
- username: TT
-
-#============== kafka ===================
-kafka:
- consumer:
- zookeeper:
- connect: 135.192.86.200:2181
- servers: 135.192.86.200:9092
- enable:
- auto:
- commit: true
- session:
- timeout: 6000
- auto:
- commit:
- interval: 100
- offset:
- reset: latest
- topic: test
- group:
- id: codeServiceStatus
- concurrency: 10
-
- producer:
- zookeeper:
- connect: 135.192.86.200:2181
- servers: 135.192.86.200:9092
- retries: 0
- batch:
- size: 4096
- linger: 1
- buffer:
- memory: 40960
\ No newline at end of file
diff --git a/CodeService/src/main/resources/banner.txt b/CodeService/src/main/resources/banner.txt
deleted file mode 100644
index 8a1a12cef7..0000000000
--- a/CodeService/src/main/resources/banner.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-${AnsiColor.BRIGHT_RED}
-////////////////////////////////////////////////////////////////////
-// _ooOoo_ //
-// o8888888o //
-// 88" . "88 //
-// (| ^_^ |) //
-// O\ = /O //
-// ____/`---'\____ //
-// .' \\| |// `. //
-// / \\||| : |||// \ //
-// / _||||| -:- |||||- \ //
-// | | \\\ - /// | | //
-// | \_| ''\---/'' | | //
-// \ .-\__ `-` ___/-. / //
-// ___`. .' /--.--\ `. . ___ //
-// ."" '< `.___\_<|>_/___.' >'"". //
-// | | : `- \`.;`\ _ /`;.`/ - ` : | | //
-// \ \ `-. \_ __\ /__ _/ .-` / / //
-// ========`-.____`-.___\_____/___.-`____.-'======== //
-// `=---=' //
-// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
-// 佛祖保佑 永不宕机 永无BUG //
-////////////////////////////////////////////////////////////////////
\ No newline at end of file
diff --git a/CodeService/src/test/java/com/java110/AppTest.java b/CodeService/src/test/java/com/java110/AppTest.java
deleted file mode 100644
index 57ff78d250..0000000000
--- a/CodeService/src/test/java/com/java110/AppTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.java110;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Unit test for simple App.
- */
-public class AppTest
- extends TestCase {
- /**
- * Create the test case
- *
- * @param testName name of the test case
- */
- public AppTest(String testName) {
- super(testName);
- }
-
- /**
- * @return the suite of tests being tested
- */
- public static Test suite() {
- return new TestSuite(AppTest.class);
- }
-
- /**
- * Rigourous Test :-)
- */
- public void testApp() {
- assertTrue(true);
- }
-}
diff --git a/CodingLog.txt b/CodingLog.txt
deleted file mode 100644
index 9ce8fd3b4f..0000000000
--- a/CodingLog.txt
+++ /dev/null
@@ -1,25 +0,0 @@
---------------------2018年04月13日-----------------------
-1、重新调整结构,每个服务必须要有doc(文档),docker和src目录,启用v0.2版
-2、分支管理说明,test为最新代码未测试代码(主要为了防止本地代码遗失),master 为最新测试过代码(待产品化),product 为产品化代码
-3、网友反映OrderService提供的协议过于复杂,则加入CenterService服务简化协议处理服务(文档设计实际已经完成,请查看CenterService/doc/centerService.docx,待开发)
-4、开发HttpApi service 接口未完成,目前完成数据封装到DataFlow对象。
-
---------------------2018年04月14日-----------------------
-1、httpApi service 请求常规校验
-2、加入Redis 缓存系统
---------------------2018年04月15日-----------------------
-1、加入kafka
-2、调整依赖关系
---------------------2018年04月16日-----------------------
-1、实现接受通知消息流程 CenterServiceSMOImpl receiveBusinessSystemNotifyMessage方法
-2、实现失败和成功模式下通知业务系统,竣工数据或作废数据
-3、实现异步同步数据到业务系统处理(同步方式,需要做事件监听等业务未完成,做事件监听主要为了对报文重构)
---------------------2018年04月17日-----------------------
-1、完成同步方式下订单侦听处理逻辑(主要是用来修改代码)
-2、完成订单处理逻辑,待测试版
---------------------2018年04月23日-----------------------
-1、加入sign 鉴权处理
-2、请求报文和返回报文加密处理
-3、加入java脚本代码处理
-4、sql配置到表里情况下解决sql注入问题
-5、开启druid 统计信息
\ No newline at end of file
diff --git a/CommentService/bin/start_comment.sh b/CommentService/bin/start_comment.sh
deleted file mode 100644
index 738191586f..0000000000
--- a/CommentService/bin/start_comment.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-#### debug model prod
-#nohup java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n -jar -Dspring.profiles.active=dev target/CommentService.jar $1 > comment.log 2>&1 &
-
-#### normal prod model
-#nohup java -jar -Dspring.profiles.active=prod $1 target/CommentService.jar > comment.log $1 2>&1 &
-
-#### normal test model
-#nohup java -jar -Dspring.profiles.active=test $1 target/CommentService.jar > comment.log $1 2>&1 &
-
-#### normal dev model
-nohup java -jar -Dspring.profiles.active=$1 target/CommentService.jar > comment.log 2>&1 &
-
-tail -100f comment.log
\ No newline at end of file
diff --git a/CommentService/doc/deleteCommentInfo.json b/CommentService/doc/deleteCommentInfo.json
deleted file mode 100644
index 9eb1338509..0000000000
--- a/CommentService/doc/deleteCommentInfo.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "orders": {
- "appId": "外系统ID,分配得到",
- "transactionId": "100000000020180409224736000001",
- "userId": "用户ID",
- "orderTypeCd": "订单类型,查询,受理",
- "requestTime": "20180409224736",
- "remark": "备注",
- "sign": "这个服务是否要求MD5签名",
- "attrs": [{
- "specCd": "配置的字段ID",
- "value": "具体值"
- }]
- },
- "business": [{
- "serviceCode": "delete.comment.info",
- "serviceName": "保存评论信息",
- "remark": "备注",
- "datas": {
- "comment": {
- "commentId": "123"
- },
- "subComment": { //如果有 comment 节点 这个节点不用写
- "subCommentId": "123456"
- }
- },
- "attrs": [{
- "specCd": "配置的字段ID",
- "value": "具体值"
- }]
- }]
-}
\ No newline at end of file
diff --git a/CommentService/doc/saveCommentInfo.json b/CommentService/doc/saveCommentInfo.json
deleted file mode 100644
index 9279171191..0000000000
--- a/CommentService/doc/saveCommentInfo.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "orders": {
- "appId": "外系统ID,分配得到",
- "transactionId": "100000000020180409224736000001",
- "userId": "用户ID",
- "orderTypeCd": "订单类型,查询,受理",
- "requestTime": "20180409224736",
- "remark": "备注",
- "sign": "这个服务是否要求MD5签名",
- "attrs": [{
- "specCd": "配置的字段ID",
- "value": "具体值"
- }]
- },
- "business": [{
- "serviceCode": "save.comment.info",
- "serviceName": "保存评论信息",
- "remark": "备注",
- "datas": {
- "comment": {
- "commentId": "-1",
- "userId": "123",
- "commentTypeCd":"S",
- "outId": "9898989898"
- },
- "subComment": {
- "subCommentId": "-1",
- "commentId":"-1",
- "parentSubCommentId":"-1",
- "subCommentTypeCd":"C",
- "commentContext":"非常好"
- },
- "subCommentAttr": [{
- "subCommentId": "-1",
- "attrId":"-1",
- "specCd":"1001",
- "value":"01"
- }],
- "subCommentPhoto":[{
- "commentPhotoId":"-1",
- "subCommentId":"-1",
- "commentPhotoTypeCd":"L",
- "photo":"123.jpg"
- }],
- "commentScore":[{
- "commentScoreId":"-1",
- "commentId":"-1",
- "scoreTypeCd":"S",
- "value":"5"
- }]
- },
- "attrs": [{
- "specCd": "配置的字段ID",
- "value": "具体值"
- }]
- }]
-}
\ No newline at end of file
diff --git a/CommentService/doc/start_commentService.sh b/CommentService/doc/start_commentService.sh
deleted file mode 100644
index df150daff2..0000000000
--- a/CommentService/doc/start_commentService.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/bash
-#### debug model prod
-#nohup java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n -jar -Dspring.profiles.active=dev CommentService.jar $1 > comment.log 2>&1 &
-
-#### normal prod model
-#nohup java -jar -Dspring.profiles.active=prod $1 CommentService.jar > comment.log $1 2>&1 &
-
-#### normal test model
-#nohup java -jar -Dspring.profiles.active=test $1 CommentService.jar > comment.log $1 2>&1 &
-
-#### normal dev model
-nohup java -jar -Dspring.profiles.active=dev $1 CommentService.jar > comment.log $1 2>&1 &
-
-tail -100f comment.log
\ No newline at end of file
diff --git a/CommentService/docker/Dockerfile b/CommentService/docker/Dockerfile
deleted file mode 100644
index ac91ef73e2..0000000000
--- a/CommentService/docker/Dockerfile
+++ /dev/null
@@ -1,11 +0,0 @@
-FROM registry.cn-beijing.aliyuncs.com/sxd/ubuntu-java8:1.0
-MAINTAINER wuxw <928255095@qq.com>
-
-ADD target/CommentService.jar /root/target/
-
-ADD bin/start_comment.sh /root/
-
-
-RUN chmod u+x /root/start_comment.sh
-
-CMD ["/root/start_comment.sh","dev"]
\ No newline at end of file
diff --git a/CommentService/docker/onStart.sh b/CommentService/docker/onStart.sh
deleted file mode 100644
index 304a58d9b5..0000000000
--- a/CommentService/docker/onStart.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-cp -r ../bin .
-
-cp -r ../target .
-
-docker build -t java110/comment .
-
-docker run -ti --name comment_test -p8008:8008 -idt java110/comment:latest
-
-docker logs -f comment_test
\ No newline at end of file
diff --git a/CommentService/pom.xml b/CommentService/pom.xml
deleted file mode 100644
index 909655a526..0000000000
--- a/CommentService/pom.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
-
- MicroCommunity
- com.java110
- 1.0-SNAPSHOT
-
- 4.0.0
-
- CommentService
-
- CommentService
-
- http://www.example.com
-
-
- UTF-8
-
-
-
-
- com.java110
- java110-service
-
-
- com.java110
- java110-event
-
-
-
-
- CommentService
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
- 2.10
-
-
- unpack
- generate-resources
-
- unpack
-
-
-
-
- com.java110
- java110-config
- ${microcommunity.version}
- jar
- true
- ${project.build.directory}/classes
-
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
- com.java110.comment.CommentServiceApplicationStart
-
-
-
-
-
diff --git a/CommentService/src/main/java/com/java110/comment/CommentServiceApplicationStart.java b/CommentService/src/main/java/com/java110/comment/CommentServiceApplicationStart.java
deleted file mode 100644
index d434aee1e5..0000000000
--- a/CommentService/src/main/java/com/java110/comment/CommentServiceApplicationStart.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package com.java110.comment;
-
-import com.java110.core.annotation.Java110ListenerDiscovery;
-import com.java110.event.service.BusinessServiceDataFlowEventPublishing;
-import com.java110.service.init.ServiceStartInit;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.web.client.RestTemplateBuilder;
-import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
-import org.springframework.cloud.client.loadbalancer.LoadBalanced;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.http.converter.StringHttpMessageConverter;
-import org.springframework.web.client.RestTemplate;
-
-import java.nio.charset.Charset;
-
-
-/**
- * spring boot 初始化启动类
- *
- * @version v0.1
- * @auther com.java110.wuxw
- * @mail 928255095@qq.com
- * @date 2016年8月6日
- * @tag
- */
-@SpringBootApplication(scanBasePackages={"com.java110.service","com.java110.comment","com.java110.core","com.java110.cache"})
-@EnableDiscoveryClient
-@Java110ListenerDiscovery(listenerPublishClass = BusinessServiceDataFlowEventPublishing.class,
- basePackages = {"com.java110.comment.listener"})
-public class CommentServiceApplicationStart {
-
-
- /**
- * 实例化RestTemplate,通过@LoadBalanced注解开启均衡负载能力.
- * @return restTemplate
- */
- @Bean
- @LoadBalanced
- public RestTemplate restTemplate() {
- StringHttpMessageConverter m = new StringHttpMessageConverter(Charset.forName("UTF-8"));
- RestTemplate restTemplate = new RestTemplateBuilder().additionalMessageConverters(m).build();
- return restTemplate;
- }
-
- public static void main(String[] args) throws Exception{
- ApplicationContext context = SpringApplication.run(CommentServiceApplicationStart.class, args);
- ServiceStartInit.initSystemConfig(context);
- }
-}
\ No newline at end of file
diff --git a/CommentService/src/main/java/com/java110/comment/api/CommentApi.java b/CommentService/src/main/java/com/java110/comment/api/CommentApi.java
deleted file mode 100644
index f4fe6992bd..0000000000
--- a/CommentService/src/main/java/com/java110/comment/api/CommentApi.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package com.java110.comment.api;
-
-import com.alibaba.fastjson.JSONObject;
-import com.java110.comment.smo.ICommentServiceSMO;
-import com.java110.common.constant.ResponseConstant;
-import com.java110.common.exception.InitConfigDataException;
-import com.java110.common.exception.InitDataFlowContextException;
-import com.java110.core.base.controller.BaseController;
-import com.java110.core.context.BusinessServiceDataFlow;
-import com.java110.core.factory.DataTransactionFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.servlet.http.HttpServletRequest;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * 用户服务类
- * Created by wuxw on 2018/5/14.
- */
-@RestController
-public class CommentApi extends BaseController {
-
- @Autowired
- ICommentServiceSMO commentServiceSMOImpl;
-
- @RequestMapping(path = "/commentApi/service",method= RequestMethod.GET)
- public String serviceGet(HttpServletRequest request) {
- return DataTransactionFactory.createBusinessResponseJson(ResponseConstant.RESULT_CODE_ERROR,"不支持Get方法请求").toJSONString();
- }
-
- /**
- * 用户服务统一处理接口
- * @param orderInfo
- * @param request
- * @return
- */
- @RequestMapping(path = "/commentApi/service",method= RequestMethod.POST)
- public String servicePost(@RequestBody String orderInfo, HttpServletRequest request) {
- BusinessServiceDataFlow businessServiceDataFlow = null;
- JSONObject responseJson = null;
- try {
- Map headers = new HashMap();
- getRequestInfo(request, headers);
- //预校验
- preValiateOrderInfo(orderInfo);
- businessServiceDataFlow = this.writeDataToDataFlowContext(orderInfo, headers);
- responseJson = commentServiceSMOImpl.service(businessServiceDataFlow);
- }catch (InitDataFlowContextException e){
- logger.error("请求报文错误,初始化 BusinessServiceDataFlow失败"+orderInfo,e);
- responseJson = DataTransactionFactory.createNoBusinessTypeBusinessResponseJson(orderInfo,ResponseConstant.RESULT_PARAM_ERROR,e.getMessage(),null);
- }catch (InitConfigDataException e){
- logger.error("请求报文错误,加载配置信息失败"+orderInfo,e);
- responseJson = DataTransactionFactory.createNoBusinessTypeBusinessResponseJson(orderInfo,ResponseConstant.RESULT_PARAM_ERROR,e.getMessage(),null);
- }catch (Exception e){
- logger.error("请求订单异常",e);
- responseJson = DataTransactionFactory.createBusinessResponseJson(businessServiceDataFlow,ResponseConstant.RESULT_CODE_ERROR,e.getMessage()+e,
- null);
- }finally {
- return responseJson.toJSONString();
- }
- }
-
- /**
- * 这里预校验,请求报文中不能有 dataFlowId
- * @param orderInfo
- */
- private void preValiateOrderInfo(String orderInfo) {
- /* if(JSONObject.parseObject(orderInfo).getJSONObject("orders").containsKey("dataFlowId")){
- throw new BusinessException(ResponseConstant.RESULT_CODE_ERROR,"报文中不能存在dataFlowId节点");
- }*/
- }
-
- /**
- * 获取请求信息
- * @param request
- * @param headers
- * @throws RuntimeException
- */
- private void getRequestInfo(HttpServletRequest request,Map headers) throws Exception{
- try{
- super.initHeadParam(request,headers);
- super.initUrlParam(request,headers);
- }catch (Exception e){
- logger.error("加载头信息失败",e);
- throw new InitConfigDataException(ResponseConstant.RESULT_PARAM_ERROR,"加载头信息失败");
- }
- }
-
- public ICommentServiceSMO getCommentServiceSMOImpl() {
- return commentServiceSMOImpl;
- }
-
- public void setCommentServiceSMOImpl(ICommentServiceSMO commentServiceSMOImpl) {
- this.commentServiceSMOImpl = commentServiceSMOImpl;
- }
-}
diff --git a/CommentService/src/main/java/com/java110/comment/dao/ICommentServiceDao.java b/CommentService/src/main/java/com/java110/comment/dao/ICommentServiceDao.java
deleted file mode 100644
index e4edf8a8ee..0000000000
--- a/CommentService/src/main/java/com/java110/comment/dao/ICommentServiceDao.java
+++ /dev/null
@@ -1,140 +0,0 @@
-package com.java110.comment.dao;
-
-
-import com.java110.common.exception.DAOException;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 商品组件内部之间使用,没有给外围系统提供服务能力
- * 商品服务接口类,要求全部以字符串传输,方便微服务化
- * 新建客户,修改客户,删除客户,查询客户等功能
- *
- * Created by wuxw on 2016/12/27.
- */
-public interface ICommentServiceDao {
-
-
-
- /**
- * 保存评论
- * @param comment 评论
- * @throws DAOException
- */
- public void saveCommentInstance(Map comment) throws DAOException;
-
-
- /**
- * 保存评论
- * @param subComment 评论内容
- * @throws DAOException
- */
- public void saveSubCommentInstance(Map subComment) throws DAOException;
-
- /**
- * 保存商品购买记录属性
- * @param subCommentAttr
- * @throws DAOException
- */
- public void saveSubCommentAttrInstance(Map subCommentAttr) throws DAOException;
-
- /**
- * 保存评论分数属性
- * @param subCommentScore
- * @throws DAOException
- */
- public void saveCommentScoreInstance(Map subCommentScore) throws DAOException;
-
- /**
- * 保存 评论照片
- * @param subCommentPhoto
- * @throws DAOException
- */
- public void saveSubCommentPhotoInstance(Map subCommentPhoto) throws DAOException;
-
-
-
- /**
- * 评论查询(instance)
- * @param info bId 信息
- * @return
- * @throws DAOException
- */
- public Map getComment(Map info) throws DAOException;
-
- /**
- * 评论内容查询(instance)
- * @param info bId 信息
- * @return
- * @throws DAOException
- */
- public Map getSubComment(Map info) throws DAOException;
-
- /**
- * 评论内容查询(instance)
- * @param info bId 信息
- * @return
- * @throws DAOException
- */
- public List