初始化
This commit is contained in:
parent
030fb37a0f
commit
f59878ef23
|
|
@ -70,7 +70,7 @@ public class DictionaryController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@PostMapping("deleteDictionary")
|
@PostMapping("deleteDictionary")
|
||||||
@ApiMark(moduleName = "字典管理", apiName = "删除字典")
|
@ApiMark(moduleName = "字典管理", apiName = "删除字典")
|
||||||
public ApiResult<Void> deleteDictionary(@Valid @RequestBody @NotEmpty List<Integer> ids) {
|
public ApiResult<Void> deleteDictionary(@Valid @RequestBody @NotEmpty List<Long> ids) {
|
||||||
dictionaryControllerService.deleteDictionary(ids);
|
dictionaryControllerService.deleteDictionary(ids);
|
||||||
return ApiResult.success();
|
return ApiResult.success();
|
||||||
}
|
}
|
||||||
|
|
@ -103,7 +103,7 @@ public class DictionaryController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@PostMapping("deleteDictionaryItem")
|
@PostMapping("deleteDictionaryItem")
|
||||||
@ApiMark(moduleName = "字典管理", apiName = "删除字典值")
|
@ApiMark(moduleName = "字典管理", apiName = "删除字典值")
|
||||||
public ApiResult<Void> deleteDictionaryItem(@Valid @RequestBody @NotEmpty List<Integer> ids) {
|
public ApiResult<Void> deleteDictionaryItem(@Valid @RequestBody @NotEmpty List<Long> ids) {
|
||||||
dictionaryItemService.removeByIds(ids);
|
dictionaryItemService.removeByIds(ids);
|
||||||
return ApiResult.success();
|
return ApiResult.success();
|
||||||
}
|
}
|
||||||
|
|
@ -126,7 +126,7 @@ public class DictionaryController extends BaseController {
|
||||||
@GetMapping("exportDictionaryItemTranslates")
|
@GetMapping("exportDictionaryItemTranslates")
|
||||||
@ApiMark(moduleName = "字典管理", apiName = "导出字典值翻译列表")
|
@ApiMark(moduleName = "字典管理", apiName = "导出字典值翻译列表")
|
||||||
public ApiResult<Void> exportDictionaryItemTranslates(HttpServletResponse response
|
public ApiResult<Void> exportDictionaryItemTranslates(HttpServletResponse response
|
||||||
, @Validated @RequestParam @NotEmpty List<Integer> dictionaryItemIds) throws IOException {
|
, @Validated @RequestParam @NotEmpty List<Long> dictionaryItemIds) throws IOException {
|
||||||
dictionaryControllerService.exportDictionaryItemTranslates(response, dictionaryItemIds);
|
dictionaryControllerService.exportDictionaryItemTranslates(response, dictionaryItemIds);
|
||||||
return ApiResult.success();
|
return ApiResult.success();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ public class FileController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@PostMapping("deleteFile")
|
@PostMapping("deleteFile")
|
||||||
@ApiMark(moduleName = "文件管理", apiName = "删除文件")
|
@ApiMark(moduleName = "文件管理", apiName = "删除文件")
|
||||||
public ApiResult<Void> deleteFile(@Valid @RequestBody @NotEmpty List<Integer> ids) {
|
public ApiResult<Void> deleteFile(@Valid @RequestBody @NotEmpty List<Long> ids) {
|
||||||
fileControllerService.deleteFile(ids);
|
fileControllerService.deleteFile(ids);
|
||||||
return ApiResult.success();
|
return ApiResult.success();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.nflg.wms.admin.controller;
|
package com.nflg.wms.admin.controller;
|
||||||
|
|
||||||
|
import com.nflg.wms.admin.service.LDAPControllerService;
|
||||||
import com.nflg.wms.common.pojo.ApiResult;
|
import com.nflg.wms.common.pojo.ApiResult;
|
||||||
import com.nflg.wms.common.pojo.PageData;
|
import com.nflg.wms.common.pojo.PageData;
|
||||||
import com.nflg.wms.common.pojo.qo.EnableQO;
|
import com.nflg.wms.common.pojo.qo.EnableQO;
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 多语言相关接口
|
* 多语言相关接口
|
||||||
*
|
|
||||||
* @author 曹鹏飞
|
* @author 曹鹏飞
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|
@ -43,7 +42,6 @@ public class MultilingualController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取语言列表
|
* 获取语言列表
|
||||||
*
|
|
||||||
* @return 语言列表
|
* @return 语言列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getAllLanguage")
|
@GetMapping("/getAllLanguage")
|
||||||
|
|
@ -54,7 +52,6 @@ public class MultilingualController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取启用的语言列表
|
* 获取启用的语言列表
|
||||||
*
|
|
||||||
* @return 取语言列表
|
* @return 取语言列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("getLanguages")
|
@GetMapping("getLanguages")
|
||||||
|
|
@ -65,7 +62,6 @@ public class MultilingualController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启用/禁言语言
|
* 启用/禁言语言
|
||||||
*
|
|
||||||
* @param request 请求参数
|
* @param request 请求参数
|
||||||
*/
|
*/
|
||||||
@PostMapping("/enableLanguage")
|
@PostMapping("/enableLanguage")
|
||||||
|
|
@ -77,7 +73,6 @@ public class MultilingualController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取所有模块
|
* 获取所有模块
|
||||||
*
|
|
||||||
* @return 模块列表
|
* @return 模块列表
|
||||||
*/
|
*/
|
||||||
@PostMapping("/getModules")
|
@PostMapping("/getModules")
|
||||||
|
|
@ -88,7 +83,6 @@ public class MultilingualController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取所有页面
|
* 获取所有页面
|
||||||
*
|
|
||||||
* @return 页面列表
|
* @return 页面列表
|
||||||
*/
|
*/
|
||||||
@PostMapping("/getPages")
|
@PostMapping("/getPages")
|
||||||
|
|
@ -99,7 +93,6 @@ public class MultilingualController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 搜索网页组件
|
* 搜索网页组件
|
||||||
*
|
|
||||||
* @param request 请求参数
|
* @param request 请求参数
|
||||||
* @return 组件列表
|
* @return 组件列表
|
||||||
*/
|
*/
|
||||||
|
|
@ -111,7 +104,6 @@ public class MultilingualController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除网页组件
|
* 删除网页组件
|
||||||
*
|
|
||||||
* @param ids 组件id列表
|
* @param ids 组件id列表
|
||||||
*/
|
*/
|
||||||
@PostMapping("/deleteWebComponent")
|
@PostMapping("/deleteWebComponent")
|
||||||
|
|
@ -123,7 +115,6 @@ public class MultilingualController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出网页组件翻译列表
|
* 导出网页组件翻译列表
|
||||||
*
|
|
||||||
* @param request 请求参数
|
* @param request 请求参数
|
||||||
*/
|
*/
|
||||||
@PostMapping("exportWebComponentTranslates")
|
@PostMapping("exportWebComponentTranslates")
|
||||||
|
|
@ -135,7 +126,6 @@ public class MultilingualController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导入字典值翻译列表
|
* 导入字典值翻译列表
|
||||||
*
|
|
||||||
* @param file 文件
|
* @param file 文件
|
||||||
*/
|
*/
|
||||||
@PostMapping("importWebComponentTranslates")
|
@PostMapping("importWebComponentTranslates")
|
||||||
|
|
@ -151,7 +141,6 @@ public class MultilingualController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取网页组件详情
|
* 获取网页组件详情
|
||||||
*
|
|
||||||
* @return 组件详情
|
* @return 组件详情
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getWebComponentInfo")
|
@GetMapping("/getWebComponentInfo")
|
||||||
|
|
@ -162,7 +151,6 @@ public class MultilingualController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加网页组件
|
* 添加网页组件
|
||||||
*
|
|
||||||
* @return 组件详情
|
* @return 组件详情
|
||||||
*/
|
*/
|
||||||
@PostMapping("/addWebComponent")
|
@PostMapping("/addWebComponent")
|
||||||
|
|
@ -174,7 +162,6 @@ public class MultilingualController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新网页组件
|
* 更新网页组件
|
||||||
*
|
|
||||||
* @return 组件详情
|
* @return 组件详情
|
||||||
*/
|
*/
|
||||||
@PostMapping("/updateWebComponent")
|
@PostMapping("/updateWebComponent")
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ public class DictionaryControllerService {
|
||||||
*
|
*
|
||||||
* @param ids id列表
|
* @param ids id列表
|
||||||
*/
|
*/
|
||||||
public void deleteDictionary(@Valid @RequestBody @NotEmpty List<Integer> ids) {
|
public void deleteDictionary(@Valid @RequestBody @NotEmpty List<Long> ids) {
|
||||||
dictionaryService.delete(ids);
|
dictionaryService.delete(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -120,7 +120,7 @@ public class DictionaryControllerService {
|
||||||
* @param dictionaryItemIds 字典值id列表
|
* @param dictionaryItemIds 字典值id列表
|
||||||
*/
|
*/
|
||||||
public void exportDictionaryItemTranslates(HttpServletResponse response
|
public void exportDictionaryItemTranslates(HttpServletResponse response
|
||||||
, @Validated @RequestParam @NotEmpty List<Integer> dictionaryItemIds) throws IOException {
|
, @Validated @RequestParam @NotEmpty List<Long> dictionaryItemIds) throws IOException {
|
||||||
List<DictionaryItemTranslateDTO> datas = dictionaryService.getAllLanguageByDictionaryItemIds(dictionaryItemIds);
|
List<DictionaryItemTranslateDTO> datas = dictionaryService.getAllLanguageByDictionaryItemIds(dictionaryItemIds);
|
||||||
EecExcelUtil.export("字典翻译", "sheet1", datas, response);
|
EecExcelUtil.export("字典翻译", "sheet1", datas, response);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ public class FileControllerService {
|
||||||
return PageUtil.convert(datas, d -> Convert.convert(FileVO.class, d));
|
return PageUtil.convert(datas, d -> Convert.convert(FileVO.class, d));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteFile(@Valid @NotEmpty List<Integer> ids) {
|
public void deleteFile(@Valid @NotEmpty List<Long> ids) {
|
||||||
fileUploadRecordService.removeBatchByIds(ids);
|
fileUploadRecordService.removeBatchByIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
package com.nflg.wms.admin.controller;
|
package com.nflg.wms.admin.service;
|
||||||
|
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.nflg.wms.admin.service.DepartmentControllerService;
|
|
||||||
import com.nflg.wms.admin.service.LdapService;
|
|
||||||
import com.nflg.wms.common.pojo.dto.AdDTO;
|
import com.nflg.wms.common.pojo.dto.AdDTO;
|
||||||
import com.nflg.wms.common.pojo.qo.EnableQO;
|
import com.nflg.wms.common.pojo.qo.EnableQO;
|
||||||
import com.nflg.wms.common.pojo.qo.LDAPAddQO;
|
import com.nflg.wms.common.pojo.qo.LDAPAddQO;
|
||||||
|
|
@ -2,11 +2,12 @@ package com.nflg.wms.repository.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import java.io.Serializable;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 字典
|
* 字典
|
||||||
|
|
@ -59,4 +60,9 @@ public class Language implements Serializable {
|
||||||
* 是否启用
|
* 是否启用
|
||||||
*/
|
*/
|
||||||
private Boolean enable;
|
private Boolean enable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 翻译时的语言代码
|
||||||
|
*/
|
||||||
|
private String translateCode;
|
||||||
}
|
}
|
||||||
|
|
@ -24,7 +24,7 @@ public interface IDictionaryService extends IService<Dictionary> {
|
||||||
|
|
||||||
void save(SaveDictionaryQO request);
|
void save(SaveDictionaryQO request);
|
||||||
|
|
||||||
void delete(List<Integer> ids);
|
void delete(List<Long> ids);
|
||||||
|
|
||||||
List<DictionaryItemTranslateDTO> getAllLanguageByDictionaryItemIds(@NotEmpty List<Integer> dictionaryItemIds);
|
List<DictionaryItemTranslateDTO> getAllLanguageByDictionaryItemIds(@NotEmpty List<Long> dictionaryItemIds);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ public class DictionaryServiceImpl extends ServiceImpl<DictionaryMapper, Diction
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public void delete(List<Integer> ids) {
|
public void delete(List<Long> ids) {
|
||||||
removeByIds(ids);
|
removeByIds(ids);
|
||||||
List<Long> itemIds = dictionaryItemService.lambdaQuery().eq(DictionaryItem::getDictionaryId, ids).list().stream().map(DictionaryItem::getId).collect(Collectors.toList());
|
List<Long> itemIds = dictionaryItemService.lambdaQuery().eq(DictionaryItem::getDictionaryId, ids).list().stream().map(DictionaryItem::getId).collect(Collectors.toList());
|
||||||
if (CollectionUtil.isNotEmpty(itemIds)) {
|
if (CollectionUtil.isNotEmpty(itemIds)) {
|
||||||
|
|
@ -95,7 +95,7 @@ public class DictionaryServiceImpl extends ServiceImpl<DictionaryMapper, Diction
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DictionaryItemTranslateDTO> getAllLanguageByDictionaryItemIds(List<Integer> dictionaryItemIds) {
|
public List<DictionaryItemTranslateDTO> getAllLanguageByDictionaryItemIds(List<Long> dictionaryItemIds) {
|
||||||
List<DictionaryItem> dictionaryItems = dictionaryItemService.lambdaQuery().in(DictionaryItem::getId, dictionaryItemIds).list();
|
List<DictionaryItem> dictionaryItems = dictionaryItemService.lambdaQuery().in(DictionaryItem::getId, dictionaryItemIds).list();
|
||||||
VUtil.trueThrowBusinessError(CollectionUtil.isEmpty(dictionaryItems)).throwMessage("字典值不存在");
|
VUtil.trueThrowBusinessError(CollectionUtil.isEmpty(dictionaryItems)).throwMessage("字典值不存在");
|
||||||
Dictionary dictionary = getById(dictionaryItems.get(0).getDictionaryId());
|
Dictionary dictionary = getById(dictionaryItems.get(0).getDictionaryId());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue