|
|
@ -1,7 +1,6 @@ |
|
|
|
package com.cloud.kicc.system.devtools.controller; |
|
|
|
package com.cloud.kicc.system.devtools.controller; |
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
@ -9,7 +8,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.cloud.kicc.common.core.api.R; |
|
|
|
import com.cloud.kicc.common.core.api.R; |
|
|
|
import com.cloud.kicc.common.core.constant.AppConstants; |
|
|
|
import com.cloud.kicc.common.core.constant.AppConstants; |
|
|
|
import com.cloud.kicc.system.api.devtools.entity.GencodeCustomObj; |
|
|
|
import com.cloud.kicc.system.api.devtools.entity.GencodeCustomObj; |
|
|
|
|
|
|
|
import com.cloud.kicc.system.api.devtools.entity.GencodeScheme; |
|
|
|
import com.cloud.kicc.system.devtools.service.IGencodeCustomObjService; |
|
|
|
import com.cloud.kicc.system.devtools.service.IGencodeCustomObjService; |
|
|
|
|
|
|
|
import com.cloud.kicc.system.devtools.service.IGencodeSchemeService; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
|
@ -29,6 +30,7 @@ import java.util.Arrays; |
|
|
|
public class GencodeCustomObjController { |
|
|
|
public class GencodeCustomObjController { |
|
|
|
|
|
|
|
|
|
|
|
private final IGencodeCustomObjService iGencodeCustomObjService; |
|
|
|
private final IGencodeCustomObjService iGencodeCustomObjService; |
|
|
|
|
|
|
|
private final IGencodeSchemeService iGencodeSchemeService; |
|
|
|
|
|
|
|
|
|
|
|
private LambdaQueryWrapper<GencodeCustomObj> getQueryWrapper(GencodeCustomObj gencodeCustomObj) { |
|
|
|
private LambdaQueryWrapper<GencodeCustomObj> getQueryWrapper(GencodeCustomObj gencodeCustomObj) { |
|
|
|
return new LambdaQueryWrapper<GencodeCustomObj>() |
|
|
|
return new LambdaQueryWrapper<GencodeCustomObj>() |
|
|
@ -52,6 +54,18 @@ public class GencodeCustomObjController { |
|
|
|
return R.ok(); |
|
|
|
return R.ok(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/add") |
|
|
|
|
|
|
|
public R add(String genTableId, String genTableType) { |
|
|
|
|
|
|
|
GencodeScheme gencodeScheme = iGencodeSchemeService.getOne(Wrappers.<GencodeScheme>lambdaQuery().eq(GencodeScheme::getGenTableId, genTableId)); |
|
|
|
|
|
|
|
if (gencodeScheme == null) { |
|
|
|
|
|
|
|
return R.error("添加JAVA自定义对象失败,请先生成代码!或者你可以到自定义对象管理中手动添加。"); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
// todo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return R.ok(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PutMapping("/update") |
|
|
|
@PutMapping("/update") |
|
|
|
public R update(@RequestBody GencodeCustomObj gencodeCustomObj) { |
|
|
|
public R update(@RequestBody GencodeCustomObj gencodeCustomObj) { |
|
|
|
iGencodeCustomObjService.updateById(gencodeCustomObj); |
|
|
|
iGencodeCustomObjService.updateById(gencodeCustomObj); |
|
|
|