Explorar o código

轮播图详情

anderx %!s(int64=7) %!d(string=hai) anos
pai
achega
7a2e008e36

+ 11 - 0
src/main/java/com/goafanti/banners/controller/AdminBannersApiController.java

@@ -110,6 +110,17 @@ public class AdminBannersApiController extends BaseApiController {
 		return result;
 	}
 	/**
+	 * 轮播图详情
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value="/details" ,method=RequestMethod.GET)
+	public Result details(String  id){
+		Result result=new Result();
+		result.setData(bannersService.selectByPrimaryKey(id));
+		return result;
+	}
+	/**
 	 * 修改轮播图
 	 * @param b
 	 * @return

+ 3 - 0
src/main/java/com/goafanti/banners/service/BannersService.java

@@ -41,6 +41,9 @@ public class BannersService extends BaseMybatisDao<BannersMapper> {
 	public int deleteBanner(String id) {
 		return bannersMapper.deleteByPrimaryKey(id);
 	}
+	public Banners selectByPrimaryKey(String id) {
+		return bannersMapper.selectByPrimaryKey(id);
+	}
 
 	public List<Banners> findAdminBannersList(String apiUrl,Integer client,Integer pageSize,Integer pageNo) {
 		return portalBanners(apiUrl, client, pageNo, pageSize);