|
|
@ -44,6 +44,7 @@ import com.elink.esua.epdc.dto.ScheduleJobDTO; |
|
|
|
import com.elink.esua.epdc.modules.activity.dao.ActInfoDao; |
|
|
|
import com.elink.esua.epdc.modules.activity.dao.ActUserClockLogDao; |
|
|
|
import com.elink.esua.epdc.modules.activity.dao.ActUserRelationDao; |
|
|
|
import com.elink.esua.epdc.modules.activity.entity.ActBannerEntity; |
|
|
|
import com.elink.esua.epdc.modules.activity.entity.ActInfoEntity; |
|
|
|
import com.elink.esua.epdc.modules.activity.entity.ActUserClockLogEntity; |
|
|
|
import com.elink.esua.epdc.modules.activity.entity.ActUserRelationEntity; |
|
|
@ -225,6 +226,8 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit |
|
|
|
String dateString = formatter.format(currentTime); |
|
|
|
formDto.setTimestamp(dateString); |
|
|
|
ActInfoDetailAppResultDTO resultDTO = baseDao.getDetailByApp(formDto); |
|
|
|
//获取活动详情 活动信息表 浏览数+1 banner表 浏览数+1
|
|
|
|
this.addActBrowseNumber(resultDTO); |
|
|
|
return new Result<ActInfoDetailAppResultDTO>().ok(resultDTO); |
|
|
|
} |
|
|
|
|
|
|
@ -375,4 +378,22 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit |
|
|
|
return new Result<ActInfoDetailAppResultDTO>().ok(resultDTO); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description: 增加活动浏览数 |
|
|
|
* @Param: [dto] |
|
|
|
* @return: void |
|
|
|
* @Author: zy |
|
|
|
* @Date: 2020-02-06 |
|
|
|
*/ |
|
|
|
private void addActBrowseNumber(ActInfoDetailAppResultDTO dto){ |
|
|
|
//活动信息表 浏览数+1
|
|
|
|
dto.setActBrowseNum(dto.getActBrowseNum() + 1); |
|
|
|
ActInfoEntity infoEntity = ConvertUtils.sourceToTarget(dto, ActInfoEntity.class); |
|
|
|
updateById(infoEntity); |
|
|
|
//banner表 浏览数+1
|
|
|
|
ActBannerDTO bannerDto = actBannerService.getBannerInfo(dto.getId()); |
|
|
|
bannerDto.setBrowseNum(bannerDto.getBrowseNum()+1); |
|
|
|
ActBannerEntity bannerEntity = ConvertUtils.sourceToTarget(bannerDto, ActBannerEntity.class); |
|
|
|
actBannerService.updateById(bannerEntity); |
|
|
|
} |
|
|
|
} |
|
|
|