修改id类型
parent
061ea8bf7e
commit
78d136342e
|
@ -1,5 +1,6 @@
|
|||
package com.muyu.etl.common.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
@ -24,7 +25,7 @@ import java.util.Date;
|
|||
@TableName(value="data_sources")
|
||||
public class DataSources extends BaseEntity {
|
||||
/** id */
|
||||
@TableId
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id ;
|
||||
|
||||
/** 数据来源类型 */
|
||||
|
|
|
@ -32,7 +32,7 @@ public class DataSourcesController {
|
|||
* @return 实例对象
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public Result<DataSources> queryById(@PathVariable("id") Integer id){
|
||||
public Result<DataSources> queryById(@PathVariable("id") Long id){
|
||||
return Result.success(dataSourcesService.getById(id));
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ public class DataSourcesController {
|
|||
* @return 是否成功
|
||||
*/
|
||||
@DeleteMapping("/{id}")
|
||||
public Result<Boolean> deleteById(@PathVariable("id") Integer id){
|
||||
public Result<Boolean> deleteById(@PathVariable("id") Long id){
|
||||
return Result.success(dataSourcesService.removeById(id));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue