FeeService/README.md
File was deleted FeeService/docker/Dockerfile
New file @@ -0,0 +1,10 @@ FROM registry.cn-beijing.aliyuncs.com/sxd/ubuntu-java8:1.0 MAINTAINER wuxw <928255095@qq.com> ADD bin/start_fee.sh /root/ RUN chmod u+x /root/start_fee.sh CMD ["/root/start_fee.sh","dev"] FeeService/docker/bin/start_fee.sh
New file @@ -0,0 +1,14 @@ #!/bin/bash #### debug model prod #nohup java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n -jar -Dspring.profiles.active=dev target/FeeService.jar > fee.log 2>&1 & #### normal prod model #nohup java -jar -Dspring.profiles.active=prod target/FeeService.jar > fee.log 2>&1 & #### normal test model #nohup java -jar -Dspring.profiles.active=test target/FeeService.jar > fee.log 2>&1 & #### normal dev model nohup java -jar -Dspring.profiles.active=$1 target/FeeService.jar > fee.log 2>&1 & tail -100f fee.log FeeService/docker/docker-compose.yml
New file @@ -0,0 +1,19 @@ version: '2' services: feeserivce: container_name: feeserivce-1 build: context: . dockerfile: Dockerfile restart: always ports: - "8009:8009" volumes: - ../target/FeeService.jar:/root/target/FeeService.jar # extra_hosts: # - "dev.java110.com:192.168.1.18" # - "dev.db.java110.com:192.168.1.18" # - "dev.zk.java110.com:192.168.1.18" # - "dev.kafka.java110.com:192.168.1.18" # - "dev.redis.java110.com:192.168.1.18" # - "api.java110.com:92.168.1.18" FeeService/docker/onStart.sh
New file @@ -0,0 +1,11 @@ #!/bin/bash cp -r ../bin . cp -r ../target . docker build -t java110/fee . docker run -ti --name fee_test -p8006:8006 -idt java110/fee:latest docker logs -f fee_test FeeService/pom.xml
@@ -1,3 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> @@ -10,17 +12,64 @@ <artifactId>FeeService</artifactId> <packaging>jar</packaging> <name>PayService</name> <url>http://maven.apache.org</url> <name>FeeService</name> <!-- FIXME change it to the project's website --> <url>http://www.example.com</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.target>1.7</maven.compiler.target> </properties> <dependencies> <dependency> <groupId>com.java110</groupId> <artifactId>java110-common</artifactId> <artifactId>java110-service</artifactId> </dependency> <dependency> <groupId>com.java110</groupId> <artifactId>java110-event</artifactId> </dependency> </dependencies> <build> <finalName>FeeService</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.10</version> <executions> <execution> <id>unpack</id> <phase>generate-resources</phase> <goals> <goal>unpack</goal> </goals> <configuration> <artifactItems> <artifactItem> <groupId>com.java110</groupId> <artifactId>java110-config</artifactId> <version>${microcommunity.version}</version> <type>jar</type> <overWrite>true</overWrite> <outputDirectory>${project.build.directory}/classes</outputDirectory> </artifactItem> </artifactItems> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <mainClass>com.java110.community.FeeServiceApplicationStart</mainClass> </configuration> </plugin> </plugins> </build> </project> FeeService/src/main/java/com/java110/fee/FeeServiceApplicationStart.java
New file @@ -0,0 +1,58 @@ package com.java110.fee; import com.java110.core.annotation.Java110ListenerDiscovery; import com.java110.event.service.BusinessServiceDataFlowEventPublishing; import com.java110.service.init.ServiceStartInit; import org.slf4j.Logger; import org.slf4j.LoggerFactory; 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.cloud.netflix.feign.EnableFeignClients; 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.fee", "com.java110.core", "com.java110.cache", "com.java110.db"}) @EnableDiscoveryClient @Java110ListenerDiscovery(listenerPublishClass = BusinessServiceDataFlowEventPublishing.class, basePackages = {"com.java110.fee.listener"}) @EnableFeignClients(basePackages = {"com.java110.core.smo.user"}) public class FeeServiceApplicationStart { private static Logger logger = LoggerFactory.getLogger(FeeServiceApplicationStart.class); /** * å®ä¾å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(FeeServiceApplicationStart.class, args); ServiceStartInit.initSystemConfig(context); } } FeeService/src/main/java/com/java110/fee/api/FeeApi.java
New file @@ -0,0 +1,104 @@ package com.java110.fee.api; import com.alibaba.fastjson.JSONObject; 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 com.java110.fee.smo.IFeeServiceSMO; import org.slf4j.Logger; import org.slf4j.LoggerFactory; 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 FeeApi extends BaseController { private final static Logger logger = LoggerFactory.getLogger(FeeApi.class); @Autowired IFeeServiceSMO feeServiceSMOImpl; @RequestMapping(path = "/feeApi/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 = "/feeApi/service",method= RequestMethod.POST) public String servicePost(@RequestBody String orderInfo, HttpServletRequest request) { BusinessServiceDataFlow businessServiceDataFlow = null; JSONObject responseJson = null; try { Map<String, String> headers = new HashMap<String, String>(); getRequestInfo(request, headers); //颿 ¡éª preValiateOrderInfo(orderInfo); businessServiceDataFlow = this.writeDataToDataFlowContext(orderInfo, headers); responseJson = feeServiceSMOImpl.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 IFeeServiceSMO getFeeServiceSMOImpl() { return feeServiceSMOImpl; } public void setFeeServiceSMOImpl(IFeeServiceSMO feeServiceSMOImpl) { this.feeServiceSMOImpl = feeServiceSMOImpl; } } FeeService/src/main/java/com/java110/fee/dao/IFeeServiceDao.java
New file @@ -0,0 +1,222 @@ package com.java110.fee.dao; import com.java110.common.exception.DAOException; import java.util.List; import java.util.Map; /** * å°åºç»ä»¶å é¨ä¹é´ä½¿ç¨ï¼æ²¡æç»å¤å´ç³»ç»æä¾æå¡è½å * å°åºæå¡æ¥å£ç±»ï¼è¦æ±å ¨é¨ä»¥åç¬¦ä¸²ä¼ è¾ï¼æ¹ä¾¿å¾®æå¡å * æ°å»ºå®¢æ·ï¼ä¿®æ¹å®¢æ·ï¼å é¤å®¢æ·ï¼æ¥è¯¢å®¢æ·çåè½ * * Created by wuxw on 2016/12/27. */ public interface IFeeServiceDao { /** * ä¿å å°åºä¿¡æ¯ * @param businessFeeInfo å°åºä¿¡æ¯ å°è£ * @throws DAOException æä½æ°æ®åºå¼å¸¸ */ void saveBusinessFeeInfo(Map businessFeeInfo) throws DAOException; /** * ä¿åå°åºå±æ§ * @param businessFeeAttr å°åºå±æ§ä¿¡æ¯å°è£ * @throws DAOException æä½æ°æ®åºå¼å¸¸ */ void saveBusinessFeeAttr(Map businessFeeAttr) throws DAOException; /** * ä¿åå°åºç §çä¿¡æ¯ * @param businessFeePhoto å°åºç §ç * @throws DAOException æä½æ°æ®åºå¼å¸¸ */ void saveBusinessFeePhoto(Map businessFeePhoto) throws DAOException; /** * ä¿åå°åºè¯ä»¶ä¿¡æ¯ * @param businessFeeCerdentials å°åºè¯ä»¶ * @throws DAOException æä½æ°æ®åºå¼å¸¸ */ void saveBusinessFeeCerdentials(Map businessFeeCerdentials) throws DAOException; /** * æ¥è¯¢å°åºä¿¡æ¯ï¼businessè¿ç¨ï¼ * æ ¹æ®bId æ¥è¯¢å°åºä¿¡æ¯ * @param info bId ä¿¡æ¯ * @return å°åºä¿¡æ¯ * @throws DAOException */ Map getBusinessFeeInfo(Map info) throws DAOException; /** * æ¥è¯¢å°åºå±æ§ä¿¡æ¯ï¼businessè¿ç¨ï¼ * @param info bId ä¿¡æ¯ * @return å°åºå±æ§ * @throws DAOException */ List<Map> getBusinessFeeAttrs(Map info) throws DAOException; /** * æ¥è¯¢å°åºç §ç * @param info bId ä¿¡æ¯ * @return å°åºç §ç * @throws DAOException */ List<Map> getBusinessFeePhoto(Map info) throws DAOException; /** * æ¥è¯¢å°åºè¯ä»¶ä¿¡æ¯ * @param info bId ä¿¡æ¯ * @return å°åºç §ç * @throws DAOException */ List<Map> getBusinessFeeCerdentials(Map info) throws DAOException; /** * ä¿å å°åºä¿¡æ¯ Businessæ°æ®å° Instanceä¸ * @param info * @throws DAOException */ void saveFeeInfoInstance(Map info) throws DAOException; /** * ä¿å å°åºå±æ§ä¿¡æ¯ Businessæ°æ®å° Instanceä¸ * @param info * @throws DAOException */ void saveFeeAttrsInstance(Map info) throws DAOException; /** * ä¿å å°åºç §çä¿¡æ¯ Businessæ°æ®å° Instanceä¸ * @param info * @throws DAOException */ void saveFeePhotoInstance(Map info) throws DAOException; /** * æ¥è¯¢å°åºä¿¡æ¯ï¼instanceè¿ç¨ï¼ * æ ¹æ®bId æ¥è¯¢å°åºä¿¡æ¯ * @param info bId ä¿¡æ¯ * @return å°åºä¿¡æ¯ * @throws DAOException */ Map getFeeInfo(Map info) throws DAOException; /** * æ¥è¯¢å°åºå±æ§ä¿¡æ¯ï¼instanceè¿ç¨ï¼ * @param info bId ä¿¡æ¯ * @return å°åºå±æ§ * @throws DAOException */ List<Map> getFeeAttrs(Map info) throws DAOException; /** * æ¥è¯¢å°åºç §çï¼instance è¿ç¨ï¼ * @param info bId ä¿¡æ¯ * @return å°åºç §ç * @throws DAOException */ List<Map> getFeePhoto(Map info) throws DAOException; /** * ä¿®æ¹å°åºä¿¡æ¯ * @param info ä¿®æ¹ä¿¡æ¯ * @throws DAOException */ void updateFeeInfoInstance(Map info) throws DAOException; /** * ä¿®æ¹å°åºå±æ§ä¿¡æ¯ * @param info ä¿®æ¹ä¿¡æ¯ * @throws DAOException */ void updateFeeAttrInstance(Map info) throws DAOException; /** * ä¿®æ¹å°åºç §çä¿¡æ¯ * @param info ä¿®æ¹ä¿¡æ¯ * @throws DAOException */ void updateFeePhotoInstance(Map info) throws DAOException; /** * å°åºæåå å ¥ä¿¡æ¯ * @param businessFeeMember å°åºæåä¿¡æ¯ å°è£ * @throws DAOException æä½æ°æ®åºå¼å¸¸ */ void saveBusinessFeeMember(Map businessFeeMember) throws DAOException; /** * æåå å ¥ ä¿åä¿¡æ¯è³instance * @param info * @throws DAOException */ void saveFeeMemberInstance(Map info) throws DAOException; /** * æ¥è¯¢å°åºæåå å ¥ä¿¡æ¯ï¼businessè¿ç¨ï¼ * æ ¹æ®bId æ¥è¯¢å°åºä¿¡æ¯ * @param info bId ä¿¡æ¯ * @return å°åºä¿¡æ¯ * @throws DAOException */ Map getBusinessFeeMember(Map info) throws DAOException; /** * æ¥è¯¢å°åºæåå å ¥ä¿¡æ¯ï¼instanceè¿ç¨ï¼ * æ ¹æ®bId æ¥è¯¢å°åºä¿¡æ¯ * @param info bId ä¿¡æ¯ * @return å°åºä¿¡æ¯ * @throws DAOException */ Map getFeeMember(Map info) throws DAOException; /** * ä¿®æ¹å°åºæåå å ¥ä¿¡æ¯ * @param info ä¿®æ¹ä¿¡æ¯ * @throws DAOException */ void updateFeeMemberInstance(Map info) throws DAOException; /** * æ¥è¯¢å°åºæåå å ¥ä¿¡æ¯ï¼instanceè¿ç¨ï¼ * æ ¹æ®bId æ¥è¯¢å°åºä¿¡æ¯ * @param info bId ä¿¡æ¯ * @return å°åºä¿¡æ¯ * @throws DAOException */ List<Map> getFeeMembers(Map info) throws DAOException; /** * æ¥è¯¢å°åºæåä¸ªæ° * æ ¹æ®bId æ¥è¯¢å°åºä¿¡æ¯ * @param info bId ä¿¡æ¯ * @return å°åºä¿¡æ¯ * @throws DAOException */ int getFeeMemberCount(Map info); } FeeService/src/main/java/com/java110/fee/dao/impl/FeeServiceDaoImpl.java
New file @@ -0,0 +1,436 @@ package com.java110.fee.dao.impl; import com.alibaba.fastjson.JSONObject; import com.java110.common.constant.ResponseConstant; import com.java110.common.exception.DAOException; import com.java110.common.util.DateUtil; import com.java110.fee.dao.IFeeServiceDao; import com.java110.core.base.dao.BaseServiceDao; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import java.util.List; import java.util.Map; /** * å°åºæå¡ 䏿°æ®åºäº¤äº * Created by wuxw on 2017/4/5. */ @Service("feeServiceDaoImpl") //@Transactional public class FeeServiceDaoImpl extends BaseServiceDao implements IFeeServiceDao { private static Logger logger = LoggerFactory.getLogger(FeeServiceDaoImpl.class); /** * å°åºä¿¡æ¯å°è£ * * @param businessFeeInfo å°åºä¿¡æ¯ å°è£ * @throws DAOException */ @Override public void saveBusinessFeeInfo(Map businessFeeInfo) throws DAOException { businessFeeInfo.put("month", DateUtil.getCurrentMonth()); // æ¥è¯¢business_user æ°æ®æ¯å¦å·²ç»åå¨ logger.debug("ä¿åå°åºä¿¡æ¯ å ¥å businessFeeInfo : {}", businessFeeInfo); int saveFlag = sqlSessionTemplate.insert("feeServiceDaoImpl.saveBusinessFeeInfo", businessFeeInfo); if (saveFlag < 1) { throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "ä¿åå°åºæ°æ®å¤±è´¥ï¼" + JSONObject.toJSONString(businessFeeInfo)); } } /** * å°åºå±æ§ä¿¡æ¯åè£ * * @param businessFeeAttr å°åºå±æ§ä¿¡æ¯å°è£ * @throws DAOException */ @Override public void saveBusinessFeeAttr(Map businessFeeAttr) throws DAOException { businessFeeAttr.put("month", DateUtil.getCurrentMonth()); // æ¥è¯¢business_user æ°æ®æ¯å¦å·²ç»åå¨ logger.debug("ä¿åå°åºå±æ§ä¿¡æ¯ å ¥å businessFeeAttr : {}", businessFeeAttr); int saveFlag = sqlSessionTemplate.insert("feeServiceDaoImpl.saveBusinessFeeAttr", businessFeeAttr); if (saveFlag < 1) { throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "ä¿åå°åºå±æ§æ°æ®å¤±è´¥ï¼" + JSONObject.toJSONString(businessFeeAttr)); } } /** * ä¿åå°åºç §çä¿¡æ¯ * * @param businessFeePhoto å°åºç §ç * @throws DAOException */ @Override public void saveBusinessFeePhoto(Map businessFeePhoto) throws DAOException { businessFeePhoto.put("month", DateUtil.getCurrentMonth()); logger.debug("ä¿åå°åºç §çä¿¡æ¯ å ¥å businessFeePhoto : {}", businessFeePhoto); int saveFlag = sqlSessionTemplate.insert("feeServiceDaoImpl.saveBusinessFeePhoto", businessFeePhoto); if (saveFlag < 1) { throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "ä¿åå°åºç §çæ°æ®å¤±è´¥ï¼" + JSONObject.toJSONString(businessFeePhoto)); } } /** * ä¿åå°åºè¯ä»¶ä¿¡æ¯ * * @param businessFeeCerdentials å°åºè¯ä»¶ * @throws DAOException */ @Override public void saveBusinessFeeCerdentials(Map businessFeeCerdentials) throws DAOException { businessFeeCerdentials.put("month", DateUtil.getCurrentMonth()); logger.debug("ä¿åå°åºè¯ä»¶ä¿¡æ¯ å ¥å businessFeeCerdentials : {}", businessFeeCerdentials); int saveFlag = sqlSessionTemplate.insert("feeServiceDaoImpl.saveBusinessFeeCerdentials", businessFeeCerdentials); if (saveFlag < 1) { throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "ä¿åå°åºè¯ä»¶æ°æ®å¤±è´¥ï¼" + JSONObject.toJSONString(businessFeeCerdentials)); } } /** * æ¥è¯¢å°åºä¿¡æ¯ * * @param info bId ä¿¡æ¯ * @return å°åºä¿¡æ¯ * @throws DAOException */ @Override public Map getBusinessFeeInfo(Map info) throws DAOException { logger.debug("æ¥è¯¢å°åºä¿¡æ¯ å ¥å info : {}", info); List<Map> businessFeeInfos = sqlSessionTemplate.selectList("feeServiceDaoImpl.getBusinessFeeInfo", info); if (businessFeeInfos == null) { return null; } if (businessFeeInfos.size() > 1) { throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "æ ¹æ®æ¡ä»¶æ¥è¯¢æå¤æ¡æ°æ®,æ°æ®å¼å¸¸ï¼è¯·æ£æ¥ï¼businessFeeInfosï¼" + JSONObject.toJSONString(info)); } return businessFeeInfos.get(0); } /** * æ¥è¯¢å°åºå±æ§ * * @param info bId ä¿¡æ¯ * @return å°åºå±æ§ * @throws DAOException */ @Override public List<Map> getBusinessFeeAttrs(Map info) throws DAOException { logger.debug("æ¥è¯¢å°åºå±æ§ä¿¡æ¯ å ¥å info : {}", info); List<Map> businessFeeAttrs = sqlSessionTemplate.selectList("feeServiceDaoImpl.getBusinessFeeAttrs", info); return businessFeeAttrs; } /** * æ¥è¯¢å°åºç §ç * * @param info bId ä¿¡æ¯ * @return * @throws DAOException */ @Override public List<Map> getBusinessFeePhoto(Map info) throws DAOException { logger.debug("æ¥è¯¢å°åºç §çä¿¡æ¯ å ¥å info : {}", info); List<Map> businessFeePhotos = sqlSessionTemplate.selectList("feeServiceDaoImpl.getBusinessFeePhoto", info); return businessFeePhotos; } /** * æ¥è¯¢å°åºè¯ä»¶ * * @param info bId ä¿¡æ¯ * @return * @throws DAOException */ @Override public List<Map> getBusinessFeeCerdentials(Map info) throws DAOException { logger.debug("æ¥è¯¢å°åºè¯ä»¶ä¿¡æ¯ å ¥å info : {}", info); List<Map> businessFeeCerdentialses = sqlSessionTemplate.selectList("feeServiceDaoImpl.getBusinessFeeCerdentials", info); return businessFeeCerdentialses; } /** * ä¿åå°åºä¿¡æ¯ å° instance * * @param info bId ä¿¡æ¯ * @throws DAOException */ @Override public void saveFeeInfoInstance(Map info) throws DAOException { logger.debug("ä¿åå°åºä¿¡æ¯Instance å ¥å info : {}", info); int saveFlag = sqlSessionTemplate.insert("feeServiceDaoImpl.saveFeeInfoInstance", info); if (saveFlag < 1) { throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "ä¿åå°åºä¿¡æ¯Instanceæ°æ®å¤±è´¥ï¼" + JSONObject.toJSONString(info)); } } @Override public void saveFeeAttrsInstance(Map info) throws DAOException { logger.debug("ä¿åå°åºå±æ§ä¿¡æ¯Instance å ¥å info : {}", info); int saveFlag = sqlSessionTemplate.insert("feeServiceDaoImpl.saveFeeAttrsInstance", info); if (saveFlag < 1) { throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "ä¿åå°åºå±æ§ä¿¡æ¯Instanceæ°æ®å¤±è´¥ï¼" + JSONObject.toJSONString(info)); } } @Override public void saveFeePhotoInstance(Map info) throws DAOException { logger.debug("ä¿åå°åºç §çä¿¡æ¯Instance å ¥å info : {}", info); int saveFlag = sqlSessionTemplate.insert("feeServiceDaoImpl.saveFeePhotoInstance", info); if (saveFlag < 1) { throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "ä¿åå°åºç §çä¿¡æ¯Instanceæ°æ®å¤±è´¥ï¼" + JSONObject.toJSONString(info)); } } /** * æ¥è¯¢å°åºä¿¡æ¯ï¼instanceï¼ * * @param info bId ä¿¡æ¯ * @return * @throws DAOException */ @Override public Map getFeeInfo(Map info) throws DAOException { logger.debug("æ¥è¯¢å°åºä¿¡æ¯ å ¥å info : {}", info); List<Map> businessFeeInfos = sqlSessionTemplate.selectList("feeServiceDaoImpl.getFeeInfo", info); if (businessFeeInfos == null || businessFeeInfos.size() == 0) { return null; } if (businessFeeInfos.size() > 1) { throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "æ ¹æ®æ¡ä»¶æ¥è¯¢æå¤æ¡æ°æ®,æ°æ®å¼å¸¸ï¼è¯·æ£æ¥ï¼getFeeInfoï¼" + JSONObject.toJSONString(info)); } return businessFeeInfos.get(0); } /** * å°åºå±æ§æ¥è¯¢ï¼instanceï¼ * * @param info bId ä¿¡æ¯ * @return * @throws DAOException */ @Override public List<Map> getFeeAttrs(Map info) throws DAOException { logger.debug("æ¥è¯¢å°åºå±æ§ä¿¡æ¯ å ¥å info : {}", info); List<Map> feeAttrs = sqlSessionTemplate.selectList("feeServiceDaoImpl.getFeeAttrs", info); return feeAttrs; } /** * å°åºç §çæ¥è¯¢ï¼instanceï¼ * * @param info bId ä¿¡æ¯ * @return * @throws DAOException */ @Override public List<Map> getFeePhoto(Map info) throws DAOException { logger.debug("æ¥è¯¢å°åºç §çä¿¡æ¯ å ¥å info : {}", info); List<Map> feePhotos = sqlSessionTemplate.selectList("feeServiceDaoImpl.getFeePhoto", info); return feePhotos; } /** * ä¿®æ¹å°åºä¿¡æ¯ * * @param info ä¿®æ¹ä¿¡æ¯ * @throws DAOException */ @Override public void updateFeeInfoInstance(Map info) throws DAOException { logger.debug("ä¿®æ¹å°åºä¿¡æ¯Instance å ¥å info : {}", info); int saveFlag = sqlSessionTemplate.update("feeServiceDaoImpl.updateFeeInfoInstance", info); if (saveFlag < 1) { throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "ä¿®æ¹å°åºä¿¡æ¯Instanceæ°æ®å¤±è´¥ï¼" + JSONObject.toJSONString(info)); } } /** * ä¿®æ¹å°åºå±æ§ä¿¡æ¯ï¼instanceï¼ * * @param info ä¿®æ¹ä¿¡æ¯ * @throws DAOException */ @Override public void updateFeeAttrInstance(Map info) throws DAOException { logger.debug("ä¿®æ¹å°åºå±æ§ä¿¡æ¯Instance å ¥å info : {}", info); int saveFlag = sqlSessionTemplate.update("feeServiceDaoImpl.updateFeeAttrInstance", info); if (saveFlag < 1) { throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "ä¿®æ¹å°åºå±æ§ä¿¡æ¯Instanceæ°æ®å¤±è´¥ï¼" + JSONObject.toJSONString(info)); } } /** * ä¿®æ¹ å°åºç §çä¿¡æ¯ * * @param info ä¿®æ¹ä¿¡æ¯ * @throws DAOException */ @Override public void updateFeePhotoInstance(Map info) throws DAOException { logger.debug("ä¿®æ¹å°åºç §çä¿¡æ¯Instance å ¥å info : {}", info); int saveFlag = sqlSessionTemplate.update("feeServiceDaoImpl.updateFeePhotoInstance", info); if (saveFlag < 1) { throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "ä¿®æ¹å°åºç §çä¿¡æ¯Instanceæ°æ®å¤±è´¥ï¼" + JSONObject.toJSONString(info)); } } /** * å°åºæåå å ¥ä¿¡æ¯ * * @param businessFeeMember å°åºæåä¿¡æ¯ å°è£ * @throws DAOException æä½æ°æ®åºå¼å¸¸ */ public void saveBusinessFeeMember(Map businessFeeMember) throws DAOException { logger.debug("å°åºæåå å ¥ å ¥å businessFeeMember : {}", businessFeeMember); businessFeeMember.put("month", DateUtil.getCurrentMonth()); int saveFlag = sqlSessionTemplate.insert("feeServiceDaoImpl.saveBusinessFeeMember", businessFeeMember); if (saveFlag < 1) { throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "å°åºæåå å ¥å¤±è´¥ï¼" + JSONObject.toJSONString(businessFeeMember)); } } /** * æåå å ¥ ä¿åä¿¡æ¯è³instance * * @param info * @throws DAOException */ @Override public void saveFeeMemberInstance(Map info) throws DAOException { logger.debug("å°åºæåå å ¥Instance å ¥å info : {}", info); int saveFlag = sqlSessionTemplate.insert("feeServiceDaoImpl.saveFeeMemberInstance", info); if (saveFlag < 1) { throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "ä¿åå°åºç §çä¿¡æ¯Instanceæ°æ®å¤±è´¥ï¼" + JSONObject.toJSONString(info)); } } /** * æ¥è¯¢å°åºæåå å ¥ä¿¡æ¯ï¼businessè¿ç¨ï¼ * æ ¹æ®bId æ¥è¯¢å°åºä¿¡æ¯ * * @param info bId ä¿¡æ¯ * @return å°åºä¿¡æ¯ * @throws DAOException */ public Map getBusinessFeeMember(Map info) throws DAOException { logger.debug("æ¥è¯¢å°åºæåå å ¥ä¿¡æ¯ å ¥å info : {}", info); List<Map> businessFeeMembers = sqlSessionTemplate.selectList("feeServiceDaoImpl.getBusinessFeeMember", info); if (businessFeeMembers == null || businessFeeMembers.size() == 0) { return null; } if (businessFeeMembers.size() > 1) { throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "æ ¹æ®æ¡ä»¶æ¥è¯¢æå¤æ¡æ°æ®,æ°æ®å¼å¸¸ï¼è¯·æ£æ¥ï¼businessFeeMemberï¼" + JSONObject.toJSONString(info)); } return businessFeeMembers.get(0); } /** * æ¥è¯¢å°åºæåå å ¥ä¿¡æ¯ï¼instanceè¿ç¨ï¼ * æ ¹æ®bId æ¥è¯¢å°åºä¿¡æ¯ * * @param info bId ä¿¡æ¯ * @return å°åºä¿¡æ¯ * @throws DAOException */ public Map getFeeMember(Map info) throws DAOException { logger.debug("æ¥è¯¢å°åºæåå å ¥ä¿¡æ¯ å ¥å info : {}", info); List<Map> memberFees = sqlSessionTemplate.selectList("feeServiceDaoImpl.getFeeMember", info); if (memberFees == null || memberFees.size() == 0) { return null; } if (memberFees.size() > 1) { throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "æ ¹æ®æ¡ä»¶æ¥è¯¢æå¤æ¡æ°æ®,æ°æ®å¼å¸¸ï¼è¯·æ£æ¥ï¼getFeeMemberï¼" + JSONObject.toJSONString(info)); } return memberFees.get(0); } /** * ä¿®æ¹å°åºæåå å ¥ä¿¡æ¯ * * @param info ä¿®æ¹ä¿¡æ¯ * @throws DAOException */ public void updateFeeMemberInstance(Map info) throws DAOException { logger.debug("ä¿®æ¹å°åºæåå å ¥ä¿¡æ¯Instance å ¥å info : {}", info); int saveFlag = sqlSessionTemplate.update("feeServiceDaoImpl.updateFeeMemberInstance", info); if (saveFlag < 1) { throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "ä¿®æ¹å°åºæåå å ¥ä¿¡æ¯Instanceæ°æ®å¤±è´¥ï¼" + JSONObject.toJSONString(info)); } } /** * @param info bId ä¿¡æ¯ * @return * @throws DAOException */ @Override public List<Map> getFeeMembers(Map info) throws DAOException { logger.debug("æ¥è¯¢å°åºæåå å ¥ä¿¡æ¯ å ¥å info : {}", info); List<Map> memberFees = sqlSessionTemplate.selectList("feeServiceDaoImpl.getFeeMember", info); return memberFees; } @Override public int getFeeMemberCount(Map info) { logger.debug("æ¥è¯¢å°åºæåå å ¥ä¿¡æ¯ å ¥å info : {}", info); List<Map> memberFees = sqlSessionTemplate.selectList("feeServiceDaoImpl.getFeeMemberCount", info); if (memberFees.size() < 1) { return 0; } return Integer.parseInt(memberFees.get(0).get("count").toString()); } } FeeService/src/main/java/com/java110/fee/kafka/FeeServiceBean.java
New file @@ -0,0 +1,16 @@ package com.java110.fee.kafka; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** * Created by wuxw on 2018/4/15. */ @Configuration public class FeeServiceBean { @Bean public FeeServiceKafka listener() { return new FeeServiceKafka(); } } FeeService/src/main/java/com/java110/fee/kafka/FeeServiceKafka.java
New file @@ -0,0 +1,92 @@ package com.java110.fee.kafka; import com.alibaba.fastjson.JSONObject; import com.java110.common.constant.KafkaConstant; import com.java110.common.constant.ResponseConstant; import com.java110.common.constant.StatusConstant; import com.java110.common.exception.InitConfigDataException; import com.java110.common.exception.InitDataFlowContextException; import com.java110.common.kafka.KafkaFactory; import com.java110.core.base.controller.BaseController; import com.java110.core.context.BusinessServiceDataFlow; import com.java110.core.factory.DataTransactionFactory; import com.java110.fee.smo.IFeeServiceSMO; import org.apache.kafka.clients.consumer.ConsumerRecord; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.kafka.annotation.KafkaListener; import java.util.HashMap; import java.util.Map; /** * kafkaä¾¦å¬ * Created by wuxw on 2018/4/15. */ public class FeeServiceKafka extends BaseController { private final static Logger logger = LoggerFactory.getLogger(FeeServiceKafka.class); @Autowired private IFeeServiceSMO feeServiceSMOImpl; @KafkaListener(topics = {"feeServiceTopic"}) public void listen(ConsumerRecord<?, ?> record) { logger.info("kafkaçkey: " + record.key()); logger.info("kafkaçvalue: " + record.value().toString()); String orderInfo = record.value().toString(); BusinessServiceDataFlow businessServiceDataFlow = null; JSONObject responseJson = null; try { Map<String, String> headers = new HashMap<String, String>(); //颿 ¡éª preValiateOrderInfo(orderInfo); businessServiceDataFlow = this.writeDataToDataFlowContext(orderInfo, headers); responseJson = feeServiceSMOImpl.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 { logger.debug("å½åè¯·æ±æ¥æï¼" + orderInfo +", å½åè¿åæ¥æï¼" +responseJson.toJSONString()); //åªæbusiness å instance è¿ç¨æåéç¥æ¶æ¯ if(!StatusConstant.REQUEST_BUSINESS_TYPE_BUSINESS.equals(responseJson.getString("businessType")) && !StatusConstant.REQUEST_BUSINESS_TYPE_INSTANCE.equals(responseJson.getString("businessType"))){ return ; } try { KafkaFactory.sendKafkaMessage(KafkaConstant.TOPIC_NOTIFY_CENTER_SERVICE_NAME, "", responseJson.toJSONString()); }catch (Exception e){ logger.error("ç¨æ·æå¡éç¥centerService失败"+responseJson,e); //è¿éä¿åå¼å¸¸ä¿¡æ¯ } } } /** * è¿é颿 ¡éªï¼è¯·æ±æ¥æä¸ä¸è½æ dataFlowId * @param orderInfo */ private void preValiateOrderInfo(String orderInfo) { /* if(JSONObject.parseObject(orderInfo).getJSONObject("orders").containsKey("dataFlowId")){ throw new BusinessException(ResponseConstant.RESULT_CODE_ERROR,"æ¥æä¸ä¸è½åå¨dataFlowIdèç¹"); }*/ } public IFeeServiceSMO getFeeServiceSMOImpl() { return feeServiceSMOImpl; } public void setFeeServiceSMOImpl(IFeeServiceSMO feeServiceSMOImpl) { this.feeServiceSMOImpl = feeServiceSMOImpl; } } FeeService/src/main/java/com/java110/fee/smo/IFeeServiceSMO.java
New file @@ -0,0 +1,17 @@ package com.java110.fee.smo; import com.alibaba.fastjson.JSONObject; import com.java110.common.exception.SMOException; import com.java110.core.context.BusinessServiceDataFlow; /** * * ç¨æ·ä¿¡æ¯ç®¡çï¼æå¡ * Created by wuxw on 2017/4/5. */ public interface IFeeServiceSMO { public JSONObject service(BusinessServiceDataFlow businessServiceDataFlow) throws SMOException; } FeeService/src/main/java/com/java110/fee/smo/impl/FeeServiceSMOImpl.java
New file @@ -0,0 +1,112 @@ package com.java110.fee.smo.impl; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.java110.common.cache.MappingCache; import com.java110.common.constant.KafkaConstant; import com.java110.common.constant.MappingConstant; import com.java110.common.constant.ResponseConstant; import com.java110.common.exception.SMOException; import com.java110.common.kafka.KafkaFactory; import com.java110.common.util.Assert; import com.java110.common.util.DateUtil; import com.java110.fee.smo.IFeeServiceSMO; import com.java110.core.base.smo.BaseServiceSMO; import com.java110.core.context.BusinessServiceDataFlow; import com.java110.core.factory.DataFlowFactory; import com.java110.entity.center.DataFlowLinksCost; import com.java110.entity.center.DataFlowLog; import com.java110.event.service.BusinessServiceDataFlowEventPublishing; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Date; import java.util.List; /** * ç¨æ·æå¡ä¿¡æ¯ç®¡çä¸å¡ä¿¡æ¯å®ç° * Created by wuxw on 2017/4/5. */ @Service("feeServiceSMOImpl") @Transactional public class FeeServiceSMOImpl extends BaseServiceSMO implements IFeeServiceSMO { private static Logger logger = LoggerFactory.getLogger(FeeServiceSMOImpl.class); @Override public JSONObject service(BusinessServiceDataFlow businessServiceDataFlow) throws SMOException { try { Assert.hasLength(businessServiceDataFlow.getbId(), "bId ä¸è½ä¸ºç©º"); BusinessServiceDataFlowEventPublishing.multicastEvent(businessServiceDataFlow); Assert.notEmpty(businessServiceDataFlow.getResJson(), "ç¨æ·æå¡[" + businessServiceDataFlow.getCurrentBusiness().getServiceCode() + "]没æè¿åå 容"); } catch (Exception e) { logger.error("ç¨æ·ä¿¡æ¯å¤çå¼å¸¸", e); throw new SMOException(ResponseConstant.RESULT_PARAM_ERROR, "ç¨æ·ä¿¡æ¯å¤çå¼å¸¸" + e.getMessage()); } finally { if (businessServiceDataFlow == null) { return null; } //è¿éè®°å½æ¥å¿ Date endDate = DateUtil.getCurrentDate(); businessServiceDataFlow.setEndDate(endDate); //æ·»å èæ¶ DataFlowFactory.addCostTime(businessServiceDataFlow, "service", "ä¸å¡å¤çæ»èæ¶", businessServiceDataFlow.getStartDate(), businessServiceDataFlow.getEndDate()); //ä¿åèæ¶ saveCostTimeLogMessage(businessServiceDataFlow); //ä¿åæ¥å¿ saveLogMessage(businessServiceDataFlow); } return businessServiceDataFlow.getResJson(); } /** * ä¿åæ¥å¿ä¿¡æ¯ * * @param businessServiceDataFlow */ private void saveLogMessage(BusinessServiceDataFlow businessServiceDataFlow) { try { if (MappingConstant.VALUE_ON.equals(MappingCache.getValue(MappingConstant.KEY_LOG_ON_OFF))) { for (DataFlowLog dataFlowLog : businessServiceDataFlow.getLogDatas()) { KafkaFactory.sendKafkaMessage(KafkaConstant.TOPIC_LOG_NAME, "", JSONObject.toJSONString(dataFlowLog)); } } } catch (Exception e) { logger.error("æ¥éæ¥å¿åºéäºï¼", e); } } /** * ä¿åèæ¶ä¿¡æ¯ * * @param businessServiceDataFlow */ private void saveCostTimeLogMessage(BusinessServiceDataFlow businessServiceDataFlow) { try { if (MappingConstant.VALUE_ON.equals(MappingCache.getValue(MappingConstant.KEY_COST_TIME_ON_OFF))) { List<DataFlowLinksCost> dataFlowLinksCosts = businessServiceDataFlow.getLinksCostDates(); JSONObject costDate = new JSONObject(); JSONArray costDates = new JSONArray(); JSONObject newObj = null; for (DataFlowLinksCost dataFlowLinksCost : dataFlowLinksCosts) { newObj = JSONObject.parseObject(JSONObject.toJSONString(dataFlowLinksCost)); newObj.put("dataFlowId", businessServiceDataFlow.getDataFlowId()); newObj.put("transactionId", businessServiceDataFlow.getTransactionId()); costDates.add(newObj); } costDate.put("costDates", costDates); KafkaFactory.sendKafkaMessage(KafkaConstant.TOPIC_COST_TIME_LOG_NAME, "", costDate.toJSONString()); } } catch (Exception e) { logger.error("æ¥éæ¥å¿åºéäºï¼", e); } } } FeeService/src/main/resources/application-dev.yml
New file @@ -0,0 +1,96 @@ jedis: pool: config: maxTotal: 100 maxIdle: 20 maxWaitMillis: 20000 host: dev.redis.java110.com port: 6379 eureka: instance: leaseRenewalIntervalInSeconds: 10 leaseExpirationDurationInSeconds: 30 preferIpAddress: true instanceId: ${spring.cloud.client.ipAddress}:${server.port} client: serviceUrl: defaultZone: http://dev.java110.com:8761/eureka/ #defaultZone: http://localhost:8761/eureka/ server: port: 8009 tomcat: uri-encoding: UTF-8 spring: profiles: active: share http: encoding: charset: UTF-8 enabled: true force: true application: name: community-service redis: database: 0 host: dev.redis.java110.com 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://dev.db.java110.com: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: dev.zk.java110.com:2181 servers: dev.kafka.java110.com:9092 enable: auto: commit: true session: timeout: 6000 auto: commit: interval: 100 offset: reset: latest topic: test group: id: communityBusinessStatus concurrency: 10 producer: zookeeper: connect: dev.zk.java110.com:2181 servers: dev.kafka.java110.com:9092 retries: 0 batch: size: 4096 linger: 1 buffer: memory: 40960 FeeService/src/main/resources/application-prod.yml
New file @@ -0,0 +1,94 @@ jedis: pool: config: maxTotal: 100 maxIdle: 20 maxWaitMillis: 20000 host: prod.redis.java110.com port: 6379 eureka: instance: leaseRenewalIntervalInSeconds: 10 leaseExpirationDurationInSeconds: 30 preferIpAddress: true instanceId: ${spring.cloud.client.ipAddress}:${server.port} client: serviceUrl: defaultZone: http://prod.java110.com:8761/eureka/ #defaultZone: http://localhost:8761/eureka/ server: port: 8009 tomcat: uri-encoding: UTF-8 spring: http: encoding: charset: UTF-8 enabled: true force: true application: name: community-service redis: database: 0 host: prod.redis.java110.com 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://prod.db.java110.com: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: prod.zk.java110.com:2181 servers: prod.kafka.java110.com:9092 enable: auto: commit: true session: timeout: 6000 auto: commit: interval: 100 offset: reset: latest topic: test group: id: communityBusinessStatus concurrency: 10 producer: zookeeper: connect: prod.zk.java110.com:2181 servers: prod.kafka.java110.com:9092 retries: 0 batch: size: 4096 linger: 1 buffer: memory: 40960 FeeService/src/main/resources/application-share.yml
New file @@ -0,0 +1,61 @@ spring: shardingsphere: datasource: # names: ds_master_0,ds_master_1,ds_master_0_slave_0,ds_master_0_slave_1,ds_master_1_slave_0,ds_master_1_slave_1 names: ds_master_0,ds_master_1 # ds_master_0_slave_0: # jdbc-url: jdbc:mysql://localhost:3306/demo_ds_master_0_slave_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8 # password: # type: com.zaxxer.hikari.HikariDataSource # driver-class-name: com.mysql.jdbc.Driver # username: root ds_master_0: driver-class-name: com.mysql.jdbc.Driver type: com.alibaba.druid.pool.DruidDataSource jdbc-url: jdbc:mysql://dev.db.java110.com:3306/hc_community?useUnicode=true&characterEncoding=utf-8 username: hc_community password: hc_community@12345678 minIdle: 5 validationQuery: SELECT 1 FROM DUAL initialSize: 5 maxWait: 60000 filters: stat,wall,log4j poolPreparedStatements: true ds_master_1: driver-class-name: com.mysql.jdbc.Driver type: com.alibaba.druid.pool.DruidDataSource jdbc-url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8 username: TT password: TT@12345678 minIdle: 5 validationQuery: SELECT 1 FROM DUAL initialSize: 5 maxWait: 60000 filters: stat,wall,log4j poolPreparedStatements: true sharding: tables: business_community: actual-data-nodes: ds_master_$->{0..1}.business_community database-strategy: inline: sharding-column: community_id algorithm-expression: ds_master_$->{Long.parseLong(community_id) % 2} community: actual-data-nodes: ds_master_$->{0..1}.community database-strategy: inline: sharding-column: community_id algorithm-expression: ds_master_$->{Long.parseLong(community_id) % 2} default-database-strategy: none: default-table-strategy: none: default-datasource-name: ds_master_0 # master-slave-rules: # ds_1: # slave-data-source-names: ds_master_1_slave_0, ds_master_1_slave_1 # master-data-source-name: ds_master_1 # ds_0: # slave-data-source-names: ds_master_0_slave_0, ds_master_0_slave_1 # master-data-source-name: ds_master_0 FeeService/src/main/resources/application-test.yml
New file @@ -0,0 +1,94 @@ jedis: pool: config: maxTotal: 100 maxIdle: 20 maxWaitMillis: 20000 host: test.redis.java110.com port: 6379 eureka: instance: leaseRenewalIntervalInSeconds: 10 leaseExpirationDurationInSeconds: 30 preferIpAddress: true instanceId: ${spring.cloud.client.ipAddress}:${server.port} client: serviceUrl: defaultZone: http://test.java110.com:8761/eureka/ #defaultZone: http://localhost:8761/eureka/ server: port: 8009 tomcat: uri-encoding: UTF-8 spring: http: encoding: charset: UTF-8 enabled: true force: true application: name: community-service redis: database: 0 host: test.redis.java110.com 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://test.db.java110.com: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: test.zk.java110.com:2181 servers: test.kafka.java110.com:9092 enable: auto: commit: true session: timeout: 6000 auto: commit: interval: 100 offset: reset: latest topic: test group: id: communityBusinessStatus concurrency: 10 producer: zookeeper: connect: test.zk.java110.com:2181 servers: test.kafka.java110.com:9092 retries: 0 batch: size: 4096 linger: 1 buffer: memory: 40960 FeeService/src/main/resources/application.yml
New file @@ -0,0 +1,3 @@ spring: profiles: active: dev FeeService/src/main/resources/banner.txt
New file @@ -0,0 +1,15 @@ ${AnsiColor.BRIGHT_RED} __ ____ ___________ |__|____ ___ _______ /_ /_ \ _ \ | \__ \\ \/ /\__ \ | || / /_\ \ | |/ __ \\ / / __ \| || \ \_/ \ /\__| (____ /\_/ (____ /___||___|\_____ / \______| \/ \/ \/ ____ ___ _________ .__ | | \______ ___________/ _____/ ______________ _|__| ____ ____ | | / ___// __ \_ __ \_____ \_/ __ \_ __ \ \/ / |/ ___\/ __ \ | | /\___ \\ ___/| | \/ \ ___/| | \/\ /| \ \__\ ___/ |______//____ >\___ >__| /_______ /\___ >__| \_/ |__|\___ >___ > \/ \/ \/ \/ \/ \/ java110 UserService starting, more information scan https://github.com/java110/MicroCommunity FeeService/src/main/resources/dataSource.yml
New file @@ -0,0 +1,125 @@ dataSources: ds0: !!com.alibaba.druid.pool.DruidDataSource driverClassName: com.mysql.jdbc.Driver url: jdbc:mysql://dev.db.java110.com:3306/hc_community?useUnicode=true&characterEncoding=utf-8 username: hc_community password: hc_community@12345678 minIdle: 5 validationQuery: SELECT 1 FROM DUAL initialSize: 5 maxWait: 60000 filters: stat,wall,log4j poolPreparedStatements: true # ds0_slave0: !!com.alibaba.druid.pool.DruidDataSource # driverClassName: com.mysql.jdbc.Driver # url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8 # username: TT # password: TT@12345678 # connectionTimeoutMilliseconds: 30000 # idleTimeoutMilliseconds: 60000 # maxPoolSize: 50 # minPoolSize: 1 # maintenanceIntervalMilliseconds: 30000 ds1: !!com.alibaba.druid.pool.DruidDataSource driverClassName: com.mysql.jdbc.Driver url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8 username: TT password: TT@12345678 minIdle: 5 validationQuery: SELECT 1 FROM DUAL initialSize: 5 maxWait: 60000 filters: stat,wall,log4j poolPreparedStatements: true # ds1_slave0: !!com.alibaba.druid.pool.DruidDataSource # driverClassName: com.mysql.jdbc.Driver # url: jdbc:mysql://dev.db.java110.com:3306/TT?useUnicode=true&characterEncoding=utf-8 # username: TT # password: TT@12345678 # connectionTimeoutMilliseconds: 30000 # idleTimeoutMilliseconds: 60000 # maxPoolSize: 50 # minPoolSize: 1 # maintenanceIntervalMilliseconds: 30000 shardingRule: tables: business_community: actualDataNodes: ds${0..1}.business_community databaseStrategy: inline: shardingColumn: community_id algorithmExpression: ds${Long.parseLong(community_id) % 2} s_community: actualDataNodes: ds${0..1}.s_community databaseStrategy: inline: shardingColumn: community_id algorithmExpression: ds${Long.parseLong(community_id) % 2} business_community_attr: actualDataNodes: ds${0..1}.business_community_attr databaseStrategy: inline: shardingColumn: community_id algorithmExpression: ds${Long.parseLong(community_id) % 2} s_community_attr: actualDataNodes: ds${0..1}.s_community_attr databaseStrategy: inline: shardingColumn: community_id algorithmExpression: ds${Long.parseLong(community_id) % 2} business_community_member: actualDataNodes: ds${0..1}.business_community_member databaseStrategy: inline: shardingColumn: community_id algorithmExpression: ds${Long.parseLong(community_id) % 2} business_community_photo: actualDataNodes: ds${0..1}.business_community_photo databaseStrategy: inline: shardingColumn: community_id algorithmExpression: ds${Long.parseLong(community_id) % 2} s_community_member: actualDataNodes: ds${0..1}.s_community_member databaseStrategy: inline: shardingColumn: community_id algorithmExpression: ds${Long.parseLong(community_id) % 2} s_community_photo: actualDataNodes: ds${0..1}.s_community_photo databaseStrategy: inline: shardingColumn: community_id algorithmExpression: ds${Long.parseLong(community_id) % 2} bindingTables: - business_community - s_community - business_community_member - business_community_photo - s_community_member - s_community_photo - business_community_attr - s_community_attr defaultDataSourceName: ds1 defaultDatabaseStrategy: inline: shardingColumn: community_id algorithmExpression: ds${Long.parseLong(community_id) % 2} defaultTableStrategy: none: # masterSlaveRules: # ms_ds0: # masterDataSourceName: ds0 # slaveDataSourceNames: # - ds0_slave0 # loadBalanceAlgorithmType: ROUND_ROBIN # ms_ds1: # masterDataSourceName: ds1 # slaveDataSourceNames: # - ds1_slave0 # loadBalanceAlgorithmType: ROUND_ROBIN props: sql.show: true FeeService/src/test/java/com/java110/pay/AppTest.java
File was deleted SaveFloorListener.java
File was deleted docs/hcÐ¡Çø¹ÜÀíϵͳÊý¾Ý¿âÄ£ÐÍv1.0.pdb
Diff too large docs/hcÐ¡Çø¹ÜÀíϵͳÊý¾Ý¿âÄ£ÐÍv1.0.pdm
Diff too large java110-db/db/FeeService/create.sql
@@ -1,13 +1,133 @@ create table fee( -- è´¹ç¨ä¸»è¡¨ create table business_pay_fee( fee_id varchar(30) not null comment 'è´¹ç¨ID', b_id VARCHAR(30) NOT NULL COMMENT 'ä¸å¡Id', fee_type_cd varchar(12) not null comment 'è´¹ç¨ç±»åï¼ç©ä¸è´¹ï¼å车费', community_id varchar(30) not null comment 'å°åºID', payer_obj_id varchar(30) not null comment '仿¬¾æ¹ID', income_obj_id varchar(30) not null comment 'æ¶å ¥æ¹ID', cycle int not null comment '卿æ°ï¼ä»¥æä¸ºåä½', price DECIMAL(7,2) not null comment 'éé¢', remark VARCHAR(300) NOT NULL COMMENT 'ç¨æ·ID', income_obj_id varchar(30) not null comment 'æ¶æ¬¾æ¹ID', start_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'å¼å§æ¶é´', end_time TIMESTAMP NOT NULL COMMENT 'ç»ææ¶é´', amount decimal(7,2) not null default -1.00 comment 'æ»éé¢ï¼å¦ç©ä¸è´¹ï¼åè½¦è´¹çæ²¡ææ»éé¢çï¼å¡«å为-1.00', user_id varchar(30) not null comment 'åå»ºç¨æ·ID', create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'å建æ¶é´', operate VARCHAR(4) NOT NULL COMMENT 'æ°æ®ç¶æï¼æ·»å ADDï¼ä¿®æ¹MOD å é¤DEL' ); CREATE INDEX idx_bpf_fee_id ON business_pay_fee(fee_id); CREATE INDEX idx_bpf_b_id ON business_pay_fee(b_id); create table pay_fee( fee_id varchar(30) not null comment 'è´¹ç¨ID', b_id VARCHAR(30) NOT NULL COMMENT 'ä¸å¡Id', fee_type_cd varchar(12) not null comment 'è´¹ç¨ç±»åï¼ç©ä¸è´¹ï¼å车费', community_id varchar(30) not null comment 'å°åºID', payer_obj_id varchar(30) not null comment '仿¬¾æ¹ID', income_obj_id varchar(30) not null comment 'æ¶æ¬¾æ¹ID', start_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'å¼å§æ¶é´', end_time TIMESTAMP NOT NULL COMMENT 'ç»ææ¶é´', amount decimal(7,2) not null default -1.00 comment 'æ»éé¢ï¼å¦ç©ä¸è´¹ï¼åè½¦è´¹çæ²¡ææ»éé¢çï¼å¡«å为-1.00', user_id varchar(30) not null comment 'åå»ºç¨æ·ID', create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'å建æ¶é´', status_cd VARCHAR(2) NOT NULL DEFAULT '0' COMMENT 'æ°æ®ç¶æï¼è¯¦ç»åèc_status表ï¼S ä¿åï¼0, å¨ç¨ 1失æ', UNIQUE KEY (fee_id) ); ); CREATE INDEX idx_pf_fee_id ON business_pay_fee(fee_id); CREATE INDEX idx_pf_b_id ON business_pay_fee(b_id); -- CREATE TABLE business_pay_fee_attrs( fee_id VARCHAR(30) NOT NULL COMMENT 'è´¹ç¨ID', b_id VARCHAR(30) NOT NULL COMMENT 'ä¸å¡Id', community_id varchar(30) not null comment 'å°åºID', attr_id VARCHAR(30) NOT NULL COMMENT '屿§id', spec_cd VARCHAR(12) NOT NULL COMMENT 'è§æ ¼id,åèspec表', `value` VARCHAR(50) NOT NULL COMMENT '屿§å¼', operate VARCHAR(4) NOT NULL COMMENT 'æ°æ®ç¶æï¼æ·»å ADDï¼ä¿®æ¹MOD å é¤DEL' ); CREATE INDEX idx_bpfa_fee_id ON business_pay_fee_attrs(fee_id); CREATE INDEX idx_bpfa_b_id ON business_pay_fee_attrs(b_id); -- c_orders_attrs CREATE TABLE pay_fee_attrs( fee_id VARCHAR(30) NOT NULL COMMENT 'è´¹ç¨ID', b_id VARCHAR(30) NOT NULL COMMENT 'ä¸å¡Id', community_id varchar(30) not null comment 'å°åºID', attr_id VARCHAR(30) NOT NULL COMMENT '屿§id', spec_cd VARCHAR(12) NOT NULL COMMENT 'è§æ ¼id,åèspec表', `value` VARCHAR(50) NOT NULL COMMENT '屿§å¼', status_cd VARCHAR(2) NOT NULL DEFAULT '0' COMMENT 'æ°æ®ç¶æï¼è¯¦ç»åèc_status表ï¼S ä¿åï¼0, å¨ç¨ 1失æ', UNIQUE KEY (attr_id) ); CREATE INDEX idx_pfa_fee_id ON business_pay_fee_attrs(fee_id); CREATE INDEX idx_pfa_b_id ON business_pay_fee_attrs(b_id); -- è´¹ç¨æç»è¡¨ create table business_pay_fee_detail( detail_id varchar(30) not null comment 'è´¹ç¨æç»ID', b_id VARCHAR(30) NOT NULL COMMENT 'ä¸å¡Id', fee_id varchar(30) not null comment 'è´¹ç¨ID', community_id varchar(30) not null comment 'å°åºID', cycles int not null comment '卿ï¼ä»¥æä¸ºåä½', receivable_amount decimal(7,2) not null comment 'åºæ¶éé¢', received_amount decimal(7,2) not null comment '宿¶éé¢', prime_rate decimal(3,2) not null comment 'ææç', remark VARCHAR(200) NOT NULL COMMENT '夿³¨', create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'å建æ¶é´', operate VARCHAR(4) NOT NULL COMMENT 'æ°æ®ç¶æï¼æ·»å ADDï¼ä¿®æ¹MOD å é¤DEL' ); CREATE INDEX idx_bpfd_detail_id ON business_pay_fee_detail(detail_id); CREATE INDEX idx_bpfd_b_id ON business_pay_fee_detail(b_id); -- è´¹ç¨æç»è¡¨ create table pay_fee_detail( detail_id varchar(30) not null comment 'è´¹ç¨æç»ID', b_id VARCHAR(30) NOT NULL COMMENT 'ä¸å¡Id', fee_id varchar(30) not null comment 'è´¹ç¨ID', community_id varchar(30) not null comment 'å°åºID', cycles int not null comment '卿ï¼ä»¥æä¸ºåä½', receivable_amount decimal(7,2) not null comment 'åºæ¶éé¢', received_amount decimal(7,2) not null comment '宿¶éé¢', prime_rate decimal(3,2) not null comment 'ææç', remark VARCHAR(200) NOT NULL COMMENT '夿³¨', create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'å建æ¶é´', status_cd VARCHAR(2) NOT NULL DEFAULT '0' COMMENT 'æ°æ®ç¶æï¼è¯¦ç»åèc_status表ï¼S ä¿åï¼0, å¨ç¨ 1失æ', UNIQUE KEY (detail_id) ); CREATE INDEX idx_pfd_detail_id ON business_pay_fee_detail(detail_id); CREATE INDEX idx_pfd_b_id ON business_pay_fee_detail(b_id); -- è´¹ç¨é 置表 create table business_pay_fee_config( config_id varchar(30) not null comment 'è´¹ç¨ID', b_id VARCHAR(30) NOT NULL COMMENT 'ä¸å¡Id', community_id varchar(30) not null comment 'å°åºID', fee_type_cd varchar(12) not null comment 'è´¹ç¨ç±»åï¼ç©ä¸è´¹ï¼å车费', square_price decimal(7,2) not null comment 'æ¯å¹³ç±³æ¶åçåä»·', additional_amount decimal(7,2) not null comment 'éå è´¹ç¨', create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'å建æ¶é´', operate VARCHAR(4) NOT NULL COMMENT 'æ°æ®ç¶æï¼æ·»å ADDï¼ä¿®æ¹MOD å é¤DEL' ); CREATE INDEX idx_bpfc_config_id ON business_pay_fee_config(config_id); CREATE INDEX idx_bpfc_b_id ON business_pay_fee_config(b_id); -- è´¹ç¨é 置表 create table pay_fee_config( config_id varchar(30) not null comment 'è´¹ç¨ID', b_id VARCHAR(30) NOT NULL COMMENT 'ä¸å¡Id', community_id varchar(30) not null comment 'å°åºID', fee_type_cd varchar(12) not null comment 'è´¹ç¨ç±»åï¼ç©ä¸è´¹ï¼å车费', square_price decimal(7,2) not null comment 'æ¯å¹³ç±³æ¶åçåä»·', additional_amount decimal(7,2) not null comment 'éå è´¹ç¨', create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'å建æ¶é´', status_cd VARCHAR(2) NOT NULL DEFAULT '0' COMMENT 'æ°æ®ç¶æï¼è¯¦ç»åèc_status表ï¼S ä¿åï¼0, å¨ç¨ 1失æ', UNIQUE KEY (config_id) ); CREATE INDEX idx_pfc_config_id ON business_pay_fee_config(config_id); CREATE INDEX idx_pfc_b_id ON business_pay_fee_config(b_id); pom.xml.bak
New file @@ -0,0 +1,458 @@ <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.java110</groupId> <artifactId>MicroCommunity</artifactId> <packaging>pom</packaging> <version>1.0-SNAPSHOT</version> <modules> <module>java110-bean</module> <module>java110-config</module> <module>java110-common</module> <module>UserService</module> <module>LogService</module> <module>eureka</module> <module>java110-core</module> <module>java110-service</module> <module>CodeService</module> <module>StoreService</module> <module>RuleService</module> <module>java110-event</module> <module>OrderService</module> <module>java110-cacheAgent</module> <module>WebService</module> <module>java110-logAgent</module> <module>zipkin</module> <module>ShopService</module> <module>CommentService</module> <module>Api</module> <module>CommunityService</module> <module>java110-code-generator</module> <module>java110-db</module> </modules> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.4.0.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <properties> <maven.compile.target>1.8</maven.compile.target> <sourceEncoding>UTF-8</sourceEncoding> <spring-boot>1.3.2.RELEASE</spring-boot> <shiro.version>1.2.4</shiro.version> <mybatis.version>3.3.0</mybatis.version> <microcommunity.version>1.0-SNAPSHOT</microcommunity.version> <dubbo.version>2.5.4-SNAPSHOT</dubbo.version> <logback.vaersion>1.1.3</logback.vaersion> <apache.common.lang3.version>3.4</apache.common.lang3.version> <mybatis.version>3.4.1</mybatis.version> <log4j.version>1.2.17</log4j.version> <tomcat.servlet.version>6.0.37</tomcat.servlet.version> <druid.version>1.0.18</druid.version> <mybatis-spring.version>1.3.1</mybatis-spring.version> <mysql.version>5.1.39</mysql.version> <commons-pool2.version>2.2</commons-pool2.version> <commons-collections.version>3.2.1</commons-collections.version> <commons-fileupload.version>1.3.3</commons-fileupload.version> <commons-codec.version>1.6</commons-codec.version> <commons-logging.version>1.1.1</commons-logging.version> <commons-lang.version>2.5</commons-lang.version> <commons-beanutils.version>1.8.0</commons-beanutils.version> <slf4j.version>1.7.7</slf4j.version> <logback.version>1.1.2</logback.version> <activemq.version>5.7.0</activemq.version> <xbean.version>3.18</xbean.version> <axis.version>1.4</axis.version> <httpclient.verion>3.1</httpclient.verion> <spring.version>4.3.2.RELEASE</spring.version> <zookeeper.version>3.4.14</zookeeper.version> <swagger.version>2.5.0</swagger.version> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>Brixton.SR5</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</artifactId> <version>4.2.7.RELEASE</version> </dependency> <dependency> <groupId>org.springframework.kafka</groupId> <artifactId>spring-kafka</artifactId> <version>1.1.1.RELEASE</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.28</version> </dependency> <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>1.1.1</version> </dependency> <!--mapper--> <dependency> <groupId>tk.mybatis</groupId> <artifactId>mapper-spring-boot-starter</artifactId> <version>1.1.0</version> </dependency> <!--pagehelper--> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>1.1.0</version> </dependency> <dependency> <groupId>com.auth0</groupId> <artifactId>java-jwt</artifactId> <version>3.3.0</version> </dependency> <dependency> <groupId>com.java110</groupId> <artifactId>java110-common</artifactId> <version>${microcommunity.version}</version> </dependency> <dependency> <groupId>com.java110</groupId> <artifactId>java110-bean</artifactId> <version>${microcommunity.version}</version> </dependency> <dependency> <groupId>com.java110</groupId> <artifactId>java110-event</artifactId> <version>${microcommunity.version}</version> </dependency> <dependency> <groupId>com.java110</groupId> <artifactId>java110-core</artifactId> <version>${microcommunity.version}</version> </dependency> <dependency> <groupId>com.java110</groupId> <artifactId>java110-service</artifactId> <version>${microcommunity.version}</version> </dependency> <dependency> <groupId>com.java110</groupId> <artifactId>java110-config</artifactId> <version>${microcommunity.version}</version> </dependency> <dependency> <groupId>com.java110</groupId> <artifactId>java110-cacheAgent</artifactId> <version>${microcommunity.version}</version> </dependency> <dependency> <groupId>com.java110</groupId> <artifactId>java110-logAgent</artifactId> <version>${microcommunity.version}</version> </dependency> <dependency> <groupId>com.java110</groupId> <artifactId>java110-db</artifactId> <version>${microcommunity.version}</version> </dependency> <!-- logback æ¥å¿ç»ä»¶æ¯æ --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.7.7</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>${logback.vaersion}</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-access</artifactId> <version>${logback.vaersion}</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>${logback.vaersion}</version> </dependency> <!-- https://mvnrepository.com/artifact/com.mchange/c3p0 --> <dependency> <groupId>com.mchange</groupId> <artifactId>c3p0</artifactId> <version>0.9.5.4</version> </dependency> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-core</artifactId> <version>${activemq.version}</version> </dependency> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-pool</artifactId> <version>${activemq.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jms</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.apache.xbean</groupId> <artifactId>xbean-spring</artifactId> <version>${xbean.version}</version> </dependency> <!-- apache commons å 主è¦ä½¿ç¨ä¸äºå·¥å ·ç±» --> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>${apache.common.lang3.version}</version> </dependency> <!-- mybatis ä¾èµå --> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>${mybatis.version}</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>${mybatis-spring.version}</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>${mysql.version}</version> </dependency> <!-- é¿é æ°æ®æºç¸å ³jar --> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>${druid.version}</version> </dependency> <dependency> <groupId>commons-validator</groupId> <artifactId>commons-validator</artifactId> <version>1.3.1</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-pool2</artifactId> <version>${commons-pool2.version}</version> </dependency> <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>${commons-fileupload.version}</version> </dependency> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>${commons-codec.version}</version> </dependency> <dependency> <groupId>commons-net</groupId> <artifactId>commons-net</artifactId> <version>3.3</version> </dependency> <dependency> <groupId>commons-httpclient</groupId> <artifactId>commons-httpclient</artifactId> <version>${httpclient.verion}</version> </dependency> <!--<dependency> <groupId>io.shardingsphere</groupId> <artifactId>sharding-jdbc</artifactId> <version>3.0.0.M3</version> </dependency>--> <!--<dependency> <groupId>io.shardingsphere</groupId> <artifactId>sharding-jdbc-core</artifactId> <version>3.1.0</version> </dependency>--> <dependency> <groupId>org.apache.shardingsphere</groupId> <artifactId>sharding-jdbc-core</artifactId> <version>4.0.0-RC1</version> </dependency> <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2 <dependency> <groupId>org.apache.axis</groupId> <artifactId>axis</artifactId> <version>${axis.version}</version> </dependency> <dependency> <groupId>org.apache.axis</groupId> <artifactId>axis-jaxrpc</artifactId> <version>${axis.version}</version> </dependency> <dependency> <groupId>org.apache.axis</groupId> <artifactId>axis-saaj</artifactId> <version>${axis.version}</version> </dependency> <dependency> <groupId>wsdl4j</groupId> <artifactId>wsdl4j</artifactId> <version>${axis.version}</version> </dependency> --> <dependency> <groupId>net.sf.ehcache</groupId> <artifactId>ehcache</artifactId> <version>2.10.2</version> </dependency> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.8.2</version> </dependency> <dependency> <groupId>org.quartz-scheduler</groupId> <artifactId>quartz</artifactId> <version>2.3.0</version> </dependency> <dependency> <groupId>org.springframework.session</groupId> <artifactId>spring-session-data-redis</artifactId> <version>1.0.1.RELEASE</version> </dependency> <dependency> <groupId>org.beanshell</groupId> <artifactId>bsh-core</artifactId> <version>2.0b4</version> </dependency> <dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</artifactId> <version>${zookeeper.version}</version> </dependency> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>${swagger.version}</version> </dependency> <!-- swagger-ui --> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId> <version>${swagger.version}</version> </dependency> <dependency> <groupId>net.sourceforge.nekohtml</groupId> <artifactId>nekohtml</artifactId> <version>1.9.22</version> </dependency> <dependency> <groupId>com.aliyun</groupId> <artifactId>aliyun-java-sdk-core</artifactId> <version>4.0.3</version> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> <optional>true</optional> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>2.10.4</version> </plugin> </plugins> </build> </project>