班组管理
This commit is contained in:
parent
20771acd03
commit
dc89479702
|
|
@ -0,0 +1,31 @@
|
|||
package com.bonus.aqgqj.basis.service;
|
||||
|
||||
import com.bonus.aqgqj.basis.entity.vo.BaseCustom;
|
||||
import com.bonus.aqgqj.model.SysUser;
|
||||
import com.bonus.aqgqj.system.vo.UserDto;
|
||||
import com.bonus.aqgqj.task.entity.TaskVo;
|
||||
import com.bonus.aqgqj.utils.ServerResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CustomService {
|
||||
|
||||
|
||||
List<BaseCustom> list(BaseCustom custom);
|
||||
|
||||
ServerResponse getCustomId(BaseCustom custom);
|
||||
|
||||
BaseCustom getCustom(String customName,Long customId);
|
||||
|
||||
BaseCustom getCustomPhone(String customPhone,Long customId);
|
||||
|
||||
BaseCustom updateCustom(BaseCustom custom);
|
||||
|
||||
BaseCustom getAdd(String customName);
|
||||
|
||||
BaseCustom add(BaseCustom custom);
|
||||
|
||||
int delCustom(Long customId);
|
||||
|
||||
ServerResponse updateCustomStatus(BaseCustom custom);
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.bonus.aqgqj.basis.service;
|
||||
|
||||
import com.bonus.aqgqj.basis.entity.vo.BaseTeam;
|
||||
import com.bonus.aqgqj.basis.entity.vo.BaseTeamConfig;
|
||||
import com.bonus.aqgqj.utils.ServerResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TeamConfigService {
|
||||
|
||||
|
||||
List<BaseTeamConfig> list(String keyWord,Long teamId);
|
||||
//
|
||||
// ServerResponse getTeamId(BaseTeam team);
|
||||
//
|
||||
// BaseTeam getTeam(String teamName,Long teamId);
|
||||
////
|
||||
//// BaseCustom getCustomPhone(String customPhone,Long customId);
|
||||
//
|
||||
// BaseTeam updateTeam(BaseTeam team);
|
||||
//
|
||||
// BaseTeam getAdd(String teamName);
|
||||
//
|
||||
// BaseTeam add(BaseTeam team);
|
||||
//
|
||||
// int delTeam(Long teamId);
|
||||
|
||||
List<BaseTeam> teamList(String name);
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.bonus.aqgqj.basis.service;
|
||||
|
||||
import com.bonus.aqgqj.basis.entity.vo.BaseCustom;
|
||||
import com.bonus.aqgqj.basis.entity.vo.BaseTeam;
|
||||
import com.bonus.aqgqj.utils.ServerResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TeamService {
|
||||
|
||||
|
||||
List<BaseTeam> list(String keyWord);
|
||||
|
||||
ServerResponse getTeamId(BaseTeam team);
|
||||
|
||||
BaseTeam getTeam(String teamName,Long teamId);
|
||||
//
|
||||
// BaseCustom getCustomPhone(String customPhone,Long customId);
|
||||
|
||||
BaseTeam updateTeam(BaseTeam team);
|
||||
|
||||
BaseTeam getAdd(String teamName);
|
||||
|
||||
BaseTeam add(BaseTeam team);
|
||||
|
||||
int delTeam(Long teamId);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
package com.bonus.aqgqj.basis.service.impl;
|
||||
|
||||
import com.bonus.aqgqj.basis.dao.CustomDao;
|
||||
import com.bonus.aqgqj.basis.service.CustomService;
|
||||
import com.bonus.aqgqj.basis.entity.vo.BaseCustom;
|
||||
import com.bonus.aqgqj.model.SysUser;
|
||||
import com.bonus.aqgqj.system.vo.UserDto;
|
||||
import com.bonus.aqgqj.task.entity.TaskVo;
|
||||
import com.bonus.aqgqj.utils.ServerResponse;
|
||||
import com.bonus.aqgqj.utils.StringHelper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.quartz.CronExpression;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class CustomServiceImpl implements CustomService {
|
||||
|
||||
|
||||
@Resource
|
||||
private CustomDao customDao;
|
||||
|
||||
|
||||
@Override
|
||||
public List<BaseCustom> list(BaseCustom custom) {
|
||||
return customDao.list(custom);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServerResponse getCustomId(BaseCustom custom) {
|
||||
try{
|
||||
BaseCustom vo= customDao.getCustomId(custom);
|
||||
return ServerResponse.createSuccess(vo);
|
||||
}catch (Exception e){
|
||||
return ServerResponse.createSuccess("修改成功");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseCustom getCustom(String customName,Long customId) {
|
||||
try{
|
||||
return customDao.getCustom(customName,customId);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public BaseCustom getCustomPhone(String customPhone,Long customId) {
|
||||
try{
|
||||
return customDao.getCustomPhone(customPhone,customId);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public BaseCustom updateCustom(BaseCustom custom) {
|
||||
|
||||
customDao.update(custom);
|
||||
//saveUserRoles(userDto.getId(), userDto.getRoleIds());
|
||||
|
||||
return custom;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseCustom getAdd(String customName) {
|
||||
try{
|
||||
return customDao.getAdd(customName);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public BaseCustom add(BaseCustom custom) {
|
||||
|
||||
customDao.add(custom);
|
||||
//saveUserRoles(userDto.getId(), userDto.getRoleIds());
|
||||
|
||||
return custom;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delCustom(Long customId) {
|
||||
return customDao.delCustom(customId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServerResponse updateCustomStatus(BaseCustom data) {
|
||||
try{
|
||||
if(data.getCustomId()==0 || StringHelper.isEmpty(String.valueOf(data.getCustomStatus()))){
|
||||
return ServerResponse.createErroe("参数不能为空");
|
||||
}else{
|
||||
|
||||
int num= customDao.updateCustomStatus(data);
|
||||
if(num==1){
|
||||
if(data.getCustomStatus()==1){
|
||||
return ServerResponse.createSuccess("开启成功");
|
||||
}else{
|
||||
return ServerResponse.createSuccess("关闭成功");
|
||||
}
|
||||
}else{
|
||||
return ServerResponse.createErroe("sql异常,请联系管理员");
|
||||
}
|
||||
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return ServerResponse.createErroe("参数异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
package com.bonus.aqgqj.basis.service.impl;
|
||||
|
||||
import com.bonus.aqgqj.basis.dao.TeamConfigDao;
|
||||
import com.bonus.aqgqj.basis.dao.TeamDao;
|
||||
import com.bonus.aqgqj.basis.entity.vo.BaseTeam;
|
||||
import com.bonus.aqgqj.basis.entity.vo.BaseTeamConfig;
|
||||
import com.bonus.aqgqj.basis.service.TeamConfigService;
|
||||
import com.bonus.aqgqj.basis.service.TeamService;
|
||||
import com.bonus.aqgqj.model.Role;
|
||||
import com.bonus.aqgqj.utils.ServerResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class TeamConfigServiceImpl implements TeamConfigService {
|
||||
|
||||
|
||||
@Resource
|
||||
private TeamConfigDao teamconfigDao;
|
||||
|
||||
|
||||
@Override
|
||||
public List<BaseTeamConfig> list(String keyWord,Long teamId) {
|
||||
return teamconfigDao.list(keyWord,teamId);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public ServerResponse getTeamId(BaseTeam team) {
|
||||
// try{
|
||||
// BaseTeam vo= teamDao.getTeamId(team);
|
||||
// return ServerResponse.createSuccess(vo);
|
||||
// }catch (Exception e){
|
||||
// return ServerResponse.createSuccess("修改成功");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public BaseTeam getTeam(String teamName,Long teamId) {
|
||||
// try{
|
||||
// return teamDao.getTeam(teamName,teamId);
|
||||
// }catch (Exception e){
|
||||
// log.error(e.toString(),e);
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
|
||||
// public BaseCustom getCustomPhone(String customPhone,Long customId) {
|
||||
// try{
|
||||
// return customDao.getCustomPhone(customPhone,customId);
|
||||
// }catch (Exception e){
|
||||
// log.error(e.toString(),e);
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @Transactional
|
||||
// public BaseTeam updateTeam(BaseTeam team) {
|
||||
//
|
||||
// teamDao.update(team);
|
||||
// //saveUserRoles(userDto.getId(), userDto.getRoleIds());
|
||||
//
|
||||
// return team;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public BaseTeam getAdd(String teamName) {
|
||||
// try{
|
||||
// return teamDao.getAdd(teamName);
|
||||
// }catch (Exception e){
|
||||
// log.error(e.toString(),e);
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @Transactional
|
||||
// public BaseTeam add(BaseTeam team) {
|
||||
//
|
||||
// teamDao.add(team);
|
||||
// //saveUserRoles(userDto.getId(), userDto.getRoleIds());
|
||||
//
|
||||
// return team;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int delTeam(Long teamId) {
|
||||
// return teamDao.delTeam(teamId);
|
||||
// }
|
||||
@Override
|
||||
public List<BaseTeam> teamList(String name) {
|
||||
List<BaseTeam> list = teamconfigDao.teamList(name);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
package com.bonus.aqgqj.basis.service.impl;
|
||||
|
||||
import com.bonus.aqgqj.basis.dao.CustomDao;
|
||||
import com.bonus.aqgqj.basis.dao.TeamDao;
|
||||
import com.bonus.aqgqj.basis.entity.vo.BaseCustom;
|
||||
import com.bonus.aqgqj.basis.entity.vo.BaseTeam;
|
||||
import com.bonus.aqgqj.basis.service.CustomService;
|
||||
import com.bonus.aqgqj.basis.service.TeamService;
|
||||
import com.bonus.aqgqj.utils.ServerResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class TeamServiceImpl implements TeamService {
|
||||
|
||||
|
||||
@Resource
|
||||
private TeamDao teamDao;
|
||||
|
||||
|
||||
@Override
|
||||
public List<BaseTeam> list(String keyWord) {
|
||||
return teamDao.list(keyWord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServerResponse getTeamId(BaseTeam team) {
|
||||
try{
|
||||
BaseTeam vo= teamDao.getTeamId(team);
|
||||
return ServerResponse.createSuccess(vo);
|
||||
}catch (Exception e){
|
||||
return ServerResponse.createSuccess("修改成功");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseTeam getTeam(String teamName,Long teamId) {
|
||||
try{
|
||||
return teamDao.getTeam(teamName,teamId);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// public BaseCustom getCustomPhone(String customPhone,Long customId) {
|
||||
// try{
|
||||
// return customDao.getCustomPhone(customPhone,customId);
|
||||
// }catch (Exception e){
|
||||
// log.error(e.toString(),e);
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
@Override
|
||||
@Transactional
|
||||
public BaseTeam updateTeam(BaseTeam team) {
|
||||
|
||||
teamDao.update(team);
|
||||
//saveUserRoles(userDto.getId(), userDto.getRoleIds());
|
||||
|
||||
return team;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseTeam getAdd(String teamName) {
|
||||
try{
|
||||
return teamDao.getAdd(teamName);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public BaseTeam add(BaseTeam team) {
|
||||
|
||||
teamDao.add(team);
|
||||
//saveUserRoles(userDto.getId(), userDto.getRoleIds());
|
||||
|
||||
return team;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delTeam(Long teamId) {
|
||||
return teamDao.delTeam(teamId);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue