获取所有标签
This commit is contained in:
@@ -235,7 +235,7 @@ public class AccountController {
|
|||||||
return Response.success("success");
|
return Response.success("success");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "verifyUserEmail")
|
/*@ApiOperation(value = "verifyUserEmail")
|
||||||
@GetMapping("/verifyUserEmail")
|
@GetMapping("/verifyUserEmail")
|
||||||
public Response<String> verifyUserEmail(@RequestParam("verifyCode") String verifyCode){
|
public Response<String> verifyUserEmail(@RequestParam("verifyCode") String verifyCode){
|
||||||
accountService.verifyUserEmail(verifyCode);
|
accountService.verifyUserEmail(verifyCode);
|
||||||
@@ -254,7 +254,7 @@ public class AccountController {
|
|||||||
public Response<String> activateNewEmail(@RequestParam("token") String token){
|
public Response<String> activateNewEmail(@RequestParam("token") String token){
|
||||||
accountService.activateNewEmail(token);
|
accountService.activateNewEmail(token);
|
||||||
return Response.success("success");
|
return Response.success("success");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
@PostMapping("halfPricePromotion")
|
@PostMapping("halfPricePromotion")
|
||||||
@ApiOperation(value = "十月半价活动")
|
@ApiOperation(value = "十月半价活动")
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public class TagsController {
|
|||||||
|
|
||||||
@ApiOperation("获取标签")
|
@ApiOperation("获取标签")
|
||||||
@GetMapping("/getTags")
|
@GetMapping("/getTags")
|
||||||
public Response<List<Tags>> getTags(@RequestParam("userInput") String userInput) {
|
public Response<List<Tags>> getTags(@RequestParam(value = "userInput", required = false) String userInput) {
|
||||||
return Response.success(tagsService.getTags(userInput));
|
return Response.success(tagsService.getTags(userInput));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,4 +10,7 @@ import lombok.EqualsAndHashCode;
|
|||||||
public class Tags extends BaseEntity{
|
public class Tags extends BaseEntity{
|
||||||
|
|
||||||
private String tagName;
|
private String tagName;
|
||||||
|
|
||||||
|
// 表示标签是否正在活动中 0->不在活动中 1->在活动中
|
||||||
|
private byte active = (byte)0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -177,11 +177,11 @@ public interface AccountService extends IService<Account> {
|
|||||||
|
|
||||||
void editUserName(String newUserName);
|
void editUserName(String newUserName);
|
||||||
|
|
||||||
void verifyUserEmail(String verifyCode);
|
/*void verifyUserEmail(String verifyCode);
|
||||||
|
|
||||||
void changeUserEmail(String newMailbox);
|
void changeUserEmail(String newMailbox);
|
||||||
|
|
||||||
void activateNewEmail(String token);
|
void activateNewEmail(String token);*/
|
||||||
|
|
||||||
String updateNoLoginRequiredNew(NoLoginRequiredDTO noLoginRequiredDTO, HttpServletRequest request);
|
String updateNoLoginRequiredNew(NoLoginRequiredDTO noLoginRequiredDTO, HttpServletRequest request);
|
||||||
|
|
||||||
|
|||||||
@@ -1863,7 +1863,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 验证是否是本人进行邮箱绑定更改
|
/*// 验证是否是本人进行邮箱绑定更改
|
||||||
public void verifyUserEmail(String verifyCode){
|
public void verifyUserEmail(String verifyCode){
|
||||||
// 向旧邮箱发送验证码,以保证是当前邮箱拥有者在进行更改
|
// 向旧邮箱发送验证码,以保证是当前邮箱拥有者在进行更改
|
||||||
String userEmail = baseMapper.selectById(UserContext.getUserHolder().getId()).getUserEmail();
|
String userEmail = baseMapper.selectById(UserContext.getUserHolder().getId()).getUserEmail();
|
||||||
@@ -1896,7 +1896,6 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
// 验证激活链接
|
// 验证激活链接
|
||||||
public void activateNewEmail(String token){
|
public void activateNewEmail(String token){
|
||||||
// 获取链接地址信息,更新指定用户邮箱
|
// 获取链接地址信息,更新指定用户邮箱
|
||||||
|
|
||||||
String emailAndId = jwtTokenHelper.parseToEmailAndId(token);
|
String emailAndId = jwtTokenHelper.parseToEmailAndId(token);
|
||||||
String newMailbox = emailAndId.substring(0, emailAndId.lastIndexOf("_"));
|
String newMailbox = emailAndId.substring(0, emailAndId.lastIndexOf("_"));
|
||||||
String accountId = emailAndId.substring(emailAndId.lastIndexOf("_") + 1);
|
String accountId = emailAndId.substring(emailAndId.lastIndexOf("_") + 1);
|
||||||
@@ -1918,7 +1917,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
account.setId(Long.parseLong(accountId));
|
account.setId(Long.parseLong(accountId));
|
||||||
baseMapper.updateById(account);
|
baseMapper.updateById(account);
|
||||||
log.info("邮箱绑定更改完成,用户id:{},新邮箱:{}", accountId, newMailbox);
|
log.info("邮箱绑定更改完成,用户id:{},新邮箱:{}", accountId, newMailbox);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String googleCallback(String code, HttpSession session) {
|
public String googleCallback(String code, HttpSession session) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.ai.da.mapper.primary.entity.Tags;
|
|||||||
import com.ai.da.service.TagsService;
|
import com.ai.da.service.TagsService;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import io.netty.util.internal.StringUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -19,7 +20,10 @@ public class TagsServiceImpl extends ServiceImpl<TagsMapper, Tags> implements Ta
|
|||||||
public List<Tags> getTags(String tagPrefix){
|
public List<Tags> getTags(String tagPrefix){
|
||||||
// 1、根据tag前缀,查询
|
// 1、根据tag前缀,查询
|
||||||
QueryWrapper<Tags> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<Tags> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.likeRight("tag_name", tagPrefix);
|
if (!StringUtil.isNullOrEmpty(tagPrefix)) {
|
||||||
|
queryWrapper.like("tag_name", tagPrefix);
|
||||||
|
}
|
||||||
|
queryWrapper.orderByDesc("id").last("limit 10");
|
||||||
|
|
||||||
// 需返回标签内容和id
|
// 需返回标签内容和id
|
||||||
return baseMapper.selectList(queryWrapper);
|
return baseMapper.selectList(queryWrapper);
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ spring.security.jwtExpiration=8640000000
|
|||||||
spring.security.ignorePaths=/,/favicon.ico,/doc.html,/webjars/**,/swagger-resources,/v2/api-docs,\
|
spring.security.ignorePaths=/,/favicon.ico,/doc.html,/webjars/**,/swagger-resources,/v2/api-docs,\
|
||||||
/api/account/**,/api/element/**,/api/python/**,/api/design/**,/api/history/**,/api/library/**,/api/third/party/**,/api/generate/**,/api/workspace/**,/api/classification/**,\
|
/api/account/**,/api/element/**,/api/python/**,/api/design/**,/api/history/**,/api/library/**,/api/third/party/**,/api/generate/**,/api/workspace/**,/api/classification/**,\
|
||||||
/api/product/**,/api/ali-pay/**,/api/order-info/**,/api/paypal/**,/api/credits/**,/api/inquiry/**,/api/tasks/**,/api/python/prepareForSR,/api/alipay-hk/**,/api/portfolio/**,\
|
/api/product/**,/api/ali-pay/**,/api/order-info/**,/api/paypal/**,/api/credits/**,/api/inquiry/**,/api/tasks/**,/api/python/prepareForSR,/api/alipay-hk/**,/api/portfolio/**,\
|
||||||
/api/stripe/**,/api/message/**,/notification/**,/api/affiliate/**
|
/api/stripe/**,/api/message/**,/api/tags/**,/notification/**,/api/affiliate/**
|
||||||
spring.security.authApi=/auth/login
|
spring.security.authApi=/auth/login
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user