feat(portal): 新增 HwWeb1 和 HwWebMenu1 域对象,专门负责产品中心的产品详情页面
parent
836394b110
commit
6fd14109f7
@ -0,0 +1,98 @@
|
|||||||
|
package com.ruoyi.portal.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.web.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.log.annotation.Log;
|
||||||
|
import com.ruoyi.common.log.enums.BusinessType;
|
||||||
|
import com.ruoyi.portal.domain.HwWeb1;
|
||||||
|
import com.ruoyi.portal.service.IHwWebService1;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* haiwei官网jsonController
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-08-18
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/HwWeb1")
|
||||||
|
public class HwWebController1 extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IHwWebService1 hwWebService1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询haiwei官网json列表
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("portalhwWeb:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(HwWeb1 HwWeb1)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<HwWeb1> list = hwWebService1.selectHwWebList(HwWeb1);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出haiwei官网json列表
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("portalhwWeb:export")
|
||||||
|
@Log(title = "haiwei官网json", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, HwWeb1 HwWeb1)
|
||||||
|
{
|
||||||
|
List<HwWeb1> list = hwWebService1.selectHwWebList(HwWeb1);
|
||||||
|
ExcelUtil<HwWeb1> util = new ExcelUtil<HwWeb1>(HwWeb1.class);
|
||||||
|
util.exportExcel(response, list, "haiwei官网json数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取haiwei官网json详细信息
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("portalhwWeb:query")
|
||||||
|
@GetMapping(value = "/{webCode}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("webCode") Long webCode)
|
||||||
|
{
|
||||||
|
return success(hwWebService1.selectHwWebByWebcode(webCode));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增haiwei官网json
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("portalhwWeb:add")
|
||||||
|
@Log(title = "haiwei官网json", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody HwWeb1 HwWeb1)
|
||||||
|
{
|
||||||
|
return toAjax(hwWebService1.insertHwWeb(HwWeb1));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改haiwei官网json
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("portalhwWeb:edit")
|
||||||
|
@Log(title = "haiwei官网json", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody HwWeb1 HwWeb1)
|
||||||
|
{
|
||||||
|
int i = hwWebService1.updateHwWeb(HwWeb1);
|
||||||
|
return toAjax(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除haiwei官网json
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("portalhwWeb:remove")
|
||||||
|
@Log(title = "haiwei官网json", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{webIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] webIds)
|
||||||
|
{
|
||||||
|
return toAjax(hwWebService1.deleteHwWebByWebIds(webIds));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,103 @@
|
|||||||
|
package com.ruoyi.portal.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.web.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.log.annotation.Log;
|
||||||
|
import com.ruoyi.common.log.enums.BusinessType;
|
||||||
|
import com.ruoyi.portal.domain.HwWebMenu1;
|
||||||
|
import com.ruoyi.portal.service.IHwWebMenuService1;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* haiwei官网菜单Controller
|
||||||
|
*
|
||||||
|
* @author zch
|
||||||
|
* @date 2025-08-18
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/hwWebMenu1")
|
||||||
|
public class HwWebMenuController1 extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IHwWebMenuService1 hwWebMenuService1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询haiwei官网菜单列表
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("portalhwWebMenu:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public AjaxResult list(HwWebMenu1 hwWebMenu1)
|
||||||
|
{
|
||||||
|
List<HwWebMenu1> list = hwWebMenuService1.selectHwWebMenuList(hwWebMenu1);
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出haiwei官网菜单列表
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("portalhwWebMenu:export")
|
||||||
|
@Log(title = "haiwei官网菜单", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, HwWebMenu1 hwWebMenu1)
|
||||||
|
{
|
||||||
|
List<HwWebMenu1> list = hwWebMenuService1.selectHwWebMenuList(hwWebMenu1);
|
||||||
|
ExcelUtil<HwWebMenu1> util = new ExcelUtil<HwWebMenu1>(HwWebMenu1.class);
|
||||||
|
util.exportExcel(response, list, "haiwei官网菜单数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取haiwei官网菜单详细信息
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("portalhwWebMenu:query")
|
||||||
|
@GetMapping(value = "/{webMenuId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("webMenuId") Long webMenuId)
|
||||||
|
{
|
||||||
|
return success(hwWebMenuService1.selectHwWebMenuByWebMenuId(webMenuId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增haiwei官网菜单
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("portalhwWebMenu:add")
|
||||||
|
@Log(title = "haiwei官网菜单", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody HwWebMenu1 hwWebMenu1)
|
||||||
|
{
|
||||||
|
return toAjax(hwWebMenuService1.insertHwWebMenu(hwWebMenu1));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改haiwei官网菜单
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("portalhwWebMenu:edit")
|
||||||
|
@Log(title = "haiwei官网菜单", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody HwWebMenu1 hwWebMenu1)
|
||||||
|
{
|
||||||
|
return toAjax(hwWebMenuService1.updateHwWebMenu(hwWebMenu1));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除haiwei官网菜单
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("portalhwWebMenu:remove")
|
||||||
|
@Log(title = "haiwei官网菜单", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{webMenuIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] webMenuIds)
|
||||||
|
{
|
||||||
|
return toAjax(hwWebMenuService1.deleteHwWebMenuByWebMenuIds(webMenuIds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取菜单树列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/selectMenuTree")
|
||||||
|
public AjaxResult selectMenuTree(HwWebMenu1 hwWebMenu1){
|
||||||
|
return success(hwWebMenuService1.selectMenuTree(hwWebMenu1));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,80 @@
|
|||||||
|
package com.ruoyi.portal.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.core.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* haiwei官网json对象 hw_web
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-08-18
|
||||||
|
*/
|
||||||
|
public class HwWeb1 extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long webId;
|
||||||
|
|
||||||
|
/** json */
|
||||||
|
@Excel(name = "json")
|
||||||
|
private String webJson;
|
||||||
|
|
||||||
|
/** json字符串 */
|
||||||
|
@Excel(name = "json字符串")
|
||||||
|
private String webJsonString;
|
||||||
|
|
||||||
|
/** 页面 */
|
||||||
|
@Excel(name = "页面")
|
||||||
|
private Long webCode;
|
||||||
|
|
||||||
|
|
||||||
|
public void setWebId(Long webId)
|
||||||
|
{
|
||||||
|
this.webId = webId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getWebId()
|
||||||
|
{
|
||||||
|
return webId;
|
||||||
|
}
|
||||||
|
public void setWebJson(String webJson)
|
||||||
|
{
|
||||||
|
this.webJson = webJson;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWebJson()
|
||||||
|
{
|
||||||
|
return webJson;
|
||||||
|
}
|
||||||
|
public void setWebJsonString(String webJsonString)
|
||||||
|
{
|
||||||
|
this.webJsonString = webJsonString;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWebJsonString()
|
||||||
|
{
|
||||||
|
return webJsonString;
|
||||||
|
}
|
||||||
|
public void setWebCode(Long webCode)
|
||||||
|
{
|
||||||
|
this.webCode = webCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getWebCode()
|
||||||
|
{
|
||||||
|
return webCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("webId", getWebId())
|
||||||
|
.append("webJson", getWebJson())
|
||||||
|
.append("webJsonString", getWebJsonString())
|
||||||
|
.append("webCode", getWebCode())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,134 @@
|
|||||||
|
package com.ruoyi.portal.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.core.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.web.domain.TreeEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* haiwei官网菜单对象 hw_web_menu
|
||||||
|
*
|
||||||
|
* @author zch
|
||||||
|
* @date 2025-08-18
|
||||||
|
*/
|
||||||
|
public class HwWebMenu1 extends TreeEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 菜单主键id */
|
||||||
|
private Long webMenuId;
|
||||||
|
|
||||||
|
/** 父节点 */
|
||||||
|
@Excel(name = "父节点")
|
||||||
|
private Long parent;
|
||||||
|
|
||||||
|
/** 状态 */
|
||||||
|
@Excel(name = "状态")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/** 菜单名称 */
|
||||||
|
@Excel(name = "菜单名称")
|
||||||
|
private String webMenuName;
|
||||||
|
|
||||||
|
/** 租户 */
|
||||||
|
@Excel(name = "租户")
|
||||||
|
private Long tenantId;
|
||||||
|
|
||||||
|
/** 图片地址 */
|
||||||
|
@Excel(name = "图片地址")
|
||||||
|
private String webMenuPic;
|
||||||
|
|
||||||
|
/** 官网菜单类型 */
|
||||||
|
@Excel(name = "官网菜单类型")
|
||||||
|
private Long webMenuType;
|
||||||
|
|
||||||
|
private String valuel;
|
||||||
|
|
||||||
|
public void setWebMenuId(Long webMenuId)
|
||||||
|
{
|
||||||
|
this.webMenuId = webMenuId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getWebMenuId()
|
||||||
|
{
|
||||||
|
return webMenuId;
|
||||||
|
}
|
||||||
|
public void setParent(Long parent)
|
||||||
|
{
|
||||||
|
this.parent = parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getParent()
|
||||||
|
{
|
||||||
|
return parent;
|
||||||
|
}
|
||||||
|
public void setStatus(String status)
|
||||||
|
{
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus()
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
public void setWebMenuName(String webMenuName)
|
||||||
|
{
|
||||||
|
this.webMenuName = webMenuName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWebMenuName()
|
||||||
|
{
|
||||||
|
return webMenuName;
|
||||||
|
}
|
||||||
|
public void setTenantId(Long tenantId)
|
||||||
|
{
|
||||||
|
this.tenantId = tenantId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getTenantId()
|
||||||
|
{
|
||||||
|
return tenantId;
|
||||||
|
}
|
||||||
|
public void setWebMenuPic(String webMenuPic)
|
||||||
|
{
|
||||||
|
this.webMenuPic = webMenuPic;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWebMenuPic()
|
||||||
|
{
|
||||||
|
return webMenuPic;
|
||||||
|
}
|
||||||
|
public void setWebMenuType(Long webMenuType)
|
||||||
|
{
|
||||||
|
this.webMenuType = webMenuType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getWebMenuType()
|
||||||
|
{
|
||||||
|
return webMenuType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValuel() {
|
||||||
|
return valuel;
|
||||||
|
}
|
||||||
|
public void setValuel(String valuel) {
|
||||||
|
this.valuel = valuel;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("webMenuId", getWebMenuId())
|
||||||
|
.append("parent", getParent())
|
||||||
|
.append("ancestors", getAncestors())
|
||||||
|
.append("status", getStatus())
|
||||||
|
.append("webMenuName", getWebMenuName())
|
||||||
|
.append("tenantId", getTenantId())
|
||||||
|
.append("webMenuPic", getWebMenuPic())
|
||||||
|
.append("webMenuType", getWebMenuType())
|
||||||
|
.append("valuel", getValuel())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
package com.ruoyi.portal.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.portal.domain.HwWeb1;
|
||||||
|
import com.ruoyi.portal.domain.HwWeb1;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* haiwei官网jsonMapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-08-18
|
||||||
|
*/
|
||||||
|
public interface HwWebMapper1
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询haiwei官网json
|
||||||
|
*
|
||||||
|
* @param webId haiwei官网json主键
|
||||||
|
* @return haiwei官网json
|
||||||
|
*/
|
||||||
|
public HwWeb1 selectHwWebByWebcode(Long webCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询haiwei官网json列表
|
||||||
|
*
|
||||||
|
* @param HwWeb1 haiwei官网json
|
||||||
|
* @return haiwei官网json集合
|
||||||
|
*/
|
||||||
|
public List<HwWeb1> selectHwWebList(HwWeb1 HwWeb1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增haiwei官网json
|
||||||
|
*
|
||||||
|
* @param HwWeb1 haiwei官网json
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertHwWeb(HwWeb1 HwWeb1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改haiwei官网json
|
||||||
|
*
|
||||||
|
* @param HwWeb1 haiwei官网json
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateHwWeb(HwWeb1 HwWeb1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除haiwei官网json
|
||||||
|
*
|
||||||
|
* @param webId haiwei官网json主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteHwWebByWebId(Long webId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除haiwei官网json
|
||||||
|
*
|
||||||
|
* @param webIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteHwWebByWebIds(Long[] webIds);
|
||||||
|
}
|
@ -0,0 +1,71 @@
|
|||||||
|
package com.ruoyi.portal.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.portal.domain.HwWebMenu;
|
||||||
|
import com.ruoyi.portal.domain.HwWebMenu1;
|
||||||
|
import com.ruoyi.portal.domain.HwWebMenu1;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* haiwei官网菜单Mapper接口
|
||||||
|
*
|
||||||
|
* @author zch
|
||||||
|
* @date 2025-08-18
|
||||||
|
*/
|
||||||
|
public interface HwWebMenuMapper1
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询haiwei官网菜单
|
||||||
|
*
|
||||||
|
* @param webMenuId haiwei官网菜单主键
|
||||||
|
* @return haiwei官网菜单
|
||||||
|
*/
|
||||||
|
public HwWebMenu1 selectHwWebMenuByWebMenuId(Long webMenuId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询haiwei官网菜单列表
|
||||||
|
*
|
||||||
|
* @param HwWebMenu1 haiwei官网菜单
|
||||||
|
* @return haiwei官网菜单集合
|
||||||
|
*/
|
||||||
|
public List<HwWebMenu1> selectHwWebMenuList(HwWebMenu1 HwWebMenu1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增haiwei官网菜单
|
||||||
|
*
|
||||||
|
* @param HwWebMenu1 haiwei官网菜单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertHwWebMenu(HwWebMenu1 HwWebMenu1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改haiwei官网菜单
|
||||||
|
*
|
||||||
|
* @param HwWebMenu1 haiwei官网菜单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateHwWebMenu(HwWebMenu1 HwWebMenu1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除haiwei官网菜单
|
||||||
|
*
|
||||||
|
* @param webMenuId haiwei官网菜单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteHwWebMenuByWebMenuId(Long webMenuId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除haiwei官网菜单
|
||||||
|
*
|
||||||
|
* @param webMenuIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteHwWebMenuByWebMenuIds(Long[] webMenuIds);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取菜单树列表
|
||||||
|
*/
|
||||||
|
public List<HwWebMenu1> selectMenuTree(HwWebMenu1 hwWebMenu);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
package com.ruoyi.portal.service;
|
||||||
|
|
||||||
|
import com.ruoyi.portal.domain.HwWebMenu1;
|
||||||
|
import com.ruoyi.portal.domain.HwWebMenu1;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* haiwei官网菜单Service接口
|
||||||
|
*
|
||||||
|
* @author zch
|
||||||
|
* @date 2025-08-18
|
||||||
|
*/
|
||||||
|
public interface IHwWebMenuService1
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询haiwei官网菜单
|
||||||
|
*
|
||||||
|
* @param webMenuId haiwei官网菜单主键
|
||||||
|
* @return haiwei官网菜单
|
||||||
|
*/
|
||||||
|
public HwWebMenu1 selectHwWebMenuByWebMenuId(Long webMenuId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询haiwei官网菜单列表
|
||||||
|
*
|
||||||
|
* @param HwWebMenu1 haiwei官网菜单
|
||||||
|
* @return haiwei官网菜单集合
|
||||||
|
*/
|
||||||
|
public List<HwWebMenu1> selectHwWebMenuList(HwWebMenu1 HwWebMenu1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增haiwei官网菜单
|
||||||
|
*
|
||||||
|
* @param HwWebMenu1 haiwei官网菜单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertHwWebMenu(HwWebMenu1 HwWebMenu1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改haiwei官网菜单
|
||||||
|
*
|
||||||
|
* @param HwWebMenu1 haiwei官网菜单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateHwWebMenu(HwWebMenu1 HwWebMenu1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除haiwei官网菜单
|
||||||
|
*
|
||||||
|
* @param webMenuIds 需要删除的haiwei官网菜单主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteHwWebMenuByWebMenuIds(Long[] webMenuIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除haiwei官网菜单信息
|
||||||
|
*
|
||||||
|
* @param webMenuId haiwei官网菜单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteHwWebMenuByWebMenuId(Long webMenuId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取菜单树列表
|
||||||
|
*/
|
||||||
|
public List<HwWebMenu1> selectMenuTree(HwWebMenu1 HwWebMenu1);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
package com.ruoyi.portal.service;
|
||||||
|
|
||||||
|
import com.ruoyi.portal.domain.HwWeb1;
|
||||||
|
import com.ruoyi.portal.domain.HwWeb1;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* haiwei官网jsonService接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-08-18
|
||||||
|
*/
|
||||||
|
public interface IHwWebService1
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询haiwei官网json
|
||||||
|
*
|
||||||
|
* @param webId haiwei官网json主键
|
||||||
|
* @return haiwei官网json
|
||||||
|
*/
|
||||||
|
public HwWeb1 selectHwWebByWebcode(Long webCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询haiwei官网json列表
|
||||||
|
*
|
||||||
|
* @param HwWeb1 haiwei官网json
|
||||||
|
* @return haiwei官网json集合
|
||||||
|
*/
|
||||||
|
public List<HwWeb1> selectHwWebList(HwWeb1 HwWeb1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增haiwei官网json
|
||||||
|
*
|
||||||
|
* @param HwWeb1 haiwei官网json
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertHwWeb(HwWeb1 HwWeb1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改haiwei官网json
|
||||||
|
*
|
||||||
|
* @param HwWeb1 haiwei官网json
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateHwWeb(HwWeb1 HwWeb1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除haiwei官网json
|
||||||
|
*
|
||||||
|
* @param webIds 需要删除的haiwei官网json主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteHwWebByWebIds(Long[] webIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除haiwei官网json信息
|
||||||
|
*
|
||||||
|
* @param webId haiwei官网json主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteHwWebByWebId(Long webId);
|
||||||
|
}
|
@ -0,0 +1,104 @@
|
|||||||
|
package com.ruoyi.portal.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.portal.domain.HwWeb1;
|
||||||
|
|
||||||
|
import com.ruoyi.portal.mapper.HwWebMapper1;
|
||||||
|
|
||||||
|
import com.ruoyi.portal.service.IHwWebService1;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* haiwei官网jsonService业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-08-18
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class HwWebServiceImpl1 implements IHwWebService1
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private HwWebMapper1 hwWebMapper1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询haiwei官网json
|
||||||
|
*
|
||||||
|
* @param webId haiwei官网json主键
|
||||||
|
* @return haiwei官网json
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public HwWeb1 selectHwWebByWebcode(Long webCode)
|
||||||
|
{
|
||||||
|
return hwWebMapper1.selectHwWebByWebcode(webCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询haiwei官网json列表
|
||||||
|
*
|
||||||
|
* @param HwWeb1 haiwei官网json
|
||||||
|
* @return haiwei官网json
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<HwWeb1> selectHwWebList(HwWeb1 HwWeb1)
|
||||||
|
{
|
||||||
|
return hwWebMapper1.selectHwWebList(HwWeb1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增haiwei官网json
|
||||||
|
*
|
||||||
|
* @param HwWeb1 haiwei官网json
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertHwWeb(HwWeb1 HwWeb1)
|
||||||
|
{
|
||||||
|
return hwWebMapper1.insertHwWeb(HwWeb1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改haiwei官网json
|
||||||
|
*
|
||||||
|
* @param HwWeb1 haiwei官网json
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateHwWeb(HwWeb1 HwWeb1)
|
||||||
|
{
|
||||||
|
HwWeb1 codeWeb = new HwWeb1();
|
||||||
|
//编号唯一
|
||||||
|
codeWeb.setWebCode(HwWeb1.getWebCode());
|
||||||
|
if(hwWebMapper1.selectHwWebList(codeWeb).isEmpty()){
|
||||||
|
return hwWebMapper1.insertHwWeb(HwWeb1);
|
||||||
|
}
|
||||||
|
return hwWebMapper1.updateHwWeb(HwWeb1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除haiwei官网json
|
||||||
|
*
|
||||||
|
* @param webIds 需要删除的haiwei官网json主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteHwWebByWebIds(Long[] webIds)
|
||||||
|
{
|
||||||
|
return hwWebMapper1.deleteHwWebByWebIds(webIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除haiwei官网json信息
|
||||||
|
*
|
||||||
|
* @param webId haiwei官网json主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteHwWebByWebId(Long webId)
|
||||||
|
{
|
||||||
|
return hwWebMapper1.deleteHwWebByWebId(webId);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,67 @@
|
|||||||
|
<?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.portal.mapper.HwWebMapper1">
|
||||||
|
|
||||||
|
<resultMap type="HwWeb1" id="HwWebResult1">
|
||||||
|
<result property="webId" column="web_id" />
|
||||||
|
<result property="webJson" column="web_json" />
|
||||||
|
<result property="webJsonString" column="web_json_string" />
|
||||||
|
<result property="webCode" column="web_code" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectHwWebVo">
|
||||||
|
select web_id, web_json, web_json_string, web_code from hw_web1
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectHwWebList" parameterType="HwWeb1" resultMap="HwWebResult1">
|
||||||
|
<include refid="selectHwWebVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="webId != null "> and web_id = #{webId}</if>
|
||||||
|
<if test="webJson != null and webJson != ''"> and web_json = #{webJson}</if>
|
||||||
|
<if test="webJsonString != null and webJsonString != ''"> and web_json_string = #{webJsonString}</if>
|
||||||
|
<if test="webCode != null "> and web_code = #{webCode}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectHwWebByWebcode" parameterType="Long" resultMap="HwWebResult1">
|
||||||
|
<include refid="selectHwWebVo"/>
|
||||||
|
where web_code = #{webCode}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertHwWeb" parameterType="HwWeb1" useGeneratedKeys="true" keyProperty="webId">
|
||||||
|
insert into hw_web1
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="webJson != null">web_json,</if>
|
||||||
|
<if test="webJsonString != null">web_json_string,</if>
|
||||||
|
<if test="webCode != null">web_code,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="webJson != null">#{webJson},</if>
|
||||||
|
<if test="webJsonString != null">#{webJsonString},</if>
|
||||||
|
<if test="webCode != null">#{webCode},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateHwWeb" parameterType="HwWeb1">
|
||||||
|
update hw_web1
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="webJson != null">web_json = #{webJson},</if>
|
||||||
|
<if test="webJsonString != null">web_json_string = #{webJsonString},</if>
|
||||||
|
<if test="webCode != null">web_code = #{webCode},</if>
|
||||||
|
</trim>
|
||||||
|
where web_code = #{webCode}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteHwWebByWebId" parameterType="Long">
|
||||||
|
delete from hw_web1 where web_id = #{webId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteHwWebByWebIds" parameterType="String">
|
||||||
|
delete from hw_web1 where web_id in
|
||||||
|
<foreach item="webId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{webId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
@ -0,0 +1,95 @@
|
|||||||
|
<?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.portal.mapper.HwWebMenuMapper1">
|
||||||
|
|
||||||
|
<resultMap type="HwWebMenu1" id="HwWebMenuResult1">
|
||||||
|
<result property="webMenuId" column="web_menu_id" />
|
||||||
|
<result property="parent" column="parent" />
|
||||||
|
<result property="ancestors" column="ancestors" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="webMenuName" column="web_menu_name" />
|
||||||
|
<result property="tenantId" column="tenant_id" />
|
||||||
|
<result property="webMenuPic" column="web_menu__pic" />
|
||||||
|
<result property="webMenuType" column="web_menu_type" />
|
||||||
|
<result property="value" column="value" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectHwWebMenuVo">
|
||||||
|
select web_menu_id, parent, ancestors, status, web_menu_name, tenant_id, web_menu__pic,
|
||||||
|
value,
|
||||||
|
web_menu_type from hw_web_menu1
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectHwWebMenuList" parameterType="HwWebMenu1" resultMap="HwWebMenuResult1">
|
||||||
|
<include refid="selectHwWebMenuVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="parent != null "> and parent = #{parent}</if>
|
||||||
|
<if test="ancestors != null and ancestors != ''"> and ancestors = #{ancestors}</if>
|
||||||
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||||
|
<if test="webMenuName != null and webMenuName != ''"> and web_menu_name like concat('%', #{webMenuName}, '%')</if>
|
||||||
|
<if test="tenantId != null "> and tenant_id = #{tenantId}</if>
|
||||||
|
<if test="webMenuPic != null and webMenuPic != ''"> and web_menu__pic = #{webMenuPic}</if>
|
||||||
|
<if test="webMenuType != null "> and web_menu_type = #{webMenuType}</if>
|
||||||
|
<if test="value != null and value != ''"> and value like concat('%', #{value}, '%')</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectHwWebMenuByWebMenuId" parameterType="Long" resultMap="HwWebMenuResult1">
|
||||||
|
<include refid="selectHwWebMenuVo"/>
|
||||||
|
where web_menu_id = #{webMenuId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertHwWebMenu" parameterType="HwWebMenu1">
|
||||||
|
insert into hw_web_menu1
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="webMenuId != null">web_menu_id,</if>
|
||||||
|
<if test="parent != null">parent,</if>
|
||||||
|
<if test="ancestors != null">ancestors,</if>
|
||||||
|
<if test="status != null">status,</if>
|
||||||
|
<if test="webMenuName != null">web_menu_name,</if>
|
||||||
|
<if test="tenantId != null">tenant_id,</if>
|
||||||
|
<if test="webMenuPic != null">web_menu__pic,</if>
|
||||||
|
<if test="webMenuType != null">web_menu_type,</if>
|
||||||
|
<if test="value != null">value,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="webMenuId != null">#{webMenuId},</if>
|
||||||
|
<if test="parent != null">#{parent},</if>
|
||||||
|
<if test="ancestors != null">#{ancestors},</if>
|
||||||
|
<if test="status != null">#{status},</if>
|
||||||
|
<if test="webMenuName != null">#{webMenuName},</if>
|
||||||
|
<if test="tenantId != null">#{tenantId},</if>
|
||||||
|
<if test="webMenuPic != null">#{webMenuPic},</if>
|
||||||
|
<if test="webMenuType != null">#{webMenuType},</if>
|
||||||
|
<if test="value != null">#{value},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateHwWebMenu" parameterType="HwWebMenu1">
|
||||||
|
update hw_web_menu1
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="parent != null">parent = #{parent},</if>
|
||||||
|
<if test="ancestors != null">ancestors = #{ancestors},</if>
|
||||||
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="webMenuName != null">web_menu_name = #{webMenuName},</if>
|
||||||
|
<if test="tenantId != null">tenant_id = #{tenantId},</if>
|
||||||
|
<if test="webMenuPic != null">web_menu__pic = #{webMenuPic},</if>
|
||||||
|
<if test="webMenuType != null">web_menu_type = #{webMenuType},</if>
|
||||||
|
<if test="value != null">value = #{value},</if>
|
||||||
|
</trim>
|
||||||
|
where web_menu_id = #{webMenuId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteHwWebMenuByWebMenuId" parameterType="Long">
|
||||||
|
delete from hw_web_menu1 where web_menu_id = #{webMenuId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteHwWebMenuByWebMenuIds" parameterType="String">
|
||||||
|
delete from hw_web_menu1 where web_menu_id in
|
||||||
|
<foreach item="webMenuId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{webMenuId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue