Commit 589f3680 by 吴迪

修改项目请求方式

parent e74da019
......@@ -108,7 +108,7 @@ public class PolicyController extends AbstractController {
public R delete(@RequestBody Integer[] ids) {
try {
if (ids.length>0) {
if (ids.length > 0) {
for (Integer id : ids) {
PolicyEntity policyEntity = policyService.getById(id);
// NewsMovieEntity newsMovieEntity = (NewsMovieEntity) policyEntity;
......@@ -200,7 +200,7 @@ public class PolicyController extends AbstractController {
@Login
@GetMapping({"/api/info/{id}","/api/info/{id}/{token}"})
@GetMapping({"/api/info/{id}", "/api/info/{id}/{token}"})
// @RequiresPermissions("manage:indexcarouselmanage:pictureImageList")
public R getDetail(@PathVariable("id") Integer id, @PathVariable(value = "token", required = false) String token) {
PolicyEntity policy = policyService.getById(id);
......@@ -220,21 +220,21 @@ public class PolicyController extends AbstractController {
}
tokenCount.setCountFlag(tokenCount.getCountFlag() + 1);
tokenCountService.updateById(tokenCount);
} else{
if(StrUtil.equals("0",policy.getStatus())) {
} else {
if (StrUtil.equals("0", policy.getStatus())) {
return R.error("没有可显示的内容");
}
//点击量+1
PolicyEntity policyUpdate = new PolicyEntity();
if(policyUpdate.getHits()!=null){
policyUpdate.setHits(policyUpdate.getHits()+1);
} else{
if (policyUpdate.getHits() != null) {
policyUpdate.setHits(policyUpdate.getHits() + 1);
} else {
policyUpdate.setHits(1);
}
UpdateWrapper<PolicyEntity> updateWrapper = new UpdateWrapper();
updateWrapper.eq("id",id);
policyService.update(policyUpdate,updateWrapper);
updateWrapper.eq("id", id);
policyService.update(policyUpdate, updateWrapper);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment