datax模块
parent
be3352f6c0
commit
3329bbc25d
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -22,40 +22,33 @@ import java.util.List;
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class DataxController {
|
public class DataxController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private DataxService stuService;
|
private DataxService dataxService;
|
||||||
|
|
||||||
@Operation(summary = "执行同步")
|
|
||||||
@PostMapping("/json/{id}")
|
|
||||||
public Result json(@PathVariable Long id) {
|
|
||||||
stuService.json(id);
|
|
||||||
return Result.ok();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "查询列表")
|
@Operation(summary = "查询列表")
|
||||||
@PostMapping("/dataxList")
|
@PostMapping("/list")
|
||||||
public Result<List<StrDatax>> stuList() {
|
public Result<List<StrDatax>> stuList() {
|
||||||
List<StrDatax> stuList = stuService.dataxList();
|
List<StrDatax> stuList = dataxService.dataxList();
|
||||||
return Result.ok(stuList);
|
return Result.ok(stuList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "新增")
|
@Operation(summary = "新增")
|
||||||
@PostMapping("/addDatax")
|
@PostMapping("/add")
|
||||||
public Result<StrDatax> add(@RequestBody StrDatax strDatax) {
|
public Result<StrDatax> add(@RequestBody StrDatax strDatax) {
|
||||||
stuService.add(strDatax);
|
dataxService.add(strDatax);
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "修改列表")
|
@Operation(summary = "修改列表")
|
||||||
@PostMapping("/updateDatax")
|
@PostMapping("/update")
|
||||||
public Result<StrDatax> updateDatax(@RequestBody StrDatax strDatax) {
|
public Result<StrDatax> updateDatax(@RequestBody StrDatax strDatax) {
|
||||||
stuService.updateDatax(strDatax);
|
dataxService.updateStrDatax(strDatax);
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "删除列表")
|
@Operation(summary = "删除列表")
|
||||||
@PostMapping("/delStudent/{id}")
|
@PostMapping("/del/{id}")
|
||||||
public Result<String> delDatax(@PathVariable Long id) {
|
public Result<String> delDatax(@PathVariable Long id) {
|
||||||
stuService.delDatax(id);
|
dataxService.delStrDatax(id);
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +56,7 @@ public class DataxController {
|
||||||
@PostMapping("/findById/{id}")
|
@PostMapping("/findById/{id}")
|
||||||
public Result<StrDatax> findById(@PathVariable Integer id) {
|
public Result<StrDatax> findById(@PathVariable Integer id) {
|
||||||
if (id!= null) {
|
if (id!= null) {
|
||||||
return Result.ok(stuService.findById(id));
|
return Result.ok(dataxService.findById(id));
|
||||||
}
|
}
|
||||||
return Result.ok();
|
return Result.ok();
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
package net.srt.datax.server;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import net.srt.datax.vo.StrDatax;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName StrDataxService
|
||||||
|
* @Description 描述
|
||||||
|
* @Author 栗永斌
|
||||||
|
*/
|
||||||
|
public interface DataxService extends IService<StrDatax> {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void add(StrDatax StrDatax);
|
||||||
|
|
||||||
|
List<StrDatax> dataxList();
|
||||||
|
|
||||||
|
void delStrDatax(Long id);
|
||||||
|
|
||||||
|
void updateStrDatax(StrDatax StrDatax);
|
||||||
|
|
||||||
|
StrDatax findById(Integer id);
|
||||||
|
|
||||||
|
}
|
|
@ -1,26 +0,0 @@
|
||||||
package net.srt.datax.server;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import net.srt.datax.vo.Stu;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName StuService
|
|
||||||
* @Description 描述
|
|
||||||
* @Author 栗永斌
|
|
||||||
*/
|
|
||||||
public interface StuService extends IService<Stu> {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void add(Stu stu);
|
|
||||||
|
|
||||||
List<Stu> stuList();
|
|
||||||
|
|
||||||
void delStudent(Long id);
|
|
||||||
|
|
||||||
void updateStudent(Stu stu);
|
|
||||||
|
|
||||||
Stu findById(Integer id);
|
|
||||||
}
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
package net.srt.datax.server.impl;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import net.srt.datax.mapper.DataxMapper;
|
||||||
|
import net.srt.datax.server.DataxService;
|
||||||
|
import net.srt.datax.vo.StrDatax;
|
||||||
|
import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName StrDataxServiceImpl
|
||||||
|
* @Description 描述
|
||||||
|
* @Author 栗永斌
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class StrDataxServiceImpl extends BaseServiceImpl<DataxMapper, StrDatax> implements DataxService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DataxMapper dataxMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void add(StrDatax StrDatax) {
|
||||||
|
dataxMapper.insert(StrDatax);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StrDatax> dataxList() {
|
||||||
|
List<StrDatax> StrDataxs = dataxMapper.selectList(null);
|
||||||
|
return StrDataxs;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void delStrDatax(Long id) {
|
||||||
|
dataxMapper.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateStrDatax(StrDatax StrDatax) {
|
||||||
|
dataxMapper.updateById(StrDatax);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StrDatax findById(Integer id) {
|
||||||
|
StrDatax StrDatax = dataxMapper.selectById(id);
|
||||||
|
return StrDatax;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,53 +0,0 @@
|
||||||
package net.srt.datax.server.impl;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import net.srt.datax.mapper.StuMapper;
|
|
||||||
import net.srt.datax.server.StuService;
|
|
||||||
import net.srt.datax.vo.Stu;
|
|
||||||
import net.srt.framework.mybatis.service.impl.BaseServiceImpl;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
/**
|
|
||||||
* @ClassName StuServiceImpl
|
|
||||||
* @Description 描述
|
|
||||||
* @Author 栗永斌
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class StuServiceImpl extends BaseServiceImpl<StuMapper,Stu> implements StuService {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private StuMapper stuMapper;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void add(Stu stu) {
|
|
||||||
stuMapper.insert(stu);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<Stu> stuList() {
|
|
||||||
List<Stu> stus = stuMapper.selectList(null);
|
|
||||||
return stus;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void delStudent(Long id) {
|
|
||||||
stuMapper.deleteById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateStudent(Stu stu) {
|
|
||||||
stuMapper.updateById(stu);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Stu findById(Integer id) {
|
|
||||||
Stu stu = stuMapper.selectById(id);
|
|
||||||
return stu;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue