修复mybatis generator重复生成mapper.xml内容的问题
This commit is contained in:
@@ -11,5 +11,5 @@ import lombok.Setter;
|
||||
public class SmsFlashPromotionSessionDetail extends SmsFlashPromotionSession {
|
||||
@Setter
|
||||
@Getter
|
||||
private Integer productCount;
|
||||
private Long productCount;
|
||||
}
|
||||
|
||||
@@ -46,5 +46,5 @@ public interface SmsFlashPromotionProductRelationService {
|
||||
* @param flashPromotionSessionId
|
||||
* @return
|
||||
*/
|
||||
int getCount(Long flashPromotionId,Long flashPromotionSessionId);
|
||||
long getCount(Long flashPromotionId,Long flashPromotionSessionId);
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user