Commit 310696e2 authored by macro's avatar macro
Browse files

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

parent 79000a1e
......@@ -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);
}
......
......@@ -22,7 +22,7 @@
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>1.3.3</version>
<version>1.3.7</version>
</dependency>
<!-- MyBatis-->
<dependency>
......
......@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CmsHelpCategoryMapper {
int countByExample(CmsHelpCategoryExample example);
long countByExample(CmsHelpCategoryExample example);
int deleteByExample(CmsHelpCategoryExample example);
......
......@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CmsHelpMapper {
int countByExample(CmsHelpExample example);
long countByExample(CmsHelpExample example);
int deleteByExample(CmsHelpExample example);
......
......@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CmsMemberReportMapper {
int countByExample(CmsMemberReportExample example);
long countByExample(CmsMemberReportExample example);
int deleteByExample(CmsMemberReportExample example);
......
......@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CmsPrefrenceAreaMapper {
int countByExample(CmsPrefrenceAreaExample example);
long countByExample(CmsPrefrenceAreaExample example);
int deleteByExample(CmsPrefrenceAreaExample example);
......
......@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CmsPrefrenceAreaProductRelationMapper {
int countByExample(CmsPrefrenceAreaProductRelationExample example);
long countByExample(CmsPrefrenceAreaProductRelationExample example);
int deleteByExample(CmsPrefrenceAreaProductRelationExample example);
......
......@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CmsSubjectCategoryMapper {
int countByExample(CmsSubjectCategoryExample example);
long countByExample(CmsSubjectCategoryExample example);
int deleteByExample(CmsSubjectCategoryExample example);
......
......@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CmsSubjectCommentMapper {
int countByExample(CmsSubjectCommentExample example);
long countByExample(CmsSubjectCommentExample example);
int deleteByExample(CmsSubjectCommentExample example);
......
......@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CmsSubjectMapper {
int countByExample(CmsSubjectExample example);
long countByExample(CmsSubjectExample example);
int deleteByExample(CmsSubjectExample example);
......
......@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CmsSubjectProductRelationMapper {
int countByExample(CmsSubjectProductRelationExample example);
long countByExample(CmsSubjectProductRelationExample example);
int deleteByExample(CmsSubjectProductRelationExample example);
......
......@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CmsTopicCategoryMapper {
int countByExample(CmsTopicCategoryExample example);
long countByExample(CmsTopicCategoryExample example);
int deleteByExample(CmsTopicCategoryExample example);
......
......@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CmsTopicCommentMapper {
int countByExample(CmsTopicCommentExample example);
long countByExample(CmsTopicCommentExample example);
int deleteByExample(CmsTopicCommentExample example);
......
......@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CmsTopicMapper {
int countByExample(CmsTopicExample example);
long countByExample(CmsTopicExample example);
int deleteByExample(CmsTopicExample example);
......
......@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface OmsCartItemMapper {
int countByExample(OmsCartItemExample example);
long countByExample(OmsCartItemExample example);
int deleteByExample(OmsCartItemExample example);
......
......@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface OmsCompanyAddressMapper {
int countByExample(OmsCompanyAddressExample example);
long countByExample(OmsCompanyAddressExample example);
int deleteByExample(OmsCompanyAddressExample example);
......
......@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface OmsOrderItemMapper {
int countByExample(OmsOrderItemExample example);
long countByExample(OmsOrderItemExample example);
int deleteByExample(OmsOrderItemExample example);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment