ソースを参照

数据库删改代码修改

anderx 7 年 前
コミット
ee06e42b06

+ 1 - 64
src/main/java/com/goafanti/achievement/controller/AdminAchievementApiController.java

@@ -31,19 +31,15 @@ import com.goafanti.common.dao.AdminMapper;
 import com.goafanti.common.enums.AchievementAuditStatus;
 import com.goafanti.common.enums.AchievementFields;
 import com.goafanti.common.enums.AchievementImportFields;
-import com.goafanti.common.enums.AchievementOrderStatus;
 import com.goafanti.common.enums.AttachmentType;
 import com.goafanti.common.enums.DeleteStatus;
-import com.goafanti.common.enums.MarketingPage;
 import com.goafanti.common.model.Achievement;
 import com.goafanti.common.model.AchievementPublish;
 import com.goafanti.common.model.Attachment;
-import com.goafanti.common.model.MarketingManagement;
 import com.goafanti.common.service.BranchInformationService;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.marketing.service.MarketingManagementService;
 import com.goafanti.user.service.UserService;
 @RestController
 @RequestMapping(value = "/api/admin/achievement")
@@ -55,8 +51,6 @@ public class AdminAchievementApiController extends CertifyApiController {
     @Resource
     private AttachmentService			attachmentService;
     @Resource
-    private MarketingManagementService marketingManagementService;
-    @Resource
     private AdminMapper adminMapper;
     @Resource
     AchievementPublishService	achievementPublishService;
@@ -186,23 +180,7 @@ public class AdminAchievementApiController extends CertifyApiController {
         Achievement a = new Achievement();
         BeanUtils.copyProperties(ia, a);
         achievementService.saveAchievement(a, keywords);
-        if(null != hot && hot == 1){ //属于营销活动
-        	int marketHisCount = marketingManagementService.getMarketingCount(
-        			MarketingPage.mainAchievement.getPageUrl(), MarketingPage.mainAchievement.getBoothType(),1);
-        	if(marketHisCount >= MarketingPage.mainAchievement.getBoothSize()) { //展位已满
-        		 res.getError().add(buildError(ErrorConstants.MARKET_BOOTH_MAX, "",marketHisCount));
-        		 return res;
-        	}else{ //保存营销记录
-        		MarketingManagement mm = new MarketingManagement();
-        		mm.setShowPage(MarketingPage.mainAchievement.getPageUrl()); //营销页面
-        		mm.setCategory(MarketingPage.mainAchievement.getBoothType()); //营销分类
-            	if(StringUtils.isNotBlank(coverImg)) mm.setCoverImg(coverImg);
-            	mm.setProductId(a.getId());
-            	mm.setEffective(1);
-        		marketingManagementService.save(mm);
-        	}    	
-        }      
-        return res;
+       return res;
     }
     /**
      * 修改成果
@@ -246,44 +224,6 @@ public class AdminAchievementApiController extends CertifyApiController {
         Achievement a = new Achievement();
         BeanUtils.copyProperties(ia, a);
         achievementService.updateAchievement(a, keywords, switchSign);
-        //更新营销活动
-       MarketingManagement mm = marketingManagementService.selectMarket(
-    		   MarketingPage.mainAchievement.getPageUrl(), MarketingPage.mainAchievement.getBoothType(), a.getId());
-       if (null != mm) {
-			if(mm.getEffective() == 1){ //原本属于营销有效
-				if (null != coverImg) mm.setCoverImg(coverImg);
-				if (null != hot) mm.setEffective(hot);
-				marketingManagementService.update(mm);
-			}else if(mm.getEffective() == 0){ //原本属于营销无效
-				int marketHisCount = marketingManagementService.getMarketingCount(
-						MarketingPage.mainAchievement.getPageUrl(), MarketingPage.mainAchievement.getBoothType(), 1);
-				if (marketHisCount >= MarketingPage.mainAchievement.getBoothSize()) { // 展位已满
-					res.getError().add(buildError(ErrorConstants.MARKET_BOOTH_MAX,"", marketHisCount));
-					return res;
-				}else{
-					if (null != hot) mm.setEffective(hot);
-					if (null != coverImg) mm.setCoverImg(coverImg);
-					marketingManagementService.update(mm);
-				}
-			}
-		}else{
-    	   if(null != hot && hot == 1){ //属于营销活动
-           	int marketHisCount = marketingManagementService.getMarketingCount(
-           			MarketingPage.mainAchievement.getPageUrl(), MarketingPage.mainAchievement.getBoothType(),1);
-           	if(marketHisCount >= MarketingPage.mainAchievement.getBoothSize()) { //展位已满
-           		 res.getError().add(buildError(ErrorConstants.MARKET_BOOTH_MAX, "",marketHisCount));
-           		 return res;
-           	}else{ //保存营销记录
-           		mm = new MarketingManagement();
-           		mm.setShowPage(MarketingPage.mainAchievement.getPageUrl()); //营销页面
-           		mm.setCategory(MarketingPage.mainAchievement.getBoothType()); //营销分类
-               	if(StringUtils.isNotBlank(coverImg)) mm.setCoverImg(coverImg);
-               	mm.setProductId(a.getId());
-               	mm.setEffective(1);
-           		marketingManagementService.save(mm);
-           	}    	
-           } 
-       }    
        return res;
     }
     /**
@@ -490,9 +430,6 @@ public class AdminAchievementApiController extends CertifyApiController {
         Result res = new Result();
         if (ids == null || ids.length != 1) {
             res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", ""));
-        } else {
-            marketingManagementService.deleteByProductId(Arrays.asList(ids));
-            res.setData(achievementService.deleteByPrimaryKey(Arrays.asList(ids)));
         }
         return res;
     }

+ 5 - 10
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -13,13 +13,9 @@ import org.springframework.web.servlet.ModelAndView;
 import com.goafanti.achievement.service.AchievementService;
 import com.goafanti.banners.enums.BannersType;
 import com.goafanti.banners.service.BannersService;
-import com.goafanti.common.enums.MarketingPage;
 import com.goafanti.common.model.Banners;
-import com.goafanti.common.model.BusinessProject;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.demand.service.DemandService;
-import com.goafanti.marketing.bo.MarketingManagementBo;
-import com.goafanti.marketing.service.MarketingManagementService;
 import com.goafanti.user.service.OrganizationIdentityService;
 import com.goafanti.user.service.UserIdentityService;
 import com.goafanti.news.bo.NewsPortalList;
@@ -47,8 +43,7 @@ public class WebpageController extends BaseController {
 	@Resource
 	private NewsService newsService;
 	
-	@Resource
-	private MarketingManagementService marketingManagementService; 
+	
 
 	@RequestMapping(value = "/user/account/index", method = RequestMethod.GET)
 	public ModelAndView index(HttpServletRequest request, ModelAndView modelview) {
@@ -233,18 +228,18 @@ public class WebpageController extends BaseController {
 		//政策
 		modelview.addObject("jtdt", newsService.findIndexNewsList(0, NewsType.JTDT.getCode(), 4));
 		//服务项目
-		List<BusinessProject> projectList=marketingManagementService.selectHotProject(5);
+		/*List<BusinessProject> projectList=marketingManagementService.selectHotProject(5);
 		
 		List<MarketingManagementBo> achievementList = marketingManagementService.selectMarketList(request,
 				MarketingPage.mainAchievement.getBoothType(),MarketingPage.mainAchievement.getBoothSize());
 		List<MarketingManagementBo> demandList = marketingManagementService.selectMarketList(request,
 				MarketingPage.mainDemand.getBoothType(),MarketingPage.mainDemand.getBoothSize());
 		List<MarketingManagementBo> speciaList = marketingManagementService.selectMarketList(request,
-				MarketingPage.specialist.getBoothType(), MarketingPage.specialist.getBoothSize());
-		modelview.addObject("achievementList", achievementList);
+				MarketingPage.specialist.getBoothType(), MarketingPage.specialist.getBoothSize());*/
+		/*modelview.addObject("achievementList", achievementList);
 		modelview.addObject("demandList", demandList);
 		modelview.addObject("speciaList", speciaList);
-		modelview.addObject("projectList", projectList);
+		modelview.addObject("projectList", projectList);*/
 		return modelview; 
 	}
 

+ 0 - 136
src/main/java/com/goafanti/common/dao/MarketingManagementMapper.java

