text:(测试)
parent
d4df43db76
commit
0b0bb8d046
|
@ -0,0 +1,72 @@
|
|||
package com.muyu.etl.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @ClassDescription:
|
||||
* @JdkVersion: 17
|
||||
* @Author: zhangxu
|
||||
* @Created: 2024/5/16 15:06
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class ConnectionFactory {
|
||||
|
||||
|
||||
|
||||
private String host;
|
||||
|
||||
private String port;
|
||||
|
||||
private String virtualHost;
|
||||
|
||||
private String username;
|
||||
|
||||
private String password;
|
||||
|
||||
public String getHost() {
|
||||
return host;
|
||||
}
|
||||
|
||||
public void setHost(String host) {
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
public String getPort() {
|
||||
return port;
|
||||
}
|
||||
|
||||
public void setPort(String port) {
|
||||
this.port = port;
|
||||
}
|
||||
|
||||
public String getVirtualHost() {
|
||||
return virtualHost;
|
||||
}
|
||||
|
||||
public void setVirtualHost(String virtualHost) {
|
||||
this.virtualHost = virtualHost;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package com.muyu.etl.mapper;
|
||||
|
||||
import com.muyu.etl.domain.Student;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassDescription:
|
||||
* @JdkVersion: 17
|
||||
* @Author: zhangxu
|
||||
* @Created: 2024/5/17 19:54
|
||||
*/
|
||||
@Mapper
|
||||
public interface StudentMapper {
|
||||
|
||||
|
||||
List<Student> studentList();
|
||||
|
||||
List<Student> studentListByDeptId(Long deptId);
|
||||
|
||||
Student studentById(Long id);
|
||||
|
||||
int insertStudent(Student student);
|
||||
|
||||
int updateStudent(Student student);
|
||||
|
||||
int deleteStudent(Long id);
|
||||
|
||||
int deleteStudentList(List<Long> ids);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
package com.muyu.etl.service;
|
||||
|
||||
import com.muyu.etl.domain.Student;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassDescription:
|
||||
* @JdkVersion: 17
|
||||
* @Author: zhangxu
|
||||
* @Created: 2024/5/17 19:55
|
||||
*/
|
||||
public interface StudentService {
|
||||
|
||||
List<Student> studentList();
|
||||
|
||||
void insertStudent(Student student);
|
||||
|
||||
void updateStudent(Student student);
|
||||
|
||||
void deleteStudent(Student student);
|
||||
|
||||
void deleteStudentList(List<Student> studentList);
|
||||
|
||||
Student getStudent(Student student);
|
||||
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
package com.muyu.etl.service.impl;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.security.utils.SecurityUtils;
|
||||
import com.muyu.etl.domain.req.BrandReq;
|
||||
import com.muyu.etl.mapper.BrandMapper;
|
||||
import com.muyu.etl.service.BrandReqService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassDescription:
|
||||
* @JdkVersion: 17
|
||||
* @Author: zhangxu
|
||||
* @Created: 2024/5/16 20:58
|
||||
*/
|
||||
@Service
|
||||
public class BrandReqServiceImpl implements BrandReqService {
|
||||
|
||||
@Autowired
|
||||
private BrandMapper brandMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public List<BrandReq> getBrandReqList(BrandReq brandReq) {
|
||||
List<BrandReq> brandList = brandMapper.getBrandList(brandReq);
|
||||
return brandList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BrandReq> getBrandReqListByDeptId(BrandReq brandReq) {
|
||||
List<BrandReq> brandList = brandMapper.getBrandList(brandReq);
|
||||
return brandList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result updateBrandReq(BrandReq brandReq) {
|
||||
String username = SecurityUtils.getUsername();
|
||||
brandReq.setUpdateBy(String.valueOf(new Date()));
|
||||
int update = brandMapper.update();
|
||||
return Result.success(update);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result updateBrandReqList(List<BrandReq> brandReqList) {
|
||||
String username = SecurityUtils.getUsername();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result deleteBrandReq(BrandReq brandReq) {
|
||||
int delete = brandMapper.delete(brandReq);
|
||||
return Result.success(delete);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result deleteBrandReqList(List<BrandReq> brandReqList) {
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result insertBrandReq(BrandReq brandReq) {
|
||||
int insert = brandMapper.insert();
|
||||
if (insert > 0) {
|
||||
return Result.success();
|
||||
}
|
||||
return Result.error();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue