|
|
@ -96,16 +96,7 @@ public class ActBannerServiceImpl extends BaseServiceImpl<ActBannerDao, ActBanne |
|
|
|
@Override |
|
|
|
public ActBannerDTO get(String id) { |
|
|
|
ActBannerEntity entity = baseDao.selectById(id); |
|
|
|
ActBannerDTO dto = ConvertUtils.sourceToTarget(entity, ActBannerDTO.class); |
|
|
|
// 浏览数+1
|
|
|
|
if (null != entity) { |
|
|
|
int browseNum = null == entity.getBrowseNum() ? 1:entity.getBrowseNum()+1; |
|
|
|
ActBannerEntity bannerEntity = new ActBannerEntity(); |
|
|
|
bannerEntity.setActId(id); |
|
|
|
bannerEntity.setBrowseNum(browseNum); |
|
|
|
updateById(bannerEntity); |
|
|
|
} |
|
|
|
return dto; |
|
|
|
return ConvertUtils.sourceToTarget(entity, ActBannerDTO.class); |
|
|
|
} |
|
|
|
@Override |
|
|
|
public Result grounding(String id) { |
|
|
@ -194,4 +185,19 @@ public class ActBannerServiceImpl extends BaseServiceImpl<ActBannerDao, ActBanne |
|
|
|
public List<ActBannerDTO> listBanners(EpdcAppBannerFormDTO formDto) { |
|
|
|
return baseDao.selectListBanners(formDto); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public ActBannerDTO getBannerDetail(String id) { |
|
|
|
ActBannerEntity entity = baseDao.selectById(id); |
|
|
|
ActBannerDTO dto = ConvertUtils.sourceToTarget(entity, ActBannerDTO.class); |
|
|
|
// 浏览数+1
|
|
|
|
if (null != entity) { |
|
|
|
int browseNum = null == entity.getBrowseNum() ? 1:entity.getBrowseNum()+1; |
|
|
|
ActBannerEntity bannerEntity = new ActBannerEntity(); |
|
|
|
bannerEntity.setId(id); |
|
|
|
bannerEntity.setBrowseNum(browseNum); |
|
|
|
updateById(bannerEntity); |
|
|
|
} |
|
|
|
return dto; |
|
|
|
} |
|
|
|
} |
|
|
|