Commit 620febd3d3c6b88b21fe5464e31d2c37adb2bc57

Authored by Jiang
1 parent 9fe14032

重命名部分类名

dtms-dao/src/main/java/com/b2c/dtms/dao/DtmsMaxidDao.java
@@ -7,16 +7,16 @@ package com.b2c.dtms.dao; @@ -7,16 +7,16 @@ package com.b2c.dtms.dao;
7 import java.util.concurrent.atomic.AtomicLong; 7 import java.util.concurrent.atomic.AtomicLong;
8 8
9 import com.b2c.dtms.dao.base.BaseDao; 9 import com.b2c.dtms.dao.base.BaseDao;
10 -import com.b2c.dtms.domain.OrderMaxid; 10 +import com.b2c.dtms.domain.Maxid;
11 11
12 /** 12 /**
13 * OrderMaxidDao 接口 13 * OrderMaxidDao 接口
14 * @author dev-center 14 * @author dev-center
15 * @since 2014-05-19 15 * @since 2014-05-19
16 */ 16 */
17 -public interface DtmsMaxidDao extends BaseDao<OrderMaxid,Long>{ 17 +public interface DtmsMaxidDao extends BaseDao<Maxid,Long>{
18 //自定义扩展 18 //自定义扩展
19 - public OrderMaxid getOrderMaxIdByIdType(String idType); 19 + public Maxid getOrderMaxIdByIdType(String idType);
20 20
21 /** 21 /**
22 * 在一个独立新事务中更新 22 * 在一个独立新事务中更新
dtms-dao/src/main/java/com/b2c/dtms/dao/impl/DtmsMaxidDaoImpl.java
@@ -7,7 +7,7 @@ package com.b2c.dtms.dao.impl; @@ -7,7 +7,7 @@ package com.b2c.dtms.dao.impl;
7 import com.b2c.dtms.common.CommonUtils; 7 import com.b2c.dtms.common.CommonUtils;
8 import com.b2c.dtms.dao.DtmsMaxidDao; 8 import com.b2c.dtms.dao.DtmsMaxidDao;
9 import com.b2c.dtms.dao.base.BaseDaoImpl; 9 import com.b2c.dtms.dao.base.BaseDaoImpl;
10 -import com.b2c.dtms.domain.OrderMaxid; 10 +import com.b2c.dtms.domain.Maxid;
11 11
12 import org.springframework.stereotype.Repository; 12 import org.springframework.stereotype.Repository;
13 import org.springframework.transaction.annotation.Propagation; 13 import org.springframework.transaction.annotation.Propagation;
@@ -22,7 +22,7 @@ import java.util.List; @@ -22,7 +22,7 @@ import java.util.List;
22 * @since 2014-05-19 22 * @since 2014-05-19
23 */ 23 */
24 @Repository("orderMaxidDao") 24 @Repository("orderMaxidDao")
25 -public class DtmsMaxidDaoImpl extends BaseDaoImpl<OrderMaxid, Long> implements DtmsMaxidDao { 25 +public class DtmsMaxidDaoImpl extends BaseDaoImpl<Maxid, Long> implements DtmsMaxidDao {
26 private final static String NAMESPACE = "com.b2c.dtms.dao.OrderMaxidDao."; 26 private final static String NAMESPACE = "com.b2c.dtms.dao.OrderMaxidDao.";
27 27
28 // 返回本DAO命名空间,并添加statement 28 // 返回本DAO命名空间,并添加statement
@@ -31,10 +31,10 @@ public class DtmsMaxidDaoImpl extends BaseDaoImpl&lt;OrderMaxid, Long&gt; implements D @@ -31,10 +31,10 @@ public class DtmsMaxidDaoImpl extends BaseDaoImpl&lt;OrderMaxid, Long&gt; implements D
31 } 31 }
32 32
33 @Override 33 @Override
34 - public OrderMaxid getOrderMaxIdByIdType(String idType) {  
35 - OrderMaxid orderMaxid = new OrderMaxid(); 34 + public Maxid getOrderMaxIdByIdType(String idType) {
  35 + Maxid orderMaxid = new Maxid();
36 orderMaxid.setIdType(idType); 36 orderMaxid.setIdType(idType);
37 - List<OrderMaxid> list = this.selectEntryList(orderMaxid); 37 + List<Maxid> list = this.selectEntryList(orderMaxid);
38 if (list == null || list.isEmpty()) { 38 if (list == null || list.isEmpty()) {
39 return null; 39 return null;
40 } 40 }
@@ -50,7 +50,7 @@ public class DtmsMaxidDaoImpl extends BaseDaoImpl&lt;OrderMaxid, Long&gt; implements D @@ -50,7 +50,7 @@ public class DtmsMaxidDaoImpl extends BaseDaoImpl&lt;OrderMaxid, Long&gt; implements D
50 50
51 @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class) 51 @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
52 public SequenceNo getSeqNoByNewTransactional(SequenceNo idSequence, String seqIdKey, Long startSeq) { 52 public SequenceNo getSeqNoByNewTransactional(SequenceNo idSequence, String seqIdKey, Long startSeq) {
53 - OrderMaxid orderMaxid = this.getOrderMaxIdByIdType(seqIdKey); 53 + Maxid orderMaxid = this.getOrderMaxIdByIdType(seqIdKey);
54 if (startSeq != null && startSeq > orderMaxid.getIdValue()) {// orderMaxid.getIdValue() 54 if (startSeq != null && startSeq > orderMaxid.getIdValue()) {// orderMaxid.getIdValue()
55 idSequence.setStartSeq(startSeq); 55 idSequence.setStartSeq(startSeq);
56 } else { 56 } else {
dtms-domain/src/main/java/com/b2c/dtms/domain/OrderMaxid.java renamed to dtms-domain/src/main/java/com/b2c/dtms/domain/Maxid.java
@@ -11,14 +11,14 @@ import com.b2c.dtms.domain.base.BaseDomain; @@ -11,14 +11,14 @@ import com.b2c.dtms.domain.base.BaseDomain;
11 * @author dev-center 11 * @author dev-center
12 * @since 2014-05-19 12 * @since 2014-05-19
13 */ 13 */
14 -public class OrderMaxid extends BaseDomain { 14 +public class Maxid extends BaseDomain {
15 private static final long serialVersionUID = 1L; 15 private static final long serialVersionUID = 1L;
16 private String idType; 16 private String idType;
17 private Long idValue; 17 private Long idValue;
18 private String memo; 18 private String memo;
19 private Long versionNum; 19 private Long versionNum;
20 20
21 - public OrderMaxid(){ 21 + public Maxid(){
22 //默认无参构造方法 22 //默认无参构造方法
23 } 23 }
24 24
dtms-service/src/main/java/com/b2c/dtms/service/DtmsMaxidService.java
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 */ 4 */
5 package com.b2c.dtms.service; 5 package com.b2c.dtms.service;
6 6
7 -import com.b2c.dtms.domain.OrderMaxid; 7 +import com.b2c.dtms.domain.Maxid;
8 import com.b2c.dtms.service.base.BaseService; 8 import com.b2c.dtms.service.base.BaseService;
9 9
10 /** 10 /**
@@ -12,7 +12,7 @@ import com.b2c.dtms.service.base.BaseService; @@ -12,7 +12,7 @@ import com.b2c.dtms.service.base.BaseService;
12 * @author dev-center 12 * @author dev-center
13 * @since 2014-05-19 13 * @since 2014-05-19
14 */ 14 */
15 -public interface DtmsMaxidService extends BaseService<OrderMaxid,Long> { 15 +public interface DtmsMaxidService extends BaseService<Maxid,Long> {
16 /** 16 /**
17 * 获取消息新id 17 * 获取消息新id
18 * @return 18 * @return
dtms-service/src/main/java/com/b2c/dtms/service/impl/DtmsMaxidServiceImpl.java
@@ -14,7 +14,7 @@ import com.b2c.dtms.common.CommonUtils; @@ -14,7 +14,7 @@ import com.b2c.dtms.common.CommonUtils;
14 import com.b2c.dtms.dao.DtmsMaxidDao; 14 import com.b2c.dtms.dao.DtmsMaxidDao;
15 import com.b2c.dtms.dao.DtmsMaxidDao.SequenceNo; 15 import com.b2c.dtms.dao.DtmsMaxidDao.SequenceNo;
16 import com.b2c.dtms.dao.base.BaseDao; 16 import com.b2c.dtms.dao.base.BaseDao;
17 -import com.b2c.dtms.domain.OrderMaxid; 17 +import com.b2c.dtms.domain.Maxid;
18 import com.b2c.dtms.service.DtmsMaxidService; 18 import com.b2c.dtms.service.DtmsMaxidService;
19 import com.b2c.dtms.service.base.BaseServiceImpl; 19 import com.b2c.dtms.service.base.BaseServiceImpl;
20 import com.diligrp.srvce.client.utils.ResultCode; 20 import com.diligrp.srvce.client.utils.ResultCode;
@@ -25,11 +25,11 @@ import com.diligrp.srvce.client.utils.ResultCode; @@ -25,11 +25,11 @@ import com.diligrp.srvce.client.utils.ResultCode;
25 * @since 2014-05-19 25 * @since 2014-05-19
26 */ 26 */
27 @Service("dtmsMaxidService") 27 @Service("dtmsMaxidService")
28 -public class DtmsMaxidServiceImpl extends BaseServiceImpl<OrderMaxid,Long> implements DtmsMaxidService { 28 +public class DtmsMaxidServiceImpl extends BaseServiceImpl<Maxid,Long> implements DtmsMaxidService {
29 29
30 @Resource private DtmsMaxidDao orderMaxidDao; 30 @Resource private DtmsMaxidDao orderMaxidDao;
31 private ConcurrentHashMap<SEQ_ID_KEY,SequenceNo> SeqIdMap = new ConcurrentHashMap<SEQ_ID_KEY, SequenceNo>(); 31 private ConcurrentHashMap<SEQ_ID_KEY,SequenceNo> SeqIdMap = new ConcurrentHashMap<SEQ_ID_KEY, SequenceNo>();
32 - public BaseDao<OrderMaxid,Long> getDao() { 32 + public BaseDao<Maxid,Long> getDao() {
33 return orderMaxidDao; 33 return orderMaxidDao;
34 } 34 }
35 35
dtms-service/src/main/java/com/b2c/dtms/task/ScheduleTask.java
@@ -113,7 +113,6 @@ public class ScheduleTask implements Runnable { @@ -113,7 +113,6 @@ public class ScheduleTask implements Runnable {
113 dtmsMessageService.reduceRetryCountAndSetNextRuntime(ctx.getWaitHandleDtmsMessage(), 1, nextRuntime, 113 dtmsMessageService.reduceRetryCountAndSetNextRuntime(ctx.getWaitHandleDtmsMessage(), 1, nextRuntime,
114 serverName + ctx.getReturnMessage()); 114 serverName + ctx.getReturnMessage());
115 } 115 }
116 - dtmsMessage.setVersion(dtmsMessage.getVersion() + 1);  
117 dtmsMessageService.tryReleaseLock(dtmsMessage); 116 dtmsMessageService.tryReleaseLock(dtmsMessage);
118 break; 117 break;
119 default: 118 default:
dtms-web/pom.xml
@@ -36,7 +36,6 @@ @@ -36,7 +36,6 @@
36 <dependency> 36 <dependency>
37 <groupId>ch.qos.logback</groupId> 37 <groupId>ch.qos.logback</groupId>
38 <artifactId>logback-core</artifactId> 38 <artifactId>logback-core</artifactId>
39 - <version>${logback.version}</version>  
40 </dependency> 39 </dependency>
41 <dependency> 40 <dependency>
42 <groupId>${project.groupId}</groupId> 41 <groupId>${project.groupId}</groupId>