提交 67b768e7 authored 作者: renjianyu's avatar renjianyu

--no commit message

上级 af9a8056
......@@ -21,12 +21,14 @@ import com.zrqx.core.form.resource.bg.ebook.UpdateEbookForm;
import com.zrqx.core.form.resource.bg.workmanagement.SaveUpdateWorkForm;
import com.zrqx.core.form.resource.bg.workmanagement.UpdateWorkForm;
import com.zrqx.core.form.resource.bg.workmanagement.WorkmanagementForm;
import com.zrqx.core.form.resource.fg.workmanagement.FgWorkAgreeForm;
import com.zrqx.core.form.resource.fg.workmanagement.FgWorkmanagementForm;
import com.zrqx.core.model.resource.ebook.Ebook;
import com.zrqx.core.model.resource.ebook.EbookDiyType;
import com.zrqx.core.model.resource.ebook.EbookImage;
import com.zrqx.core.model.resource.membercollection.MemberCollection;
import com.zrqx.core.model.resource.resourcerelation.ResourceRelation;
import com.zrqx.core.model.resource.statistics.Statistics;
import com.zrqx.core.model.resource.workmanagement.WorkManagement;
import com.zrqx.core.model.resource.workmanagement.WorkManagementAgree;
import com.zrqx.core.model.resource.workmanagement.WorkManagementDiyType;
......@@ -51,6 +53,7 @@ import com.zrqx.resource.bg.service.workmanagement.WorkManagementWorkService;
import com.zrqx.resource.commons.Redis;
import com.zrqx.resource.fg.mapper.workmanagement.FgWorkManagementAgreeMapper;
import com.zrqx.resource.fg.mapper.workmanagement.FgWorkManagementDiyTypeMapper;
import com.zrqx.resource.fg.service.statistics.FgStatisticsService;
import com.zrqx.resource.fg.service.workmanagement.FgWorkManagementDiyTypeService;
import com.zrqx.resource.fg.service.workmanagement.FgWorkManagementImgService;
import com.zrqx.resource.fg.service.workmanagement.FgWorkManagementService;
......@@ -85,6 +88,9 @@ public class FgWorkmanagementController {
private FgWorkManagementAgreeMapper fgWorkManagementAgreeMappere;
@Autowired
private Redis redisManage;
@Autowired
private FgStatisticsService fgStatisticsService;
@ApiOperation("查询作品列表")
@GetMapping(ResourceRequestPath.PAGE)
......@@ -166,5 +172,36 @@ public class FgWorkmanagementController {
vo.setDiyType(diytype);
return CallBack.success(vo);
}
@ApiOperation(value = "分享总次数", notes = "")
@PostMapping(ResourceRequestPath.STATISTICS + ResourceRequestPath.SHARE)
public CallBack<Boolean> statisticsShare(){
//type 0取消评论,type 1 评论
Statistics statistics =new Statistics();
statistics = fgStatisticsService.selectAll().get(0);
statistics.setShareCount(statistics.getShareCount()+1);
return CallBack.success(fgStatisticsService.updateByPrimaryKeySelective(statistics));
}
@ApiOperation(value = "活动总访问量", notes = "")
@PostMapping(ResourceRequestPath.STATISTICS + ResourceRequestPath.VISITCOUNT)
public CallBack<Boolean> statisticsVisitCount(){
//type 0取消评论,type 1 评论
Statistics statistics =new Statistics();
statistics = fgStatisticsService.selectAll().get(0);
statistics.setVisitCount(statistics.getVisitCount()+1);
return CallBack.success(fgStatisticsService.updateByPrimaryKeySelective(statistics));
}
@ApiOperation(value = "总分享点击量", notes = "")
@PostMapping(ResourceRequestPath.STATISTICS + ResourceRequestPath.SHARE + ResourceRequestPath.COUNT)
public CallBack<Boolean> statisticsShareCount(){
//type 0取消评论,type 1 评论
Statistics statistics =new Statistics();
statistics = fgStatisticsService.selectAll().get(0);
statistics.setShareClickCount(statistics.getShareClickCount()+1);
return CallBack.success(fgStatisticsService.updateByPrimaryKeySelective(statistics));
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论