Showing
1 changed file
with
11 additions
and
1 deletions
@@ -6,6 +6,7 @@ import com.yohobuy.platform.cms.service.IGrassFindgoodsService; | @@ -6,6 +6,7 @@ import com.yohobuy.platform.cms.service.IGrassFindgoodsService; | ||
6 | import com.yohobuy.platform.dal.cms.IGrassFindGoodsDAO; | 6 | import com.yohobuy.platform.dal.cms.IGrassFindGoodsDAO; |
7 | import com.yohobuy.platform.dal.cms.model.GrassFindGoods; | 7 | import com.yohobuy.platform.dal.cms.model.GrassFindGoods; |
8 | import com.yohobuy.platform.dal.cms.req.GrassFindgoodsReq; | 8 | import com.yohobuy.platform.dal.cms.req.GrassFindgoodsReq; |
9 | +import com.yohobuy.platform.dal.grass.IGrassArticleDao; | ||
9 | import com.yohobuy.platform.grass.service.IGrassArticleService; | 10 | import com.yohobuy.platform.grass.service.IGrassArticleService; |
10 | import com.yohobuy.platform.model.cms.response.GrassFindgoodsRspBO; | 11 | import com.yohobuy.platform.model.cms.response.GrassFindgoodsRspBO; |
11 | import com.yohobuy.platform.model.common.PageResponseVO; | 12 | import com.yohobuy.platform.model.common.PageResponseVO; |
@@ -32,6 +33,9 @@ public class GrassFindgoodsServiceImpl implements IGrassFindgoodsService { | @@ -32,6 +33,9 @@ public class GrassFindgoodsServiceImpl implements IGrassFindgoodsService { | ||
32 | @Resource | 33 | @Resource |
33 | IGrassFindGoodsDAO grassFindGoodsDAO; | 34 | IGrassFindGoodsDAO grassFindGoodsDAO; |
34 | 35 | ||
36 | + @Resource | ||
37 | + IGrassArticleDao grassArticleDao; | ||
38 | + | ||
35 | 39 | ||
36 | @Override | 40 | @Override |
37 | public PageResponseVO<GrassFindgoodsRspBO> getGrassFindgoodsList(GrassFindgoodsReq req) { | 41 | public PageResponseVO<GrassFindgoodsRspBO> getGrassFindgoodsList(GrassFindgoodsReq req) { |
@@ -70,7 +74,7 @@ public class GrassFindgoodsServiceImpl implements IGrassFindgoodsService { | @@ -70,7 +74,7 @@ public class GrassFindgoodsServiceImpl implements IGrassFindgoodsService { | ||
70 | } | 74 | } |
71 | 75 | ||
72 | rsp.setList(grassArticleService.buildFindgoodsRsp(grassFindGoodsList)); | 76 | rsp.setList(grassArticleService.buildFindgoodsRsp(grassFindGoodsList)); |
73 | - rsp.setTotal(grassArticleService.buildFindgoodsRsp(grassFindGoodsList).size()); | 77 | + rsp.setTotal(grassFindGoodsList.size()); |
74 | rsp.setSize(size); | 78 | rsp.setSize(size); |
75 | rsp.setPage(page); | 79 | rsp.setPage(page); |
76 | logger.info("out getArticleList ,page is {}", page); | 80 | logger.info("out getArticleList ,page is {}", page); |
@@ -83,7 +87,13 @@ public class GrassFindgoodsServiceImpl implements IGrassFindgoodsService { | @@ -83,7 +87,13 @@ public class GrassFindgoodsServiceImpl implements IGrassFindgoodsService { | ||
83 | return; | 87 | return; |
84 | } | 88 | } |
85 | logger.info("enter deleteFindgoods, id is {}", id); | 89 | logger.info("enter deleteFindgoods, id is {}", id); |
90 | + GrassFindGoods findGoods = grassFindGoodsDAO.selectByPrimaryKey(id); | ||
91 | + if(findGoods != null){ | ||
86 | grassFindGoodsDAO.deleteById(id); | 92 | grassFindGoodsDAO.deleteById(id); |
93 | + grassArticleDao.updateMarkFlag(findGoods.getArticleId(),null,null,0); | ||
94 | + grassArticleDao.selectByPrimaryKey(findGoods.getArticleId()); | ||
95 | + } | ||
96 | + | ||
87 | } | 97 | } |
88 | 98 | ||
89 | @Override | 99 | @Override |
-
Please register or login to post a comment