修复mybatis generator重复生成mapper.xml内容的问题

This commit is contained in:
macro
2019-06-19 20:15:02 +08:00
parent 79000a1ee1
commit 310696e269
149 changed files with 150 additions and 148 deletions

View File

@@ -11,5 +11,5 @@ import lombok.Setter;
public class SmsFlashPromotionSessionDetail extends SmsFlashPromotionSession {
@Setter
@Getter
private Integer productCount;
private Long productCount;
}

View File

@@ -46,5 +46,5 @@ public interface SmsFlashPromotionProductRelationService {
* @param flashPromotionSessionId
* @return
*/
int getCount(Long flashPromotionId,Long flashPromotionSessionId);
long getCount(Long flashPromotionId,Long flashPromotionSessionId);
}

View File

@@ -53,7 +53,7 @@ public class SmsFlashPromotionProductRelationServiceImpl implements SmsFlashProm
}
@Override
public int getCount(Long flashPromotionId, Long flashPromotionSessionId) {
public long getCount(Long flashPromotionId, Long flashPromotionSessionId) {
SmsFlashPromotionProductRelationExample example = new SmsFlashPromotionProductRelationExample();
example.createCriteria()
.andFlashPromotionIdEqualTo(flashPromotionId)

View File

@@ -70,7 +70,7 @@ public class SmsFlashPromotionSessionServiceImpl implements SmsFlashPromotionSes
for (SmsFlashPromotionSession promotionSession : list) {
SmsFlashPromotionSessionDetail detail = new SmsFlashPromotionSessionDetail();
BeanUtils.copyProperties(promotionSession, detail);
int count = relationService.getCount(flashPromotionId, promotionSession.getId());
long count = relationService.getCount(flashPromotionId, promotionSession.getId());
detail.setProductCount(count);
result.add(detail);
}