Authored by liangyi.chen@yoho.cn

页面优化

... ... @@ -6,6 +6,7 @@ import com.yohobuy.platform.cms.service.IGrassFindgoodsService;
import com.yohobuy.platform.dal.cms.IGrassFindGoodsDAO;
import com.yohobuy.platform.dal.cms.model.GrassFindGoods;
import com.yohobuy.platform.dal.cms.req.GrassFindgoodsReq;
import com.yohobuy.platform.dal.grass.IGrassArticleDao;
import com.yohobuy.platform.grass.service.IGrassArticleService;
import com.yohobuy.platform.model.cms.response.GrassFindgoodsRspBO;
import com.yohobuy.platform.model.common.PageResponseVO;
... ... @@ -32,6 +33,9 @@ public class GrassFindgoodsServiceImpl implements IGrassFindgoodsService {
@Resource
IGrassFindGoodsDAO grassFindGoodsDAO;
@Resource
IGrassArticleDao grassArticleDao;
@Override
public PageResponseVO<GrassFindgoodsRspBO> getGrassFindgoodsList(GrassFindgoodsReq req) {
... ... @@ -70,7 +74,7 @@ public class GrassFindgoodsServiceImpl implements IGrassFindgoodsService {
}
rsp.setList(grassArticleService.buildFindgoodsRsp(grassFindGoodsList));
rsp.setTotal(grassArticleService.buildFindgoodsRsp(grassFindGoodsList).size());
rsp.setTotal(grassFindGoodsList.size());
rsp.setSize(size);
rsp.setPage(page);
logger.info("out getArticleList ,page is {}", page);
... ... @@ -83,7 +87,13 @@ public class GrassFindgoodsServiceImpl implements IGrassFindgoodsService {
return;
}
logger.info("enter deleteFindgoods, id is {}", id);
grassFindGoodsDAO.deleteById(id);
GrassFindGoods findGoods = grassFindGoodsDAO.selectByPrimaryKey(id);
if(findGoods != null){
grassFindGoodsDAO.deleteById(id);
grassArticleDao.updateMarkFlag(findGoods.getArticleId(),null,null,0);
grassArticleDao.selectByPrimaryKey(findGoods.getArticleId());
}
}
@Override
... ...