@@ -1,136 +0,0 @@
-package com.goafanti.common.dao;
-
-import com.goafanti.common.model.BusinessProject;
-import com.goafanti.common.model.MarketingManagement;
-import com.goafanti.common.model.MarketingManagementExample;
-import com.goafanti.marketing.bo.MarketingManagementBo;
-
-import java.util.List;
-import org.apache.ibatis.annotations.Param;
-
-public interface MarketingManagementMapper {
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    long countByExample(MarketingManagementExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    int deleteByExample(MarketingManagementExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    int deleteByPrimaryKey(String id);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    int insert(MarketingManagement record);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    int insertSelective(MarketingManagement record);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    List<MarketingManagement> selectByExample(MarketingManagementExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    MarketingManagement selectByPrimaryKey(String id);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    int updateByExampleSelective(@Param("record") MarketingManagement record, @Param("example") MarketingManagementExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    int updateByExample(@Param("record") MarketingManagement record, @Param("example") MarketingManagementExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    int updateByPrimaryKeySelective(MarketingManagement record);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    int updateByPrimaryKey(MarketingManagement record);
-    
-    /**
-     *  查询营销页面活动数量
-     * @param showPage 
-     * @param category
-     * @param effective
-     * @return
-     */
-     int getMarketingCount(@Param("showPage")String showPage, @Param("category")Integer category, @Param("effective")Integer effective);
-    
-    /**
-     * 查询已有的活动产品
-     * @param showPage
-     * @param category
-     * @param productId
-     */
-    MarketingManagement selectMarket(@Param("showPage")String showPage, @Param("category")Integer category, @Param("productId")String productId);
-
-    /**
-     * 取消营销活动
-     * @param productIds
-     */
-	void deleteByProductId(@Param("productIds")List<String> productIds);
-	
-	/**
-	 * 查询营销活动列表
-	 * @param showPage
-	 * @param category
-	 * @return
-	 */
-	List<MarketingManagementBo> selectMarketList(@Param("url")String url,@Param("category")Integer category, @Param("boothSize")Integer boothSize);
-	/**
-	 * 查询服务列表
-	 * @param pSize
-	 * @return
-	 */
-	List<BusinessProject> selectHotProject(@Param("pSize")Integer pSize);
-}

+ 15 - 136
src/main/java/com/goafanti/common/mapper/AchievementMapper.xml

@@ -708,24 +708,11 @@
   		a.name, a.keyword, a.category, a.owner_name as ownerName, a.owner_type as ownerType, 
   		ui.username as username, a.owner_id as ownerId, a.org_id as orgId, a.contacts,
   		a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId,a.boutique,a.create_time as createTime
-  	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		,1 as hot
-	</if>
-	<if test="hot != null and hot == 0"><!-- 不在首页 -->
-		,0 as hot
-	</if>
-	<if test="hot==null"><!-- 无首页参数 -->
-		,ifnull(mm.effective,0) as hot
-	</if>
+  	
   	from achievement a
   	LEFT JOIN admin ad on ad.id = a.tech_broker_id
   	LEFT JOIN user_identity ui on a.owner_id = ui.uid
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		inner join marketing_management mm on a.id = mm.product_id
-	</if>
-	<if test="hot == null"> <!-- 无首页参数 -->
-		left join marketing_management mm on a.id = mm.product_id 
-	</if>
+	
   	where a.deleted_sign = 0 and a.owner_type = 0
   	<if test="ownerName != null">
   		and  a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
@@ -776,12 +763,6 @@
 	<if test="boutique != null">
 		and a.boutique = #{boutique,jdbcType=INTEGER}
 	</if>
-	<if test="hot != null and hot == 0"><!-- 不在首页 -->
-		and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
-	</if>
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		and mm.effective = 1
-	</if>
 	order by a.serial_number desc
 	<if test="page_sql!=null">
 			${page_sql}
@@ -792,12 +773,7 @@
   	select 
   		count(1)
   	from achievement a
-  	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		inner join marketing_management mm on a.id = mm.product_id
-	</if>
-	<if test="hot == null"> <!-- 无首页参数 -->
-		left join marketing_management mm on a.id = mm.product_id 
-	</if>
+  	
   	where deleted_sign = 0 and owner_type = 0
   	<if test="ownerName != null">
   		and  a.owner_name like CONCAT('%',#{ownerName,jdbcType=VARCHAR},'%')
@@ -848,12 +824,7 @@
 	<if test="boutique != null">
 		and a.boutique = #{boutique,jdbcType=INTEGER}
 	</if>
-	<if test="hot != null and hot = 0"><!-- 不在首页 -->
-		and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
-	</if>
-	<if test="hot != null and hot = 1"><!-- 在首页 -->
-		and mm.effective = 1
-	</if>
+	
   </select>
   
   
@@ -865,23 +836,10 @@
   		a.owner_id as ownerId, a.org_id as orgId,a.create_time as createTime,
   		a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId,a.boutique,ad.id techBrokerIdd,
   		a.release_status as releaseStatus
-  	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		,1 as hot
-	</if>
-	<if test="hot != null and hot == 0"><!-- 无首页参数 -->
-		,0 as hot
-	</if>
-	<if test="hot==null"><!-- 在首页 -->
-		,ifnull(mm.effective,0) as hot
-	</if>
+  	
   	from achievement a
   	LEFT JOIN admin ad on ad.id = a.tech_broker_id
-  	<if test="hot != null and hot == 1"> <!-- 在首页 -->
-		inner join marketing_management mm on a.id = mm.product_id
-	</if>
-	<if test="hot == null"> <!-- 无首页参数 -->
-		left join marketing_management mm on a.id = mm.product_id 
-	</if>
+  	
   	where a.deleted_sign = 0 
   	<if test="recordPerson != null">
 		and ad.name = #{recordPerson,jdbcType=VARCHAR}
@@ -932,12 +890,6 @@
 	<if test="boutique != null">
 		and a.boutique = #{boutique,jdbcType=INTEGER}
 	</if>
-	<if test="hot != null and hot == 0"><!-- 不在首页 -->
-		and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
-	</if>
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		and mm.effective = 1
-	</if>
 	order by serial_number desc
 	<if test="page_sql!=null">
 			${page_sql}
@@ -949,12 +901,7 @@
   		count(1)
   	from achievement a
   	LEFT JOIN admin ad on ad.id = a.tech_broker_id
-  	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		inner join marketing_management mm on a.id = mm.product_id
-	</if>
-	<if test="hot == null"> <!-- 无首页参数 -->
-		left join marketing_management mm on a.id = mm.product_id 
-	</if>
+  	
   	where a.deleted_sign = 0 
   	<if test="recordPerson != null">
 		and ad.name = #{recordPerson,jdbcType=VARCHAR}
@@ -1004,12 +951,7 @@
 	<if test="boutique != null">
 		and a.boutique = #{boutique,jdbcType=INTEGER}
 	</if>
-	<if test="hot != null and hot == 0"><!-- 不在首页 -->
-		and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
-	</if>
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		and  mm.effective = 1
-	</if>
+	
   </select>
   
   
@@ -1250,7 +1192,7 @@
 		    a.release_date as releaseDate, a.audit_status as auditStatus, a.tech_broker_id as techBrokerId,
 		    ui.username as iOwnerName, ui.province, ui.city, ui.area, u.email as iOwnerEmail,
 			ui.id_number as iOwnerIdNumber, u.mobile as iOwnerMobile,j.easemob_name as easemobName,a.remark,
-			ifnull(t.x,0) as orderIntentionCount ,ifnull(t2.x,0) as orderCount,ifnull(mm.effective,0) hot,a.boutique,a.contacts,a.contact_mobile as contactMobile, 
+			ifnull(t.x,0) as orderIntentionCount ,ifnull(t2.x,0) as orderCount,a.boutique,a.contacts,a.contact_mobile as contactMobile, 
 			a.international_flag as internationalFlag
 	from achievement a
     left join user_identity ui on a.owner_id = ui.uid
@@ -1266,7 +1208,6 @@
 				group by  tl.commodity_id) t2 on a.id=t2.commodity_id 
     left join jpush_easemob_account j on a.owner_id=j.uid
     left join user u on u.id = a.owner_id
-    left join marketing_management mm on a.id = mm.product_id
   where a.id =#{id,jdbcType=VARCHAR}
   </select>
   
@@ -1288,11 +1229,10 @@
 		    a.create_time as createTime, a.release_status as releaseStatus,
 		    a.release_date as releaseDate, a.audit_status as auditStatus, a.tech_broker_id as techBrokerId,
 		    oi.unit_name as iOwnerName, oi.postal_address as iOwnerPostalAddress, u.email as iOwnerEmail,
-		    oi.org_code as iOwnerIdNumber, u.mobile as iOwnerMobile,a.boutique,ifnull(mm.effective,0) hot,mm.cover_img as coverImg,a.remark,a.contacts,a.contact_mobile as contactMobile
+		    oi.org_code as iOwnerIdNumber, u.mobile as iOwnerMobile,a.boutique,a.remark,a.contacts,a.contact_mobile as contactMobile
     from achievement a
     left join organization_identity oi on a.owner_id = oi.uid
     left join user u on u.id = a.owner_id
-    left join marketing_management mm on a.id = mm.product_id
     where a.id = #{id,jdbcType=VARCHAR}
   </select>
   
@@ -1818,27 +1758,13 @@
   		a.name, a.keyword, a.category, a.owner_name as ownerName, a.owner_type as ownerType, 
   		<!-- oi.unit_name as username,  -->a.owner_id as ownerId, a.org_id as orgId,a.create_time as createTime,
   		a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId,a.boutique
-  	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		,1 as hot
-	</if>
-	<if test="hot != null and hot == 0"><!-- 无首页参数 -->
-		,0 as hot
-	</if>
-	<if test="hot==null"><!-- 在首页 -->
-		,ifnull(mm.effective,0) as hot
-	</if>
+  	
   	from achievement a
   	LEFT JOIN admin ad on ad.id = a.tech_broker_id
 	<!-- LEFT JOIN organization_identity oi on a.owner_id = oi.uid -->
 	<if test="adminId != null">
 		LEFT JOIN user u on a.owner_id = u.id
 	</if>
-  	<if test="hot != null and hot == 1"> <!-- 在首页 -->
-		inner join marketing_management mm on a.id = mm.product_id
-	</if>
-	<if test="hot == null"> <!-- 无首页参数 -->
-		left join marketing_management mm on a.id = mm.product_id 
-	</if>
   	where a.deleted_sign = 0 
   	<if test="ownerType != null">
 		and a.owner_type = #{ownerType,jdbcType=VARCHAR}
@@ -1892,12 +1818,6 @@
 	<if test="boutique != null">
 		and a.boutique = #{boutique,jdbcType=INTEGER}
 	</if>
-	<if test="hot != null and hot == 0"><!-- 不在首页 -->
-		and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
-	</if>
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		and mm.effective = 1
-	</if>
 	order by serial_number desc
 	<if test="page_sql!=null">
 			${page_sql}
@@ -1913,12 +1833,6 @@
 	<if test="adminId != null">
 		LEFT JOIN user u on a.owner_id = u.id
 	</if>
-  	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		inner join marketing_management mm on a.id = mm.product_id
-	</if>
-	<if test="hot == null"> <!-- 无首页参数 -->
-		left join marketing_management mm on a.id = mm.product_id 
-	</if>
   	where a.deleted_sign = 0 
   	<if test="ownerType != null">
 		and a.owner_type = #{ownerType,jdbcType=VARCHAR}
@@ -1971,12 +1885,6 @@
 	<if test="boutique != null">
 		and a.boutique = #{boutique,jdbcType=INTEGER}
 	</if>
-	<if test="hot != null and hot == 0"><!-- 不在首页 -->
-		and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
-	</if>
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		and  mm.effective = 1
-	</if>
   </select>
   	
   	<select id="findManageAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
@@ -1985,15 +1893,7 @@
   		a.name, a.keyword, a.category, a.owner_name as ownerName, a.owner_type as ownerType, 
   		<!-- oi.unit_name as username,  -->a.owner_id as ownerId, a.org_id as orgId,a.create_time as createTime,
   		a.release_date as releaseDate, a.audit_status as auditStatus, ad.name as techBrokerId,a.boutique
-  	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		,1 as hot
-	</if>
-	<if test="hot != null and hot == 0"><!-- 无首页参数 -->
-		,0 as hot
-	</if>
-	<if test="hot==null"><!-- 在首页 -->
-		,ifnull(mm.effective,0) as hot
-	</if>
+  	
   	from achievement a
   	LEFT JOIN admin ad on ad.id = a.tech_broker_id
   	LEFT JOIN department dm on dm.id = ad.department_id
@@ -2001,12 +1901,7 @@
 	<if test="adminId != null">
 		LEFT JOIN user u on a.owner_id = u.id
 	</if>
-  	<if test="hot != null and hot == 1"> <!-- 在首页 -->
-		inner join marketing_management mm on a.id = mm.product_id
-	</if>
-	<if test="hot == null"> <!-- 无首页参数 -->
-		left join marketing_management mm on a.id = mm.product_id 
-	</if>
+  	
   	where a.deleted_sign = 0 
   	<if test="recordPerson != null">
 		and ad.name = #{recordPerson,jdbcType=VARCHAR}
@@ -2063,12 +1958,7 @@
 	<if test="boutique != null">
 		and a.boutique = #{boutique,jdbcType=INTEGER}
 	</if>
-	<if test="hot != null and hot == 0"><!-- 不在首页 -->
-		and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
-	</if>
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		and mm.effective = 1
-	</if>
+	
 	order by serial_number desc
 	<if test="page_sql!=null">
 			${page_sql}
@@ -2085,12 +1975,7 @@
 	<if test="adminId != null">
 		LEFT JOIN user u on a.owner_id = u.id
 	</if>
-  	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		inner join marketing_management mm on a.id = mm.product_id
-	</if>
-	<if test="hot == null"> <!-- 无首页参数 -->
-		left join marketing_management mm on a.id = mm.product_id 
-	</if>
+  	
   	where a.deleted_sign = 0 
   	<if test="recordPerson != null">
 		and ad.name = #{recordPerson,jdbcType=VARCHAR}
@@ -2146,12 +2031,6 @@
 	<if test="boutique != null">
 		and a.boutique = #{boutique,jdbcType=INTEGER}
 	</if>
-	<if test="hot != null and hot == 0"><!-- 不在首页 -->
-		and a.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
-	</if>
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		and  mm.effective = 1
-	</if>
   </select>
   <select id="getAppHomeAchievement" resultType="com.goafanti.app.bo.HomeAchievemend">
   select ap.achievement_id as id ,a.name as name ,a.technical_picture_url as img, 

+ 14 - 113
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -548,12 +548,7 @@
 	<if test="adminId != null">
 		LEFT JOIN user u on d.employer_id = u.id
 	</if>
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		inner join marketing_management mm on d.id = mm.product_id
-	</if>
-	<if test="hot == null"> <!-- 无首页参数 -->
-		left join marketing_management mm on d.id = mm.product_id 
-	</if>
+	
 	where d.deleted_sign = 0 and d.data_category = 0 
 	<if test="adminId != null">
 		and (u.mid = #{adminId,jdbcType=VARCHAR}
@@ -616,12 +611,7 @@
 	<if test="boutique != null">
 		and d.boutique = #{boutique,jdbcType=INTEGER}
 	</if>
-	<if test="hot != null and hot == 0"><!-- 不在首页 -->
-		and d.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
-	</if>
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		and mm.effective = 1
-	</if>
+
   	order by d.serial_number desc
   	<if test="page_sql!=null">
 		${page_sql}
@@ -637,12 +627,7 @@
 	<if test="adminId != null">
 		LEFT JOIN user u on d.employer_id = u.id
 	</if>
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		inner join marketing_management mm on d.id = mm.product_id
-	</if>
-	<if test="hot == null"> <!-- 无首页参数 -->
-		left join marketing_management mm on d.id = mm.product_id 
-	</if>
+	
 	where d.deleted_sign = 0 and d.data_category = 0 
 	<if test="adminId != null">
 		and (u.mid = #{adminId,jdbcType=VARCHAR}
@@ -705,12 +690,7 @@
 	<if test="boutique != null">
 		and d.boutique = #{boutique,jdbcType=INTEGER}
 	</if>
-	<if test="hot != null and hot == 0"><!-- 不在首页 -->
-		and d.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
-	</if>
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		and mm.effective = 1
-	</if>
+	
   </select>
   
    <select id="findManageOrgDemandListByPage" parameterType="String" resultType="com.goafanti.demand.bo.DemandManageListBo">
@@ -733,12 +713,6 @@
 	 </if>
 	from  demand d 
 	LEFT JOIN admin a on a.id = d.tech_broker_id
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		inner join marketing_management mm on d.id = mm.product_id
-	</if>
-	<if test="hot == null"> <!-- 无首页参数 -->
-		left join marketing_management mm on d.id = mm.product_id 
-	</if>
 	where d.deleted_sign = 0 
 	<if test="recordPerson != null">
 		and a.name= #{recordPerson,jdbcType=VARCHAR}
@@ -795,12 +769,7 @@
 	<if test="boutique != null">
 		and d.boutique = #{boutique,jdbcType=INTEGER}
 	</if>
-	<if test="hot != null and hot == 0"><!-- 不在首页 -->
-		and d.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
-	</if>
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		and mm.effective = 1
-	</if>
+	
   	order by d.serial_number desc
   	<if test="page_sql!=null">
 			${page_sql}
@@ -813,12 +782,7 @@
 	from  demand d 
 	<!-- LEFT JOIN organization_identity oi on d.employer_id = oi.uid -->
 	LEFT JOIN admin a on a.id = d.tech_broker_id
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		inner join marketing_management mm on d.id = mm.product_id
-	</if>
-	<if test="hot == null"> <!-- 无首页参数 -->
-		left join marketing_management mm on d.id = mm.product_id 
-	</if>
+	
 	where d.deleted_sign = 0 
 	<if test="recordPerson != null">
 		and a.name= #{recordPerson,jdbcType=VARCHAR}
@@ -875,12 +839,7 @@
 	<if test="boutique != null">
 		and d.boutique = #{boutique,jdbcType=INTEGER}
 	</if>
-	<if test="hot != null and hot == 0"><!-- 不在首页 -->
-		and d.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
-	</if>
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		and mm.effective = 1
-	</if>
+	
   </select>
   
   <select id="selectUserDemandDetail" parameterType="java.lang.String" resultType="com.goafanti.demand.bo.DemandManageDetailBo">
@@ -898,11 +857,10 @@
   		d.employer_address as employerAddress, d.employer_contacts_mobile as employerContactsMobile,
   		d.employer_contacts_mailbox as employerContactsMailbox, d.employer_name as employerName,
   		d.tech_broker_id as techBrokerId,  u.mobile as contactsName,d.urgent_days as urgentDays,d.urgent_money as urgentMoney,
-  		d.boutique,ifnull(mm.effective,0) as hot,mm.cover_img as coverImg,d.remark,d.contacts,d.contact_mobile as contactMobile
+  		d.boutique,d.remark,d.contacts,d.contact_mobile as contactMobile
   	from demand d 
   	left join user_identity ui on ui.uid = d.employer_id
   	left join user u on u.id = d.employer_id
-  	left join marketing_management mm on d.id = mm.product_id
   	where d.data_category = 0 and d.id = #{id,jdbcType=VARCHAR}
   </select>
   
@@ -923,11 +881,10 @@ select
   		d.tech_broker_id as techBrokerId,d.remark,d.urgent_days as urgentDays,d.urgent_money as urgentMoney, 
   		d.employer_address as employerAddress, d.employer_contacts_mobile as employerContactsMobile,
   		d.employer_contacts_mailbox as employerContactsMailbox, d.employer_name as employerName,
-  		d.boutique,ifnull(mm.effective,0) as hot,mm.cover_img as coverImg,d.contacts,d.contact_mobile as contactMobile
+  		d.boutique,d.contacts,d.contact_mobile as contactMobile
   	from demand d 
   	left join organization_identity oi on oi.uid = d.employer_id
   	left join user u on u.id = d.employer_id
-  	left join marketing_management mm on d.id = mm.product_id
   	where <!-- d.data_category = 1 and --> d.id = #{id,jdbcType=VARCHAR}
   </select>
   
@@ -1716,21 +1673,14 @@ select
 	 <if test="hot != null and hot == 0"><!-- 不在首页 -->
 		,0 as hot
 	 </if>
-	 <if test="hot==null"><!-- 无首页参数 -->
-		,ifnull(mm.effective,0) as hot
-	 </if>
+	 
 	from  demand d 
 	<!-- LEFT JOIN organization_identity oi on d.employer_id = oi.uid -->
 	LEFT JOIN admin a on a.id = d.tech_broker_id
 	<if test="adminId != null">
 		LEFT JOIN user u on d.employer_id = u.id
 	</if>
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		inner join marketing_management mm on d.id = mm.product_id
-	</if>
-	<if test="hot == null"> <!-- 无首页参数 -->
-		left join marketing_management mm on d.id = mm.product_id 
-	</if>
+	
 	where d.deleted_sign = 0 
 	<if test="techBrokerId != null">
 		and d.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
@@ -1803,13 +1753,7 @@ select
 	<if test="boutique != null">
 		and d.boutique = #{boutique,jdbcType=INTEGER}
 	</if>
-	<if test="hot != null and hot == 0"><!-- 不在首页 -->
-		and d.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
-	</if>
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		and mm.effective = 1
-	</if>
-  	order by d.serial_number desc
+	order by d.serial_number desc
   	<if test="page_sql!=null">
 			${page_sql}
 	</if>
@@ -1824,12 +1768,6 @@ select
 	<if test="adminId != null">
 		LEFT JOIN user u on d.employer_id = u.id
 	</if>
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		inner join marketing_management mm on d.id = mm.product_id
-	</if>
-	<if test="hot == null"> <!-- 无首页参数 -->
-		left join marketing_management mm on d.id = mm.product_id 
-	</if>
 	where d.deleted_sign = 0 
 	<if test="techBrokerId != null">
 		and d.tech_broker_id = #{techBrokerId,jdbcType=VARCHAR}
@@ -1902,12 +1840,7 @@ select
 	<if test="boutique != null">
 		and d.boutique = #{boutique,jdbcType=INTEGER}
 	</if>
-	<if test="hot != null and hot == 0"><!-- 不在首页 -->
-		and d.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
-	</if>
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		and mm.effective = 1
-	</if>
+	
   </select>
   
   <select id="findManageDemandListByPage" parameterType="String" resultType="com.goafanti.demand.bo.DemandManageListBo">
@@ -1919,25 +1852,10 @@ select
 	  d.release_status as releaseStatus, d.release_date as releaseDate, a.name as techBrokerId,d.create_time as createTime,
 	  d.employer_id as employerId, d.audit_status as auditStatus,
 	  d.tech_broker_id as techBrokerId,d.boutique
-	 <if test="hot != null and hot == 1"><!-- 在首页 -->
-		,1 as hot
-	 </if>
-	 <if test="hot != null and hot == 0"><!-- 不在首页 -->
-		,0 as hot
-	 </if>
-	 <if test="hot==null"><!-- 无首页参数 -->
-		,ifnull(mm.effective,0) as hot
-	 </if>
 	from  demand d 
 	<!-- LEFT JOIN organization_identity oi on d.employer_id = oi.uid -->
 	LEFT JOIN admin a on a.id = d.tech_broker_id
 	LEFT JOIN department dm on dm.id = a.department_id
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		inner join marketing_management mm on d.id = mm.product_id
-	</if>
-	<if test="hot == null"> <!-- 无首页参数 -->
-		left join marketing_management mm on d.id = mm.product_id 
-	</if>
 	where d.deleted_sign = 0 
 	<if test="recordPerson != null">
 		and a.name = #{recordPerson,jdbcType=VARCHAR}
@@ -2003,12 +1921,6 @@ select
 	<if test="boutique != null">
 		and d.boutique = #{boutique,jdbcType=INTEGER}
 	</if>
-	<if test="hot != null and hot == 0"><!-- 不在首页 -->
-		and d.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
-	</if>
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		and mm.effective = 1
-	</if>
   	order by d.serial_number desc
   	<if test="page_sql!=null">
 			${page_sql}
@@ -2022,12 +1934,6 @@ select
 	<!-- LEFT JOIN organization_identity oi on d.employer_id = oi.uid -->
 	LEFT JOIN admin a on a.id = d.tech_broker_id
 	LEFT JOIN department dm on dm.id = a.department_id
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		inner join marketing_management mm on d.id = mm.product_id
-	</if>
-	<if test="hot == null"> <!-- 无首页参数 -->
-		left join marketing_management mm on d.id = mm.product_id 
-	</if>
 	where d.deleted_sign = 0 
 	<if test="recordPerson != null">
 		and a.name = #{recordPerson,jdbcType=VARCHAR}
@@ -2093,12 +1999,7 @@ select
 	<if test="boutique != null">
 		and d.boutique = #{boutique,jdbcType=INTEGER}
 	</if>
-	<if test="hot != null and hot == 0"><!-- 不在首页 -->
-		and d.id not in(select mm.product_id from marketing_management mm where mm.effective = 1)
-	</if>
-	<if test="hot != null and hot == 1"><!-- 在首页 -->
-		and mm.effective = 1
-	</if>
+	
   </select>
   <select id="getAppHomeRecommended" resultType="com.goafanti.demand.bo.DemandRecommended">
 	  		select dp.demand_id as id,d.name,d.demand_type as demandType,d.problem_des as introduction,d.picture_url as pictureUrl,

+ 0 - 430
src/main/java/com/goafanti/common/mapper/MarketingManagementMapper.xml

@@ -1,430 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.goafanti.common.dao.MarketingManagementMapper">
-  <resultMap id="BaseResultMap" type="com.goafanti.common.model.MarketingManagement">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Sep 26 14:34:04 CST 2017.
-    -->
-    <id column="id" jdbcType="VARCHAR" property="id" />
-    <result column="product_id" jdbcType="VARCHAR" property="productId" />
-    <result column="show_page" jdbcType="VARCHAR" property="showPage" />
-    <result column="cover_img" jdbcType="VARCHAR" property="coverImg" />
-    <result column="start_date" jdbcType="TIMESTAMP" property="startDate" />
-    <result column="end_date" jdbcType="TIMESTAMP" property="endDate" />
-    <result column="category" jdbcType="INTEGER" property="category" />
-    <result column="effective" jdbcType="INTEGER" property="effective" />
-  </resultMap>
-  <sql id="Example_Where_Clause">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Sep 26 14:34:04 CST 2017.
-    -->
-    <where>
-      <foreach collection="oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Update_By_Example_Where_Clause">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Sep 26 14:34:04 CST 2017.
-    -->
-    <where>
-      <foreach collection="example.oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Base_Column_List">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Sep 26 14:34:04 CST 2017.
-    -->
-    id, product_id, show_page, cover_img, start_date, end_date, category, effective
-  </sql>
-  <select id="selectByExample" parameterType="com.goafanti.common.model.MarketingManagementExample" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Sep 26 14:34:04 CST 2017.
-    -->
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from marketing_management
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
-  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Sep 26 14:34:04 CST 2017.
-    -->
-    select 
-    <include refid="Base_Column_List" />
-    from marketing_management
-    where id = #{id,jdbcType=VARCHAR}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Sep 26 14:34:04 CST 2017.
-    -->
-    delete from marketing_management
-    where id = #{id,jdbcType=VARCHAR}
-  </delete>
-  <delete id="deleteByExample" parameterType="com.goafanti.common.model.MarketingManagementExample">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Sep 26 14:34:04 CST 2017.
-    -->
-    delete from marketing_management
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.MarketingManagement">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Sep 26 14:34:04 CST 2017.
-    -->
-    insert into marketing_management (id, product_id, show_page, 
-      cover_img, start_date, end_date, 
-      category, effective)
-    values (#{id,jdbcType=VARCHAR}, #{productId,jdbcType=VARCHAR}, #{showPage,jdbcType=VARCHAR}, 
-      #{coverImg,jdbcType=VARCHAR}, #{startDate,jdbcType=TIMESTAMP}, #{endDate,jdbcType=TIMESTAMP}, 
-      #{category,jdbcType=INTEGER}, #{effective,jdbcType=INTEGER})
-  </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.MarketingManagement">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Sep 26 14:34:04 CST 2017.
-    -->
-    insert into marketing_management
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
-      <if test="productId != null">
-        product_id,
-      </if>
-      <if test="showPage != null">
-        show_page,
-      </if>
-      <if test="coverImg != null">
-        cover_img,
-      </if>
-      <if test="startDate != null">
-        start_date,
-      </if>
-      <if test="endDate != null">
-        end_date,
-      </if>
-      <if test="category != null">
-        category,
-      </if>
-      <if test="effective != null">
-        effective,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=VARCHAR},
-      </if>
-      <if test="productId != null">
-        #{productId,jdbcType=VARCHAR},
-      </if>
-      <if test="showPage != null">
-        #{showPage,jdbcType=VARCHAR},
-      </if>
-      <if test="coverImg != null">
-        #{coverImg,jdbcType=VARCHAR},
-      </if>
-      <if test="startDate != null">
-        #{startDate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="endDate != null">
-        #{endDate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="category != null">
-        #{category,jdbcType=INTEGER},
-      </if>
-      <if test="effective != null">
-        #{effective,jdbcType=INTEGER},
-      </if>
-    </trim>
-  </insert>
-  <select id="countByExample" parameterType="com.goafanti.common.model.MarketingManagementExample" resultType="java.lang.Long">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Sep 26 14:34:04 CST 2017.
-    -->
-    select count(*) from marketing_management
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Sep 26 14:34:04 CST 2017.
-    -->
-    update marketing_management
-    <set>
-      <if test="record.id != null">
-        id = #{record.id,jdbcType=VARCHAR},
-      </if>
-      <if test="record.productId != null">
-        product_id = #{record.productId,jdbcType=VARCHAR},
-      </if>
-      <if test="record.showPage != null">
-        show_page = #{record.showPage,jdbcType=VARCHAR},
-      </if>
-      <if test="record.coverImg != null">
-        cover_img = #{record.coverImg,jdbcType=VARCHAR},
-      </if>
-      <if test="record.startDate != null">
-        start_date = #{record.startDate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.endDate != null">
-        end_date = #{record.endDate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.category != null">
-        category = #{record.category,jdbcType=INTEGER},
-      </if>
-      <if test="record.effective != null">
-        effective = #{record.effective,jdbcType=INTEGER},
-      </if>
-    </set>
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Sep 26 14:34:04 CST 2017.
-    -->
-    update marketing_management
-    set id = #{record.id,jdbcType=VARCHAR},
-      product_id = #{record.productId,jdbcType=VARCHAR},
-      show_page = #{record.showPage,jdbcType=VARCHAR},
-      cover_img = #{record.coverImg,jdbcType=VARCHAR},
-      start_date = #{record.startDate,jdbcType=TIMESTAMP},
-      end_date = #{record.endDate,jdbcType=TIMESTAMP},
-      category = #{record.category,jdbcType=INTEGER},
-      effective = #{record.effective,jdbcType=INTEGER}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.MarketingManagement">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Sep 26 14:34:04 CST 2017.
-    -->
-    update marketing_management
-    <set>
-      <if test="productId != null">
-        product_id = #{productId,jdbcType=VARCHAR},
-      </if>
-      <if test="showPage != null">
-        show_page = #{showPage,jdbcType=VARCHAR},
-      </if>
-      <if test="coverImg != null">
-        cover_img = #{coverImg,jdbcType=VARCHAR},
-      </if>
-      <if test="startDate != null">
-        start_date = #{startDate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="endDate != null">
-        end_date = #{endDate,jdbcType=TIMESTAMP},
-      </if>
-      <if test="category != null">
-        category = #{category,jdbcType=INTEGER},
-      </if>
-      <if test="effective != null">
-        effective = #{effective,jdbcType=INTEGER},
-      </if>
-    </set>
-    where id = #{id,jdbcType=VARCHAR}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.MarketingManagement">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Sep 26 14:34:04 CST 2017.
-    -->
-    update marketing_management
-    set product_id = #{productId,jdbcType=VARCHAR},
-      show_page = #{showPage,jdbcType=VARCHAR},
-      cover_img = #{coverImg,jdbcType=VARCHAR},
-      start_date = #{startDate,jdbcType=TIMESTAMP},
-      end_date = #{endDate,jdbcType=TIMESTAMP},
-      category = #{category,jdbcType=INTEGER},
-      effective = #{effective,jdbcType=INTEGER}
-    where id = #{id,jdbcType=VARCHAR}
-  </update>
-  <select id="getMarketingCount" resultType="java.lang.Integer">
-  	 select count(0) from marketing_management 
-  	 where show_page = #{showPage,jdbcType=VARCHAR} 
-  	 and category = #{category,jdbcType=INTEGER} 
-  	 and effective = #{effective,jdbcType=INTEGER}
-  </select>
-  <select id="selectMarket"  resultMap="BaseResultMap">
-  	 select 
-  	 <include refid="Base_Column_List" /> 
-  	 from marketing_management
-  	 where show_page = #{showPage,jdbcType=VARCHAR} 
-  	 and category = #{category,jdbcType=INTEGER} 
-  	 and product_id = #{productId,jdbcType=VARCHAR}
-  </select>
-  <select id="deleteByProductId">
-  	update marketing_management set effective = 0
-  	where  product_id in 
-	<foreach item="item"  collection="productIds" open="(" separator="," close=")">
-		#{item}
-	</foreach>
-  </select>
-  <select id="selectMarketList" resultType="com.goafanti.marketing.bo.MarketingManagementBo">
-  	<if test="category == 1"> <!-- 成果 -->
-  		    select
-	x.id as productId,x.owner_type as ownerType,x.summary,x.introduction,x.name,x.field_a,fg.name as fieldA,
-	x.field_b,fg1.name as fieldB,x.technical_picture_url  as coverImg,bi.domain_name 
-from
-	 achievement x 
-right join achievement_publish ap on ap.achievement_id=x.id
-left join branch_information bi on bi.id=ap.publish_platform
-left join field_glossory fg on x.field_a=fg.id
-left join field_glossory fg1 on x.field_b=fg1.id
-where x.audit_status = 3
-	and x.deleted_sign = 0
-	and ap.publish_client='0'
-	and ap.publish_page='W01'
-	and bi.domain_name like "%"#{url,jdbcType=VARCHAR}"%"
-  	</if>
-  	<if test="category == 2"> <!-- 需求 -->
-  		select x.id as productId,x.data_category as ownerType,x.name,
-	x.picture_url as coverImg,x.problem_des as problemDes,
-	x.urgent_days as urgentDays,x.urgent_money as urgentMoney,bi.domain_name
-		from    demand x 
-		right join demand_publish dp on dp.demand_id=x.id
-		left join branch_information bi on bi.id=dp.publish_platform
-		where  x.audit_status =3 and x.deleted_sign = 0
-			and x.deleted_sign = 0
-	and dp.publish_client='0'
-	and dp.publish_page='W01'
-	and bi.domain_name like "%"#{url,jdbcType=VARCHAR}"%" 
-  	</if>
-  	<if test="category == 7"> <!-- 智者 -->
-  		select
-		u.id,i.username,i.work_unit as workUnit,i.professional_title as professionalTitle,u.introduction,
-	    u.head_portrait_url as headPortraitUrl,u.type,i.expert,bi.domain_name,ifnull(o.x,0) as reservationCount
-	    from `user` u
-	    left join user_ability ua on u.id=ua.uid
-	    left join user_career c on u.id=c.uid
-	    left join user_identity i on u.id=i.uid
-	    left join (select count(0) as x,seller_id from t_order
-				where order_status != 4
-				group by  seller_id ) o on u.id=o.seller_id
-	    right join expert_publish ep on ep.expert_id=u.id
-	    left join branch_information bi on bi.id=ep.publish_platform
-	    WHERE
-	    u.type = 0 
-	    and i.expert = 1
-	    and ep.publish_client='0'
-	    and ep.publish_page='W01'
-	    and bi.domain_name like "%"#{url,jdbcType=VARCHAR}"%" 
-	</if>
-	<if test="category == 1">
-	order by ap.if_top,ap.top_number,ap.show_number asc
-	</if>
-	<if test="category == 2">
-	order by dp.if_top,dp.top_number,dp.show_number asc
-	</if>
-	<if test="category == 7">
-	order by ep.if_top,ep.top_number,ep.show_number asc
-	</if>
-	<if test="boothSize !=null">
-		LIMIT 0, #{boothSize,jdbcType=VARCHAR}
-	</if>
-	</select>
-  
-    <select id="selectHotProject" resultType="com.goafanti.common.model.BusinessProject">
-  	select 
-  	id, create_id as createId, create_time as createTime, update_time as updateTime, delete_sign as deleteSign, bname, cid, price, offset, 
-    activity_price as activityPrice, activity_flag as activityFlag, member_price as memberPrice, introduce, status, country, province, 
-    city, district, principal_id as principalId, Value_effect as ValueEffect, client_size as clientSize, max_logo as maxLogo, min_logo as minLogo, boutique, 
-    project_url as projectUrl, first_payment as firstPayment
-  	FROM business_project
-    where boutique=1
-    <if test="pSize != null">
-    LIMIT 0, #{pSize,jdbcType=VARCHAR}
-    </if>    
-  </select>
-</mapper>

+ 0 - 273
src/main/java/com/goafanti/common/model/MarketingManagement.java

@@ -1,273 +0,0 @@
-package com.goafanti.common.model;
-
-import java.util.Date;
-
-public class MarketingManagement {
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column marketing_management.id
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    private String id;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column marketing_management.product_id
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    private String productId;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column marketing_management.show_page
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    private String showPage;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column marketing_management.cover_img
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    private String coverImg;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column marketing_management.start_date
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    private Date startDate;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column marketing_management.end_date
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    private Date endDate;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column marketing_management.category
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    private Integer category;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column marketing_management.effective
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    private Integer effective;
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column marketing_management.id
-     *
-     * @return the value of marketing_management.id
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public String getId() {
-        return id;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column marketing_management.id
-     *
-     * @param id the value for marketing_management.id
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column marketing_management.product_id
-     *
-     * @return the value of marketing_management.product_id
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public String getProductId() {
-        return productId;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column marketing_management.product_id
-     *
-     * @param productId the value for marketing_management.product_id
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public void setProductId(String productId) {
-        this.productId = productId;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column marketing_management.show_page
-     *
-     * @return the value of marketing_management.show_page
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public String getShowPage() {
-        return showPage;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column marketing_management.show_page
-     *
-     * @param showPage the value for marketing_management.show_page
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public void setShowPage(String showPage) {
-        this.showPage = showPage;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column marketing_management.cover_img
-     *
-     * @return the value of marketing_management.cover_img
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public String getCoverImg() {
-    	if (null!=coverImg&&coverImg.contains(",")) {
-    		String s[]=coverImg.split(",");
-    		coverImg=s[0];
-		}
-        return coverImg;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column marketing_management.cover_img
-     *
-     * @param coverImg the value for marketing_management.cover_img
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public void setCoverImg(String coverImg) {
-        this.coverImg = coverImg;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column marketing_management.start_date
-     *
-     * @return the value of marketing_management.start_date
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public Date getStartDate() {
-        return startDate;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column marketing_management.start_date
-     *
-     * @param startDate the value for marketing_management.start_date
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public void setStartDate(Date startDate) {
-        this.startDate = startDate;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column marketing_management.end_date
-     *
-     * @return the value of marketing_management.end_date
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public Date getEndDate() {
-        return endDate;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column marketing_management.end_date
-     *
-     * @param endDate the value for marketing_management.end_date
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public void setEndDate(Date endDate) {
-        this.endDate = endDate;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column marketing_management.category
-     *
-     * @return the value of marketing_management.category
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public Integer getCategory() {
-        return category;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column marketing_management.category
-     *
-     * @param category the value for marketing_management.category
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public void setCategory(Integer category) {
-        this.category = category;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column marketing_management.effective
-     *
-     * @return the value of marketing_management.effective
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public Integer getEffective() {
-        return effective;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column marketing_management.effective
-     *
-     * @param effective the value for marketing_management.effective
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public void setEffective(Integer effective) {
-        this.effective = effective;
-    }
-}

+ 0 - 823
src/main/java/com/goafanti/common/model/MarketingManagementExample.java

@@ -1,823 +0,0 @@
-package com.goafanti.common.model;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-public class MarketingManagementExample {
-    /**
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    protected String orderByClause;
-
-    /**
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    protected boolean distinct;
-
-    /**
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    protected List<Criteria> oredCriteria;
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public MarketingManagementExample() {
-        oredCriteria = new ArrayList<Criteria>();
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public void setOrderByClause(String orderByClause) {
-        this.orderByClause = orderByClause;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public String getOrderByClause() {
-        return orderByClause;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public void setDistinct(boolean distinct) {
-        this.distinct = distinct;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public boolean isDistinct() {
-        return distinct;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public List<Criteria> getOredCriteria() {
-        return oredCriteria;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public void or(Criteria criteria) {
-        oredCriteria.add(criteria);
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public Criteria or() {
-        Criteria criteria = createCriteriaInternal();
-        oredCriteria.add(criteria);
-        return criteria;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public Criteria createCriteria() {
-        Criteria criteria = createCriteriaInternal();
-        if (oredCriteria.size() == 0) {
-            oredCriteria.add(criteria);
-        }
-        return criteria;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    protected Criteria createCriteriaInternal() {
-        Criteria criteria = new Criteria();
-        return criteria;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public void clear() {
-        oredCriteria.clear();
-        orderByClause = null;
-        distinct = false;
-    }
-
-    /**
-     * This class was generated by MyBatis Generator.
-     * This class corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    protected abstract static class GeneratedCriteria {
-        protected List<Criterion> criteria;
-
-        protected GeneratedCriteria() {
-            super();
-            criteria = new ArrayList<Criterion>();
-        }
-
-        public boolean isValid() {
-            return criteria.size() > 0;
-        }
-
-        public List<Criterion> getAllCriteria() {
-            return criteria;
-        }
-
-        public List<Criterion> getCriteria() {
-            return criteria;
-        }
-
-        protected void addCriterion(String condition) {
-            if (condition == null) {
-                throw new RuntimeException("Value for condition cannot be null");
-            }
-            criteria.add(new Criterion(condition));
-        }
-
-        protected void addCriterion(String condition, Object value, String property) {
-            if (value == null) {
-                throw new RuntimeException("Value for " + property + " cannot be null");
-            }
-            criteria.add(new Criterion(condition, value));
-        }
-
-        protected void addCriterion(String condition, Object value1, Object value2, String property) {
-            if (value1 == null || value2 == null) {
-                throw new RuntimeException("Between values for " + property + " cannot be null");
-            }
-            criteria.add(new Criterion(condition, value1, value2));
-        }
-
-        public Criteria andIdIsNull() {
-            addCriterion("id is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andIdIsNotNull() {
-            addCriterion("id is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andIdEqualTo(String value) {
-            addCriterion("id =", value, "id");
-            return (Criteria) this;
-        }
-
-        public Criteria andIdNotEqualTo(String value) {
-            addCriterion("id <>", value, "id");
-            return (Criteria) this;
-        }
-
-        public Criteria andIdGreaterThan(String value) {
-            addCriterion("id >", value, "id");
-            return (Criteria) this;
-        }
-
-        public Criteria andIdGreaterThanOrEqualTo(String value) {
-            addCriterion("id >=", value, "id");
-            return (Criteria) this;
-        }
-
-        public Criteria andIdLessThan(String value) {
-            addCriterion("id <", value, "id");
-            return (Criteria) this;
-        }
-
-        public Criteria andIdLessThanOrEqualTo(String value) {
-            addCriterion("id <=", value, "id");
-            return (Criteria) this;
-        }
-
-        public Criteria andIdLike(String value) {
-            addCriterion("id like", value, "id");
-            return (Criteria) this;
-        }
-
-        public Criteria andIdNotLike(String value) {
-            addCriterion("id not like", value, "id");
-            return (Criteria) this;
-        }
-
-        public Criteria andIdIn(List<String> values) {
-            addCriterion("id in", values, "id");
-            return (Criteria) this;
-        }
-
-        public Criteria andIdNotIn(List<String> values) {
-            addCriterion("id not in", values, "id");
-            return (Criteria) this;
-        }
-
-        public Criteria andIdBetween(String value1, String value2) {
-            addCriterion("id between", value1, value2, "id");
-            return (Criteria) this;
-        }
-
-        public Criteria andIdNotBetween(String value1, String value2) {
-            addCriterion("id not between", value1, value2, "id");
-            return (Criteria) this;
-        }
-
-        public Criteria andProductIdIsNull() {
-            addCriterion("product_id is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andProductIdIsNotNull() {
-            addCriterion("product_id is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andProductIdEqualTo(String value) {
-            addCriterion("product_id =", value, "productId");
-            return (Criteria) this;
-        }
-
-        public Criteria andProductIdNotEqualTo(String value) {
-            addCriterion("product_id <>", value, "productId");
-            return (Criteria) this;
-        }
-
-        public Criteria andProductIdGreaterThan(String value) {
-            addCriterion("product_id >", value, "productId");
-            return (Criteria) this;
-        }
-
-        public Criteria andProductIdGreaterThanOrEqualTo(String value) {
-            addCriterion("product_id >=", value, "productId");
-            return (Criteria) this;
-        }
-
-        public Criteria andProductIdLessThan(String value) {
-            addCriterion("product_id <", value, "productId");
-            return (Criteria) this;
-        }
-
-        public Criteria andProductIdLessThanOrEqualTo(String value) {
-            addCriterion("product_id <=", value, "productId");
-            return (Criteria) this;
-        }
-
-        public Criteria andProductIdLike(String value) {
-            addCriterion("product_id like", value, "productId");
-            return (Criteria) this;
-        }
-
-        public Criteria andProductIdNotLike(String value) {
-            addCriterion("product_id not like", value, "productId");
-            return (Criteria) this;
-        }
-
-        public Criteria andProductIdIn(List<String> values) {
-            addCriterion("product_id in", values, "productId");
-            return (Criteria) this;
-        }
-
-        public Criteria andProductIdNotIn(List<String> values) {
-            addCriterion("product_id not in", values, "productId");
-            return (Criteria) this;
-        }
-
-        public Criteria andProductIdBetween(String value1, String value2) {
-            addCriterion("product_id between", value1, value2, "productId");
-            return (Criteria) this;
-        }
-
-        public Criteria andProductIdNotBetween(String value1, String value2) {
-            addCriterion("product_id not between", value1, value2, "productId");
-            return (Criteria) this;
-        }
-
-        public Criteria andShowPageIsNull() {
-            addCriterion("show_page is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andShowPageIsNotNull() {
-            addCriterion("show_page is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andShowPageEqualTo(String value) {
-            addCriterion("show_page =", value, "showPage");
-            return (Criteria) this;
-        }
-
-        public Criteria andShowPageNotEqualTo(String value) {
-            addCriterion("show_page <>", value, "showPage");
-            return (Criteria) this;
-        }
-
-        public Criteria andShowPageGreaterThan(String value) {
-            addCriterion("show_page >", value, "showPage");
-            return (Criteria) this;
-        }
-
-        public Criteria andShowPageGreaterThanOrEqualTo(String value) {
-            addCriterion("show_page >=", value, "showPage");
-            return (Criteria) this;
-        }
-
-        public Criteria andShowPageLessThan(String value) {
-            addCriterion("show_page <", value, "showPage");
-            return (Criteria) this;
-        }
-
-        public Criteria andShowPageLessThanOrEqualTo(String value) {
-            addCriterion("show_page <=", value, "showPage");
-            return (Criteria) this;
-        }
-
-        public Criteria andShowPageLike(String value) {
-            addCriterion("show_page like", value, "showPage");
-            return (Criteria) this;
-        }
-
-        public Criteria andShowPageNotLike(String value) {
-            addCriterion("show_page not like", value, "showPage");
-            return (Criteria) this;
-        }
-
-        public Criteria andShowPageIn(List<String> values) {
-            addCriterion("show_page in", values, "showPage");
-            return (Criteria) this;
-        }
-
-        public Criteria andShowPageNotIn(List<String> values) {
-            addCriterion("show_page not in", values, "showPage");
-            return (Criteria) this;
-        }
-
-        public Criteria andShowPageBetween(String value1, String value2) {
-            addCriterion("show_page between", value1, value2, "showPage");
-            return (Criteria) this;
-        }
-
-        public Criteria andShowPageNotBetween(String value1, String value2) {
-            addCriterion("show_page not between", value1, value2, "showPage");
-            return (Criteria) this;
-        }
-
-        public Criteria andCoverImgIsNull() {
-            addCriterion("cover_img is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCoverImgIsNotNull() {
-            addCriterion("cover_img is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCoverImgEqualTo(String value) {
-            addCriterion("cover_img =", value, "coverImg");
-            return (Criteria) this;
-        }
-
-        public Criteria andCoverImgNotEqualTo(String value) {
-            addCriterion("cover_img <>", value, "coverImg");
-            return (Criteria) this;
-        }
-
-        public Criteria andCoverImgGreaterThan(String value) {
-            addCriterion("cover_img >", value, "coverImg");
-            return (Criteria) this;
-        }
-
-        public Criteria andCoverImgGreaterThanOrEqualTo(String value) {
-            addCriterion("cover_img >=", value, "coverImg");
-            return (Criteria) this;
-        }
-
-        public Criteria andCoverImgLessThan(String value) {
-            addCriterion("cover_img <", value, "coverImg");
-            return (Criteria) this;
-        }
-
-        public Criteria andCoverImgLessThanOrEqualTo(String value) {
-            addCriterion("cover_img <=", value, "coverImg");
-            return (Criteria) this;
-        }
-
-        public Criteria andCoverImgLike(String value) {
-            addCriterion("cover_img like", value, "coverImg");
-            return (Criteria) this;
-        }
-
-        public Criteria andCoverImgNotLike(String value) {
-            addCriterion("cover_img not like", value, "coverImg");
-            return (Criteria) this;
-        }
-
-        public Criteria andCoverImgIn(List<String> values) {
-            addCriterion("cover_img in", values, "coverImg");
-            return (Criteria) this;
-        }
-
-        public Criteria andCoverImgNotIn(List<String> values) {
-            addCriterion("cover_img not in", values, "coverImg");
-            return (Criteria) this;
-        }
-
-        public Criteria andCoverImgBetween(String value1, String value2) {
-            addCriterion("cover_img between", value1, value2, "coverImg");
-            return (Criteria) this;
-        }
-
-        public Criteria andCoverImgNotBetween(String value1, String value2) {
-            addCriterion("cover_img not between", value1, value2, "coverImg");
-            return (Criteria) this;
-        }
-
-        public Criteria andStartDateIsNull() {
-            addCriterion("start_date is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andStartDateIsNotNull() {
-            addCriterion("start_date is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andStartDateEqualTo(Date value) {
-            addCriterion("start_date =", value, "startDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andStartDateNotEqualTo(Date value) {
-            addCriterion("start_date <>", value, "startDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andStartDateGreaterThan(Date value) {
-            addCriterion("start_date >", value, "startDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andStartDateGreaterThanOrEqualTo(Date value) {
-            addCriterion("start_date >=", value, "startDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andStartDateLessThan(Date value) {
-            addCriterion("start_date <", value, "startDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andStartDateLessThanOrEqualTo(Date value) {
-            addCriterion("start_date <=", value, "startDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andStartDateIn(List<Date> values) {
-            addCriterion("start_date in", values, "startDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andStartDateNotIn(List<Date> values) {
-            addCriterion("start_date not in", values, "startDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andStartDateBetween(Date value1, Date value2) {
-            addCriterion("start_date between", value1, value2, "startDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andStartDateNotBetween(Date value1, Date value2) {
-            addCriterion("start_date not between", value1, value2, "startDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andEndDateIsNull() {
-            addCriterion("end_date is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andEndDateIsNotNull() {
-            addCriterion("end_date is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andEndDateEqualTo(Date value) {
-            addCriterion("end_date =", value, "endDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andEndDateNotEqualTo(Date value) {
-            addCriterion("end_date <>", value, "endDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andEndDateGreaterThan(Date value) {
-            addCriterion("end_date >", value, "endDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andEndDateGreaterThanOrEqualTo(Date value) {
-            addCriterion("end_date >=", value, "endDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andEndDateLessThan(Date value) {
-            addCriterion("end_date <", value, "endDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andEndDateLessThanOrEqualTo(Date value) {
-            addCriterion("end_date <=", value, "endDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andEndDateIn(List<Date> values) {
-            addCriterion("end_date in", values, "endDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andEndDateNotIn(List<Date> values) {
-            addCriterion("end_date not in", values, "endDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andEndDateBetween(Date value1, Date value2) {
-            addCriterion("end_date between", value1, value2, "endDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andEndDateNotBetween(Date value1, Date value2) {
-            addCriterion("end_date not between", value1, value2, "endDate");
-            return (Criteria) this;
-        }
-
-        public Criteria andCategoryIsNull() {
-            addCriterion("category is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCategoryIsNotNull() {
-            addCriterion("category is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andCategoryEqualTo(Integer value) {
-            addCriterion("category =", value, "category");
-            return (Criteria) this;
-        }
-
-        public Criteria andCategoryNotEqualTo(Integer value) {
-            addCriterion("category <>", value, "category");
-            return (Criteria) this;
-        }
-
-        public Criteria andCategoryGreaterThan(Integer value) {
-            addCriterion("category >", value, "category");
-            return (Criteria) this;
-        }
-
-        public Criteria andCategoryGreaterThanOrEqualTo(Integer value) {
-            addCriterion("category >=", value, "category");
-            return (Criteria) this;
-        }
-
-        public Criteria andCategoryLessThan(Integer value) {
-            addCriterion("category <", value, "category");
-            return (Criteria) this;
-        }
-
-        public Criteria andCategoryLessThanOrEqualTo(Integer value) {
-            addCriterion("category <=", value, "category");
-            return (Criteria) this;
-        }
-
-        public Criteria andCategoryIn(List<Integer> values) {
-            addCriterion("category in", values, "category");
-            return (Criteria) this;
-        }
-
-        public Criteria andCategoryNotIn(List<Integer> values) {
-            addCriterion("category not in", values, "category");
-            return (Criteria) this;
-        }
-
-        public Criteria andCategoryBetween(Integer value1, Integer value2) {
-            addCriterion("category between", value1, value2, "category");
-            return (Criteria) this;
-        }
-
-        public Criteria andCategoryNotBetween(Integer value1, Integer value2) {
-            addCriterion("category not between", value1, value2, "category");
-            return (Criteria) this;
-        }
-
-        public Criteria andEffectiveIsNull() {
-            addCriterion("effective is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andEffectiveIsNotNull() {
-            addCriterion("effective is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andEffectiveEqualTo(Integer value) {
-            addCriterion("effective =", value, "effective");
-            return (Criteria) this;
-        }
-
-        public Criteria andEffectiveNotEqualTo(Integer value) {
-            addCriterion("effective <>", value, "effective");
-            return (Criteria) this;
-        }
-
-        public Criteria andEffectiveGreaterThan(Integer value) {
-            addCriterion("effective >", value, "effective");
-            return (Criteria) this;
-        }
-
-        public Criteria andEffectiveGreaterThanOrEqualTo(Integer value) {
-            addCriterion("effective >=", value, "effective");
-            return (Criteria) this;
-        }
-
-        public Criteria andEffectiveLessThan(Integer value) {
-            addCriterion("effective <", value, "effective");
-            return (Criteria) this;
-        }
-
-        public Criteria andEffectiveLessThanOrEqualTo(Integer value) {
-            addCriterion("effective <=", value, "effective");
-            return (Criteria) this;
-        }
-
-        public Criteria andEffectiveIn(List<Integer> values) {
-            addCriterion("effective in", values, "effective");
-            return (Criteria) this;
-        }
-
-        public Criteria andEffectiveNotIn(List<Integer> values) {
-            addCriterion("effective not in", values, "effective");
-            return (Criteria) this;
-        }
-
-        public Criteria andEffectiveBetween(Integer value1, Integer value2) {
-            addCriterion("effective between", value1, value2, "effective");
-            return (Criteria) this;
-        }
-
-        public Criteria andEffectiveNotBetween(Integer value1, Integer value2) {
-            addCriterion("effective not between", value1, value2, "effective");
-            return (Criteria) this;
-        }
-    }
-
-    /**
-     * This class was generated by MyBatis Generator.
-     * This class corresponds to the database table marketing_management
-     *
-     * @mbg.generated do_not_delete_during_merge Tue Sep 26 14:34:04 CST 2017
-     */
-    public static class Criteria extends GeneratedCriteria {
-
-        protected Criteria() {
-            super();
-        }
-    }
-
-    /**
-     * This class was generated by MyBatis Generator.
-     * This class corresponds to the database table marketing_management
-     *
-     * @mbg.generated Tue Sep 26 14:34:04 CST 2017
-     */
-    public static class Criterion {
-        private String condition;
-
-        private Object value;
-
-        private Object secondValue;
-
-        private boolean noValue;
-
-        private boolean singleValue;
-
-        private boolean betweenValue;
-
-        private boolean listValue;
-
-        private String typeHandler;
-
-        public String getCondition() {
-            return condition;
-        }
-
-        public Object getValue() {
-            return value;
-        }
-
-        public Object getSecondValue() {
-            return secondValue;
-        }
-
-        public boolean isNoValue() {
-            return noValue;
-        }
-
-        public boolean isSingleValue() {
-            return singleValue;
-        }
-
-        public boolean isBetweenValue() {
-            return betweenValue;
-        }
-
-        public boolean isListValue() {
-            return listValue;
-        }
-
-        public String getTypeHandler() {
-            return typeHandler;
-        }
-
-        protected Criterion(String condition) {
-            super();
-            this.condition = condition;
-            this.typeHandler = null;
-            this.noValue = true;
-        }
-
-        protected Criterion(String condition, Object value, String typeHandler) {
-            super();
-            this.condition = condition;
-            this.value = value;
-            this.typeHandler = typeHandler;
-            if (value instanceof List<?>) {
-                this.listValue = true;
-            } else {
-                this.singleValue = true;
-            }
-        }
-
-        protected Criterion(String condition, Object value) {
-            this(condition, value, null);
-        }
-
-        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
-            super();
-            this.condition = condition;
-            this.value = value;
-            this.secondValue = secondValue;
-            this.typeHandler = typeHandler;
-            this.betweenValue = true;
-        }
-
-        protected Criterion(String condition, Object value, Object secondValue) {
-            this(condition, value, secondValue, null);
-        }
-    }
-}

+ 2 - 61
src/main/java/com/goafanti/demand/controller/AdminDemandApiController.java

@@ -38,7 +38,6 @@ import com.goafanti.common.model.DemandFollow;
 import com.goafanti.common.model.DemandFollowDetail;
 
 import com.goafanti.common.model.DemandPublish;
-import com.goafanti.common.model.MarketingManagement;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.shiro.token.TokenManager;
@@ -48,7 +47,6 @@ import com.goafanti.demand.service.DemandFollowService;
 import com.goafanti.demand.service.DemandPublishPageService;
 import com.goafanti.demand.service.DemandPublishService;
 import com.goafanti.demand.service.DemandService;
-import com.goafanti.marketing.service.MarketingManagementService;
 import com.goafanti.user.service.UserService;
 
 @RestController
@@ -62,8 +60,6 @@ public class AdminDemandApiController extends CertifyApiController {
 	private AttachmentService		aftFileService;
 	
 	@Resource
-    private MarketingManagementService marketingManagementService;
-	@Resource
 	DemandPublishService	demandPublishService;
 	@Resource
 	DemandFollowService		demandFollowService;
@@ -272,25 +268,7 @@ public class AdminDemandApiController extends CertifyApiController {
 		if (null==demand.getUrgentMoney()) {
 			d.setUrgentMoney(demand.getUrgentMoney());
 		}
-			
-		
 		demandService.saveUserDemand(d, validityPeriodFormattedDate, keywords);
-		if (null != hot && hot == 1) { // 属于营销活动
-			int marketHisCount = marketingManagementService.getMarketingCount(MarketingPage.mainDemand.getPageUrl(),
-					MarketingPage.mainDemand.getBoothType(), 1);
-			if (marketHisCount >= MarketingPage.mainDemand.getBoothSize()) { // 展位已满
-				res.getError().add(buildError(ErrorConstants.MARKET_BOOTH_MAX, "",marketHisCount));
-				return res;
-			} else { // 保存营销记录
-				MarketingManagement mm = new MarketingManagement();
-				mm.setShowPage(MarketingPage.mainDemand.getPageUrl()); // 营销页面
-				mm.setCategory(MarketingPage.mainDemand.getBoothType()); // 营销分类
-				if (StringUtils.isNotBlank(coverImg)) mm.setCoverImg(coverImg);
-				mm.setProductId(d.getId());
-				mm.setEffective(1);
-				marketingManagementService.save(mm);
-			}
-		}
 		return res;
 	}
 
@@ -445,44 +423,7 @@ public class AdminDemandApiController extends CertifyApiController {
 			d.setUrgentMoney(demand.getUrgentMoney());
 		}
 		res.setData(demandService.updateUserDemand(d, validityPeriodFormattedDate, keywords, switchSign));
-		// 更新营销活动
-		MarketingManagement mm = marketingManagementService.selectMarket(MarketingPage.mainDemand.getPageUrl(),
-				MarketingPage.mainDemand.getBoothType(), d.getId());
-		if (null != mm) {
-			if(mm.getEffective() == 1){
-				if (null != coverImg) mm.setCoverImg(coverImg);
-				if (null != hot) mm.setEffective(hot);
-				marketingManagementService.update(mm);
-			}else if(mm.getEffective() == 0){
-				int marketHisCount = marketingManagementService.getMarketingCount(
-						MarketingPage.mainDemand.getPageUrl(), MarketingPage.mainDemand.getBoothType(), 1);
-				if (marketHisCount >= MarketingPage.mainDemand.getBoothSize()) { // 展位已满
-					res.getError().add(buildError(ErrorConstants.MARKET_BOOTH_MAX,"", marketHisCount));
-					return res;
-				}else{
-					if (null != hot) mm.setEffective(hot);
-					if (null != coverImg) mm.setCoverImg(coverImg);
-					marketingManagementService.update(mm);
-				}
-			}
-		} else {
-			if (null != hot && hot == 1) { // 属于营销活动
-				int marketHisCount = marketingManagementService.getMarketingCount(
-						MarketingPage.mainDemand.getPageUrl(), MarketingPage.mainDemand.getBoothType(), 1);
-				if (marketHisCount >= MarketingPage.mainDemand.getBoothSize()) { // 展位已满
-					res.getError().add(buildError(ErrorConstants.MARKET_BOOTH_MAX,"", marketHisCount));
-					return res;
-				} else { // 保存营销记录
-					mm = new MarketingManagement();
-					mm.setShowPage(MarketingPage.mainDemand.getPageUrl()); // 营销页面
-					mm.setCategory(MarketingPage.mainDemand.getBoothType()); // 营销分类
-					if (StringUtils.isNotBlank(coverImg)) mm.setCoverImg(coverImg);
-					mm.setProductId(d.getId());
-					mm.setEffective(1);
-					marketingManagementService.save(mm);
-				}
-			}
-		}		
+				
 		return res;
 	}
 
@@ -540,7 +481,7 @@ public class AdminDemandApiController extends CertifyApiController {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", ""));
 		} else {
 			
-			marketingManagementService.deleteByProductId(Arrays.asList(ids));
+			//marketingManagementService.deleteByProductId(Arrays.asList(ids));
 			res.setData(demandService.deleteByPrimaryKey(Arrays.asList(ids)));
 		}
 		return res;

+ 0 - 127
src/main/java/com/goafanti/marketing/bo/MarketingManagementBo.java

@@ -1,127 +0,0 @@
-package com.goafanti.marketing.bo;
-
-import com.goafanti.common.model.MarketingManagement;
-
-public class MarketingManagementBo extends MarketingManagement{
-	private String name; /** 名字 **/
-	private String summary; /** 简介 **/
-	private String ownerType; /** 用户类型 **/
-	private String problemDes;/** 问题说明 **/
-	private String fieldA;
-	private String fieldB;
-	private String urgentDays;
-	private String urgentMoney;
-	private String workUnit;
-	private String professionalTitle;
-	private String abilityLabel;/** 领域 **/
-	private String username;/** 智者名字 **/
-	private String introduction;/** 简介 **/
-	private String headPortraitUrl;/** 头像地址 **/
-	private String id;/** 智者ID **/
-	private String type;/** 个人,单位 **/
-	private Integer reservationCount;/**预约次数**/
-	
-	public String getName() {
-		return name;
-	}
-	public String getFieldA() {
-		return fieldA;
-	}
-	public void setFieldA(String fieldA) {
-		this.fieldA = fieldA;
-	}
-	public String getFieldB() {
-		return fieldB;
-	}
-	public void setFieldB(String fieldB) {
-		this.fieldB = fieldB;
-	}
-	public String getUrgentDays() {
-		return urgentDays;
-	}
-	public void setUrgentDays(String urgentDays) {
-		this.urgentDays = urgentDays;
-	}
-	public String getUrgentMoney() {
-		return urgentMoney;
-	}
-	public void setUrgentMoney(String urgentMoney) {
-		this.urgentMoney = urgentMoney;
-	}
-	public String getType() {
-		return type;
-	}
-	public void setType(String type) {
-		this.type = type;
-	}
-	public String getId() {
-		return id;
-	}
-	public void setId(String id) {
-		this.id = id;
-	}
-	public String getAbilityLabel() {
-		return abilityLabel;
-	}
-	public void setAbilityLabel(String abilityLabel) {
-		this.abilityLabel = abilityLabel;
-	}
-	public String getUsername() {
-		return username;
-	}
-	public void setUsername(String username) {
-		this.username = username;
-	}
-	public String getIntroduction() {
-		return introduction;
-	}
-	public void setIntroduction(String introduction) {
-		this.introduction = introduction;
-	}
-	public String getHeadPortraitUrl() {
-		return headPortraitUrl;
-	}
-	public void setHeadPortraitUrl(String headPortraitUrl) {
-		this.headPortraitUrl = headPortraitUrl;
-	}
-	public String getProblemDes() {
-		return problemDes;
-	}
-	public void setProblemDes(String problemDes) {
-		this.problemDes = problemDes;
-	}
-	public void setName(String name) {
-		this.name = name;
-	}
-	public String getSummary() {
-		return summary;
-	}
-	public void setSummary(String summary) {
-		this.summary = summary;
-	}
-	public String getOwnerType() {
-		return ownerType;
-	}
-	public void setOwnerType(String ownerType) {
-		this.ownerType = ownerType;
-	}
-	public Integer getReservationCount() {
-		if(reservationCount!=null)return 20;
-		return reservationCount+20;
-	}
-	public void setReservationCount(Integer reservationCount) {
-		this.reservationCount = reservationCount;
-	}
-	public String getWorkUnit() {
-		return workUnit;
-	}
-	public void setWorkUnit(String workUnit) {
-		this.workUnit = workUnit;
-	}
-	public String getProfessionalTitle() {
-		return professionalTitle;
-	}
-	public void setProfessionalTitle(String professionalTitle) {
-		this.professionalTitle = professionalTitle;
-	}
-}

+ 0 - 63
src/main/java/com/goafanti/marketing/service/MarketingManagementService.java

@@ -1,63 +0,0 @@
-package com.goafanti.marketing.service;
-
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.http.HttpRequest;
-
-import com.goafanti.common.model.BusinessProject;
-import com.goafanti.common.model.MarketingManagement;
-import com.goafanti.marketing.bo.MarketingManagementBo;
-
-public interface MarketingManagementService {
-	/**
-	 * 
-	 * @param mm 保存营销活动
-	 */
-	public void save(MarketingManagement mm);
-	
-	/**
-	 * 
-	 * @param mm 更新营销活动
-	 */
-	public void update(MarketingManagement mm);
-	
-	/**
-	 * 
-	 * @param showPage 页面地址
-	 * @param category 营销类型  
-	 * @return
-	 */
-	public Integer getMarketingCount(String showPage,Integer category,Integer effective);
-
-	/**
-	 * 
-	 * @param showPage 页面地址
-	 * @param category 分类
-	 * @param productId 产品编号
-	 * @return
-	 */
-	public MarketingManagement selectMarket(String showPage,Integer category,String productId);
-	
-	/**
-	 * 取消营销活动
-	 * @param productIds
-	 */
-	public void deleteByProductId(List<String> productIds);
-	
-	/**
-	 * 查询营销活动
-	 * @param showPage 页面
-	 * @param category 分类
-	 * @return
-	 */
-	public List<MarketingManagementBo> selectMarketList(HttpServletRequest res,Integer category,Integer boothSize);
-	
-	/**
-	 * 查询营销活动
-	 * @param pSize 页面显示数
-	 * @return
-	 */
-	List<BusinessProject> selectHotProject(Integer pSize);
-}

+ 0 - 64
src/main/java/com/goafanti/marketing/service/impl/MarketingManagementServiceImpl.java

@@ -1,64 +0,0 @@
-package com.goafanti.marketing.service.impl;
-
-import java.util.List;
-import java.util.UUID;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.http.HttpRequest;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import com.goafanti.common.dao.MarketingManagementMapper;
-import com.goafanti.common.model.BusinessProject;
-import com.goafanti.common.model.MarketingManagement;
-import com.goafanti.marketing.bo.MarketingManagementBo;
-import com.goafanti.marketing.service.MarketingManagementService;
-
-@Service
-public class MarketingManagementServiceImpl implements MarketingManagementService {
-	@Autowired
-	MarketingManagementMapper marketingManagementMapper;
-	@Override
-	public void save(MarketingManagement mm) {
-		mm.setId(UUID.randomUUID().toString());
-		marketingManagementMapper.insert(mm);
-	}
-
-	@Override
-	public void update(MarketingManagement mmb) {
-		marketingManagementMapper.updateByPrimaryKeySelective(mmb);
-	}
-
-	@Override
-	public Integer getMarketingCount(String showPage, Integer category, Integer effective) {
-		return marketingManagementMapper.getMarketingCount(showPage, category, effective);
-	}
-
-	@Override
-	public MarketingManagement selectMarket(String showPage, Integer category, String productId) {
-		return marketingManagementMapper.selectMarket(showPage, category, productId);
-	}
-
-	@Override
-	public void deleteByProductId(List<String> productIds) {
-		marketingManagementMapper.deleteByProductId(productIds);
-	}
-
-	@Override
-	public List<MarketingManagementBo> selectMarketList(HttpServletRequest res,Integer category,Integer boothSize) {
-		String url=res.getServerName();
-		url=url.substring(url.indexOf(".")+1, url.length());
-		if (url.equals("localhost")||url.equals("168.1.101")) {
-			url="jishutao.com";
-		}
-		return marketingManagementMapper.selectMarketList(url,category,boothSize);
-	}
-	
-	@Override
-	public List<BusinessProject> selectHotProject(Integer pSize) {
-		
-		return marketingManagementMapper.selectHotProject(pSize);
-	}
-	
-}