TASK: 是否完成引导字段添加;
This commit is contained in:
@@ -86,4 +86,9 @@ public class AccountController {
|
|||||||
return Response.success(accountService.trialUserLogout());
|
return Response.success(accountService.trialUserLogout());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "完成新手教程")
|
||||||
|
@PostMapping("/completeGuidance")
|
||||||
|
public Response<Boolean> completeGuidance() {
|
||||||
|
return Response.success(accountService.completeGuidance());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,4 +76,6 @@ public class Account implements Serializable {
|
|||||||
private Date updateDate;
|
private Date updateDate;
|
||||||
|
|
||||||
private Integer isTrial;
|
private Integer isTrial;
|
||||||
|
|
||||||
|
private Integer isBeginner;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.ai.da.model.vo;
|
|||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import io.swagger.models.auth.In;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
@@ -28,5 +29,7 @@ public class AccountLoginVO {
|
|||||||
|
|
||||||
@ApiModelProperty("是否是试用用户")
|
@ApiModelProperty("是否是试用用户")
|
||||||
private Integer isTrial;
|
private Integer isTrial;
|
||||||
|
@ApiModelProperty("是否完成引导")
|
||||||
|
private Integer isBeginner;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,8 +17,7 @@ public class PageQueryBaseVo {
|
|||||||
private Integer page = 1;
|
private Integer page = 1;
|
||||||
|
|
||||||
@ApiModelProperty("每页数量")
|
@ApiModelProperty("每页数量")
|
||||||
@Min(value = 0, message = "size最小值为1")
|
@Min(value = 0, message = "The minimum size is 1")
|
||||||
// TODO:异常处理
|
@Max(value = 50, message = "The maximum size is 50")
|
||||||
@Max(value = 50, message = "TODO:size最大值为50 ")
|
|
||||||
private Integer size = 20;
|
private Integer size = 20;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,4 +96,6 @@ public interface AccountService extends IService<Account> {
|
|||||||
String changeUserLanguage(String language);
|
String changeUserLanguage(String language);
|
||||||
|
|
||||||
Boolean trialUserLogout();
|
Boolean trialUserLogout();
|
||||||
|
|
||||||
|
Boolean completeGuidance();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -442,4 +442,13 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
userLikeGroupService.deleteTrialData(userInfo.getId());
|
userLikeGroupService.deleteTrialData(userInfo.getId());
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean completeGuidance() {
|
||||||
|
AuthPrincipalVo userInfo = UserContext.getUserHolder();
|
||||||
|
Account account = accountMapper.selectById(userInfo.getId());
|
||||||
|
account.setIsBeginner(0);
|
||||||
|
accountMapper.updateById(account);
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user