Browse Source

BUG修复

Michael_9527 8 years ago
parent
commit
3b2607793e

+ 0 - 49
src/main/java/com/goafanti/admin/controller/AdminBusinessApiController.java

@@ -1,49 +0,0 @@
-package com.goafanti.admin.controller;
-
-import javax.annotation.Resource;
-
-import org.junit.runner.Request;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.goafanti.admin.service.BusinessService;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.controller.CertifyApiController;
-import com.goafanti.common.utils.StringUtils;
-
-@RestController
-@RequestMapping(value="/api/admin/business")
-public class AdminBusinessApiController extends CertifyApiController{
-	@Resource
-	private BusinessService businessService; 
-	/**
-	 * 品种列表
-	 * @return
-	 */
-	@RequestMapping(value="/list" , method=RequestMethod.GET)
-	private Result varietiesList(String cname,Integer super_id,Integer layer,
-								Integer status,String pageNo,
-					            String pageSize,Integer hot) {
-		Result res=new Result();
-		Integer pNo=1;
-		Integer pSize=10;
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize= Integer.parseInt(pageSize);
-		}
-		if(StringUtils.isNumeric(pageNo)) {
-			pNo=Integer.parseInt(pageNo);
-		}
-		res.setData(businessService.listBusiness(cname,super_id,layer,status,pNo,pSize,hot));
-		return res;
-		
-	}
-	/**
-	 * 品种名列表
-	 * @return
-	 */
-	@RequestMapping(value="/namelist",method=RequestMethod.GET)
-	private Result varietiesNamelist(String cname) {
-		return null;
-	}
-}

+ 0 - 57
src/main/java/com/goafanti/admin/service/impl/BusinessServiceImpl.java

@@ -1,57 +0,0 @@
-package com.goafanti.admin.service.impl;
-
-import java.util.HashMap;
-
-import java.util.Map;
-
-import org.springframework.stereotype.Service;
-
-
-import com.goafanti.admin.bo.BusinessBo;
-import com.goafanti.core.mybatis.BaseMybatisDao;
-import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.admin.service.BusinessService;
-import com.goafanti.common.dao.AchievementMapper;
-@Service
-public class BusinessServiceImpl extends BaseMybatisDao<AchievementMapper> implements BusinessService {
-
-	@SuppressWarnings("unchecked")
-	@Override
-	public Pagination<BusinessBo> listBusiness(String cname, Integer super_id, Integer layer, Integer status, Integer pNo,
-			Integer pSize,Integer hot) {
-		Map<String, Object> params=disposeParams(cname,super_id,layer,status,hot);
-		if (pNo == null || pNo < 0) {
-			pNo = 1;
-		}
-
-		if (pSize == null || pSize < 0 || pSize > 10) {
-			pSize = 10;
-		}
-		return (Pagination<BusinessBo>) findPage("findBusinessVarietiesListByPage",
-				"findBusinessVarietiesCount",params,
-				pNo, pSize);
-	};
-	
-
-	private Map<String, Object> disposeParams(String cname, Integer super_id, Integer layer, Integer status,Integer hot) {
-		Map<String, Object> params = new HashMap<>();
-		if (null!=cname) {
-			params.put("cname", cname);
-		}
-		if (null!=super_id) {
-			params.put("super_id", super_id);
-		}
-		if (null!=layer) {
-			params.put("layer", layer);
-		}
-		if (null!=status) {
-			params.put("status", status);
-		}
-		if (null!=hot) {
-			params.put("hot", hot);
-		}
-		return params;
-	}
-
-
-}

+ 0 - 45
src/main/java/com/goafanti/common/mapper/AchievementMapper.xml

@@ -1649,50 +1649,5 @@
         </if>
   	    order by a.release_date desc limit 0,4
   </select>
-  <select id="findBusinessVarietiesListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.BusinessBo">
-  	select 
-  		b.id,b.create_id,b.create_time,b.update_time,b.delete_sign,b.cid,
-  		b.cname,b.super_id,b.super_id,b.layer,b.status,b2.cname
-  	from  business_varieties b
-  	LEFT JOIN business_varieties b2 on b.super_id = b2.id
-  	where b.deleted_sign= 1	
-  	<if test="cname != null">
-  		and  b.cname= #{cname,jdbcType=VARCHAR}
-  	</if>
-  	<if test="super_id != null">
-  		and  b.super_id= #{super_id,jdbcType=INTEGER}
-  	</if>
-  	<if test="layer != null">
-  		and  layer= #{layer,jdbcType=VARCHAR}
-  	</if>
-  	<if test="status != null">
-  		and  status= #{status,jdbcType=VARCHAR}
-  	</if>
-	order by b.id desc
-	<if test="page_sql!=null">
-			${page_sql}
-	</if>
-  </select>
-  
-    <select id="findBusinessVarietiesListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.BusinessBo">
-  	select 
-  		count(distinct(c.id))
-  	from  business_varieties b
-  	LEFT JOIN business_varieties b2 on b.super_id = b2.id
-  	where b.deleted_sign= 1	
-  	<if test="cname != null">
-  		and  b.cname= #{cname,jdbcType=VARCHAR}
-  	</if>
-  	<if test="super_id != null">
-  		and  b.super_id= #{super_id,jdbcType=INTEGER}
-  	</if>
-  	<if test="layer != null">
-  		and  layer= #{layer,jdbcType=VARCHAR}
-  	</if>
-  	<if test="status != null">
-  		and  status= #{status,jdbcType=VARCHAR}
-  	</if>
-	
-  </select>
   
 </mapper>