外贸接口
This commit is contained in:
@@ -0,0 +1,101 @@
|
||||
package com.ruoyi.export.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.core.validate.QueryGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.export.domain.vo.ExportCategoryVo;
|
||||
import com.ruoyi.export.domain.bo.ExportCategoryBo;
|
||||
import com.ruoyi.export.service.IExportCategoryService;
|
||||
|
||||
/**
|
||||
* 分类
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/export/category")
|
||||
public class ExportCategoryController extends BaseController {
|
||||
|
||||
private final IExportCategoryService iExportCategoryService;
|
||||
|
||||
/**
|
||||
* 查询分类列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public R<List<ExportCategoryVo>> list(ExportCategoryBo bo) {
|
||||
List<ExportCategoryVo> list = iExportCategoryService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出分类列表
|
||||
*/
|
||||
@Log(title = "分类", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(ExportCategoryBo bo, HttpServletResponse response) {
|
||||
List<ExportCategoryVo> list = iExportCategoryService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "分类", ExportCategoryVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分类详细信息
|
||||
*
|
||||
* @param categoryId 主键
|
||||
*/
|
||||
@GetMapping("/{categoryId}")
|
||||
public R<ExportCategoryVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long categoryId) {
|
||||
return R.ok(iExportCategoryService.queryById(categoryId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增分类
|
||||
*/
|
||||
@Log(title = "分类", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody ExportCategoryBo bo) {
|
||||
return toAjax(iExportCategoryService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改分类
|
||||
*/
|
||||
@Log(title = "分类", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ExportCategoryBo bo) {
|
||||
return toAjax(iExportCategoryService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除分类
|
||||
*
|
||||
* @param categoryIds 主键串
|
||||
*/
|
||||
@Log(title = "分类", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{categoryIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] categoryIds) {
|
||||
return toAjax(iExportCategoryService.deleteWithValidByIds(Arrays.asList(categoryIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package com.ruoyi.export.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.core.validate.QueryGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.export.domain.vo.ExportContactVo;
|
||||
import com.ruoyi.export.domain.bo.ExportContactBo;
|
||||
import com.ruoyi.export.service.IExportContactService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 联系方式
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/export/contact")
|
||||
public class ExportContactController extends BaseController {
|
||||
|
||||
private final IExportContactService iExportContactService;
|
||||
|
||||
/**
|
||||
* 查询联系方式列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<ExportContactVo> list(ExportContactBo bo, PageQuery pageQuery) {
|
||||
return iExportContactService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出联系方式列表
|
||||
*/
|
||||
@Log(title = "联系方式", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(ExportContactBo bo, HttpServletResponse response) {
|
||||
List<ExportContactVo> list = iExportContactService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "联系方式", ExportContactVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取联系方式详细信息
|
||||
*
|
||||
* @param contactId 主键
|
||||
*/
|
||||
@GetMapping("/{contactId}")
|
||||
public R<ExportContactVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long contactId) {
|
||||
return R.ok(iExportContactService.queryById(contactId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增联系方式
|
||||
*/
|
||||
@Log(title = "联系方式", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody ExportContactBo bo) {
|
||||
return toAjax(iExportContactService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改联系方式
|
||||
*/
|
||||
@Log(title = "联系方式", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ExportContactBo bo) {
|
||||
return toAjax(iExportContactService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除联系方式
|
||||
*
|
||||
* @param contactIds 主键串
|
||||
*/
|
||||
@Log(title = "联系方式", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{contactIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] contactIds) {
|
||||
return toAjax(iExportContactService.deleteWithValidByIds(Arrays.asList(contactIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package com.ruoyi.export.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.core.validate.QueryGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.export.domain.vo.ExportItemVo;
|
||||
import com.ruoyi.export.domain.bo.ExportItemBo;
|
||||
import com.ruoyi.export.service.IExportItemService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 展示品
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/export/item")
|
||||
public class ExportItemController extends BaseController {
|
||||
|
||||
private final IExportItemService iExportItemService;
|
||||
|
||||
/**
|
||||
* 查询展示品列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<ExportItemVo> list(ExportItemBo bo, PageQuery pageQuery) {
|
||||
return iExportItemService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出展示品列表
|
||||
*/
|
||||
@Log(title = "展示品", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(ExportItemBo bo, HttpServletResponse response) {
|
||||
List<ExportItemVo> list = iExportItemService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "展示品", ExportItemVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取展示品详细信息
|
||||
*
|
||||
* @param itemId 主键
|
||||
*/
|
||||
@GetMapping("/{itemId}")
|
||||
public R<ExportItemVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long itemId) {
|
||||
return R.ok(iExportItemService.queryById(itemId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增展示品
|
||||
*/
|
||||
@Log(title = "展示品", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody ExportItemBo bo) {
|
||||
return toAjax(iExportItemService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改展示品
|
||||
*/
|
||||
@Log(title = "展示品", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ExportItemBo bo) {
|
||||
return toAjax(iExportItemService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除展示品
|
||||
*
|
||||
* @param itemIds 主键串
|
||||
*/
|
||||
@Log(title = "展示品", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{itemIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] itemIds) {
|
||||
return toAjax(iExportItemService.deleteWithValidByIds(Arrays.asList(itemIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package com.ruoyi.export.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import com.ruoyi.common.core.validate.QueryGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.export.domain.vo.ExportLanguageVo;
|
||||
import com.ruoyi.export.domain.bo.ExportLanguageBo;
|
||||
import com.ruoyi.export.service.IExportLanguageService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 语言管理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/site/language")
|
||||
public class ExportLanguageController extends BaseController {
|
||||
|
||||
private final IExportLanguageService iExportLanguageService;
|
||||
|
||||
/**
|
||||
* 查询语言管理列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<ExportLanguageVo> list(ExportLanguageBo bo, PageQuery pageQuery) {
|
||||
return iExportLanguageService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出语言管理列表
|
||||
*/
|
||||
@Log(title = "语言管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(ExportLanguageBo bo, HttpServletResponse response) {
|
||||
List<ExportLanguageVo> list = iExportLanguageService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "语言管理", ExportLanguageVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取语言管理详细信息
|
||||
*
|
||||
* @param languageId 主键
|
||||
*/
|
||||
@GetMapping("/{languageId}")
|
||||
public R<ExportLanguageVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long languageId) {
|
||||
return R.ok(iExportLanguageService.queryById(languageId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增语言管理
|
||||
*/
|
||||
@Log(title = "语言管理", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody ExportLanguageBo bo) {
|
||||
return toAjax(iExportLanguageService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改语言管理
|
||||
*/
|
||||
@Log(title = "语言管理", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ExportLanguageBo bo) {
|
||||
return toAjax(iExportLanguageService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除语言管理
|
||||
*
|
||||
* @param languageIds 主键串
|
||||
*/
|
||||
@Log(title = "语言管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{languageIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] languageIds) {
|
||||
return toAjax(iExportLanguageService.deleteWithValidByIds(Arrays.asList(languageIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.export.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.ruoyi.common.core.domain.TreeEntity;
|
||||
|
||||
/**
|
||||
* 分类对象 export_category
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("export_category")
|
||||
public class ExportCategory extends TreeEntity<ExportCategory> {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 分类主键
|
||||
*/
|
||||
@TableId(value = "category_id")
|
||||
private Long categoryId;
|
||||
/**
|
||||
* 分类类型:0=模块分类,1=展示品分类
|
||||
*/
|
||||
private Integer type;
|
||||
/**
|
||||
* 语言编码
|
||||
*/
|
||||
private String langCode;
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
private String categoryName;
|
||||
/**
|
||||
* 分类描述
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Long sortOrder;
|
||||
/**
|
||||
* 是否启用(0=否,1=是)
|
||||
*/
|
||||
private Integer isEnabled;
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.ruoyi.export.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 联系方式对象 export_contact
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("export_contact")
|
||||
public class ExportContact extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 联系方式主键
|
||||
*/
|
||||
@TableId(value = "contact_id")
|
||||
private Long contactId;
|
||||
/**
|
||||
* 语言编码
|
||||
*/
|
||||
private String langCode;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String phone;
|
||||
/**
|
||||
* 联系邮箱
|
||||
*/
|
||||
private String email;
|
||||
/**
|
||||
* 传真
|
||||
*/
|
||||
private String fax;
|
||||
/**
|
||||
* 联系地址
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* 二维码链接
|
||||
*/
|
||||
private String qrCode;
|
||||
/**
|
||||
* 额外说明
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Long sortOrder;
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.ruoyi.export.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 展示品对象 export_item
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("export_item")
|
||||
public class ExportItem extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 展示品主键
|
||||
*/
|
||||
@TableId(value = "item_id")
|
||||
private Long itemId;
|
||||
/**
|
||||
* 所属分类ID(type=1 时使用)
|
||||
*/
|
||||
private Long categoryId;
|
||||
/**
|
||||
* 语言编码
|
||||
*/
|
||||
private String langCode;
|
||||
/**
|
||||
* 展示品名称
|
||||
*/
|
||||
private String itemName;
|
||||
/**
|
||||
* 展示品简述
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* HTML 正文
|
||||
*/
|
||||
private String content;
|
||||
/**
|
||||
* OSS 上的附件 ID 列表
|
||||
*/
|
||||
private String accessory;
|
||||
/**
|
||||
* 详情或外链 URL
|
||||
*/
|
||||
private String linkUrl;
|
||||
/**
|
||||
* 项目类型:0=模块项,1=展示品项
|
||||
*/
|
||||
private Integer itemType;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Long sortOrder;
|
||||
/**
|
||||
* 是否启用(0=否,1=是)
|
||||
*/
|
||||
private Integer isEnabled;
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.ruoyi.export.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 语言管理对象 export_language
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("export_language")
|
||||
public class ExportLanguage extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 语言主键
|
||||
*/
|
||||
@TableId(value = "language_id")
|
||||
private Long languageId;
|
||||
/**
|
||||
* 语言编码,如 en, zh-CN
|
||||
*/
|
||||
private String langCode;
|
||||
/**
|
||||
* 语言名称
|
||||
*/
|
||||
private String languageName;
|
||||
/**
|
||||
* 是否默认语言
|
||||
*/
|
||||
private Integer isDefault;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Long sortOrder;
|
||||
/**
|
||||
* 删除标志(0=正常,1=已删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.export.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.ruoyi.common.core.domain.TreeEntity;
|
||||
|
||||
/**
|
||||
* 分类业务对象 export_category
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ExportCategoryBo extends TreeEntity<ExportCategoryBo> {
|
||||
|
||||
/**
|
||||
* 分类主键
|
||||
*/
|
||||
private Long categoryId;
|
||||
|
||||
/**
|
||||
* 分类类型:0=模块分类,1=展示品分类
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 语言编码
|
||||
*/
|
||||
private String langCode;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
private String categoryName;
|
||||
|
||||
/**
|
||||
* 分类描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Long sortOrder;
|
||||
|
||||
/**
|
||||
* 是否启用(0=否,1=是)
|
||||
*/
|
||||
private Integer isEnabled;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.ruoyi.export.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 联系方式业务对象 export_contact
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ExportContactBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 联系方式主键
|
||||
*/
|
||||
private Long contactId;
|
||||
|
||||
/**
|
||||
* 语言编码
|
||||
*/
|
||||
private String langCode;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 联系邮箱
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 传真
|
||||
*/
|
||||
private String fax;
|
||||
|
||||
/**
|
||||
* 联系地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 二维码链接
|
||||
*/
|
||||
private String qrCode;
|
||||
|
||||
/**
|
||||
* 额外说明
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Long sortOrder;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.ruoyi.export.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 展示品业务对象 export_item
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ExportItemBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 展示品主键
|
||||
*/
|
||||
private Long itemId;
|
||||
|
||||
/**
|
||||
* 所属分类ID(type=1 时使用)
|
||||
*/
|
||||
private Long categoryId;
|
||||
|
||||
/**
|
||||
* 语言编码
|
||||
*/
|
||||
private String langCode;
|
||||
|
||||
/**
|
||||
* 展示品名称
|
||||
*/
|
||||
private String itemName;
|
||||
|
||||
/**
|
||||
* 展示品简述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* HTML 正文
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* OSS 上的附件 ID 列表
|
||||
*/
|
||||
private String accessory;
|
||||
|
||||
/**
|
||||
* 详情或外链 URL
|
||||
*/
|
||||
private String linkUrl;
|
||||
|
||||
/**
|
||||
* 项目类型:0=模块项,1=展示品项
|
||||
*/
|
||||
private Integer itemType;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Long sortOrder;
|
||||
|
||||
/**
|
||||
* 是否启用(0=否,1=是)
|
||||
*/
|
||||
private Integer isEnabled;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.ruoyi.export.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 语言管理业务对象 export_language
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ExportLanguageBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 语言主键
|
||||
*/
|
||||
private Long languageId;
|
||||
|
||||
/**
|
||||
* 语言编码,如 en, zh-CN
|
||||
*/
|
||||
private String langCode;
|
||||
|
||||
/**
|
||||
* 语言名称
|
||||
*/
|
||||
private String languageName;
|
||||
|
||||
/**
|
||||
* 是否默认语言
|
||||
*/
|
||||
private Integer isDefault;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Long sortOrder;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.ruoyi.export.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 分类视图对象 export_category
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ExportCategoryVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 分类主键
|
||||
*/
|
||||
@ExcelProperty(value = "分类主键")
|
||||
private Long categoryId;
|
||||
|
||||
/**
|
||||
* 父分类ID
|
||||
*/
|
||||
@ExcelProperty(value = "父分类ID")
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 分类类型:0=模块分类,1=展示品分类
|
||||
*/
|
||||
@ExcelProperty(value = "分类类型:0=模块分类,1=展示品分类")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 语言编码
|
||||
*/
|
||||
@ExcelProperty(value = "语言编码")
|
||||
private String langCode;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
@ExcelProperty(value = "分类名称")
|
||||
private String categoryName;
|
||||
|
||||
/**
|
||||
* 分类描述
|
||||
*/
|
||||
@ExcelProperty(value = "分类描述")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@ExcelProperty(value = "排序")
|
||||
private Long sortOrder;
|
||||
|
||||
/**
|
||||
* 是否启用(0=否,1=是)
|
||||
*/
|
||||
@ExcelProperty(value = "是否启用", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0==否,1=是")
|
||||
private Integer isEnabled;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.ruoyi.export.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 联系方式视图对象 export_contact
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ExportContactVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 联系方式主键
|
||||
*/
|
||||
@ExcelProperty(value = "联系方式主键")
|
||||
private Long contactId;
|
||||
|
||||
/**
|
||||
* 语言编码
|
||||
*/
|
||||
@ExcelProperty(value = "语言编码")
|
||||
private String langCode;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@ExcelProperty(value = "联系电话")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 联系邮箱
|
||||
*/
|
||||
@ExcelProperty(value = "联系邮箱")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 传真
|
||||
*/
|
||||
@ExcelProperty(value = "传真")
|
||||
private String fax;
|
||||
|
||||
/**
|
||||
* 联系地址
|
||||
*/
|
||||
@ExcelProperty(value = "联系地址")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 二维码链接
|
||||
*/
|
||||
@ExcelProperty(value = "二维码链接")
|
||||
private String qrCode;
|
||||
|
||||
/**
|
||||
* 额外说明
|
||||
*/
|
||||
@ExcelProperty(value = "额外说明")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@ExcelProperty(value = "排序")
|
||||
private Long sortOrder;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.ruoyi.export.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 展示品视图对象 export_item
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ExportItemVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 展示品主键
|
||||
*/
|
||||
@ExcelProperty(value = "展示品主键")
|
||||
private Long itemId;
|
||||
|
||||
/**
|
||||
* 所属分类ID(type=1 时使用)
|
||||
*/
|
||||
@ExcelProperty(value = "所属分类ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "t=ype=1,时=使用")
|
||||
private Long categoryId;
|
||||
|
||||
/**
|
||||
* 语言编码
|
||||
*/
|
||||
@ExcelProperty(value = "语言编码")
|
||||
private String langCode;
|
||||
|
||||
/**
|
||||
* 展示品名称
|
||||
*/
|
||||
@ExcelProperty(value = "展示品名称")
|
||||
private String itemName;
|
||||
|
||||
/**
|
||||
* 展示品简述
|
||||
*/
|
||||
@ExcelProperty(value = "展示品简述")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* HTML 正文
|
||||
*/
|
||||
@ExcelProperty(value = "HTML 正文")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* OSS 上的附件 ID 列表
|
||||
*/
|
||||
@ExcelProperty(value = "OSS 上的附件 ID 列表")
|
||||
private String accessory;
|
||||
|
||||
/**
|
||||
* 详情或外链 URL
|
||||
*/
|
||||
@ExcelProperty(value = "详情或外链 URL")
|
||||
private String linkUrl;
|
||||
|
||||
/**
|
||||
* 项目类型:0=模块项,1=展示品项
|
||||
*/
|
||||
@ExcelProperty(value = "项目类型:0=模块项,1=展示品项")
|
||||
private Integer itemType;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@ExcelProperty(value = "排序")
|
||||
private Long sortOrder;
|
||||
|
||||
/**
|
||||
* 是否启用(0=否,1=是)
|
||||
*/
|
||||
@ExcelProperty(value = "是否启用", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0==否,1=是")
|
||||
private Integer isEnabled;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.export.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.ruoyi.common.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 语言管理视图对象 export_language
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ExportLanguageVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 语言主键
|
||||
*/
|
||||
@ExcelProperty(value = "语言主键")
|
||||
private Long languageId;
|
||||
|
||||
/**
|
||||
* 语言编码,如 en, zh-CN
|
||||
*/
|
||||
@ExcelProperty(value = "语言编码,如 en, zh-CN")
|
||||
private String langCode;
|
||||
|
||||
/**
|
||||
* 语言名称
|
||||
*/
|
||||
@ExcelProperty(value = "语言名称")
|
||||
private String languageName;
|
||||
|
||||
/**
|
||||
* 是否默认语言
|
||||
*/
|
||||
@ExcelProperty(value = "是否默认语言")
|
||||
private Integer isDefault;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@ExcelProperty(value = "排序")
|
||||
private Long sortOrder;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.ruoyi.export.mapper;
|
||||
|
||||
import com.ruoyi.export.domain.ExportCategory;
|
||||
import com.ruoyi.export.domain.vo.ExportCategoryVo;
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 分类Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
public interface ExportCategoryMapper extends BaseMapperPlus<ExportCategoryMapper, ExportCategory, ExportCategoryVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.ruoyi.export.mapper;
|
||||
|
||||
import com.ruoyi.export.domain.ExportContact;
|
||||
import com.ruoyi.export.domain.vo.ExportContactVo;
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 联系方式Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
public interface ExportContactMapper extends BaseMapperPlus<ExportContactMapper, ExportContact, ExportContactVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.ruoyi.export.mapper;
|
||||
|
||||
import com.ruoyi.export.domain.ExportItem;
|
||||
import com.ruoyi.export.domain.vo.ExportItemVo;
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 展示品Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
public interface ExportItemMapper extends BaseMapperPlus<ExportItemMapper, ExportItem, ExportItemVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.ruoyi.export.mapper;
|
||||
|
||||
import com.ruoyi.export.domain.ExportLanguage;
|
||||
import com.ruoyi.export.domain.vo.ExportLanguageVo;
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 语言管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
public interface ExportLanguageMapper extends BaseMapperPlus<ExportLanguageMapper, ExportLanguage, ExportLanguageVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.ruoyi.export.service;
|
||||
|
||||
import com.ruoyi.export.domain.ExportCategory;
|
||||
import com.ruoyi.export.domain.vo.ExportCategoryVo;
|
||||
import com.ruoyi.export.domain.bo.ExportCategoryBo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 分类Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
public interface IExportCategoryService {
|
||||
|
||||
/**
|
||||
* 查询分类
|
||||
*/
|
||||
ExportCategoryVo queryById(Long categoryId);
|
||||
|
||||
|
||||
/**
|
||||
* 查询分类列表
|
||||
*/
|
||||
List<ExportCategoryVo> queryList(ExportCategoryBo bo);
|
||||
|
||||
/**
|
||||
* 新增分类
|
||||
*/
|
||||
Boolean insertByBo(ExportCategoryBo bo);
|
||||
|
||||
/**
|
||||
* 修改分类
|
||||
*/
|
||||
Boolean updateByBo(ExportCategoryBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除分类信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.export.service;
|
||||
|
||||
import com.ruoyi.export.domain.ExportContact;
|
||||
import com.ruoyi.export.domain.vo.ExportContactVo;
|
||||
import com.ruoyi.export.domain.bo.ExportContactBo;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 联系方式Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
public interface IExportContactService {
|
||||
|
||||
/**
|
||||
* 查询联系方式
|
||||
*/
|
||||
ExportContactVo queryById(Long contactId);
|
||||
|
||||
/**
|
||||
* 查询联系方式列表
|
||||
*/
|
||||
TableDataInfo<ExportContactVo> queryPageList(ExportContactBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询联系方式列表
|
||||
*/
|
||||
List<ExportContactVo> queryList(ExportContactBo bo);
|
||||
|
||||
/**
|
||||
* 新增联系方式
|
||||
*/
|
||||
Boolean insertByBo(ExportContactBo bo);
|
||||
|
||||
/**
|
||||
* 修改联系方式
|
||||
*/
|
||||
Boolean updateByBo(ExportContactBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除联系方式信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.export.service;
|
||||
|
||||
import com.ruoyi.export.domain.ExportItem;
|
||||
import com.ruoyi.export.domain.vo.ExportItemVo;
|
||||
import com.ruoyi.export.domain.bo.ExportItemBo;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 展示品Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
public interface IExportItemService {
|
||||
|
||||
/**
|
||||
* 查询展示品
|
||||
*/
|
||||
ExportItemVo queryById(Long itemId);
|
||||
|
||||
/**
|
||||
* 查询展示品列表
|
||||
*/
|
||||
TableDataInfo<ExportItemVo> queryPageList(ExportItemBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询展示品列表
|
||||
*/
|
||||
List<ExportItemVo> queryList(ExportItemBo bo);
|
||||
|
||||
/**
|
||||
* 新增展示品
|
||||
*/
|
||||
Boolean insertByBo(ExportItemBo bo);
|
||||
|
||||
/**
|
||||
* 修改展示品
|
||||
*/
|
||||
Boolean updateByBo(ExportItemBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除展示品信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.export.service;
|
||||
|
||||
import com.ruoyi.export.domain.ExportLanguage;
|
||||
import com.ruoyi.export.domain.vo.ExportLanguageVo;
|
||||
import com.ruoyi.export.domain.bo.ExportLanguageBo;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 语言管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
public interface IExportLanguageService {
|
||||
|
||||
/**
|
||||
* 查询语言管理
|
||||
*/
|
||||
ExportLanguageVo queryById(Long languageId);
|
||||
|
||||
/**
|
||||
* 查询语言管理列表
|
||||
*/
|
||||
TableDataInfo<ExportLanguageVo> queryPageList(ExportLanguageBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询语言管理列表
|
||||
*/
|
||||
List<ExportLanguageVo> queryList(ExportLanguageBo bo);
|
||||
|
||||
/**
|
||||
* 新增语言管理
|
||||
*/
|
||||
Boolean insertByBo(ExportLanguageBo bo);
|
||||
|
||||
/**
|
||||
* 修改语言管理
|
||||
*/
|
||||
Boolean updateByBo(ExportLanguageBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除语言管理信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.ruoyi.export.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.export.domain.bo.ExportCategoryBo;
|
||||
import com.ruoyi.export.domain.vo.ExportCategoryVo;
|
||||
import com.ruoyi.export.domain.ExportCategory;
|
||||
import com.ruoyi.export.mapper.ExportCategoryMapper;
|
||||
import com.ruoyi.export.service.IExportCategoryService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 分类Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class ExportCategoryServiceImpl implements IExportCategoryService {
|
||||
|
||||
private final ExportCategoryMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询分类
|
||||
*/
|
||||
@Override
|
||||
public ExportCategoryVo queryById(Long categoryId){
|
||||
return baseMapper.selectVoById(categoryId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询分类列表
|
||||
*/
|
||||
@Override
|
||||
public List<ExportCategoryVo> queryList(ExportCategoryBo bo) {
|
||||
LambdaQueryWrapper<ExportCategory> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<ExportCategory> buildQueryWrapper(ExportCategoryBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<ExportCategory> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getParentId() != null, ExportCategory::getParentId, bo.getParentId());
|
||||
lqw.eq(bo.getType() != null, ExportCategory::getType, bo.getType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getLangCode()), ExportCategory::getLangCode, bo.getLangCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getCategoryName()), ExportCategory::getCategoryName, bo.getCategoryName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDescription()), ExportCategory::getDescription, bo.getDescription());
|
||||
lqw.eq(bo.getSortOrder() != null, ExportCategory::getSortOrder, bo.getSortOrder());
|
||||
lqw.eq(bo.getIsEnabled() != null, ExportCategory::getIsEnabled, bo.getIsEnabled());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增分类
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(ExportCategoryBo bo) {
|
||||
ExportCategory add = BeanUtil.toBean(bo, ExportCategory.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setCategoryId(add.getCategoryId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改分类
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(ExportCategoryBo bo) {
|
||||
ExportCategory update = BeanUtil.toBean(bo, ExportCategory.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(ExportCategory entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除分类
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.ruoyi.export.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.export.domain.bo.ExportContactBo;
|
||||
import com.ruoyi.export.domain.vo.ExportContactVo;
|
||||
import com.ruoyi.export.domain.ExportContact;
|
||||
import com.ruoyi.export.mapper.ExportContactMapper;
|
||||
import com.ruoyi.export.service.IExportContactService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 联系方式Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class ExportContactServiceImpl implements IExportContactService {
|
||||
|
||||
private final ExportContactMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询联系方式
|
||||
*/
|
||||
@Override
|
||||
public ExportContactVo queryById(Long contactId){
|
||||
return baseMapper.selectVoById(contactId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询联系方式列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<ExportContactVo> queryPageList(ExportContactBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<ExportContact> lqw = buildQueryWrapper(bo);
|
||||
Page<ExportContactVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询联系方式列表
|
||||
*/
|
||||
@Override
|
||||
public List<ExportContactVo> queryList(ExportContactBo bo) {
|
||||
LambdaQueryWrapper<ExportContact> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<ExportContact> buildQueryWrapper(ExportContactBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<ExportContact> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getLangCode()), ExportContact::getLangCode, bo.getLangCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPhone()), ExportContact::getPhone, bo.getPhone());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getEmail()), ExportContact::getEmail, bo.getEmail());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getFax()), ExportContact::getFax, bo.getFax());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getAddress()), ExportContact::getAddress, bo.getAddress());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getQrCode()), ExportContact::getQrCode, bo.getQrCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDescription()), ExportContact::getDescription, bo.getDescription());
|
||||
lqw.eq(bo.getSortOrder() != null, ExportContact::getSortOrder, bo.getSortOrder());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增联系方式
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(ExportContactBo bo) {
|
||||
ExportContact add = BeanUtil.toBean(bo, ExportContact.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setContactId(add.getContactId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改联系方式
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(ExportContactBo bo) {
|
||||
ExportContact update = BeanUtil.toBean(bo, ExportContact.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(ExportContact entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除联系方式
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
package com.ruoyi.export.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.export.domain.bo.ExportItemBo;
|
||||
import com.ruoyi.export.domain.vo.ExportItemVo;
|
||||
import com.ruoyi.export.domain.ExportItem;
|
||||
import com.ruoyi.export.mapper.ExportItemMapper;
|
||||
import com.ruoyi.export.service.IExportItemService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 展示品Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class ExportItemServiceImpl implements IExportItemService {
|
||||
|
||||
private final ExportItemMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询展示品
|
||||
*/
|
||||
@Override
|
||||
public ExportItemVo queryById(Long itemId){
|
||||
return baseMapper.selectVoById(itemId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询展示品列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<ExportItemVo> queryPageList(ExportItemBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<ExportItem> lqw = buildQueryWrapper(bo);
|
||||
Page<ExportItemVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询展示品列表
|
||||
*/
|
||||
@Override
|
||||
public List<ExportItemVo> queryList(ExportItemBo bo) {
|
||||
LambdaQueryWrapper<ExportItem> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<ExportItem> buildQueryWrapper(ExportItemBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<ExportItem> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getCategoryId() != null, ExportItem::getCategoryId, bo.getCategoryId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getLangCode()), ExportItem::getLangCode, bo.getLangCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getItemName()), ExportItem::getItemName, bo.getItemName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getDescription()), ExportItem::getDescription, bo.getDescription());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getContent()), ExportItem::getContent, bo.getContent());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getAccessory()), ExportItem::getAccessory, bo.getAccessory());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getLinkUrl()), ExportItem::getLinkUrl, bo.getLinkUrl());
|
||||
lqw.eq(bo.getItemType() != null, ExportItem::getItemType, bo.getItemType());
|
||||
lqw.eq(bo.getSortOrder() != null, ExportItem::getSortOrder, bo.getSortOrder());
|
||||
lqw.eq(bo.getIsEnabled() != null, ExportItem::getIsEnabled, bo.getIsEnabled());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增展示品
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(ExportItemBo bo) {
|
||||
ExportItem add = BeanUtil.toBean(bo, ExportItem.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setItemId(add.getItemId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改展示品
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(ExportItemBo bo) {
|
||||
ExportItem update = BeanUtil.toBean(bo, ExportItem.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(ExportItem entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除展示品
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.ruoyi.export.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.export.domain.bo.ExportLanguageBo;
|
||||
import com.ruoyi.export.domain.vo.ExportLanguageVo;
|
||||
import com.ruoyi.export.domain.ExportLanguage;
|
||||
import com.ruoyi.export.mapper.ExportLanguageMapper;
|
||||
import com.ruoyi.export.service.IExportLanguageService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 语言管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-17
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class ExportLanguageServiceImpl implements IExportLanguageService {
|
||||
|
||||
private final ExportLanguageMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询语言管理
|
||||
*/
|
||||
@Override
|
||||
public ExportLanguageVo queryById(Long languageId){
|
||||
return baseMapper.selectVoById(languageId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询语言管理列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<ExportLanguageVo> queryPageList(ExportLanguageBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<ExportLanguage> lqw = buildQueryWrapper(bo);
|
||||
Page<ExportLanguageVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询语言管理列表
|
||||
*/
|
||||
@Override
|
||||
public List<ExportLanguageVo> queryList(ExportLanguageBo bo) {
|
||||
LambdaQueryWrapper<ExportLanguage> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<ExportLanguage> buildQueryWrapper(ExportLanguageBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<ExportLanguage> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getLangCode()), ExportLanguage::getLangCode, bo.getLangCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getLanguageName()), ExportLanguage::getLanguageName, bo.getLanguageName());
|
||||
lqw.eq(bo.getIsDefault() != null, ExportLanguage::getIsDefault, bo.getIsDefault());
|
||||
lqw.eq(bo.getSortOrder() != null, ExportLanguage::getSortOrder, bo.getSortOrder());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增语言管理
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(ExportLanguageBo bo) {
|
||||
ExportLanguage add = BeanUtil.toBean(bo, ExportLanguage.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setLanguageId(add.getLanguageId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改语言管理
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(ExportLanguageBo bo) {
|
||||
ExportLanguage update = BeanUtil.toBean(bo, ExportLanguage.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(ExportLanguage entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除语言管理
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?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.ruoyi.export.mapper.ExportCategoryMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.export.domain.ExportCategory" id="ExportCategoryResult">
|
||||
<result property="categoryId" column="category_id"/>
|
||||
<result property="parentId" column="parent_id"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="langCode" column="lang_code"/>
|
||||
<result property="categoryName" column="category_name"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="sortOrder" column="sort_order"/>
|
||||
<result property="isEnabled" column="is_enabled"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?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.ruoyi.export.mapper.ExportContactMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.export.domain.ExportContact" id="ExportContactResult">
|
||||
<result property="contactId" column="contact_id"/>
|
||||
<result property="langCode" column="lang_code"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="email" column="email"/>
|
||||
<result property="fax" column="fax"/>
|
||||
<result property="address" column="address"/>
|
||||
<result property="qrCode" column="qr_code"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="sortOrder" column="sort_order"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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.ruoyi.export.mapper.ExportItemMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.export.domain.ExportItem" id="ExportItemResult">
|
||||
<result property="itemId" column="item_id"/>
|
||||
<result property="categoryId" column="category_id"/>
|
||||
<result property="langCode" column="lang_code"/>
|
||||
<result property="itemName" column="item_name"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="accessory" column="accessory"/>
|
||||
<result property="linkUrl" column="link_url"/>
|
||||
<result property="itemType" column="item_type"/>
|
||||
<result property="sortOrder" column="sort_order"/>
|
||||
<result property="isEnabled" column="is_enabled"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,22 @@
|
||||
<?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.ruoyi.export.mapper.ExportLanguageMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.export.domain.ExportLanguage" id="ExportLanguageResult">
|
||||
<result property="languageId" column="language_id"/>
|
||||
<result property="langCode" column="lang_code"/>
|
||||
<result property="languageName" column="language_name"/>
|
||||
<result property="isDefault" column="is_default"/>
|
||||
<result property="sortOrder" column="sort_order"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user