mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-07 18:06:50 +08:00
提交同步
This commit is contained in:
@@ -15,7 +15,6 @@ public class CourseFullText {
|
||||
/**es中的id*/
|
||||
private String esId;
|
||||
|
||||
|
||||
/**名称*/
|
||||
private String name;
|
||||
|
||||
@@ -29,6 +28,8 @@ public class CourseFullText {
|
||||
|
||||
/**10无目录录播课,20 有目录录播课,30:面授课;40学习项目*/
|
||||
private Integer type;
|
||||
/**多个时用到*/
|
||||
private String types;
|
||||
|
||||
/**原系统的企业id,对应sass模式的字段*/
|
||||
private String companyId;
|
||||
|
||||
@@ -264,7 +264,19 @@ public class CourseElasticsearchImpl implements ICourseFullTextSearch{
|
||||
}else {
|
||||
boolQuery.filter(QueryBuilders.termQuery("type", params.getType()));
|
||||
}
|
||||
}else if(StringUtils.isNotBlank(params.getTypes())) {
|
||||
List<Integer> typeList=new ArrayList<>();
|
||||
if(params.getTypes().indexOf("20")>-1) {
|
||||
typeList.add(10);
|
||||
}
|
||||
String[] typeArray=params.getTypes().split("-");
|
||||
for(String s:typeArray) {
|
||||
typeList.add(Integer.valueOf(s));
|
||||
}
|
||||
boolQuery.filter(QueryBuilders.termsQuery("type", typeList));
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(params.getSource()!=null) {
|
||||
boolQuery.filter(QueryBuilders.termQuery("source", params.getSource()));
|
||||
@@ -273,14 +285,30 @@ public class CourseElasticsearchImpl implements ICourseFullTextSearch{
|
||||
boolQuery.filter(QueryBuilders.termQuery("openCourse", params.getOpenCourse()));
|
||||
}
|
||||
if(StringUtils.isNotBlank(params.getSysType1())) {
|
||||
if(params.getSysType1().indexOf("-")>-1) {
|
||||
String[] typeArray=params.getSysType1().split("-");
|
||||
boolQuery.filter(QueryBuilders.termsQuery("sysType1", typeArray));
|
||||
}else {
|
||||
boolQuery.filter(QueryBuilders.termQuery("sysType1", params.getSysType1()));
|
||||
}
|
||||
|
||||
}
|
||||
if(StringUtils.isNotBlank(params.getSysType2())) {
|
||||
if(params.getSysType2().indexOf("-")>-1) {
|
||||
String[] typeArray=params.getSysType2().split("-");
|
||||
boolQuery.filter(QueryBuilders.termsQuery("sysType2", typeArray));
|
||||
}else {
|
||||
boolQuery.filter(QueryBuilders.termQuery("sysType2", params.getSysType2()));
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(params.getSysType3())) {
|
||||
if(params.getSysType3().indexOf("-")>-1) {
|
||||
String[] typeArray=params.getSysType3().split("-");
|
||||
boolQuery.filter(QueryBuilders.termsQuery("sysType3", typeArray));
|
||||
}else {
|
||||
boolQuery.filter(QueryBuilders.termQuery("sysType3", params.getSysType3()));
|
||||
}
|
||||
}
|
||||
//增加companyId过滤
|
||||
if(StringUtils.isNotBlank(params.getCompanyId())) {
|
||||
BoolQueryBuilder companyFilter= QueryBuilders.boolQuery();
|
||||
|
||||
@@ -151,7 +151,7 @@ public class CasesApi extends ApiBaseController {
|
||||
}
|
||||
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setHeader("Content-disposition", "attachment;filename=Teachers.xls");
|
||||
response.setHeader("Content-disposition", "attachment;filename=cases.xls");
|
||||
ExportsExcelSenderUtil.export(map,exportVos, OutputStream,"yyyy-MM-dd HH:mm:ss");
|
||||
}catch (Exception e){
|
||||
log.error("导出失败",e.getMessage());
|
||||
|
||||
@@ -8,12 +8,14 @@ import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.xboe.common.utils.StringUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.orm.ObjectOptimisticLockingFailureException;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -135,6 +137,15 @@ public class CourseFileApi extends ApiBaseController {
|
||||
if (cfile.getResType() != null) {
|
||||
filters.add(FieldFilters.eq("resType", cfile.getResType()));
|
||||
}
|
||||
if(StringUtil.isNotBlank(cfile.getOrgId())){
|
||||
if(cfile.getOrgId().contains(",")){
|
||||
String[] split = cfile.getOrgId().split(",");
|
||||
List<String> strings = Arrays.asList(split);
|
||||
filters.add(FieldFilters.in("orgId",strings));
|
||||
}else {
|
||||
filters.add(FieldFilters.eq("orgId",cfile.getOrgId()));
|
||||
}
|
||||
}
|
||||
|
||||
//默认是查询自己的课件。
|
||||
if (self == null) {
|
||||
|
||||
@@ -134,6 +134,7 @@ public class CourseFullTextApi extends ApiBaseController{
|
||||
paras.setSysType2(dto.getSysType2());//专业分类二级
|
||||
paras.setSysType3(dto.getSysType3());//专业分类三级
|
||||
paras.setDevice(dto.getDevice());
|
||||
paras.setTypes(dto.getTypes());//多个分类的情况
|
||||
//用户的companyId
|
||||
paras.setCompanyId(dto.getCompanyId());
|
||||
//paras.setAudience(dto.getAudiences());
|
||||
|
||||
@@ -96,4 +96,9 @@ public class CourseQueryDto {
|
||||
* 是否公开课,0表非公开课,1表公开课
|
||||
*/
|
||||
private Integer openCourse;
|
||||
|
||||
/**
|
||||
* 表资源归属的in查询
|
||||
* */
|
||||
private String orgId;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -202,6 +203,15 @@ public class CourseServiceImpl implements ICourseService {
|
||||
if(dto.getPublish()!=null){
|
||||
filters.add(FieldFilters.eq("published",dto.getPublish()));
|
||||
}
|
||||
if(StringUtil.isNotBlank(dto.getOrgId())){
|
||||
if(dto.getOrgId().contains(",")){
|
||||
String[] split = dto.getOrgId().split(",");
|
||||
List<String> strings = Arrays.asList(split);
|
||||
filters.add(FieldFilters.in("orgId",strings));
|
||||
}else {
|
||||
filters.add(FieldFilters.eq("orgId",dto.getOrgId()));
|
||||
}
|
||||
}
|
||||
return filters;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ public class ExamTestServiceImpl implements IExamTestService {
|
||||
public void sava(ExamTest examTest) {
|
||||
examTest.setPublished(false);
|
||||
examTest.setDeleted(false);
|
||||
examTest.setEnabled(false);
|
||||
examTestDao.save(examTest);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,17 @@ public class PopupApi extends ApiBaseController {
|
||||
IPopupService service;
|
||||
|
||||
|
||||
/**
|
||||
* 前端查询,只是查询出对于当前用户来说需要弹出的
|
||||
* */
|
||||
@GetMapping("/user")
|
||||
public JsonResponse<List<Popup>> userList(){
|
||||
String aid=getCurrent().getAccountId();
|
||||
List<Popup> list = service.findForUser(aid);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 后台弹窗管理列表
|
||||
* */
|
||||
@@ -28,6 +39,24 @@ public class PopupApi extends ApiBaseController {
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
public JsonResponse<Boolean> list(String popupId){
|
||||
String aid=getCurrent().getAccountId();
|
||||
service.addUser(aid, popupId);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("/find-user")
|
||||
public JsonResponse<List<Popup>> findForUser(String aid){
|
||||
if(StringUtil.isBlank(aid)){
|
||||
aid=this.getCurrent().getAccountId();
|
||||
}
|
||||
List<Popup> forUser = service.findForUser(aid);
|
||||
return success(forUser);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加弹窗
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.xboe.module.popup.dao;
|
||||
|
||||
import com.xboe.core.orm.BaseDao;
|
||||
import com.xboe.module.popup.entity.PopupUser;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public class PopupUserDao extends BaseDao<PopupUser> {
|
||||
}
|
||||
@@ -17,6 +17,7 @@ import java.time.LocalDateTime;
|
||||
@Table(name = SysConstant.TABLE_PRE+"popup")
|
||||
public class Popup extends IdEntity {
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
@@ -64,11 +65,17 @@ public class Popup extends IdEntity {
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 弹出次数
|
||||
* 弹出次数,0表无限制
|
||||
*/
|
||||
@Column(name = "times",length = 2)
|
||||
private Integer times;
|
||||
|
||||
/**
|
||||
* 0全部,1:PC,;2:h5端
|
||||
*/
|
||||
@Column(name = "device",length = 2)
|
||||
private Integer device;
|
||||
|
||||
/**
|
||||
* 弹窗内容
|
||||
* */
|
||||
@@ -88,10 +95,4 @@ public class Popup extends IdEntity {
|
||||
private String url;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.xboe.module.popup.entity;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import com.xboe.core.SysConstant;
|
||||
import com.xboe.core.orm.IdEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 弹出用户记录
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Entity
|
||||
@Table(name = SysConstant.TABLE_PRE+"popup_user")
|
||||
public class PopupUser extends IdEntity{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Column(name = "popup_id",length=20)
|
||||
private String popupId;
|
||||
|
||||
@Column(name = "aid",length=20)
|
||||
private String aid;
|
||||
|
||||
/**状态默认是1,表已弹出过*/
|
||||
@Column(name = "status",length=1)
|
||||
private Boolean status;
|
||||
|
||||
}
|
||||
@@ -13,6 +13,13 @@ public interface IPopupService {
|
||||
* */
|
||||
List<Popup> list(Popup popup);
|
||||
|
||||
/**
|
||||
* 查询当前用户需要弹出的
|
||||
* @param aid
|
||||
* @return
|
||||
*/
|
||||
List<Popup> findForUser(String aid);
|
||||
|
||||
|
||||
/**
|
||||
* 添加
|
||||
@@ -36,4 +43,10 @@ public interface IPopupService {
|
||||
* 删除
|
||||
* */
|
||||
void delete(String id);
|
||||
|
||||
/**
|
||||
* 添加弹出了的用户
|
||||
* @param popupId
|
||||
*/
|
||||
void addUser(String aid,String popupId);
|
||||
}
|
||||
|
||||
@@ -6,12 +6,16 @@ import com.xboe.core.orm.FieldFilters;
|
||||
import com.xboe.core.orm.LikeMatchMode;
|
||||
import com.xboe.core.orm.QueryBuilder;
|
||||
import com.xboe.module.popup.dao.PopupDao;
|
||||
import com.xboe.module.popup.dao.PopupUserDao;
|
||||
import com.xboe.module.popup.entity.Popup;
|
||||
import com.xboe.module.popup.entity.PopupUser;
|
||||
import com.xboe.module.popup.service.IPopupService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@@ -21,6 +25,10 @@ public class PopupServiceImpl implements IPopupService {
|
||||
@Resource
|
||||
PopupDao popupDao;
|
||||
|
||||
@Resource
|
||||
PopupUserDao popupUserDao;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public List<Popup> list(Popup popup) {
|
||||
@@ -70,4 +78,34 @@ public class PopupServiceImpl implements IPopupService {
|
||||
public void delete(String id) {
|
||||
popupDao.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Popup> findForUser(String aid) {
|
||||
//根据时间查询,查询出时间内需要弹出的内容
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
List<Popup> list=popupDao.findList(FieldFilters.le("p.startTime",now),FieldFilters.ge("p.endTime",now));
|
||||
List<Popup> rslist=new ArrayList<Popup>();
|
||||
for(Popup p: list) {
|
||||
if(p.getOnce()!=null && p.getOnce()) {
|
||||
//只是查询一次
|
||||
List<PopupUser> pu = popupUserDao.findList(FieldFilters.eq("aid",aid),FieldFilters.eq("popupId",p.getId()));
|
||||
if(pu.isEmpty()) {
|
||||
rslist.add(p);
|
||||
}
|
||||
}else {
|
||||
rslist.add(p);
|
||||
}
|
||||
}
|
||||
return rslist;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addUser(String aid,String popupId) {
|
||||
PopupUser pu=new PopupUser();
|
||||
pu.setAid(aid);
|
||||
pu.setPopupId(popupId);
|
||||
pu.setStatus(true);
|
||||
popupUserDao.save(pu);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import java.util.Map;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.xboe.module.teacher.dto.TeacherFiledVo;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -272,6 +273,26 @@ public class TeacherApi extends ApiBaseController {
|
||||
return success(teacher);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param teacher
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/update-teacher")
|
||||
public JsonResponse<TeacherFiledVo> updateTeacher(@RequestBody TeacherFiledVo teacher) {
|
||||
if (teacher == null) {
|
||||
return error("缺少必要参数");
|
||||
}
|
||||
try {
|
||||
service.updateTeacher(teacher);
|
||||
} catch (Exception e) {
|
||||
return error(e.getMessage());
|
||||
}
|
||||
return success(teacher);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.xboe.module.teacher.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TeacherFiledVo {
|
||||
|
||||
private String id;
|
||||
|
||||
private String photo;
|
||||
|
||||
private String workExperience;
|
||||
|
||||
private String courses;
|
||||
|
||||
private String expertise;
|
||||
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import com.xboe.common.PageList;
|
||||
import com.xboe.core.exception.XaskException;
|
||||
import com.xboe.module.teacher.dto.TeacherFiledVo;
|
||||
import com.xboe.module.teacher.dto.TeacherSyncUpdateDto;
|
||||
import com.xboe.module.teacher.entity.Teacher;
|
||||
import com.xboe.module.teacher.vo.TeacherQuery;
|
||||
@@ -60,6 +61,15 @@ public interface ITeacherService {
|
||||
*/
|
||||
void update(TeacherVo entity) throws XaskException;
|
||||
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param entity
|
||||
* @throws XaskException
|
||||
*/
|
||||
void updateTeacher(TeacherFiledVo entity);
|
||||
|
||||
/*
|
||||
* 更新同步信息
|
||||
*/
|
||||
|
||||
@@ -9,6 +9,7 @@ import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.xboe.module.teacher.dto.TeacherFiledVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@@ -204,6 +205,17 @@ public class TeacherServiceImpl implements ITeacherService {
|
||||
// accountService.update(account);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateTeacher(TeacherFiledVo entity) {
|
||||
Teacher teacher = dao.get(entity.getId());
|
||||
teacher.setPhoto(entity.getPhoto());
|
||||
teacher.setWorkExperience(entity.getWorkExperience());
|
||||
teacher.setCourses(entity.getCourses());
|
||||
teacher.setExpertise(entity.getExpertise());
|
||||
dao.update(teacher);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(String id) {
|
||||
dao.deleteById(id);
|
||||
|
||||
@@ -148,7 +148,7 @@ public class StudyCourseServiceImpl implements IStudyCourseService{
|
||||
LocalDateTime parse = LocalDate.parse("2022-01-01", DateTimeFormatter.ofPattern("yyyy-MM-dd")).atStartOfDay();
|
||||
builder.addFilter(FieldFilters.gt("c.publishTime",parse));
|
||||
builder.addFilter(FieldFilters.isNull("c.kid"));
|
||||
builder.addFilter(FieldFilters.gt("s.score",4.0));
|
||||
builder.addFilter(FieldFilters.gt("c.score",4.0f));
|
||||
builder.addGroupBy("s.courseId");
|
||||
LocalDateTime now=LocalDateTime.now();
|
||||
LocalDateTime localDateTime = now.plusDays(-30);
|
||||
@@ -179,7 +179,7 @@ public class StudyCourseServiceImpl implements IStudyCourseService{
|
||||
list.add(studyCourseNameDto);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
//e.printStackTrace();
|
||||
e.printStackTrace();
|
||||
log.error("查询异常",e);
|
||||
}
|
||||
return list;
|
||||
|
||||
@@ -19,6 +19,13 @@ public class WhiteUserApi extends ApiBaseController {
|
||||
@Resource
|
||||
IWhiteUserService service;
|
||||
|
||||
|
||||
@PostMapping("/codes")
|
||||
public JsonResponse<List<String>> list(String env){
|
||||
List<String> list = service.getCodes(env);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 白名单列表
|
||||
* */
|
||||
@@ -33,7 +40,7 @@ public class WhiteUserApi extends ApiBaseController {
|
||||
* */
|
||||
@PostMapping("/save")
|
||||
public JsonResponse<WhiteUser> save(@RequestBody WhiteUser whiteUser){
|
||||
if(StringUtil.isBlank(whiteUser.getUserNo())){
|
||||
if(StringUtil.isBlank(whiteUser.getCode())){
|
||||
return badRequest("参数异常");
|
||||
}
|
||||
if(StringUtil.isBlank(whiteUser.getName())){
|
||||
@@ -52,7 +59,7 @@ public class WhiteUserApi extends ApiBaseController {
|
||||
* */
|
||||
@PostMapping("/update")
|
||||
public JsonResponse<WhiteUser> update(@RequestBody WhiteUser whiteUser){
|
||||
if(StringUtil.isBlank(whiteUser.getUserNo())){
|
||||
if(StringUtil.isBlank(whiteUser.getCode())){
|
||||
return badRequest("参数异常");
|
||||
}
|
||||
if(StringUtil.isBlank(whiteUser.getName())){
|
||||
|
||||
@@ -16,10 +16,18 @@ import javax.persistence.Table;
|
||||
public class WhiteUser extends IdEntity {
|
||||
|
||||
|
||||
@Column(name = "user_no",length = 30)
|
||||
private String userNo;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Column(name = "code",length = 30)
|
||||
private String code;
|
||||
|
||||
@Column(name = "name",length = 30)
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 环境
|
||||
* */
|
||||
@Column(name="environment")
|
||||
private String environment;
|
||||
|
||||
}
|
||||
|
||||
@@ -13,6 +13,13 @@ public interface IWhiteUserService {
|
||||
* */
|
||||
List<WhiteUser> list(WhiteUser whiteUser);
|
||||
|
||||
/**
|
||||
* 提取代码列表
|
||||
* @param env
|
||||
* @return
|
||||
*/
|
||||
List<String> getCodes(String env);
|
||||
|
||||
|
||||
/**
|
||||
* 添加
|
||||
|
||||
@@ -8,6 +8,8 @@ import com.xboe.core.orm.QueryBuilder;
|
||||
import com.xboe.system.whiteuser.dao.WhiteUserDao;
|
||||
import com.xboe.system.whiteuser.entity.WhiteUser;
|
||||
import com.xboe.system.whiteuser.service.IWhiteUserService;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -25,12 +27,15 @@ public class WhiteUserServiceImpl implements IWhiteUserService {
|
||||
public List<WhiteUser> list(WhiteUser whiteUser) {
|
||||
QueryBuilder builder = QueryBuilder.from(WhiteUser.class);
|
||||
if(whiteUser!=null){
|
||||
if(StringUtil.isNotBlank(whiteUser.getUserNo())){
|
||||
builder.addFilter(FieldFilters.eq("userNo",whiteUser.getUserNo()));
|
||||
if(StringUtil.isNotBlank(whiteUser.getCode())){
|
||||
builder.addFilter(FieldFilters.eq("code",whiteUser.getCode()));
|
||||
}
|
||||
if(StringUtil.isNotBlank(whiteUser.getName())){
|
||||
builder.addFilter(FieldFilters.like("name", LikeMatchMode.ANYWHERE,whiteUser.getName()));
|
||||
}
|
||||
if(whiteUser.getEnvironment()!=null){
|
||||
builder.addFilter(FieldFilters.eq("environment",whiteUser.getEnvironment()));
|
||||
}
|
||||
}
|
||||
builder.addOrder(OrderCondition.desc("id"));
|
||||
List<WhiteUser> list = whiteUserDao.findList(builder.builder());
|
||||
@@ -57,4 +62,18 @@ public class WhiteUserServiceImpl implements IWhiteUserService {
|
||||
WhiteUser whiteUser = whiteUserDao.get(id);
|
||||
return whiteUser;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getCodes(String env) {
|
||||
if(StringUtils.isBlank(env)) {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<String> codes = (List<String>) whiteUserDao.findListField("code");
|
||||
return codes;
|
||||
}else {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<String> codes = (List<String>) whiteUserDao.findListField("code",FieldFilters.eq("environment", env));
|
||||
return codes;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ xboe.local.dev=true
|
||||
## 上传相磁的路径配置
|
||||
xboe.upload.file.temp_path=E:/Projects/BOE/10/static/temp
|
||||
xboe.upload.file.save_path=E:/Projects/BOE/10/static/upload
|
||||
xboe.upload.file.http_path=http://192.168.0.11:9090/cdn/upload
|
||||
xboe.upload.file.http_path=http://127.0.0.1:9090/cdn/upload
|
||||
|
||||
## 外部接口调用地址 旧系统机构及用户数据接口
|
||||
xboe.externalinterface.url.system=http://localhost:9091
|
||||
|
||||
Reference in New Issue
Block a user