NeedBraceRule解决
This commit is contained in:
parent
7b9a801b2e
commit
6496ae7000
@ -26,7 +26,7 @@ import io.swagger.v3.oas.models.media.StringSchema;
|
||||
public class SwaggerConfig {
|
||||
|
||||
@Bean
|
||||
public OpenAPI springShopOpenAPI() {
|
||||
public OpenAPI springShopOpenApi() {
|
||||
Schema<?> codeSchema = new IntegerSchema().example(HttpStatus.SUCCESS); // 示例状态码
|
||||
Schema<?> msgSchema = new StringSchema().example("操作成功"); // 示例消息
|
||||
ObjectSchema dataSchema = new ObjectSchema(); // 数据可以是任意类型,这里简单定义为ObjectSchema
|
||||
|
@ -6,13 +6,13 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.ruoyi.auth.common.domain.OauthUser;
|
||||
import com.ruoyi.auth.common.service.IOauthUserService;
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.auth.common.domain.OauthUser;
|
||||
import com.ruoyi.auth.common.service.IOauthUserService;
|
||||
import com.ruoyi.oauth.wx.constant.WxMiniAppConstant;
|
||||
import com.ruoyi.oauth.wx.constant.WxPubConstant;
|
||||
import com.ruoyi.oauth.wx.service.Impl.WxLoginServiceImpl;
|
||||
@ -37,9 +37,10 @@ public class WxLoginController extends BaseController {
|
||||
public AjaxResult loginMiniApp(@PathVariable("source") String source, @PathVariable("code") String code) {
|
||||
String token = null;
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
if ("miniapp".equals(source))
|
||||
if ("miniapp".equals(source)) {
|
||||
token = wxLoginServiceImpl.doLoginMiniApp(code);
|
||||
else if ("pub".equals(source)) {
|
||||
|
||||
} else if ("pub".equals(source)) {
|
||||
token = wxLoginServiceImpl.doLoginPub(code);
|
||||
} else {
|
||||
return error("错误的登录方式");
|
||||
@ -58,9 +59,9 @@ public class WxLoginController extends BaseController {
|
||||
oauthUser = new OauthUser();
|
||||
oauthUser.setUserId(getUserId());
|
||||
oauthUser.setCode(code);
|
||||
if ("miniapp".equals(source))
|
||||
if ("miniapp".equals(source)) {
|
||||
msg = wxLoginServiceImpl.doRegisterMiniApp(oauthUser);
|
||||
else if ("pub".equals(source)) {
|
||||
} else if ("pub".equals(source)) {
|
||||
msg = wxLoginServiceImpl.doRegisterPub(oauthUser);
|
||||
} else {
|
||||
return error("错误的注册方式");
|
||||
|
@ -33,8 +33,9 @@ public class TableInfo {
|
||||
|
||||
public TableInfo(Class<?> cls) {
|
||||
this.table = AnnotationUtils.findAnnotation(cls, Table.class);
|
||||
if (this.table == null)
|
||||
if (this.table == null) {
|
||||
throw new RuntimeException("error , not find tableName");
|
||||
}
|
||||
this.tableName = this.table.name();
|
||||
this.enableTableMap = AnnotationUtils.findAnnotation(cls, EnableTableMap.class);
|
||||
|
||||
@ -118,10 +119,11 @@ public class TableInfo {
|
||||
}
|
||||
|
||||
public String getTableNameFrom() {
|
||||
if (this.isEnbleMap())
|
||||
if (this.isEnbleMap()){
|
||||
return this.tableName + " " + this.enableTableMap.name();
|
||||
else
|
||||
}else{
|
||||
return this.tableName;
|
||||
}
|
||||
}
|
||||
|
||||
public List<String> getQueryColumnNames() {
|
||||
|
@ -22,8 +22,9 @@ public class TableContainer {
|
||||
|
||||
public static <T extends BaseEntity> TableInfo getTableInfo(Class<?> clazz) {
|
||||
TableInfo tableInfo = tableInfoMap.get(clazz);
|
||||
if (tableInfo == null)
|
||||
if (tableInfo == null) {
|
||||
tableInfo = new TableInfo(clazz);
|
||||
}
|
||||
return tableInfo;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user