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