Merge branch 'feature/data-permission' into feature/quotation
This commit is contained in:
commit
b33d1c393d
|
|
@ -106,12 +106,12 @@ public class DeviceController extends ControllerBase {
|
|||
List<DeviceDetailResultVO> resultData = Convert.toList(DeviceDetailResultVO.class, result.getRecords());
|
||||
//初始化单位名称
|
||||
if(CollUtil.isNotEmpty(result.getRecords())){
|
||||
Set<Integer> deviceStateIds = result.getRecords().stream().map(u -> u.getDeviceState()).collect(Collectors.toSet());
|
||||
Set<Integer> warrantyStateIds = result.getRecords().stream().map(u -> u.getWarrantyState()).collect(Collectors.toSet());
|
||||
Sets.SetView<Integer> stateIds = Sets.union(deviceStateIds, warrantyStateIds);
|
||||
Set<Long> deviceStateIds = result.getRecords().stream().map(Device::getDeviceState).collect(Collectors.toSet());
|
||||
Set<Long> warrantyStateIds = result.getRecords().stream().map(Device::getWarrantyState).collect(Collectors.toSet());
|
||||
Sets.SetView<Long> stateIds = Sets.union(deviceStateIds, warrantyStateIds);
|
||||
if(CollUtil.isNotEmpty(stateIds)) {
|
||||
List<DictionaryItem> dictionaryItems = dictionaryItemService.getBaseMapper().selectByIds(stateIds);
|
||||
Map<Integer, String> stateMap = dictionaryItems.stream().collect(Collectors.toMap(DictionaryItem::getId, DictionaryItem::getName));
|
||||
Map<Long, String> stateMap = dictionaryItems.stream().collect(Collectors.toMap(DictionaryItem::getId, DictionaryItem::getName));
|
||||
resultData.forEach(u->{
|
||||
if(stateMap.containsKey(u.getDeviceState())){
|
||||
u.setDeviceStateName(stateMap.get(u.getDeviceState()));
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ public class DictionaryController extends ControllerBase {
|
|||
@PostMapping("deleteDictionary")
|
||||
@MethodInfoMark(value = "删除字典", menuName = "字典管理")
|
||||
@ApiMark(moduleName = "字典管理", apiName = "删除字典")
|
||||
public ApiResult<Void> deleteDictionary(@Valid @RequestBody @NotEmpty List<Integer> ids) {
|
||||
public ApiResult<Void> deleteDictionary(@Valid @RequestBody @NotEmpty List<Long> ids) {
|
||||
dictionaryService.delete(ids);
|
||||
return ApiResult.success();
|
||||
}
|
||||
|
|
@ -151,7 +151,7 @@ public class DictionaryController extends ControllerBase {
|
|||
*/
|
||||
@GetMapping("getDictionaryItemTranslateList")
|
||||
@ApiMark(moduleName = "字典管理", apiName = "获取字典值翻译列表")
|
||||
public ApiResult<List<DictionaryItemTranslateVO>> getDictionaryItemTranslateList(@Valid @RequestParam @NotNull Integer id) {
|
||||
public ApiResult<List<DictionaryItemTranslateVO>> getDictionaryItemTranslateList(@Valid @RequestParam @NotNull Long id) {
|
||||
return ApiResult.success(dictionaryItemTranslateService.getListByDictionaryItemId(id));
|
||||
}
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ public class DictionaryController extends ControllerBase {
|
|||
@GetMapping("exportDictionaryItemTranslates")
|
||||
@ApiMark(moduleName = "字典管理", apiName = "导出字典值翻译列表")
|
||||
public void exportDictionaryItemTranslates(HttpServletResponse response
|
||||
, @Validated @RequestParam @NotEmpty List<Integer> dictionaryItemIds) throws IOException {
|
||||
, @Validated @RequestParam @NotEmpty List<Long> dictionaryItemIds) throws IOException {
|
||||
List<DictionaryItemTranslateDTO> datas = dictionaryItemTranslateService.getAllLanguageByDictionaryItemIds(dictionaryItemIds);
|
||||
EecExcelUtil.export("字典翻译", "sheet1", datas, response);
|
||||
}
|
||||
|
|
@ -183,11 +183,11 @@ public class DictionaryController extends ControllerBase {
|
|||
List<DictionaryItemTranslate> forAdd = new ArrayList<>();
|
||||
List<DictionaryItemTranslate> forUpdate = new ArrayList<>();
|
||||
for (DictionaryItemTranslateDTO dto : datas) {
|
||||
Integer dictionaryItemId = dictionaryItemService.getId(dto.getDictionaryName(), dto.getDictionaryItemName());
|
||||
Long dictionaryItemId = dictionaryItemService.getId(dto.getDictionaryName(), dto.getDictionaryItemName());
|
||||
VUtils.trueThrowBusinessError(Objects.isNull(dictionaryItemId)).throwMessage("字典数据不存在:" + dto.getDictionaryName() + "-" + dto.getDictionaryItemName());
|
||||
Language language = languages.stream().filter(l -> StrUtil.equals(l.getName(), dto.getLanguageName())).findFirst().orElse(null);
|
||||
VUtils.trueThrowBusinessError(Objects.isNull(language)).throwMessage("语言不存在:" + dto.getLanguageName());
|
||||
Integer translateId = dictionaryItemTranslateService.getId(dictionaryItemId, language.getCode());
|
||||
Long translateId = dictionaryItemTranslateService.getId(dictionaryItemId, language.getCode());
|
||||
DictionaryItemTranslate translate = new DictionaryItemTranslate();
|
||||
translate.setValue(dto.getTranslateValue());
|
||||
if (Objects.isNull(translateId)) {
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ public class MenuController extends ControllerBase {
|
|||
@PostMapping("deleteMenu")
|
||||
@MethodInfoMark(value = "删除菜单", menuName = "菜单管理")
|
||||
@ApiMark(moduleName = "菜单管理", apiName = "删除菜单")
|
||||
public ApiResult<Void> deleteMenu(@Valid @RequestBody List<Integer> ids) {
|
||||
public ApiResult<Void> deleteMenu(@Valid @RequestBody List<Long> ids) {
|
||||
adminMenuService.delete(ids);
|
||||
return ApiResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ public class ProductSeriesController extends ControllerBase{
|
|||
* @param moduleId 模块id
|
||||
*/
|
||||
@GetMapping("/getSimpleList")
|
||||
public ApiResult<List<ProductSeriesSimpleVO>> getSimpleList(@Valid @RequestParam @NotNull Integer moduleId){
|
||||
public ApiResult<List<ProductSeriesSimpleVO>> getSimpleList(@Valid @RequestParam @NotNull Long moduleId){
|
||||
return ApiResult.success(productSeriesService.getSimpleList(moduleId));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ public class RoleController extends ControllerBase {
|
|||
*/
|
||||
@GetMapping("getMenuForAuthorize")
|
||||
@ApiMark(moduleName = "角色管理", apiName = "获取授权菜单")
|
||||
public ApiResult<List<AuthorizeMenuVO>> getMenuForAuthorize(@RequestParam Integer roleId) {
|
||||
public ApiResult<List<AuthorizeMenuVO>> getMenuForAuthorize(@RequestParam Long roleId) {
|
||||
return ApiResult.success(adminMenuService.getMenuForAuthorize(roleId));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public class CmrDeviceResultVO {
|
|||
//客户
|
||||
private String Account;
|
||||
|
||||
private Integer CfsStatus__c;
|
||||
private Long CfsStatus__c;
|
||||
|
||||
private String Id;
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ public class AdminController extends ControllerBase {
|
|||
* @return 按钮列表
|
||||
*/
|
||||
@GetMapping("getPermissionButtons")
|
||||
public ApiResult<List<ButtonVO>> getPermissionButtons(@Valid @NotNull @RequestParam("menuId") Integer menuId) {
|
||||
public ApiResult<List<ButtonVO>> getPermissionButtons(@Valid @NotNull @RequestParam("menuId") Long menuId) {
|
||||
VUtils.trueThrow(!SaTokenAdminUtil.isLogin()).throwMessage(STATE.LoginError, "请重新登录");
|
||||
return ApiResult.success(adminRoleService.getButtonsByMenuId(AdminUserUtil.getUserId(), menuId));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@ public class AuthorizeMenuRequest {
|
|||
|
||||
// 角色id
|
||||
@NotNull
|
||||
private Integer roleId;
|
||||
private Long roleId;
|
||||
|
||||
// 菜单id列表
|
||||
private List<Integer> menuIds;
|
||||
private List<Long> menuIds;
|
||||
|
||||
// 按钮id列表
|
||||
private List<Integer> buttonIds;
|
||||
private List<Long> buttonIds;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,5 +13,5 @@ public class AuthorizeRoleRequest {
|
|||
private Integer userId;
|
||||
|
||||
//角色id列表
|
||||
private List<Integer> roleIds;
|
||||
private List<Long> roleIds;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ public class AuthorizeUserRequest {
|
|||
|
||||
// 角色id
|
||||
@NotNull
|
||||
private Integer roleId;
|
||||
private Long roleId;
|
||||
|
||||
// 用户id列表
|
||||
private List<Integer> userIds;
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ public class BindButtonApiRequest {
|
|||
|
||||
//菜单按钮id
|
||||
@NotNull
|
||||
private Integer buttonId;
|
||||
private Long buttonId;
|
||||
|
||||
//api id集合
|
||||
@NotEmpty
|
||||
private List<Integer> apiIds;
|
||||
private List<Long> apiIds;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,5 +8,5 @@ import lombok.EqualsAndHashCode;
|
|||
public class ConfigUpdateRequest extends ConfigAddRequest {
|
||||
|
||||
//主键ID
|
||||
private Integer id;
|
||||
private Long id;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ public class DictionaryItemSearchRequest extends PageRequest {
|
|||
|
||||
//字典id
|
||||
@NotNull
|
||||
private Integer dictionaryId;
|
||||
private Long dictionaryId;
|
||||
|
||||
//字典名称
|
||||
private String name;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import lombok.Data;
|
|||
public class EnableLanguageRequest {
|
||||
|
||||
//id
|
||||
private Integer id;
|
||||
private Long id;
|
||||
|
||||
//启用/禁用
|
||||
private Boolean enable;
|
||||
|
|
|
|||
|
|
@ -15,5 +15,5 @@ public class EnableMenuRequest {
|
|||
|
||||
//id列表
|
||||
@NotEmpty
|
||||
private List<Integer> ids;
|
||||
private List<Long> ids;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ public class MenuAddRequest {
|
|||
|
||||
// 父级菜单id
|
||||
@NotNull
|
||||
private Integer parentId;
|
||||
private Long parentId;
|
||||
|
||||
// 菜单名称
|
||||
@NotEmpty
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ public class MenuButtonAddRequest {
|
|||
|
||||
// 菜单id
|
||||
@NotNull
|
||||
private Integer menuId;
|
||||
private Long menuId;
|
||||
|
||||
// 按钮名称
|
||||
@NotEmpty
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ import lombok.EqualsAndHashCode;
|
|||
@Data
|
||||
public class MenuButtonUpdateRequest extends MenuButtonAddRequest {
|
||||
|
||||
private Integer id;
|
||||
private Long id;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,5 +10,5 @@ import javax.validation.constraints.NotNull;
|
|||
public class MenuUpdateRequest extends MenuAddRequest {
|
||||
|
||||
@NotNull
|
||||
private Integer id;
|
||||
private Long id;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@ import lombok.EqualsAndHashCode;
|
|||
@Data
|
||||
public class RoleUpdateRequest extends RoleAddRequest {
|
||||
|
||||
private Integer id;
|
||||
private Long id;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@ import java.util.List;
|
|||
public class SaveDictionaryItemRequest {
|
||||
|
||||
//字典值id
|
||||
private Integer id;
|
||||
private Long id;
|
||||
|
||||
//字典id
|
||||
@NotNull
|
||||
private Integer dictionaryId;
|
||||
private Long dictionaryId;
|
||||
|
||||
//字典值名称
|
||||
@NotBlank(message = "字典名称不能为空")
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import javax.validation.constraints.NotBlank;
|
|||
public class SaveDictionaryRequest {
|
||||
|
||||
//字典id
|
||||
private Integer id;
|
||||
private Long id;
|
||||
|
||||
//字典名称
|
||||
@NotBlank(message = "字典名称不能为空")
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import lombok.Data;
|
|||
public class TranslateMap {
|
||||
|
||||
//翻译id
|
||||
private Integer id;
|
||||
private Long id;
|
||||
|
||||
//语言代码
|
||||
private String code;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ public class WebComponentTraslateRequest {
|
|||
|
||||
//语言id
|
||||
@NotNull
|
||||
private Integer languageId;
|
||||
private Long languageId;
|
||||
|
||||
//翻译值
|
||||
private String value;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import java.util.List;
|
|||
@Accessors(chain = true)
|
||||
public class AuthorizeMenuVO {
|
||||
|
||||
private Integer id;
|
||||
private Long id;
|
||||
|
||||
private String key;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ import java.util.List;
|
|||
@Accessors(chain = true)
|
||||
public class MenuVO {
|
||||
|
||||
private Integer id;
|
||||
private Long id;
|
||||
|
||||
//父级菜单id
|
||||
private Integer parentId;
|
||||
private Long parentId;
|
||||
|
||||
// 菜单名称
|
||||
private String name;
|
||||
|
|
@ -47,7 +47,7 @@ public class MenuVO {
|
|||
private LocalDateTime updateTime;
|
||||
|
||||
//服务标识,字典项ID
|
||||
private Integer serviceDescId;
|
||||
private Long serviceDescId;
|
||||
|
||||
//服务标识,字典项名称
|
||||
private String serviceDesc;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import java.util.List;
|
|||
@Accessors(chain = true)
|
||||
public class ModuleVO {
|
||||
|
||||
private Integer id;
|
||||
private Long id;
|
||||
|
||||
private String name;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import java.time.LocalDateTime;
|
|||
public class ParamConfigVO {
|
||||
|
||||
//配置id
|
||||
private Integer id;
|
||||
private Long id;
|
||||
|
||||
//配置名称
|
||||
private String name;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import lombok.experimental.Accessors;
|
|||
@Accessors(chain = true)
|
||||
public class RoleSimpleVO {
|
||||
|
||||
private Integer id;
|
||||
private Long id;
|
||||
|
||||
//角色名称
|
||||
private String name;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public class SolutionMeasuresItemVO {
|
|||
* 措施分类id
|
||||
*/
|
||||
@NotNull
|
||||
private Integer id;
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 措施分类名称
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import lombok.experimental.Accessors;
|
|||
public class WebComponentTraslateVO {
|
||||
|
||||
//语言id
|
||||
private Integer languageId;
|
||||
private Long languageId;
|
||||
|
||||
//语言名称
|
||||
private String languageName;
|
||||
|
|
|
|||
|
|
@ -115,12 +115,12 @@ public class DeviceController extends ControllerBase {
|
|||
List<DeviceDetailResultVO> resultData = Convert.toList(DeviceDetailResultVO.class, result.getRecords());
|
||||
//初始化单位名称
|
||||
if (CollUtil.isNotEmpty(result.getRecords())) {
|
||||
Set<Integer> deviceStateIds = result.getRecords().stream().map(GongfuDevice::getDeviceState).collect(Collectors.toSet());
|
||||
Set<Integer> warrantyStateIds = result.getRecords().stream().map(GongfuDevice::getWarrantyState).collect(Collectors.toSet());
|
||||
Sets.SetView<Integer> stateIds = Sets.union(deviceStateIds, warrantyStateIds);
|
||||
Set<Long> deviceStateIds = result.getRecords().stream().map(GongfuDevice::getDeviceState).collect(Collectors.toSet());
|
||||
Set<Long> warrantyStateIds = result.getRecords().stream().map(GongfuDevice::getWarrantyState).collect(Collectors.toSet());
|
||||
Sets.SetView<Long> stateIds = Sets.union(deviceStateIds, warrantyStateIds);
|
||||
if (CollUtil.isNotEmpty(stateIds)) {
|
||||
List<DictionaryItem> dictionaryItems = dictionaryItemService.getBaseMapper().selectByIds(stateIds);
|
||||
Map<Integer, String> stateMap = dictionaryItems.stream().collect(Collectors.toMap(DictionaryItem::getId, DictionaryItem::getName));
|
||||
Map<Long, String> stateMap = dictionaryItems.stream().collect(Collectors.toMap(DictionaryItem::getId, DictionaryItem::getName));
|
||||
resultData.forEach(u -> {
|
||||
if (stateMap.containsKey(u.getDeviceState())) {
|
||||
u.setDeviceStateName(stateMap.get(u.getDeviceState()));
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public class CmrDeviceResultVO {
|
|||
//客户
|
||||
private String Account;
|
||||
|
||||
private Integer CfsStatus__c;
|
||||
private Long CfsStatus__c;
|
||||
|
||||
private String Id;
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public class DeviceDetailResultVO {
|
|||
/**
|
||||
* 设备状态-来自字典
|
||||
*/
|
||||
private Integer deviceState;
|
||||
private Long deviceState;
|
||||
|
||||
/**
|
||||
* 代理商编码
|
||||
|
|
@ -78,7 +78,7 @@ public class DeviceDetailResultVO {
|
|||
/**
|
||||
* 质保状态-来自字典
|
||||
*/
|
||||
private Integer warrantyState;
|
||||
private Long warrantyState;
|
||||
|
||||
/**
|
||||
* 开始质保日期
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public class MobilebrokenController extends BaseController{
|
|||
* @param moduleId 产品模块id
|
||||
*/
|
||||
@GetMapping("/getSeries")
|
||||
public ApiResult<List<ProductSeriesVO>> getSeries(@Valid @RequestParam @NotNull Integer moduleId){
|
||||
public ApiResult<List<ProductSeriesVO>> getSeries(@Valid @RequestParam @NotNull Long moduleId){
|
||||
return ApiResult.success(productSeriesService.get(moduleId,MultilingualUtil.getLanguage()));
|
||||
}
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ public class MobilebrokenController extends BaseController{
|
|||
* @param seriesNumber 产品系列批次号
|
||||
*/
|
||||
@GetMapping("/getType")
|
||||
public ApiResult<List<ProductTypeVO>> getType(@Valid @RequestParam @NotNull Integer moduleId
|
||||
public ApiResult<List<ProductTypeVO>> getType(@Valid @RequestParam @NotNull Long moduleId
|
||||
,@RequestParam(required = false) String seriesNumber){
|
||||
return ApiResult.success(productTypeService.get(moduleId,seriesNumber,MultilingualUtil.getLanguage()));
|
||||
}
|
||||
|
|
@ -79,7 +79,7 @@ public class MobilebrokenController extends BaseController{
|
|||
* @param seriesNumber 产品系列批次号
|
||||
*/
|
||||
@GetMapping("getFiles")
|
||||
public ApiResult<List<ProductFileVO>> getFiles(@Valid @RequestParam @NotNull Integer moduleId
|
||||
public ApiResult<List<ProductFileVO>> getFiles(@Valid @RequestParam @NotNull Long moduleId
|
||||
,@RequestParam(required = false) String seriesNumber){
|
||||
return ApiResult.success(productTypeService.getFilesByLanguage(moduleId,seriesNumber,MultilingualUtil.getLanguage()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@ public class AdminMenu implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 上级id
|
||||
*/
|
||||
private Integer parentId;
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@ public class AdminMenuButton implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 菜单按钮id
|
||||
*/
|
||||
private Integer menuId;
|
||||
private Long menuId;
|
||||
|
||||
/**
|
||||
* 按钮名称
|
||||
|
|
|
|||
|
|
@ -25,18 +25,18 @@ public class AdminMenuButtonApiMap implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 菜单按钮id
|
||||
*/
|
||||
private Integer buttonId;
|
||||
private Long buttonId;
|
||||
|
||||
/**
|
||||
* 接口id
|
||||
*/
|
||||
private Integer apiId;
|
||||
private Long apiId;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ public class AdminRole implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 角色编号
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ public class AdminRoleButtonMap implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
private Integer roleId;
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
* 按钮id
|
||||
*/
|
||||
private Integer buttonId;
|
||||
private Long buttonId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@ public class AdminRoleMenuMap implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
private Integer roleId;
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
* 菜单id
|
||||
*/
|
||||
private Integer menuId;
|
||||
private Long menuId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,18 +25,18 @@ public class AdminRolePermission implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
private Integer roleId;
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
* 菜单id
|
||||
*/
|
||||
private Integer menuId;
|
||||
private Long menuId;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
|
|
|
|||
|
|
@ -25,13 +25,13 @@ public class AdminUserRoleMap implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
private Integer roleId;
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public class Device implements Serializable {
|
|||
/**
|
||||
* 设备状态-来自字典
|
||||
*/
|
||||
private Integer deviceState;
|
||||
private Long deviceState;
|
||||
|
||||
/**
|
||||
* 代理商编码
|
||||
|
|
@ -96,7 +96,7 @@ public class Device implements Serializable {
|
|||
/**
|
||||
* 质保状态-来自字典
|
||||
*/
|
||||
private Integer warrantyState;
|
||||
private Long warrantyState;
|
||||
|
||||
/**
|
||||
* 开始质保日期
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ public class Dictionary implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
|
|
|
|||
|
|
@ -25,13 +25,13 @@ public class DictionaryItem implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 字典id
|
||||
*/
|
||||
private Integer dictionaryId;
|
||||
private Long dictionaryId;
|
||||
|
||||
/**
|
||||
* 字典值编码
|
||||
|
|
|
|||
|
|
@ -25,13 +25,13 @@ public class DictionaryItemTranslate implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 字典值id
|
||||
*/
|
||||
private Integer dictionaryItemId;
|
||||
private Long dictionaryItemId;
|
||||
|
||||
/**
|
||||
* 语言代码
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ public class GongfuDevice implements Serializable {
|
|||
/**
|
||||
* 设备状态-来自字典
|
||||
*/
|
||||
private Integer deviceState;
|
||||
private Long deviceState;
|
||||
|
||||
/**
|
||||
* 代理商编码
|
||||
|
|
@ -97,7 +97,7 @@ public class GongfuDevice implements Serializable {
|
|||
/**
|
||||
* 质保状态-来自字典
|
||||
*/
|
||||
private Integer warrantyState;
|
||||
private Long warrantyState;
|
||||
|
||||
/**
|
||||
* 开始质保日期
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public class GongfuTicketSolution implements Serializable {
|
|||
/**
|
||||
* 字典项id
|
||||
*/
|
||||
private Integer dictionaryItemId;
|
||||
private Long dictionaryItemId;
|
||||
|
||||
/**
|
||||
* 字典项值
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ public class Language implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ public class ParamConfig implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 配置编码 配置编码 配置编码
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class TicketSolution implements Serializable {
|
|||
/**
|
||||
* 字典项id
|
||||
*/
|
||||
private Integer dictionaryItemId;
|
||||
private Long dictionaryItemId;
|
||||
|
||||
/**
|
||||
* 字典项值
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public class WebComponentTranslate implements Serializable {
|
|||
/**
|
||||
* 语言id
|
||||
*/
|
||||
private Integer languageId;
|
||||
private Long languageId;
|
||||
|
||||
/**
|
||||
* 翻译值
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@ public interface AdminRoleMapper extends BaseMapper<AdminRole> {
|
|||
|
||||
List<String> getUrlsByRoleCodes(List<String> roleCodes);
|
||||
|
||||
List<MenuVO> getMenusByRoleCodes(String from,Integer userId,Integer serviceId);
|
||||
List<MenuVO> getMenusByRoleCodes(String from,Integer userId,Long serviceId);
|
||||
|
||||
IPage<RoleVO> search(RoleSearchRequest request, Page<?> page);
|
||||
|
||||
List<ButtonVO> getButtonsByMenuId(Integer userId,Integer menuId);
|
||||
List<ButtonVO> getButtonsByMenuId(Integer userId,Long menuId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import java.util.List;
|
|||
public interface DictionaryItemMapper extends BaseMapper<DictionaryItem> {
|
||||
|
||||
@Select("SELECT di.id FROM dictionary_item di INNER JOIN dictionary d ON di.dictionary_id=d.id WHERE d.`name`=#{dictionaryName} AND di.`name`=#{dictionaryItemName}")
|
||||
Integer getId(@Param("dictionaryName") String dictionaryName, @Param("dictionaryItemName") String dictionaryItemName);
|
||||
Long getId(@Param("dictionaryName") String dictionaryName, @Param("dictionaryItemName") String dictionaryItemName);
|
||||
|
||||
String getName(String dictionaryCode, String itemCode);
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import java.util.List;
|
|||
*/
|
||||
public interface DictionaryItemTranslateMapper extends BaseMapper<DictionaryItemTranslate> {
|
||||
|
||||
List<DictionaryItemTranslateVO> getListByDictionaryItemId(Integer id);
|
||||
List<DictionaryItemTranslateVO> getListByDictionaryItemId(Long id);
|
||||
|
||||
List<TitleVO> getTitles(String language);
|
||||
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@ public interface ProductSeriesMapper extends BaseMapper<ProductSeries> {
|
|||
|
||||
Page<ProductSeriesSearchVO> getList(ProductSeriesSearchRequest request, Page<?> page);
|
||||
|
||||
List<ProductSeriesVO> get(Integer moduleId,String language);
|
||||
List<ProductSeriesVO> get(Long moduleId,String language);
|
||||
|
||||
void copyItems(@NotNull Integer oldId, Integer newId);
|
||||
|
||||
Page<FrontendProductSeriesSearchVO> search(String name, String language, Page<?> page);
|
||||
|
||||
List<ProductSeriesSimpleVO> getSimpleList(Integer moduleId);
|
||||
List<ProductSeriesSimpleVO> getSimpleList(Long moduleId);
|
||||
|
||||
List<ProductSeriesSimpleVO> getSimpleListByLanguage(Integer moduleId, String language);
|
||||
List<ProductSeriesSimpleVO> getSimpleListByLanguage(Long moduleId, String language);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,13 +21,13 @@ public interface ProductTypeMapper extends BaseMapper<ProductType> {
|
|||
|
||||
Page<ProductTypeSearchVO> getList(ProductTypeSearchRequest request, Page<?> page);
|
||||
|
||||
List<ProductTypeVO> get(Integer moduleId,String seriesNumber, String language);
|
||||
List<ProductTypeVO> get(Long moduleId,String seriesNumber, String language);
|
||||
|
||||
void copyItems(@NotNull Integer oldId, Integer newId);
|
||||
|
||||
Page<FrontendProductTypeSearchVO> search(String name, String language, Page<?> page);
|
||||
|
||||
List<ProductFileVO> getFilesByLanguage(Integer moduleId, String seriesNumber, String language);
|
||||
List<ProductFileVO> getFilesByLanguage(Long moduleId, String seriesNumber, String language);
|
||||
|
||||
List<ProductSeriesSimpleVO> getSimpleList(String seriesNumber);
|
||||
|
||||
|
|
|
|||
|
|
@ -28,11 +28,11 @@ public interface IAdminMenuService extends IService<AdminMenu> {
|
|||
|
||||
void enableMenu(EnableMenuRequest request);
|
||||
|
||||
List<AuthorizeMenuVO> getMenuForAuthorize(Integer roleId);
|
||||
List<AuthorizeMenuVO> getMenuForAuthorize(Long roleId);
|
||||
|
||||
IPage<MenuVO> search(MenuSearchRequest request);
|
||||
|
||||
void delete(List<Integer> ids);
|
||||
void delete(List<Long> ids);
|
||||
|
||||
void enableMenuButton(EnableMenuRequest request);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,5 +35,5 @@ public interface IAdminRoleService extends IService<AdminRole> {
|
|||
|
||||
IPage<RoleVO> search(RoleSearchRequest request);
|
||||
|
||||
List<ButtonVO> getButtonsByMenuId(Integer userId,Integer menuId);
|
||||
List<ButtonVO> getButtonsByMenuId(Integer userId,Long menuId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public interface IDictionaryItemService extends IService<DictionaryItem> {
|
|||
|
||||
void save(SaveDictionaryItemRequest request);
|
||||
|
||||
Integer getId(String dictionaryName, String dictionaryItemName);
|
||||
Long getId(String dictionaryName, String dictionaryItemName);
|
||||
|
||||
List<DictionaryItem> getListByDictionaryCode(String code);
|
||||
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@ import java.util.List;
|
|||
*/
|
||||
public interface IDictionaryItemTranslateService extends IService<DictionaryItemTranslate> {
|
||||
|
||||
List<DictionaryItemTranslateVO> getListByDictionaryItemId(Integer id);
|
||||
List<DictionaryItemTranslateVO> getListByDictionaryItemId(Long id);
|
||||
|
||||
List<DictionaryItemTranslateDTO> getAllLanguageByDictionaryItemIds(List<Integer> dictionaryItemIds);
|
||||
List<DictionaryItemTranslateDTO> getAllLanguageByDictionaryItemIds(List<Long> dictionaryItemIds);
|
||||
|
||||
Integer getId(Integer dictionaryItemId, String code);
|
||||
Long getId(Long dictionaryItemId, String code);
|
||||
|
||||
List<TitleVO> getTitles(String language);
|
||||
|
||||
|
|
|
|||
|
|
@ -23,5 +23,5 @@ public interface IDictionaryService extends IService<Dictionary> {
|
|||
|
||||
void save(SaveDictionaryRequest request);
|
||||
|
||||
void delete(List<Integer> ids);
|
||||
void delete(List<Long> ids);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public interface IProductSeriesService extends IService<ProductSeries> {
|
|||
|
||||
Page<ProductSeriesSearchVO> getList(ProductSeriesSearchRequest request);
|
||||
|
||||
List<ProductSeriesVO> get(Integer moduleId,String language);
|
||||
List<ProductSeriesVO> get(Long moduleId,String language);
|
||||
|
||||
void delete(@Valid BatchDeleteRequest request);
|
||||
|
||||
|
|
@ -34,9 +34,9 @@ public interface IProductSeriesService extends IService<ProductSeries> {
|
|||
|
||||
void enable(@Valid EnableRequest request);
|
||||
|
||||
List<ProductSeriesSimpleVO> getSimpleList(Integer moduleId);
|
||||
List<ProductSeriesSimpleVO> getSimpleList(Long moduleId);
|
||||
|
||||
List<ProductSeriesSimpleVO> getSimpleList(Integer moduleId, String language);
|
||||
List<ProductSeriesSimpleVO> getSimpleList(Long moduleId, String language);
|
||||
|
||||
ProductSeriesInfoVO getInfo(@Valid @NotNull Integer seriesId);
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public interface IProductTypeService extends IService<ProductType> {
|
|||
|
||||
Page<ProductTypeSearchVO> getList(ProductTypeSearchRequest request);
|
||||
|
||||
List<ProductTypeVO> get(Integer moduleId,String seriesNo,String language);
|
||||
List<ProductTypeVO> get(Long moduleId,String seriesNo,String language);
|
||||
|
||||
void enable(@Valid EnableRequest request);
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ public interface IProductTypeService extends IService<ProductType> {
|
|||
|
||||
Page<FrontendProductTypeSearchVO> search(@Valid ProductSeriesSearchRequest request, String language);
|
||||
|
||||
List<ProductFileVO> getFilesByLanguage(@Valid @NotNull Integer moduleId, String seriesNumber, String language);
|
||||
List<ProductFileVO> getFilesByLanguage(@Valid @NotNull Long moduleId, String seriesNumber, String language);
|
||||
|
||||
ProductTypeLanguageInfoVO getInfoByLanguage(@Valid @NotNull String typeNumber, String language);
|
||||
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public class AdminMenuButtonApiMapServiceImpl extends ServiceImpl<AdminMenuButto
|
|||
remove(new LambdaQueryWrapper<AdminMenuButtonApiMap>()
|
||||
.eq(AdminMenuButtonApiMap::getButtonId, request.getButtonId()));
|
||||
List<AdminMenuButtonApiMap> datas = new ArrayList<>();
|
||||
for (Integer apiId : request.getApiIds()) {
|
||||
for (Long apiId : request.getApiIds()) {
|
||||
AdminMenuButtonApiMap adminMenuButtonApiMap = new AdminMenuButtonApiMap();
|
||||
adminMenuButtonApiMap.setButtonId(request.getButtonId());
|
||||
adminMenuButtonApiMap.setApiId(apiId);
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ public class AdminMenuServiceImpl extends ServiceImpl<AdminMenuMapper, AdminMenu
|
|||
}
|
||||
}
|
||||
|
||||
private void disable(List<Integer> ids){
|
||||
private void disable(List<Long> ids){
|
||||
if (CollectionUtil.isNotEmpty(ids)) {
|
||||
lambdaUpdate()
|
||||
.set(AdminMenu::getEnable, false)
|
||||
|
|
@ -126,7 +126,7 @@ public class AdminMenuServiceImpl extends ServiceImpl<AdminMenuMapper, AdminMenu
|
|||
}
|
||||
}
|
||||
|
||||
private void enable(List<Integer> ids){
|
||||
private void enable(List<Long> ids){
|
||||
lambdaUpdate()
|
||||
.set(AdminMenu::getEnable, true)
|
||||
.set(AdminMenu::getUpdateBy, AdminUserUtil.getUserName())
|
||||
|
|
@ -136,7 +136,7 @@ public class AdminMenuServiceImpl extends ServiceImpl<AdminMenuMapper, AdminMenu
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<AuthorizeMenuVO> getMenuForAuthorize(Integer roleId) {
|
||||
public List<AuthorizeMenuVO> getMenuForAuthorize(Long roleId) {
|
||||
List<AdminMenu> datas = lambdaQuery()
|
||||
.eq(AdminMenu::getParentId, 0)
|
||||
.eq(AdminMenu::getEnable, true)
|
||||
|
|
@ -192,7 +192,7 @@ public class AdminMenuServiceImpl extends ServiceImpl<AdminMenuMapper, AdminMenu
|
|||
|
||||
@Transactional
|
||||
@Override
|
||||
public void delete(List<Integer> ids) {
|
||||
public void delete(List<Long> ids) {
|
||||
VUtils.trueThrowBusinessError(lambdaQuery().in(AdminMenu::getParentId, ids).exists()).throwMessage("请先删除下级菜单");
|
||||
VUtils.trueThrowBusinessError(adminMenuButtonService.lambdaQuery().in(AdminMenuButton::getMenuId, ids).exists())
|
||||
.throwMessage("请先删除下级按钮");
|
||||
|
|
@ -263,7 +263,7 @@ public class AdminMenuServiceImpl extends ServiceImpl<AdminMenuMapper, AdminMenu
|
|||
return po;
|
||||
}
|
||||
|
||||
private List<MenuVO> getChildren(Integer parentId) {
|
||||
private List<MenuVO> getChildren(Long parentId) {
|
||||
List<MenuVO> datas = convert(lambdaQuery().eq(AdminMenu::getParentId, parentId)
|
||||
.orderByDesc(AdminMenu::getSort)
|
||||
.list());
|
||||
|
|
@ -279,14 +279,14 @@ public class AdminMenuServiceImpl extends ServiceImpl<AdminMenuMapper, AdminMenu
|
|||
return Convert.toList(MenuVO.class, areas);
|
||||
}
|
||||
|
||||
private Boolean menuIsSelected(Integer roleId, Integer menuId) {
|
||||
private Boolean menuIsSelected(Long roleId, Long menuId) {
|
||||
return adminRoleMenuMapService.lambdaQuery()
|
||||
.eq(AdminRoleMenuMap::getMenuId, menuId)
|
||||
.eq(AdminRoleMenuMap::getRoleId, roleId)
|
||||
.exists();
|
||||
}
|
||||
|
||||
private void bindMenuChildren(Integer roleId, AuthorizeMenuVO menu) {
|
||||
private void bindMenuChildren(Long roleId, AuthorizeMenuVO menu) {
|
||||
List<AdminMenu> datas = lambdaQuery().eq(AdminMenu::getParentId, menu.getId()).eq(AdminMenu::getEnable, true).list();
|
||||
if (CollectionUtil.isNotEmpty(datas)) {
|
||||
List<AuthorizeMenuVO> vos = datas.stream().map(d -> new AuthorizeMenuVO().setType(1).setId(d.getId()).setKey("menu-"+d.getId()).setName(d.getName()).setSelected(menuIsSelected(roleId, d.getId()))).collect(Collectors.toList());
|
||||
|
|
@ -303,7 +303,7 @@ public class AdminMenuServiceImpl extends ServiceImpl<AdminMenuMapper, AdminMenu
|
|||
}
|
||||
}
|
||||
|
||||
private Boolean buttonIsSelected(Integer roleId, Integer buttonId) {
|
||||
private Boolean buttonIsSelected(Long roleId, Long buttonId) {
|
||||
return adminRoleButtonMapService.lambdaQuery()
|
||||
.eq(AdminRoleButtonMap::getButtonId, buttonId)
|
||||
.eq(AdminRoleButtonMap::getRoleId, roleId)
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ public class AdminRoleServiceImpl extends ServiceImpl<AdminRoleMapper, AdminRole
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<ButtonVO> getButtonsByMenuId(Integer userId,Integer menuId) {
|
||||
public List<ButtonVO> getButtonsByMenuId(Integer userId,Long menuId) {
|
||||
return baseMapper.getButtonsByMenuId(userId,menuId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
|
|||
.filter(it -> Objects.equals(it.getId(), u.getDepartmentId()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
Set<Integer> rmaps = roleMaps.stream()
|
||||
Set<Long> rmaps = roleMaps.stream()
|
||||
.filter(it -> Objects.equals(it.getUserId(), u.getId()))
|
||||
.map(AdminUserRoleMap::getRoleId)
|
||||
.collect(Collectors.toSet());
|
||||
|
|
@ -533,7 +533,7 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
|
|||
.findFirst()
|
||||
.orElse(null);
|
||||
vo.setTitleName(Objects.nonNull(position) ? position.getPositionName() : "");
|
||||
Set<Integer> rmaps = roleMaps.stream()
|
||||
Set<Long> rmaps = roleMaps.stream()
|
||||
.filter(it -> Objects.equals(it.getUserId(), user.getId()))
|
||||
.map(AdminUserRoleMap::getRoleId)
|
||||
.collect(Collectors.toSet());
|
||||
|
|
@ -562,7 +562,7 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
|
|||
.findFirst()
|
||||
.orElse(null);
|
||||
vo.setTitleName(Objects.nonNull(position) ? position.getPositionName() : "");
|
||||
Set<Integer> rmaps = roleMaps.stream()
|
||||
Set<Long> rmaps = roleMaps.stream()
|
||||
.filter(it -> Objects.equals(it.getUserId(), user.getId()))
|
||||
.map(AdminUserRoleMap::getRoleId)
|
||||
.collect(Collectors.toSet());
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ public class DictionaryItemServiceImpl extends ServiceImpl<DictionaryItemMapper,
|
|||
public void save(SaveDictionaryItemRequest request) {
|
||||
Dictionary dictionary = dictionaryService.getById(request.getDictionaryId());
|
||||
VUtils.trueThrowBusinessError(Objects.isNull(dictionary)).throwMessage("字典不存在");
|
||||
Integer id = request.getId();
|
||||
Long id = request.getId();
|
||||
VUtils.trueThrowBusinessError(lambdaQuery()
|
||||
.eq(DictionaryItem::getCode, request.getCode())
|
||||
.eq(DictionaryItem::getDictionaryId, request.getDictionaryId())
|
||||
|
|
@ -128,7 +128,7 @@ public class DictionaryItemServiceImpl extends ServiceImpl<DictionaryItemMapper,
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getId(String dictionaryName, String dictionaryItemName) {
|
||||
public Long getId(String dictionaryName, String dictionaryItemName) {
|
||||
return baseMapper.getId(dictionaryName, dictionaryItemName);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public class DictionaryItemTranslateServiceImpl extends ServiceImpl<DictionaryIt
|
|||
private IDictionaryService dictionaryService;
|
||||
|
||||
@Override
|
||||
public List<DictionaryItemTranslateVO> getListByDictionaryItemId(Integer id) {
|
||||
public List<DictionaryItemTranslateVO> getListByDictionaryItemId(Long id) {
|
||||
List<DictionaryItemTranslateVO> datas=baseMapper.getListByDictionaryItemId(id);
|
||||
List<Language> languages=languageService.getLanguages();
|
||||
languages.forEach(l->{
|
||||
|
|
@ -63,7 +63,7 @@ public class DictionaryItemTranslateServiceImpl extends ServiceImpl<DictionaryIt
|
|||
}
|
||||
|
||||
@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();
|
||||
VUtils.trueThrowBusinessError(CollectionUtil.isEmpty(dictionaryItems)).throwMessage("字典值不存在");
|
||||
Dictionary dictionary = dictionaryService.getById(dictionaryItems.get(0).getDictionaryId());
|
||||
|
|
@ -89,7 +89,7 @@ public class DictionaryItemTranslateServiceImpl extends ServiceImpl<DictionaryIt
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getId(Integer dictionaryItemId, String code) {
|
||||
public Long getId(Long dictionaryItemId, String code) {
|
||||
DictionaryItemTranslate translate = lambdaQuery()
|
||||
.eq(DictionaryItemTranslate::getDictionaryItemId, dictionaryItemId).eq(DictionaryItemTranslate::getLanguageCode, code)
|
||||
.one();
|
||||
|
|
|
|||
|
|
@ -76,9 +76,9 @@ public class DictionaryServiceImpl extends ServiceImpl<DictionaryMapper, Diction
|
|||
|
||||
@Transactional
|
||||
@Override
|
||||
public void delete(List<Integer> ids) {
|
||||
public void delete(List<Long> ids) {
|
||||
removeByIds(ids);
|
||||
List<Integer> 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)) {
|
||||
dictionaryItemService.removeByIds(itemIds);
|
||||
dictionaryItemTranslateService.remove(new LambdaQueryWrapper<DictionaryItemTranslate>().in(DictionaryItemTranslate::getDictionaryItemId, itemIds));
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.nflg.mobilebroken.repository.entity.Language;
|
|||
import com.nflg.mobilebroken.repository.mapper.LanguageMapper;
|
||||
import com.nflg.mobilebroken.repository.service.ILanguageService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -31,6 +32,7 @@ public class LanguageServiceImpl extends ServiceImpl<LanguageMapper, Language> i
|
|||
return lambdaQuery().orderByDesc(Language::getSort).list();
|
||||
}
|
||||
|
||||
@Transactional
|
||||
@Override
|
||||
public void enableLanguage(List<EnableLanguageRequest> request) {
|
||||
List<Language> languages = request.stream()
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ public class ProductSeriesServiceImpl extends ServiceImpl<ProductSeriesMapper, P
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<ProductSeriesVO> get(Integer moduleId,String language) {
|
||||
public List<ProductSeriesVO> get(Long moduleId,String language) {
|
||||
return baseMapper.get(moduleId,language);
|
||||
}
|
||||
|
||||
|
|
@ -203,12 +203,12 @@ public class ProductSeriesServiceImpl extends ServiceImpl<ProductSeriesMapper, P
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<ProductSeriesSimpleVO> getSimpleList(Integer moduleId) {
|
||||
public List<ProductSeriesSimpleVO> getSimpleList(Long moduleId) {
|
||||
return baseMapper.getSimpleList(moduleId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductSeriesSimpleVO> getSimpleList(Integer moduleId, String language) {
|
||||
public List<ProductSeriesSimpleVO> getSimpleList(Long moduleId, String language) {
|
||||
List<ProductSeriesSimpleVO> list = baseMapper.getSimpleListByLanguage(moduleId,language);
|
||||
list.forEach(item->{
|
||||
item.setTypes(productTypeService.getSimpleListByLanguage(item.getBatchNumber(),language));
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ public class ProductTypeServiceImpl extends ServiceImpl<ProductTypeMapper, Produ
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<ProductTypeVO> get(Integer moduleId, String seriesNumber, String language) {
|
||||
public List<ProductTypeVO> get(Long moduleId, String seriesNumber, String language) {
|
||||
List<ProductTypeVO> vos = baseMapper.get(moduleId, seriesNumber, language);
|
||||
vos.forEach(vo -> {
|
||||
vo.setModels(productModelService.getSimpleList(vo.getTypeNumber()));
|
||||
|
|
@ -302,7 +302,7 @@ public class ProductTypeServiceImpl extends ServiceImpl<ProductTypeMapper, Produ
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<ProductFileVO> getFilesByLanguage(Integer moduleId, String seriesNumber, String language) {
|
||||
public List<ProductFileVO> getFilesByLanguage(Long moduleId, String seriesNumber, String language) {
|
||||
return baseMapper.getFilesByLanguage(moduleId, seriesNumber, language);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ public class TicketSolutionServiceImpl extends ServiceImpl<TicketSolutionMapper,
|
|||
initial = dictionaryItemService.getListByDictionaryCode(Constant.DICTIONARY_SOLUTION_MEASURES, Constant.DEFAULT_LANGUAGE_CODE);
|
||||
}
|
||||
List<TicketSolution> solutions = lambdaQuery().eq(TicketSolution::getTicketId, ticketId).orderByAsc(TicketSolution::getId).list();
|
||||
Map<Integer, List<TicketSolution>> groupedSolutions = solutions.stream().collect(Collectors.groupingBy(TicketSolution::getDictionaryItemId, LinkedHashMap::new, Collectors.toList()));
|
||||
Map<Long, List<TicketSolution>> groupedSolutions = solutions.stream().collect(Collectors.groupingBy(TicketSolution::getDictionaryItemId, LinkedHashMap::new, Collectors.toList()));
|
||||
SolutionMeasuresVO vo = new SolutionMeasuresVO();
|
||||
if (SaTokenAdminUtil.isLogin()) {
|
||||
if (ticket.getType() == 0) {
|
||||
|
|
|
|||
|
|
@ -138,12 +138,15 @@ public class WebComponentServiceImpl extends ServiceImpl<WebComponentMapper, Web
|
|||
.setPageCode(webComponent.getPageCode())
|
||||
.setComponetName(webComponent.getComponentName())
|
||||
.setComponetCode(webComponent.getComponentCode())
|
||||
.setTraslates(languages.stream().map(l->{
|
||||
return new WebComponentTraslateVO()
|
||||
.setLanguageId(l.getId())
|
||||
.setLanguageName(l.getName())
|
||||
.setValue(translates.stream().filter(t->Objects.equals(t.getLanguageId(),l.getId())).findFirst().orElse(new WebComponentTranslate().setValue("")).getValue());
|
||||
}).collect(Collectors.toList()));
|
||||
.setTraslates(languages.stream().map(l-> new WebComponentTraslateVO()
|
||||
.setLanguageId(l.getId())
|
||||
.setLanguageName(l.getName())
|
||||
.setValue(translates.stream()
|
||||
.filter(t->Objects.equals(t.getLanguageId(),l.getId()))
|
||||
.findFirst()
|
||||
.orElse(new WebComponentTranslate().setValue("")).getValue())
|
||||
).collect(Collectors.toList())
|
||||
);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
|
|
|
|||
Loading…
Reference in New Issue