Merge branch '20240109-yw'
commit
56a0ee0935
@ -0,0 +1,135 @@
|
|||||||
|
package com.glxp.api.controller.anno;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.lang.func.Func;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.glxp.api.annotation.AuthRuleAnnotation;
|
||||||
|
import com.glxp.api.annotation.Log;
|
||||||
|
import com.glxp.api.common.enums.ResultEnum;
|
||||||
|
import com.glxp.api.common.res.BaseResponse;
|
||||||
|
import com.glxp.api.common.util.ResultVOUtils;
|
||||||
|
import com.glxp.api.constant.BusinessType;
|
||||||
|
import com.glxp.api.controller.BaseController;
|
||||||
|
import com.glxp.api.entity.anno.AnncmntDevEntity;
|
||||||
|
import com.glxp.api.entity.auth.SysCustomConfigDetailEntity;
|
||||||
|
import com.glxp.api.req.anno.AnncmntDevEntityRequest;
|
||||||
|
import com.glxp.api.req.auth.SysCustomConfigDetailRequest;
|
||||||
|
import com.glxp.api.req.system.DeleteRequest;
|
||||||
|
import com.glxp.api.res.PageSimpleResponse;
|
||||||
|
import com.glxp.api.service.anno.AnncmntDevService;
|
||||||
|
import com.glxp.api.util.BeanCopyUtils;
|
||||||
|
import com.glxp.api.util.StringUtils;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
|
import org.springframework.validation.BindingResult;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户信息
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ApiIgnore
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/anno/anncmnt/dev")
|
||||||
|
public class AnncmntDevController extends BaseController {
|
||||||
|
|
||||||
|
private final AnncmntDevService anncmntDevService;
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/list")
|
||||||
|
public BaseResponse list(AnncmntDevEntityRequest request, BindingResult bindingResult) {
|
||||||
|
if (bindingResult.hasErrors()) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||||
|
}
|
||||||
|
IPage page = new Page(request.getPage(),request.getLimit());
|
||||||
|
IPage<AnncmntDevEntity> pages = anncmntDevService.page(page, getQueryWrapper(request));
|
||||||
|
PageSimpleResponse<AnncmntDevEntity> pageSimpleResponse = new PageSimpleResponse<>();
|
||||||
|
pageSimpleResponse.setTotal(pages.getTotal());
|
||||||
|
pageSimpleResponse.setList(pages.getRecords());
|
||||||
|
|
||||||
|
return ResultVOUtils.success(pageSimpleResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
@AuthRuleAnnotation("")
|
||||||
|
@PostMapping("/save")
|
||||||
|
@Log(title = "器械公告管理", businessType = BusinessType.INSERT)
|
||||||
|
public BaseResponse save(@RequestBody AnncmntDevEntity entity,
|
||||||
|
BindingResult bindingResult) {
|
||||||
|
|
||||||
|
if (bindingResult.hasErrors()) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean b = anncmntDevService.save(entity);
|
||||||
|
if (!b) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
|
||||||
|
}
|
||||||
|
return ResultVOUtils.success("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
@AuthRuleAnnotation("")
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@Log(title = "器械公告管理", businessType = BusinessType.UPDATE)
|
||||||
|
public BaseResponse edit(@RequestBody @Valid AnncmntDevEntity entity,
|
||||||
|
BindingResult bindingResult) {
|
||||||
|
|
||||||
|
if (bindingResult.hasErrors()) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||||
|
}
|
||||||
|
if (entity.getId() == null) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
|
||||||
|
}
|
||||||
|
AnncmntDevEntity originEntity = anncmntDevService.getById(entity.getId());
|
||||||
|
if (originEntity == null) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
|
||||||
|
}
|
||||||
|
boolean b = anncmntDevService.updateById(entity);
|
||||||
|
if (!b) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultVOUtils.success("修改成功!");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@AuthRuleAnnotation("")
|
||||||
|
@PostMapping("/delete")
|
||||||
|
@Log(title = "器械公告管理", businessType = BusinessType.DELETE)
|
||||||
|
public BaseResponse delete(@RequestBody DeleteRequest deleteRequest) {
|
||||||
|
|
||||||
|
if (StringUtils.isEmpty(deleteRequest.getId())) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
|
||||||
|
}
|
||||||
|
boolean b = anncmntDevService.removeById(deleteRequest.getId());
|
||||||
|
|
||||||
|
if (!b) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
|
||||||
|
}
|
||||||
|
return ResultVOUtils.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static QueryWrapper<AnncmntDevEntity> getQueryWrapper(AnncmntDevEntityRequest request) {
|
||||||
|
AnncmntDevEntity entity = new AnncmntDevEntity();
|
||||||
|
BeanCopyUtils.copy(request, entity);
|
||||||
|
QueryWrapper queryWrapper = new QueryWrapper(entity);
|
||||||
|
if(StringUtils.isNotBlank(request.getEndTime())){
|
||||||
|
queryWrapper.le("publicTime",request.getEndTime());
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(request.getStartTime())){
|
||||||
|
queryWrapper.ge("publicTime",request.getStartTime());
|
||||||
|
}
|
||||||
|
return queryWrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,225 @@
|
|||||||
|
package com.glxp.api.controller.auth;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.beust.jcommander.internal.Lists;
|
||||||
|
import com.beust.jcommander.internal.Maps;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.glxp.api.annotation.AuthRuleAnnotation;
|
||||||
|
import com.glxp.api.annotation.Log;
|
||||||
|
import com.glxp.api.common.enums.ResultEnum;
|
||||||
|
import com.glxp.api.common.res.BaseResponse;
|
||||||
|
import com.glxp.api.common.util.ResultVOUtils;
|
||||||
|
import com.glxp.api.constant.BusinessType;
|
||||||
|
import com.glxp.api.controller.BaseController;
|
||||||
|
import com.glxp.api.entity.auth.SysCustomConfigDetailEntity;
|
||||||
|
import com.glxp.api.entity.auth.SysCustomConfigEntity;
|
||||||
|
import com.glxp.api.req.auth.SysCustomConfigDetailRequest;
|
||||||
|
import com.glxp.api.req.auth.SysCustomConfigRequest;
|
||||||
|
import com.glxp.api.req.system.DeleteRequest;
|
||||||
|
import com.glxp.api.res.PageSimpleResponse;
|
||||||
|
import com.glxp.api.res.auth.SysCustomConfigFromDetailResponse;
|
||||||
|
import com.glxp.api.res.auth.SysCustomConfigResponse;
|
||||||
|
import com.glxp.api.service.auth.ISysCustomConfigDetailService;
|
||||||
|
import com.glxp.api.service.auth.ISysCustomConfigService;
|
||||||
|
import com.glxp.api.util.StringUtils;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.validation.BindingResult;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户信息
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ApiIgnore
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/custom/config")
|
||||||
|
public class SysCustomConfigController extends BaseController {
|
||||||
|
|
||||||
|
private final ISysCustomConfigService sysCustomConfigService;
|
||||||
|
|
||||||
|
private final ISysCustomConfigDetailService sysCustomConfigDetailService;
|
||||||
|
|
||||||
|
@GetMapping("/list")
|
||||||
|
public BaseResponse list(SysCustomConfigRequest request, BindingResult bindingResult) {
|
||||||
|
if (bindingResult.hasErrors()) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||||
|
}
|
||||||
|
List<SysCustomConfigEntity> list = sysCustomConfigService.filterSysCustomConfig(request);
|
||||||
|
PageInfo<SysCustomConfigEntity> authAdminPageInfo = new PageInfo<>(list);
|
||||||
|
PageSimpleResponse<SysCustomConfigEntity> authAdminPageSimpleResponse = new PageSimpleResponse<>();
|
||||||
|
authAdminPageSimpleResponse.setTotal(authAdminPageInfo.getTotal());
|
||||||
|
authAdminPageSimpleResponse.setList(list);
|
||||||
|
|
||||||
|
return ResultVOUtils.success(authAdminPageSimpleResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
@AuthRuleAnnotation("")
|
||||||
|
@PostMapping("/save")
|
||||||
|
@Log(title = "界面配置管理", businessType = BusinessType.INSERT)
|
||||||
|
public BaseResponse save(@RequestBody SysCustomConfigEntity entity,
|
||||||
|
BindingResult bindingResult) {
|
||||||
|
|
||||||
|
if (bindingResult.hasErrors()) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean b = sysCustomConfigService.insertSysCustomConfig(entity);
|
||||||
|
if (!b) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
|
||||||
|
}
|
||||||
|
return ResultVOUtils.success("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
@AuthRuleAnnotation("")
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@Log(title = "界面配置管理", businessType = BusinessType.UPDATE)
|
||||||
|
public BaseResponse edit(@RequestBody @Valid SysCustomConfigEntity entity,
|
||||||
|
BindingResult bindingResult) {
|
||||||
|
|
||||||
|
if (bindingResult.hasErrors()) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||||
|
}
|
||||||
|
if (entity.getId() == null) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
|
||||||
|
}
|
||||||
|
SysCustomConfigEntity originEntity = sysCustomConfigService.selectById(entity.getId());
|
||||||
|
if (originEntity == null) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
|
||||||
|
}
|
||||||
|
boolean b = sysCustomConfigService.updateSysCustomConfig(entity);
|
||||||
|
if (!b) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultVOUtils.success("修改成功!");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@AuthRuleAnnotation("")
|
||||||
|
@PostMapping("/delete")
|
||||||
|
@Log(title = "界面配置管理", businessType = BusinessType.DELETE)
|
||||||
|
public BaseResponse delete(@RequestBody DeleteRequest deleteRequest) {
|
||||||
|
|
||||||
|
if (StringUtils.isEmpty(deleteRequest.getId())) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
|
||||||
|
}
|
||||||
|
boolean b = sysCustomConfigService.deleteById(deleteRequest.getId());
|
||||||
|
sysCustomConfigDetailService.deleteByConfigId(deleteRequest.getId());
|
||||||
|
if (!b) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
|
||||||
|
}
|
||||||
|
return ResultVOUtils.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@AuthRuleAnnotation("")
|
||||||
|
@PostMapping("/getConfigs")
|
||||||
|
@Log(title = "界面配置管理")
|
||||||
|
public BaseResponse getConfigs(@RequestBody SysCustomConfigRequest request,BindingResult bindingResult) {
|
||||||
|
|
||||||
|
if (bindingResult.hasErrors()) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||||
|
}
|
||||||
|
List<SysCustomConfigEntity> list = sysCustomConfigService.filterSysCustomConfig(request);
|
||||||
|
if (CollectionUtil.isEmpty(list)) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.DATA_NOT);
|
||||||
|
}
|
||||||
|
SysCustomConfigEntity sysCustomConfigEntity = list.get(0);
|
||||||
|
SysCustomConfigDetailRequest detailRequest = new SysCustomConfigDetailRequest();
|
||||||
|
detailRequest.setConfigId(sysCustomConfigEntity.getId().toString());
|
||||||
|
detailRequest.setIsShow("1");
|
||||||
|
// detailRequest.setType(request.getType());
|
||||||
|
List<SysCustomConfigDetailEntity> detailList = sysCustomConfigDetailService.filterSysCustomConfigDetail(detailRequest);
|
||||||
|
Map<String,List<SysCustomConfigDetailEntity>> map = detailList.stream().collect(
|
||||||
|
Collectors.groupingBy(SysCustomConfigDetailEntity::getType));
|
||||||
|
List<SysCustomConfigDetailEntity> tableList = map.get("1") == null? Lists.newArrayList():map.get("1");
|
||||||
|
List<SysCustomConfigDetailEntity> queryList = map.get("2") == null? Lists.newArrayList():map.get("2");
|
||||||
|
List<SysCustomConfigDetailEntity> fromList = map.get("3") == null? Lists.newArrayList():map.get("3");
|
||||||
|
|
||||||
|
List<SysCustomConfigDetailEntity> fromSortList = fromList.stream().sorted(Comparator.comparing(SysCustomConfigDetailEntity::getLineNumber)).collect(Collectors.toList());
|
||||||
|
|
||||||
|
Map<Integer,List<SysCustomConfigDetailEntity>> fromMap = fromSortList.stream().collect(
|
||||||
|
Collectors.groupingBy(SysCustomConfigDetailEntity::getLineNumber,LinkedHashMap::new,Collectors.toList()));
|
||||||
|
List<SysCustomConfigFromDetailResponse> fromDetailList = Lists.newArrayList();
|
||||||
|
for (Map.Entry<Integer, List<SysCustomConfigDetailEntity>> entry : fromMap.entrySet()) {
|
||||||
|
SysCustomConfigFromDetailResponse sysCustomConfigFromDetailResponse = new SysCustomConfigFromDetailResponse();
|
||||||
|
sysCustomConfigFromDetailResponse.setNumber(entry.getKey());
|
||||||
|
List<SysCustomConfigDetailEntity> entities = entry.getValue();
|
||||||
|
entities.stream().forEach(s->{
|
||||||
|
if(StringUtils.isNotEmpty(s.getCheckRules())){
|
||||||
|
String replacedJsonString = s.getCheckRules().replaceAll("(\\w+)(\\s*:\\s*)", "\"$1\"$2");
|
||||||
|
JSONArray object = JSONArray.parseArray(replacedJsonString);
|
||||||
|
s.setCheckRulesObj(object);
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotEmpty(s.getLableRule())){
|
||||||
|
JSONObject objectLaber = JSONObject.parseObject(s.getLableRule());
|
||||||
|
List<Map> mapList = Lists.newArrayList();
|
||||||
|
Iterator<String> it = objectLaber.keySet().iterator();
|
||||||
|
String inputType = s.getInputType();
|
||||||
|
while(it.hasNext()) {
|
||||||
|
Map<String,Object> mapTemp = Maps.newHashMap();
|
||||||
|
String key = (String) it.next();
|
||||||
|
String value = objectLaber.getString(key);
|
||||||
|
mapTemp.put("label", value);
|
||||||
|
if("number".equals(inputType)){
|
||||||
|
mapTemp.put("value", Integer.parseInt(key));
|
||||||
|
}else{
|
||||||
|
mapTemp.put("value", key);
|
||||||
|
}
|
||||||
|
mapList.add(mapTemp);
|
||||||
|
}
|
||||||
|
s.setLableRuleObj(mapList);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
sysCustomConfigFromDetailResponse.setList(entities);
|
||||||
|
fromDetailList.add(sysCustomConfigFromDetailResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
tableList.stream().forEach(s->{
|
||||||
|
if(StringUtils.isNotEmpty(s.getLableRule())) {
|
||||||
|
JSONObject objectLaber = JSONObject.parseObject(s.getLableRule());
|
||||||
|
s.setLableRuleObj(objectLaber);
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotEmpty(s.getButtonRule())){
|
||||||
|
JSONArray objectButton = JSONArray.parseArray(s.getButtonRule());
|
||||||
|
s.setButtonRulObj(objectButton);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
queryList.stream().forEach(s->{
|
||||||
|
if(StringUtils.isNotEmpty(s.getLableRule())){
|
||||||
|
JSONObject objectLaber = JSONObject.parseObject(s.getLableRule());
|
||||||
|
List<Map> mapList = Lists.newArrayList();
|
||||||
|
Iterator<String> it = objectLaber.keySet().iterator();
|
||||||
|
while(it.hasNext()) {
|
||||||
|
Map<String,String> mapTemp = Maps.newHashMap();
|
||||||
|
String key = (String) it.next();
|
||||||
|
String value = objectLaber.getString(key);
|
||||||
|
mapTemp.put("label", value);
|
||||||
|
mapTemp.put("value", key);
|
||||||
|
mapList.add(mapTemp);
|
||||||
|
}
|
||||||
|
s.setLableRuleObj(mapList);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
SysCustomConfigResponse sysCustomConfigResponse = new SysCustomConfigResponse();
|
||||||
|
BeanUtil.copyProperties(sysCustomConfigEntity, sysCustomConfigResponse);
|
||||||
|
sysCustomConfigResponse.setTableList(tableList);
|
||||||
|
sysCustomConfigResponse.setQueryList(queryList);
|
||||||
|
sysCustomConfigResponse.setFromList(fromDetailList);
|
||||||
|
return ResultVOUtils.success(sysCustomConfigResponse);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,115 @@
|
|||||||
|
package com.glxp.api.controller.auth;
|
||||||
|
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.glxp.api.annotation.AuthRuleAnnotation;
|
||||||
|
import com.glxp.api.annotation.Log;
|
||||||
|
import com.glxp.api.common.enums.ResultEnum;
|
||||||
|
import com.glxp.api.common.res.BaseResponse;
|
||||||
|
import com.glxp.api.common.util.ResultVOUtils;
|
||||||
|
import com.glxp.api.constant.BusinessType;
|
||||||
|
import com.glxp.api.controller.BaseController;
|
||||||
|
import com.glxp.api.entity.auth.SysCustomConfigDetailEntity;
|
||||||
|
import com.glxp.api.req.auth.SysCustomConfigDetailRequest;
|
||||||
|
import com.glxp.api.req.system.DeleteRequest;
|
||||||
|
import com.glxp.api.res.PageSimpleResponse;
|
||||||
|
import com.glxp.api.service.auth.ISysCustomConfigDetailService;
|
||||||
|
import com.glxp.api.util.StringUtils;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.validation.BindingResult;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户信息
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ApiIgnore
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/system/custom/configDetail")
|
||||||
|
public class SysCustomConfigDetailController extends BaseController {
|
||||||
|
|
||||||
|
private final ISysCustomConfigDetailService sysCustomConfigDetailService;
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/list")
|
||||||
|
public BaseResponse list(SysCustomConfigDetailRequest request, BindingResult bindingResult) {
|
||||||
|
if (bindingResult.hasErrors()) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||||
|
}
|
||||||
|
List<SysCustomConfigDetailEntity> list = sysCustomConfigDetailService.filterSysCustomConfigDetail(request);
|
||||||
|
PageInfo<SysCustomConfigDetailEntity> authAdminPageInfo = new PageInfo<>(list);
|
||||||
|
PageSimpleResponse<SysCustomConfigDetailEntity> authAdminPageSimpleResponse = new PageSimpleResponse<>();
|
||||||
|
authAdminPageSimpleResponse.setTotal(authAdminPageInfo.getTotal());
|
||||||
|
authAdminPageSimpleResponse.setList(list);
|
||||||
|
|
||||||
|
return ResultVOUtils.success(authAdminPageSimpleResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
@AuthRuleAnnotation("")
|
||||||
|
@PostMapping("/save")
|
||||||
|
@Log(title = "界面配置管理", businessType = BusinessType.INSERT)
|
||||||
|
public BaseResponse save(@RequestBody SysCustomConfigDetailEntity entity,
|
||||||
|
BindingResult bindingResult) {
|
||||||
|
|
||||||
|
if (bindingResult.hasErrors()) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean b = sysCustomConfigDetailService.insertSysCustomConfigDetail(entity);
|
||||||
|
if (!b) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
|
||||||
|
}
|
||||||
|
return ResultVOUtils.success("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
@AuthRuleAnnotation("")
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@Log(title = "界面配置管理", businessType = BusinessType.UPDATE)
|
||||||
|
public BaseResponse edit(@RequestBody @Valid SysCustomConfigDetailEntity entity,
|
||||||
|
BindingResult bindingResult) {
|
||||||
|
|
||||||
|
if (bindingResult.hasErrors()) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||||
|
}
|
||||||
|
if (entity.getId() == null) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
|
||||||
|
}
|
||||||
|
SysCustomConfigDetailEntity originEntity = sysCustomConfigDetailService.selectById(entity.getId());
|
||||||
|
if (originEntity == null) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
|
||||||
|
}
|
||||||
|
boolean b = sysCustomConfigDetailService.updateSysCustomConfigDetail(entity);
|
||||||
|
if (!b) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultVOUtils.success("修改成功!");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@AuthRuleAnnotation("")
|
||||||
|
@PostMapping("/delete")
|
||||||
|
@Log(title = "界面配置管理", businessType = BusinessType.DELETE)
|
||||||
|
public BaseResponse delete(@RequestBody DeleteRequest deleteRequest) {
|
||||||
|
|
||||||
|
if (StringUtils.isEmpty(deleteRequest.getId())) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
|
||||||
|
}
|
||||||
|
boolean b = sysCustomConfigDetailService.deleteById(deleteRequest.getId());
|
||||||
|
|
||||||
|
if (!b) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
|
||||||
|
}
|
||||||
|
return ResultVOUtils.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
package com.glxp.api.dao.auth;
|
||||||
|
|
||||||
|
|
||||||
|
import com.glxp.api.entity.auth.SysCustomConfigEntity;
|
||||||
|
import com.glxp.api.req.auth.SysCustomConfigRequest;
|
||||||
|
import com.glxp.api.req.system.DeleteRequest;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface SysCustomConfigDao {
|
||||||
|
|
||||||
|
List<SysCustomConfigEntity> filterSysCustomConfig(SysCustomConfigRequest request);
|
||||||
|
|
||||||
|
boolean insertSysCustomConfig(SysCustomConfigEntity entity);
|
||||||
|
|
||||||
|
boolean updateSysCustomConfig(SysCustomConfigEntity entity);
|
||||||
|
|
||||||
|
boolean deleteById(String id);
|
||||||
|
|
||||||
|
SysCustomConfigEntity selectById(Long id);
|
||||||
|
|
||||||
|
boolean deleteContact(DeleteRequest request);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package com.glxp.api.dao.auth;
|
||||||
|
|
||||||
|
|
||||||
|
import com.glxp.api.entity.auth.SysCustomConfigDetailEntity;
|
||||||
|
import com.glxp.api.req.auth.SysCustomConfigDetailRequest;
|
||||||
|
import com.glxp.api.req.system.DeleteRequest;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface SysCustomConfigDetailDao {
|
||||||
|
|
||||||
|
List<SysCustomConfigDetailEntity> filterSysCustomConfigDetail(SysCustomConfigDetailRequest request);
|
||||||
|
|
||||||
|
boolean insertSysCustomConfigDetail(SysCustomConfigDetailEntity entity);
|
||||||
|
|
||||||
|
boolean updateSysCustomConfigDetail(SysCustomConfigDetailEntity entity);
|
||||||
|
|
||||||
|
boolean deleteById(String id);
|
||||||
|
|
||||||
|
boolean deleteByConfigId(String id);
|
||||||
|
|
||||||
|
SysCustomConfigDetailEntity selectById(Long id);
|
||||||
|
|
||||||
|
boolean deleteContact(DeleteRequest request);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,188 @@
|
|||||||
|
package com.glxp.api.entity.auth;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author 作者
|
||||||
|
* @since 2023-02-07
|
||||||
|
*/
|
||||||
|
@TableName("sys_custom_config_detail")
|
||||||
|
@Data
|
||||||
|
public class SysCustomConfigDetailEntity {
|
||||||
|
|
||||||
|
|
||||||
|
@TableId(value = "id", type = IdType.INPUT)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配置id
|
||||||
|
*/
|
||||||
|
@TableField("configId")
|
||||||
|
private Long configId;
|
||||||
|
/**
|
||||||
|
* 类型 1列表 2表单 3查询框
|
||||||
|
*/
|
||||||
|
@TableField("type")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否显示 1显示 2隐藏
|
||||||
|
*/
|
||||||
|
@TableField("isShow")
|
||||||
|
private String isShow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列名
|
||||||
|
*/
|
||||||
|
@TableField("columnName")
|
||||||
|
private String columnName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列描述
|
||||||
|
*/
|
||||||
|
@TableField("columnDesc")
|
||||||
|
private String columnDesc;
|
||||||
|
/**
|
||||||
|
* 列类型
|
||||||
|
*/
|
||||||
|
@TableField("columnType")
|
||||||
|
private String columnType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 颜色规则
|
||||||
|
*/
|
||||||
|
@TableField("colorRule")
|
||||||
|
private String colorRule;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字段替换规则
|
||||||
|
*/
|
||||||
|
@TableField("lableRule")
|
||||||
|
private String lableRule;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字段替换规则
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Object lableRuleObj;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按钮规则
|
||||||
|
*/
|
||||||
|
@TableField("buttonRule")
|
||||||
|
private String buttonRule;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按钮规则
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Object buttonRulObj;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宽度
|
||||||
|
*/
|
||||||
|
@TableField("width")
|
||||||
|
private Integer width;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否排序
|
||||||
|
*/
|
||||||
|
@TableField("sort")
|
||||||
|
private Boolean sort;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否缩略
|
||||||
|
*/
|
||||||
|
@TableField("tooltip")
|
||||||
|
private Boolean tooltip;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
@TableField("number")
|
||||||
|
private Integer number;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行号
|
||||||
|
*/
|
||||||
|
@TableField("lineNumber")
|
||||||
|
private Integer lineNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击事件
|
||||||
|
*/
|
||||||
|
@TableField("clickFuc")
|
||||||
|
private String clickFuc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 禁用方法
|
||||||
|
*/
|
||||||
|
@TableField("禁用方法")
|
||||||
|
private String disabledFuc;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* eval表达式
|
||||||
|
*/
|
||||||
|
@TableField("eval表达式")
|
||||||
|
private String expression;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 大小
|
||||||
|
*/
|
||||||
|
@TableField("size")
|
||||||
|
private String size;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 样式
|
||||||
|
*/
|
||||||
|
@TableField("style")
|
||||||
|
private String style;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否禁用
|
||||||
|
*/
|
||||||
|
@TableField("disabled")
|
||||||
|
private Boolean disabled;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证规则
|
||||||
|
*/
|
||||||
|
@TableField("checkRules")
|
||||||
|
private String checkRules;
|
||||||
|
/**
|
||||||
|
* 验证规则
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Object checkRulesObj;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* input类型
|
||||||
|
*/
|
||||||
|
@TableField("inputType")
|
||||||
|
private String inputType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取数据方法
|
||||||
|
*/
|
||||||
|
@TableField("dataFuc")
|
||||||
|
private String dataFuc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否展示详细 1是 2否
|
||||||
|
*/
|
||||||
|
@TableField("isShowXx")
|
||||||
|
private String isShowXx;
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
package com.glxp.api.entity.auth;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author 作者
|
||||||
|
* @since 2023-02-07
|
||||||
|
*/
|
||||||
|
@TableName("sys_custom_config")
|
||||||
|
@Data
|
||||||
|
public class SysCustomConfigEntity {
|
||||||
|
|
||||||
|
|
||||||
|
@TableId(value = "id", type = IdType.INPUT)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务标识
|
||||||
|
*/
|
||||||
|
@TableField("businessType")
|
||||||
|
private String businessType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
@TableField("remark")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型 1列表 2表单
|
||||||
|
*/
|
||||||
|
@TableField("type")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表点击方法
|
||||||
|
*/
|
||||||
|
@TableField("handleChangeFuc")
|
||||||
|
private String handleChangeFuc;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.glxp.api.req.auth;
|
||||||
|
|
||||||
|
|
||||||
|
import com.glxp.api.util.page.ListPageRequest;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SysCustomConfigDetailRequest extends ListPageRequest {
|
||||||
|
private String configId;
|
||||||
|
private String type;
|
||||||
|
private String isShow;
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
package com.glxp.api.req.auth;
|
||||||
|
|
||||||
|
|
||||||
|
import com.glxp.api.util.page.ListPageRequest;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SysCustomConfigRequest extends ListPageRequest {
|
||||||
|
private String businessType;
|
||||||
|
|
||||||
|
private String remark;
|
||||||
|
private String type;
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.glxp.api.res.auth;
|
||||||
|
|
||||||
|
import com.glxp.api.entity.auth.SysCustomConfigDetailEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SysCustomConfigFromDetailResponse {
|
||||||
|
Integer number;
|
||||||
|
List<SysCustomConfigDetailEntity> list;
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.glxp.api.res.auth;
|
||||||
|
|
||||||
|
import com.glxp.api.entity.auth.SysCustomConfigDetailEntity;
|
||||||
|
import com.glxp.api.entity.auth.SysCustomConfigEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class SysCustomConfigResponse extends SysCustomConfigEntity{
|
||||||
|
|
||||||
|
List<SysCustomConfigDetailEntity> tableList;
|
||||||
|
|
||||||
|
List<SysCustomConfigDetailEntity> queryList;
|
||||||
|
|
||||||
|
List<SysCustomConfigFromDetailResponse> fromList;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
package com.glxp.api.service.auth;
|
||||||
|
|
||||||
|
import com.glxp.api.entity.auth.SysCustomConfigDetailEntity;
|
||||||
|
import com.glxp.api.req.auth.SysCustomConfigDetailRequest;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ISysCustomConfigDetailService {
|
||||||
|
|
||||||
|
List<SysCustomConfigDetailEntity> filterSysCustomConfigDetail(SysCustomConfigDetailRequest request);
|
||||||
|
|
||||||
|
|
||||||
|
boolean insertSysCustomConfigDetail(SysCustomConfigDetailEntity entity);
|
||||||
|
|
||||||
|
boolean updateSysCustomConfigDetail(SysCustomConfigDetailEntity entity);
|
||||||
|
|
||||||
|
boolean deleteById(String id);
|
||||||
|
|
||||||
|
boolean deleteByConfigId(String id);
|
||||||
|
|
||||||
|
SysCustomConfigDetailEntity selectById(Long id);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
package com.glxp.api.service.auth;
|
||||||
|
|
||||||
|
import com.glxp.api.entity.auth.SysCustomConfigEntity;
|
||||||
|
import com.glxp.api.req.auth.SysCustomConfigRequest;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ISysCustomConfigService {
|
||||||
|
|
||||||
|
List<SysCustomConfigEntity> filterSysCustomConfig(SysCustomConfigRequest request);
|
||||||
|
|
||||||
|
|
||||||
|
boolean insertSysCustomConfig(SysCustomConfigEntity entity);
|
||||||
|
|
||||||
|
boolean updateSysCustomConfig(SysCustomConfigEntity entity);
|
||||||
|
|
||||||
|
boolean deleteById(String id);
|
||||||
|
|
||||||
|
SysCustomConfigEntity selectById(Long id);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
package com.glxp.api.service.auth.impl;
|
||||||
|
|
||||||
|
import com.glxp.api.dao.auth.SysCustomConfigDetailDao;
|
||||||
|
import com.glxp.api.entity.auth.SysCustomConfigDetailEntity;
|
||||||
|
import com.glxp.api.req.auth.SysCustomConfigDetailRequest;
|
||||||
|
import com.glxp.api.service.auth.ISysCustomConfigDetailService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public class SysCustomConfigDetailServiceImpl implements ISysCustomConfigDetailService {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SysCustomConfigDetailDao sysCustomConfigDetailDao;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SysCustomConfigDetailEntity> filterSysCustomConfigDetail(SysCustomConfigDetailRequest request) {
|
||||||
|
return sysCustomConfigDetailDao.filterSysCustomConfigDetail(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean insertSysCustomConfigDetail(SysCustomConfigDetailEntity entity) {
|
||||||
|
return sysCustomConfigDetailDao.insertSysCustomConfigDetail(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean updateSysCustomConfigDetail(SysCustomConfigDetailEntity entity) {
|
||||||
|
return sysCustomConfigDetailDao.updateSysCustomConfigDetail(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean deleteById(String id) {
|
||||||
|
return sysCustomConfigDetailDao.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean deleteByConfigId(String id) {
|
||||||
|
return sysCustomConfigDetailDao.deleteByConfigId(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SysCustomConfigDetailEntity selectById(Long id) {
|
||||||
|
return sysCustomConfigDetailDao.selectById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,56 @@
|
|||||||
|
package com.glxp.api.service.auth.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.glxp.api.dao.auth.SysCustomConfigDao;
|
||||||
|
import com.glxp.api.entity.auth.SysCustomConfigEntity;
|
||||||
|
import com.glxp.api.req.auth.SysCustomConfigRequest;
|
||||||
|
import com.glxp.api.service.auth.ISysCustomConfigService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public class SysCustomConfigServiceImpl implements ISysCustomConfigService {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private SysCustomConfigDao sysCustomConfigDao;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SysCustomConfigEntity> filterSysCustomConfig(SysCustomConfigRequest request) {
|
||||||
|
if (request == null) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
if (request.getPage() != null) {
|
||||||
|
int offset = (request.getPage() - 1) * request.getLimit();
|
||||||
|
PageHelper.offsetPage(offset, request.getLimit());
|
||||||
|
}
|
||||||
|
return sysCustomConfigDao.filterSysCustomConfig(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean insertSysCustomConfig(SysCustomConfigEntity entity) {
|
||||||
|
return sysCustomConfigDao.insertSysCustomConfig(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean updateSysCustomConfig(SysCustomConfigEntity entity) {
|
||||||
|
return sysCustomConfigDao.updateSysCustomConfig(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean deleteById(String id) {
|
||||||
|
return sysCustomConfigDao.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SysCustomConfigEntity selectById(Long id) {
|
||||||
|
return sysCustomConfigDao.selectById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,64 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
|
|
||||||
|
<mapper namespace="com.glxp.api.dao.auth.SysCustomConfigDao">
|
||||||
|
<select id="filterSysCustomConfig" parameterType="com.glxp.api.req.auth.SysCustomConfigRequest"
|
||||||
|
resultType="com.glxp.api.entity.auth.SysCustomConfigEntity">
|
||||||
|
SELECT *
|
||||||
|
FROM sys_custom_config
|
||||||
|
<where>
|
||||||
|
<if test="businessType != null and '' != businessType">
|
||||||
|
AND businessType = #{businessType}
|
||||||
|
</if>
|
||||||
|
<if test="remark != '' and remark != null">
|
||||||
|
AND remark like concat('%', #{remark}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="type != null and '' != type">
|
||||||
|
AND type = #{type}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<insert id="insertSysCustomConfig" keyProperty="id"
|
||||||
|
parameterType="com.glxp.api.entity.auth.SysCustomConfigEntity">
|
||||||
|
INSERT INTO sys_custom_config
|
||||||
|
(id,remark, businessType,type,handleChangeFuc)
|
||||||
|
values (#{id},#{remark}, #{businessType},#{type},#{handleChangeFuc})
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSysCustomConfig" parameterType="com.glxp.api.entity.auth.SysCustomConfigEntity">
|
||||||
|
UPDATE sys_custom_config
|
||||||
|
<set>
|
||||||
|
<if test="businessType != null">
|
||||||
|
businessType=#{businessType},
|
||||||
|
</if>
|
||||||
|
<if test="remark != null">
|
||||||
|
remark=#{remark},
|
||||||
|
</if>
|
||||||
|
<if test="handleChangeFuc != null">
|
||||||
|
handleChangeFuc=#{handleChangeFuc},
|
||||||
|
</if>
|
||||||
|
<if test="type != null">
|
||||||
|
type=#{type},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
WHERE id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteById" parameterType="java.lang.String">
|
||||||
|
delete
|
||||||
|
from sys_custom_config
|
||||||
|
where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectById" parameterType="java.lang.Long"
|
||||||
|
resultType="com.glxp.api.entity.auth.SysCustomConfigEntity">
|
||||||
|
SELECT *
|
||||||
|
FROM sys_custom_config
|
||||||
|
WHERE (
|
||||||
|
id = #{id})
|
||||||
|
limit 1
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -0,0 +1,133 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
|
|
||||||
|
<mapper namespace="com.glxp.api.dao.auth.SysCustomConfigDetailDao">
|
||||||
|
<select id="filterSysCustomConfigDetail" parameterType="com.glxp.api.req.auth.SysCustomConfigDetailRequest"
|
||||||
|
resultType="com.glxp.api.entity.auth.SysCustomConfigDetailEntity">
|
||||||
|
SELECT *
|
||||||
|
FROM sys_custom_config_detail
|
||||||
|
<where>
|
||||||
|
<if test="configId != null and '' != configId">
|
||||||
|
AND configId = #{configId}
|
||||||
|
</if>
|
||||||
|
<if test="type != null and '' != type">
|
||||||
|
AND type = #{type}
|
||||||
|
</if>
|
||||||
|
<if test="isShow != null and '' != isShow">
|
||||||
|
AND isShow = #{isShow}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by lineNumber asc,number desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<insert id="insertSysCustomConfigDetail" keyProperty="id"
|
||||||
|
parameterType="com.glxp.api.entity.auth.SysCustomConfigDetailEntity">
|
||||||
|
INSERT INTO sys_custom_config_detail
|
||||||
|
(id,configId,type,isShow, columnName,columnDesc,columnType,colorRule,sort,lableRule,width,tooltip,buttonRule,number,
|
||||||
|
clickFuc,disabledFuc,expression,size,style,disabled,checkRules,inputType,lineNumber,dataFuc,isShowXx)
|
||||||
|
values (#{id},#{configId},#{type},#{isShow}, #{columnName},#{columnDesc},#{columnType},#{colorRule},#{sort},
|
||||||
|
#{lableRule},#{width},#{tooltip},#{buttonRule},#{number},#{clickFuc},#{disabledFuc},#{expression},#{size},#{style},
|
||||||
|
#{disabled}, #{checkRules}, #{inputType}, #{lineNumber}, #{dataFuc},#{isShowXx})
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSysCustomConfigDetail" parameterType="com.glxp.api.entity.auth.SysCustomConfigDetailEntity">
|
||||||
|
UPDATE sys_custom_config_detail
|
||||||
|
<set>
|
||||||
|
<if test="columnName != null">
|
||||||
|
columnName=#{columnName},
|
||||||
|
</if>
|
||||||
|
<if test="configId != null">
|
||||||
|
configId=#{configId},
|
||||||
|
</if>
|
||||||
|
<if test="type != null">
|
||||||
|
type=#{type},
|
||||||
|
</if>
|
||||||
|
<if test="isShow != null">
|
||||||
|
isShow=#{isShow},
|
||||||
|
</if>
|
||||||
|
<if test="columnDesc != null">
|
||||||
|
columnDesc=#{columnDesc},
|
||||||
|
</if>
|
||||||
|
<if test="columnType != null">
|
||||||
|
columnType=#{columnType},
|
||||||
|
</if>
|
||||||
|
<if test="colorRule != null">
|
||||||
|
colorRule=#{colorRule},
|
||||||
|
</if>
|
||||||
|
<if test="sort != null">
|
||||||
|
sort=#{sort},
|
||||||
|
</if>
|
||||||
|
<if test="lableRule != null">
|
||||||
|
lableRule=#{lableRule},
|
||||||
|
</if>
|
||||||
|
<if test="width != null">
|
||||||
|
width=#{width},
|
||||||
|
</if>
|
||||||
|
<if test="tooltip != null">
|
||||||
|
tooltip=#{tooltip},
|
||||||
|
</if>
|
||||||
|
<if test="buttonRule != null">
|
||||||
|
buttonRule=#{buttonRule},
|
||||||
|
</if>
|
||||||
|
<if test="number != null">
|
||||||
|
number=#{number},
|
||||||
|
</if>
|
||||||
|
<if test="clickFuc != null">
|
||||||
|
clickFuc=#{clickFuc},
|
||||||
|
</if>
|
||||||
|
<if test="disabledFuc != null">
|
||||||
|
disabledFuc=#{disabledFuc},
|
||||||
|
</if>
|
||||||
|
<if test="expression != null">
|
||||||
|
expression=#{expression},
|
||||||
|
</if>
|
||||||
|
<if test="size != null">
|
||||||
|
size=#{size},
|
||||||
|
</if>
|
||||||
|
<if test="style != null">
|
||||||
|
style=#{style},
|
||||||
|
</if>
|
||||||
|
<if test="disabled != null">
|
||||||
|
disabled=#{disabled},
|
||||||
|
</if>
|
||||||
|
<if test="checkRules != null">
|
||||||
|
checkRules=#{checkRules},
|
||||||
|
</if>
|
||||||
|
<if test="inputType != null">
|
||||||
|
inputType=#{inputType},
|
||||||
|
</if>
|
||||||
|
<if test="lineNumber != null">
|
||||||
|
lineNumber=#{lineNumber},
|
||||||
|
</if>
|
||||||
|
<if test="dataFuc != null">
|
||||||
|
dataFuc=#{dataFuc},
|
||||||
|
</if>
|
||||||
|
<if test="isShowXx != null">
|
||||||
|
isShowXx=#{isShowXx},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
WHERE id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteById" parameterType="java.lang.String">
|
||||||
|
delete
|
||||||
|
from sys_custom_config_detail
|
||||||
|
where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteByConfigId" parameterType="java.lang.String">
|
||||||
|
delete
|
||||||
|
from sys_custom_config_detail
|
||||||
|
where configId = #{configId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<select id="selectById" parameterType="java.lang.Long"
|
||||||
|
resultType="com.glxp.api.entity.auth.SysCustomConfigDetailEntity">
|
||||||
|
SELECT *
|
||||||
|
FROM sys_custom_config_detail
|
||||||
|
WHERE (
|
||||||
|
id = #{id})
|
||||||
|
limit 1
|
||||||
|
</select>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue