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

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

parent 79000a1e
...@@ -11,5 +11,5 @@ import lombok.Setter; ...@@ -11,5 +11,5 @@ import lombok.Setter;
public class SmsFlashPromotionSessionDetail extends SmsFlashPromotionSession { public class SmsFlashPromotionSessionDetail extends SmsFlashPromotionSession {
@Setter @Setter
@Getter @Getter
private Integer productCount; private Long productCount;
} }
...@@ -46,5 +46,5 @@ public interface SmsFlashPromotionProductRelationService { ...@@ -46,5 +46,5 @@ public interface SmsFlashPromotionProductRelationService {
* @param flashPromotionSessionId * @param flashPromotionSessionId
* @return * @return
*/ */
int getCount(Long flashPromotionId,Long flashPromotionSessionId); long getCount(Long flashPromotionId,Long flashPromotionSessionId);
} }
...@@ -53,7 +53,7 @@ public class SmsFlashPromotionProductRelationServiceImpl implements SmsFlashProm ...@@ -53,7 +53,7 @@ public class SmsFlashPromotionProductRelationServiceImpl implements SmsFlashProm
} }
@Override @Override
public int getCount(Long flashPromotionId, Long flashPromotionSessionId) { public long getCount(Long flashPromotionId, Long flashPromotionSessionId) {
SmsFlashPromotionProductRelationExample example = new SmsFlashPromotionProductRelationExample(); SmsFlashPromotionProductRelationExample example = new SmsFlashPromotionProductRelationExample();
example.createCriteria() example.createCriteria()
.andFlashPromotionIdEqualTo(flashPromotionId) .andFlashPromotionIdEqualTo(flashPromotionId)
......
...@@ -70,7 +70,7 @@ public class SmsFlashPromotionSessionServiceImpl implements SmsFlashPromotionSes ...@@ -70,7 +70,7 @@ public class SmsFlashPromotionSessionServiceImpl implements SmsFlashPromotionSes
for (SmsFlashPromotionSession promotionSession : list) { for (SmsFlashPromotionSession promotionSession : list) {
SmsFlashPromotionSessionDetail detail = new SmsFlashPromotionSessionDetail(); SmsFlashPromotionSessionDetail detail = new SmsFlashPromotionSessionDetail();
BeanUtils.copyProperties(promotionSession, detail); BeanUtils.copyProperties(promotionSession, detail);
int count = relationService.getCount(flashPromotionId, promotionSession.getId()); long count = relationService.getCount(flashPromotionId, promotionSession.getId());
detail.setProductCount(count); detail.setProductCount(count);
result.add(detail); result.add(detail);
} }
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<dependency> <dependency>
<groupId>org.mybatis.generator</groupId> <groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId> <artifactId>mybatis-generator-core</artifactId>
<version>1.3.3</version> <version>1.3.7</version>
</dependency> </dependency>
<!-- MyBatis--> <!-- MyBatis-->
<dependency> <dependency>
......
...@@ -6,7 +6,7 @@ import java.util.List; ...@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface CmsHelpCategoryMapper { public interface CmsHelpCategoryMapper {
int countByExample(CmsHelpCategoryExample example); long countByExample(CmsHelpCategoryExample example);
int deleteByExample(CmsHelpCategoryExample example); int deleteByExample(CmsHelpCategoryExample example);
......
...@@ -6,7 +6,7 @@ import java.util.List; ...@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface CmsHelpMapper { public interface CmsHelpMapper {
int countByExample(CmsHelpExample example); long countByExample(CmsHelpExample example);
int deleteByExample(CmsHelpExample example); int deleteByExample(CmsHelpExample example);
......
...@@ -6,7 +6,7 @@ import java.util.List; ...@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface CmsMemberReportMapper { public interface CmsMemberReportMapper {
int countByExample(CmsMemberReportExample example); long countByExample(CmsMemberReportExample example);
int deleteByExample(CmsMemberReportExample example); int deleteByExample(CmsMemberReportExample example);
......
...@@ -6,7 +6,7 @@ import java.util.List; ...@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface CmsPrefrenceAreaMapper { public interface CmsPrefrenceAreaMapper {
int countByExample(CmsPrefrenceAreaExample example); long countByExample(CmsPrefrenceAreaExample example);
int deleteByExample(CmsPrefrenceAreaExample example); int deleteByExample(CmsPrefrenceAreaExample example);
......
...@@ -6,7 +6,7 @@ import java.util.List; ...@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface CmsPrefrenceAreaProductRelationMapper { public interface CmsPrefrenceAreaProductRelationMapper {
int countByExample(CmsPrefrenceAreaProductRelationExample example); long countByExample(CmsPrefrenceAreaProductRelationExample example);
int deleteByExample(CmsPrefrenceAreaProductRelationExample example); int deleteByExample(CmsPrefrenceAreaProductRelationExample example);
......
...@@ -6,7 +6,7 @@ import java.util.List; ...@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface CmsSubjectCategoryMapper { public interface CmsSubjectCategoryMapper {
int countByExample(CmsSubjectCategoryExample example); long countByExample(CmsSubjectCategoryExample example);
int deleteByExample(CmsSubjectCategoryExample example); int deleteByExample(CmsSubjectCategoryExample example);
......
...@@ -6,7 +6,7 @@ import java.util.List; ...@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface CmsSubjectCommentMapper { public interface CmsSubjectCommentMapper {
int countByExample(CmsSubjectCommentExample example); long countByExample(CmsSubjectCommentExample example);
int deleteByExample(CmsSubjectCommentExample example); int deleteByExample(CmsSubjectCommentExample example);
......
...@@ -6,7 +6,7 @@ import java.util.List; ...@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface CmsSubjectMapper { public interface CmsSubjectMapper {
int countByExample(CmsSubjectExample example); long countByExample(CmsSubjectExample example);
int deleteByExample(CmsSubjectExample example); int deleteByExample(CmsSubjectExample example);
......
...@@ -6,7 +6,7 @@ import java.util.List; ...@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface CmsSubjectProductRelationMapper { public interface CmsSubjectProductRelationMapper {
int countByExample(CmsSubjectProductRelationExample example); long countByExample(CmsSubjectProductRelationExample example);
int deleteByExample(CmsSubjectProductRelationExample example); int deleteByExample(CmsSubjectProductRelationExample example);
......
...@@ -6,7 +6,7 @@ import java.util.List; ...@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface CmsTopicCategoryMapper { public interface CmsTopicCategoryMapper {
int countByExample(CmsTopicCategoryExample example); long countByExample(CmsTopicCategoryExample example);
int deleteByExample(CmsTopicCategoryExample example); int deleteByExample(CmsTopicCategoryExample example);
......
...@@ -6,7 +6,7 @@ import java.util.List; ...@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface CmsTopicCommentMapper { public interface CmsTopicCommentMapper {
int countByExample(CmsTopicCommentExample example); long countByExample(CmsTopicCommentExample example);
int deleteByExample(CmsTopicCommentExample example); int deleteByExample(CmsTopicCommentExample example);
......
...@@ -6,7 +6,7 @@ import java.util.List; ...@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface CmsTopicMapper { public interface CmsTopicMapper {
int countByExample(CmsTopicExample example); long countByExample(CmsTopicExample example);
int deleteByExample(CmsTopicExample example); int deleteByExample(CmsTopicExample example);
......
...@@ -6,7 +6,7 @@ import java.util.List; ...@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface OmsCartItemMapper { public interface OmsCartItemMapper {
int countByExample(OmsCartItemExample example); long countByExample(OmsCartItemExample example);
int deleteByExample(OmsCartItemExample example); int deleteByExample(OmsCartItemExample example);
......
...@@ -6,7 +6,7 @@ import java.util.List; ...@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface OmsCompanyAddressMapper { public interface OmsCompanyAddressMapper {
int countByExample(OmsCompanyAddressExample example); long countByExample(OmsCompanyAddressExample example);
int deleteByExample(OmsCompanyAddressExample example); int deleteByExample(OmsCompanyAddressExample example);
......
...@@ -6,7 +6,7 @@ import java.util.List; ...@@ -6,7 +6,7 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
public interface OmsOrderItemMapper { public interface OmsOrderItemMapper {
int countByExample(OmsOrderItemExample example); long countByExample(OmsOrderItemExample example);
int deleteByExample(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