Commit 620febd3d3c6b88b21fe5464e31d2c37adb2bc57
1 parent
9fe14032
重命名部分类名
Showing
7 changed files
with
16 additions
and
18 deletions
dtms-dao/src/main/java/com/b2c/dtms/dao/DtmsMaxidDao.java
... | ... | @@ -7,16 +7,16 @@ package com.b2c.dtms.dao; |
7 | 7 | import java.util.concurrent.atomic.AtomicLong; |
8 | 8 | |
9 | 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 | 13 | * OrderMaxidDao 接口 |
14 | 14 | * @author dev-center |
15 | 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 | import com.b2c.dtms.common.CommonUtils; |
8 | 8 | import com.b2c.dtms.dao.DtmsMaxidDao; |
9 | 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 | 12 | import org.springframework.stereotype.Repository; |
13 | 13 | import org.springframework.transaction.annotation.Propagation; |
... | ... | @@ -22,7 +22,7 @@ import java.util.List; |
22 | 22 | * @since 2014-05-19 |
23 | 23 | */ |
24 | 24 | @Repository("orderMaxidDao") |
25 | -public class DtmsMaxidDaoImpl extends BaseDaoImpl<OrderMaxid, Long> implements DtmsMaxidDao { | |
25 | +public class DtmsMaxidDaoImpl extends BaseDaoImpl<Maxid, Long> implements DtmsMaxidDao { | |
26 | 26 | private final static String NAMESPACE = "com.b2c.dtms.dao.OrderMaxidDao."; |
27 | 27 | |
28 | 28 | // 返回本DAO命名空间,并添加statement |
... | ... | @@ -31,10 +31,10 @@ public class DtmsMaxidDaoImpl extends BaseDaoImpl<OrderMaxid, Long> implements D |
31 | 31 | } |
32 | 32 | |
33 | 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 | 36 | orderMaxid.setIdType(idType); |
37 | - List<OrderMaxid> list = this.selectEntryList(orderMaxid); | |
37 | + List<Maxid> list = this.selectEntryList(orderMaxid); | |
38 | 38 | if (list == null || list.isEmpty()) { |
39 | 39 | return null; |
40 | 40 | } |
... | ... | @@ -50,7 +50,7 @@ public class DtmsMaxidDaoImpl extends BaseDaoImpl<OrderMaxid, Long> implements D |
50 | 50 | |
51 | 51 | @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class) |
52 | 52 | public SequenceNo getSeqNoByNewTransactional(SequenceNo idSequence, String seqIdKey, Long startSeq) { |
53 | - OrderMaxid orderMaxid = this.getOrderMaxIdByIdType(seqIdKey); | |
53 | + Maxid orderMaxid = this.getOrderMaxIdByIdType(seqIdKey); | |
54 | 54 | if (startSeq != null && startSeq > orderMaxid.getIdValue()) {// orderMaxid.getIdValue() |
55 | 55 | idSequence.setStartSeq(startSeq); |
56 | 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 | 11 | * @author dev-center |
12 | 12 | * @since 2014-05-19 |
13 | 13 | */ |
14 | -public class OrderMaxid extends BaseDomain { | |
14 | +public class Maxid extends BaseDomain { | |
15 | 15 | private static final long serialVersionUID = 1L; |
16 | 16 | private String idType; |
17 | 17 | private Long idValue; |
18 | 18 | private String memo; |
19 | 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 | 4 | */ |
5 | 5 | package com.b2c.dtms.service; |
6 | 6 | |
7 | -import com.b2c.dtms.domain.OrderMaxid; | |
7 | +import com.b2c.dtms.domain.Maxid; | |
8 | 8 | import com.b2c.dtms.service.base.BaseService; |
9 | 9 | |
10 | 10 | /** |
... | ... | @@ -12,7 +12,7 @@ import com.b2c.dtms.service.base.BaseService; |
12 | 12 | * @author dev-center |
13 | 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 | 17 | * 获取消息新id |
18 | 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 | 14 | import com.b2c.dtms.dao.DtmsMaxidDao; |
15 | 15 | import com.b2c.dtms.dao.DtmsMaxidDao.SequenceNo; |
16 | 16 | import com.b2c.dtms.dao.base.BaseDao; |
17 | -import com.b2c.dtms.domain.OrderMaxid; | |
17 | +import com.b2c.dtms.domain.Maxid; | |
18 | 18 | import com.b2c.dtms.service.DtmsMaxidService; |
19 | 19 | import com.b2c.dtms.service.base.BaseServiceImpl; |
20 | 20 | import com.diligrp.srvce.client.utils.ResultCode; |
... | ... | @@ -25,11 +25,11 @@ import com.diligrp.srvce.client.utils.ResultCode; |
25 | 25 | * @since 2014-05-19 |
26 | 26 | */ |
27 | 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 | 30 | @Resource private DtmsMaxidDao orderMaxidDao; |
31 | 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 | 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 | 113 | dtmsMessageService.reduceRetryCountAndSetNextRuntime(ctx.getWaitHandleDtmsMessage(), 1, nextRuntime, |
114 | 114 | serverName + ctx.getReturnMessage()); |
115 | 115 | } |
116 | - dtmsMessage.setVersion(dtmsMessage.getVersion() + 1); | |
117 | 116 | dtmsMessageService.tryReleaseLock(dtmsMessage); |
118 | 117 | break; |
119 | 118 | default: | ... | ... |