Commit aac026d0 authored by zhouxudong's avatar zhouxudong

首页精品推荐

parent 6847faeb
...@@ -10,6 +10,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil; ...@@ -10,6 +10,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.VO.BaseInfoParam; import com.ruoyi.system.VO.BaseInfoParam;
import com.ruoyi.system.VO.BaseInfoVO; import com.ruoyi.system.VO.BaseInfoVO;
import com.ruoyi.system.domain.*; import com.ruoyi.system.domain.*;
import com.ruoyi.system.factory.BusinessServiceFactory;
import com.ruoyi.system.service.*; import com.ruoyi.system.service.*;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -245,7 +246,7 @@ public class SysCarouselInfoController extends BaseController ...@@ -245,7 +246,7 @@ public class SysCarouselInfoController extends BaseController
}).collect(Collectors.toList()); }).collect(Collectors.toList());
rspData.setRows(list); rspData.setRows(list);
rspData.setTotal(new PageInfo(parkInfos).getTotal()); rspData.setTotal(new PageInfo(parkInfos).getTotal());
}else if(type == 4){ }else if(type == 3){
DevelopmentIndustrialLandInfo info = new DevelopmentIndustrialLandInfo(); DevelopmentIndustrialLandInfo info = new DevelopmentIndustrialLandInfo();
info.setName(baseInfoParam.getName()); info.setName(baseInfoParam.getName());
info.setDevelopmentName(baseInfoParam.getParentName()); info.setDevelopmentName(baseInfoParam.getParentName());
...@@ -259,7 +260,7 @@ public class SysCarouselInfoController extends BaseController ...@@ -259,7 +260,7 @@ public class SysCarouselInfoController extends BaseController
}).collect(Collectors.toList()); }).collect(Collectors.toList());
rspData.setRows(list); rspData.setRows(list);
rspData.setTotal(new PageInfo(infos).getTotal()); rspData.setTotal(new PageInfo(infos).getTotal());
}else if(type == 5){ }else if(type == 4){
CarrierInfo info = new CarrierInfo(); CarrierInfo info = new CarrierInfo();
info.setBuildingNumber(baseInfoParam.getName()); info.setBuildingNumber(baseInfoParam.getName());
info.setParkName(baseInfoParam.getParentName()); info.setParkName(baseInfoParam.getParentName());
......
...@@ -236,7 +236,7 @@ public class SysCarouselVRInfoController extends BaseController ...@@ -236,7 +236,7 @@ public class SysCarouselVRInfoController extends BaseController
}).collect(Collectors.toList()); }).collect(Collectors.toList());
rspData.setRows(list); rspData.setRows(list);
rspData.setTotal(new PageInfo(parkInfos).getTotal()); rspData.setTotal(new PageInfo(parkInfos).getTotal());
}else if(type == 4){ }else if(type == 3){
DevelopmentIndustrialLandInfo info = new DevelopmentIndustrialLandInfo(); DevelopmentIndustrialLandInfo info = new DevelopmentIndustrialLandInfo();
info.setName(baseInfoParam.getName()); info.setName(baseInfoParam.getName());
List<DevelopmentIndustrialLandInfo> infos = developmentIndustrialLandInfoService.selectLandInfoList(info); List<DevelopmentIndustrialLandInfo> infos = developmentIndustrialLandInfoService.selectLandInfoList(info);
...@@ -247,7 +247,7 @@ public class SysCarouselVRInfoController extends BaseController ...@@ -247,7 +247,7 @@ public class SysCarouselVRInfoController extends BaseController
}).collect(Collectors.toList()); }).collect(Collectors.toList());
rspData.setRows(list); rspData.setRows(list);
rspData.setTotal(new PageInfo(infos).getTotal()); rspData.setTotal(new PageInfo(infos).getTotal());
}else if(type == 5){ }else if(type == 4){
CarrierInfo info = new CarrierInfo(); CarrierInfo info = new CarrierInfo();
info.setBuildingNumber(baseInfoParam.getName()); info.setBuildingNumber(baseInfoParam.getName());
List<CarrierInfo> infos = carrierInfoService.selectCarrierInfoList(info); List<CarrierInfo> infos = carrierInfoService.selectCarrierInfoList(info);
......
package com.ruoyi.system.controller;
import java.util.List;
import com.ruoyi.system.factory.BusinessServiceFactory;
import com.ruoyi.system.service.BaseService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.SysHomeRecommend;
import com.ruoyi.system.service.ISysHomeRecommendService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 首页数据推荐Controller
*
* @author zhouxudong
* @date 2023-12-20
*/
@Controller
@RequestMapping("/system/recommend")
public class SysHomeRecommendController extends BaseController
{
private String prefix = "recommend";
@Autowired
private ISysHomeRecommendService sysHomeRecommendService;
@RequiresPermissions("system:recommend:view")
@GetMapping()
public String recommend()
{
return prefix + "/recommend";
}
/**
* 查询首页数据推荐列表
*/
@RequiresPermissions("system:recommend:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(SysHomeRecommend sysHomeRecommend)
{
startPage();
List<SysHomeRecommend> list = sysHomeRecommendService.selectSysHomeRecommendList(sysHomeRecommend);
return getDataTable(list);
}
/**
* 导出首页数据推荐列表
*/
@RequiresPermissions("system:recommend:export")
@Log(title = "首页数据推荐", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysHomeRecommend sysHomeRecommend)
{
List<SysHomeRecommend> list = sysHomeRecommendService.selectSysHomeRecommendList(sysHomeRecommend);
ExcelUtil<SysHomeRecommend> util = new ExcelUtil<SysHomeRecommend>(SysHomeRecommend.class);
return util.exportExcel(list, "首页数据推荐数据");
}
/**
* 新增首页数据推荐
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存首页数据推荐
*/
@RequiresPermissions("system:recommend:add")
@Log(title = "首页数据推荐", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(SysHomeRecommend sysHomeRecommend)
{
return toAjax(sysHomeRecommendService.insertSysHomeRecommend(sysHomeRecommend));
}
/**
* 修改首页数据推荐
*/
@RequiresPermissions("system:recommend:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap)
{
SysHomeRecommend sysHomeRecommend = sysHomeRecommendService.selectSysHomeRecommendById(id);
BaseService businessByCode = BusinessServiceFactory.getBusinessByCode(sysHomeRecommend.getBusinessType());
String name = businessByCode.getNameById(sysHomeRecommend.getBusinessId());
sysHomeRecommend.setName(name);
mmap.put("sysHomeRecommend", sysHomeRecommend);
return prefix + "/edit";
}
/**
* 修改保存首页数据推荐
*/
@RequiresPermissions("system:recommend:edit")
@Log(title = "首页数据推荐", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(SysHomeRecommend sysHomeRecommend)
{
return toAjax(sysHomeRecommendService.updateSysHomeRecommend(sysHomeRecommend));
}
/**
* 删除首页数据推荐
*/
@RequiresPermissions("system:recommend:remove")
@Log(title = "首页数据推荐", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(sysHomeRecommendService.deleteSysHomeRecommendByIds(ids));
}
}
package com.ruoyi.system.domain;
import lombok.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.Date;
/**
* 首页数据推荐对象 sys_home_recommend
*
* @author zhouxudong
* @date 2023-12-20
*/
@Getter
@Setter
@AllArgsConstructor
@ToString
@NoArgsConstructor
public class SysHomeRecommend {
private static final long serialVersionUID = 1L;
/** 注解id */
private Long id;
/** 使用场景1:立业云 2:园区字典 */
@Excel(name = "使用场景1:立业云 2:园区字典")
private Integer type;
/** 状态:0:禁用 1:启动 */
@Excel(name = "状态:0:禁用 1:启动")
private Integer status;
/** 业务类型 */
@Excel(name = "业务类型")
private Integer businessType;
/** 业务id */
@Excel(name = "业务id")
private Long businessId;
/** 排序 */
@Excel(name = "排序")
private Long sort;
/** 乐观锁 */
private Long version;
private Date createTime;
private Date updateTime;
private String createBy;
private String updateBy;
private String name;
}
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.SysHomeRecommend;
/**
* 首页数据推荐Mapper接口
*
* @author zhouxudong
* @date 2023-12-20
*/
public interface SysHomeRecommendMapper
{
/**
* 查询首页数据推荐
*
* @param id 首页数据推荐主键
* @return 首页数据推荐
*/
public SysHomeRecommend selectSysHomeRecommendById(Long id);
/**
* 查询首页数据推荐列表
*
* @param sysHomeRecommend 首页数据推荐
* @return 首页数据推荐集合
*/
public List<SysHomeRecommend> selectSysHomeRecommendList(SysHomeRecommend sysHomeRecommend);
/**
* 新增首页数据推荐
*
* @param sysHomeRecommend 首页数据推荐
* @return 结果
*/
public int insertSysHomeRecommend(SysHomeRecommend sysHomeRecommend);
/**
* 修改首页数据推荐
*
* @param sysHomeRecommend 首页数据推荐
* @return 结果
*/
public int updateSysHomeRecommend(SysHomeRecommend sysHomeRecommend);
/**
* 删除首页数据推荐
*
* @param id 首页数据推荐主键
* @return 结果
*/
public int deleteSysHomeRecommendById(Long id);
/**
* 批量删除首页数据推荐
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSysHomeRecommendByIds(String[] ids);
}
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.SysHomeRecommend;
/**
* 首页数据推荐Service接口
*
* @author zhouxudong
* @date 2023-12-20
*/
public interface ISysHomeRecommendService
{
/**
* 查询首页数据推荐
*
* @param id 首页数据推荐主键
* @return 首页数据推荐
*/
public SysHomeRecommend selectSysHomeRecommendById(Long id);
/**
* 查询首页数据推荐列表
*
* @param sysHomeRecommend 首页数据推荐
* @return 首页数据推荐集合
*/
public List<SysHomeRecommend> selectSysHomeRecommendList(SysHomeRecommend sysHomeRecommend);
/**
* 新增首页数据推荐
*
* @param sysHomeRecommend 首页数据推荐
* @return 结果
*/
public int insertSysHomeRecommend(SysHomeRecommend sysHomeRecommend);
/**
* 修改首页数据推荐
*
* @param sysHomeRecommend 首页数据推荐
* @return 结果
*/
public int updateSysHomeRecommend(SysHomeRecommend sysHomeRecommend);
/**
* 批量删除首页数据推荐
*
* @param ids 需要删除的首页数据推荐主键集合
* @return 结果
*/
public int deleteSysHomeRecommendByIds(String ids);
/**
* 删除首页数据推荐信息
*
* @param id 首页数据推荐主键
* @return 结果
*/
public int deleteSysHomeRecommendById(Long id);
}
package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.factory.BusinessServiceFactory;
import com.ruoyi.system.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysHomeRecommendMapper;
import com.ruoyi.system.domain.SysHomeRecommend;
import com.ruoyi.system.service.ISysHomeRecommendService;
import com.ruoyi.common.core.text.Convert;
/**
* 首页数据推荐Service业务层处理
*
* @author zhouxudong
* @date 2023-12-20
*/
@Service
public class SysHomeRecommendServiceImpl implements ISysHomeRecommendService {
@Autowired private SysHomeRecommendMapper sysHomeRecommendMapper;
/**
* 查询首页数据推荐
*
* @param id 首页数据推荐主键
* @return 首页数据推荐
*/
@Override
public SysHomeRecommend selectSysHomeRecommendById(Long id) {
return sysHomeRecommendMapper.selectSysHomeRecommendById(id);
}
/**
* 查询首页数据推荐列表
*
* @param sysHomeRecommend 首页数据推荐
* @return 首页数据推荐
*/
@Override
public List<SysHomeRecommend> selectSysHomeRecommendList(SysHomeRecommend sysHomeRecommend) {
List<SysHomeRecommend> sysHomeRecommends = sysHomeRecommendMapper.selectSysHomeRecommendList(sysHomeRecommend);
sysHomeRecommends.forEach(data->{
Integer businessType = data.getBusinessType();
Long businessId = data.getBusinessId();
BaseService businessByCode = BusinessServiceFactory.getBusinessByCode(businessType);
String name = businessByCode.getNameById(businessId);
data.setName(name);
});
return sysHomeRecommends;
}
/**
* 新增首页数据推荐
*
* @param sysHomeRecommend 首页数据推荐
* @return 结果
*/
@Override
public int insertSysHomeRecommend(SysHomeRecommend sysHomeRecommend) {
sysHomeRecommend.setCreateTime(DateUtils.getNowDate());
return sysHomeRecommendMapper.insertSysHomeRecommend(sysHomeRecommend);
}
/**
* 修改首页数据推荐
*
* @param sysHomeRecommend 首页数据推荐
* @return 结果
*/
@Override
public int updateSysHomeRecommend(SysHomeRecommend sysHomeRecommend) {
sysHomeRecommend.setUpdateTime(DateUtils.getNowDate());
return sysHomeRecommendMapper.updateSysHomeRecommend(sysHomeRecommend);
}
/**
* 批量删除首页数据推荐
*
* @param ids 需要删除的首页数据推荐主键
* @return 结果
*/
@Override
public int deleteSysHomeRecommendByIds(String ids) {
return sysHomeRecommendMapper.deleteSysHomeRecommendByIds(Convert.toStrArray(ids));
}
/**
* 删除首页数据推荐信息
*
* @param id 首页数据推荐主键
* @return 结果
*/
@Override
public int deleteSysHomeRecommendById(Long id) {
return sysHomeRecommendMapper.deleteSysHomeRecommendById(id);
}
}
<?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.system.mapper.SysHomeRecommendMapper">
<resultMap type="SysHomeRecommend" id="SysHomeRecommendResult">
<result property="id" column="id" />
<result property="type" column="type" />
<result property="status" column="status" />
<result property="businessType" column="business_type" />
<result property="businessId" column="business_id" />
<result property="sort" column="sort" />
<result property="version" column="version" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectSysHomeRecommendVo">
select id, type, status, business_type, business_id, sort, version, create_by, create_time, update_by, update_time from sys_home_recommend
</sql>
<select id="selectSysHomeRecommendList" parameterType="SysHomeRecommend" resultMap="SysHomeRecommendResult">
<include refid="selectSysHomeRecommendVo"/>
<where>
<if test="type != null "> and type = #{type}</if>
<if test="status != null "> and status = #{status}</if>
<if test="businessType != null "> and business_type = #{businessType}</if>
<if test="businessId != null and businessId != ''"> and business_id = #{businessId}</if>
<if test="sort != null "> and sort = #{sort}</if>
</where>
</select>
<select id="selectSysHomeRecommendById" parameterType="Long" resultMap="SysHomeRecommendResult">
<include refid="selectSysHomeRecommendVo"/>
where id = #{id}
</select>
<insert id="insertSysHomeRecommend" parameterType="SysHomeRecommend" useGeneratedKeys="true" keyProperty="id">
insert into sys_home_recommend
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="type != null">type,</if>
<if test="status != null">status,</if>
<if test="businessType != null">business_type,</if>
<if test="businessId != null">business_id,</if>
<if test="sort != null">sort,</if>
<if test="version != null">version,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="type != null">#{type},</if>
<if test="status != null">#{status},</if>
<if test="businessType != null">#{businessType},</if>
<if test="businessId != null">#{businessId},</if>
<if test="sort != null">#{sort},</if>
<if test="version != null">#{version},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateSysHomeRecommend" parameterType="SysHomeRecommend">
update sys_home_recommend
<trim prefix="SET" suffixOverrides=",">
<if test="type != null">type = #{type},</if>
<if test="status != null">status = #{status},</if>
<if test="businessType != null">business_type = #{businessType},</if>
<if test="businessId != null">business_id = #{businessId},</if>
<if test="sort != null">sort = #{sort},</if>
<if test="version != null">version = #{version},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSysHomeRecommendById" parameterType="Long">
delete from sys_home_recommend where id = #{id}
</delete>
<delete id="deleteSysHomeRecommendByIds" parameterType="String">
delete from sys_home_recommend where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<!-- <div class="form-group"> <!-- <div class="form-group">
<label class="col-sm-3 control-label">业务类型:</label> <label class="col-sm-3 control-label">业务类型:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="type" name="type" class="form-control m-b" th:with="type=${@dict.getType('lyy_business_type')}"> <select id="type" name="type" class="form-control m-b" th:with="type=${@dict.getType('business_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>
</div> </div>
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<!--<div class="form-group"> <!--<div class="form-group">
<label class="col-sm-3 control-label">业务类型:</label> <label class="col-sm-3 control-label">业务类型:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="type" name="type" class="form-control m-b" th:with="type=${@dict.getType('lyy_business_type')}"> <select id="type" name="type" class="form-control m-b" th:with="type=${@dict.getType('business_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{type}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{type}"></option>
</select> </select>
</div> </div>
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<li> <li>
<!-- <label>类型:</label>--> <!-- <label>类型:</label>-->
<!-- <input type="type" name="type"/>--> <!-- <input type="type" name="type"/>-->
类型:<select name="type" th:with="type=${@dict.getType('lyy_business_type')}"> 类型:<select name="type" th:with="type=${@dict.getType('business_type')}">
<option value="">所有</option> <option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option> th:value="${dict.dictValue}"></option>
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
var editFlag = [[${@permission.hasPermi('carousel:info:edit')}]]; var editFlag = [[${@permission.hasPermi('carousel:info:edit')}]];
var removeFlag = [[${@permission.hasPermi('carousel:info:remove')}]]; var removeFlag = [[${@permission.hasPermi('carousel:info:remove')}]];
var datas = [[${@dict.getType('sys_carousel_status')}]]; var datas = [[${@dict.getType('sys_carousel_status')}]];
var datasType = [[${@dict.getType('lyy_business_type')}]]; var datasType = [[${@dict.getType('business_type')}]];
var datasUrlType = [[${@dict.getType('sys_carousel_urltype')}]]; var datasUrlType = [[${@dict.getType('sys_carousel_urltype')}]];
var prefix = ctx + "carousel/VRinfo"; var prefix = ctx + "carousel/VRinfo";
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
var editFlag = [[${@permission.hasPermi('carousel:info:edit')}]]; var editFlag = [[${@permission.hasPermi('carousel:info:edit')}]];
var removeFlag = [[${@permission.hasPermi('carousel:info:remove')}]]; var removeFlag = [[${@permission.hasPermi('carousel:info:remove')}]];
var datas = [[${@dict.getType('sys_carousel_status')}]]; var datas = [[${@dict.getType('sys_carousel_status')}]];
var datasType = [[${@dict.getType('lyy_business_type')}]]; var datasType = [[${@dict.getType('business_type')}]];
var datasUrlType = [[${@dict.getType('sys_carousel_urltype')}]]; var datasUrlType = [[${@dict.getType('sys_carousel_urltype')}]];
var prefix = ctx + "carousel/VRinfo"; var prefix = ctx + "carousel/VRinfo";
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<!--<div class="form-group"> <!--<div class="form-group">
<label class="col-sm-3 control-label">业务类型:</label> <label class="col-sm-3 control-label">业务类型:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="type" name="type" class="form-control m-b" th:with="type=${@dict.getType('lyy_business_type')}"> <select id="type" name="type" class="form-control m-b" th:with="type=${@dict.getType('business_type')}">
<option value="" >所有</option> <option value="" >所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<!--<div class="form-group"> <!--<div class="form-group">
<label class="col-sm-3 control-label">业务类型:</label> <label class="col-sm-3 control-label">业务类型:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="type" name="type" class="form-control m-b" th:with="type=${@dict.getType('lyy_business_type')}"> <select id="type" name="type" class="form-control m-b" th:with="type=${@dict.getType('business_type')}">
<option value="" >所有</option> <option value="" >所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{type}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{type}"></option>
</select> </select>
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<li> <li>
<!-- <label>类型:</label>--> <!-- <label>类型:</label>-->
<!-- <input type="type" name="type"/>--> <!-- <input type="type" name="type"/>-->
类型:<select name="type" th:with="type=${@dict.getType('lyy_business_type')}"> 类型:<select name="type" th:with="type=${@dict.getType('business_type')}">
<option value="">所有</option> <option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option> th:value="${dict.dictValue}"></option>
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
var editFlag = [[${@permission.hasPermi('carousel:info:edit')}]]; var editFlag = [[${@permission.hasPermi('carousel:info:edit')}]];
var removeFlag = [[${@permission.hasPermi('carousel:info:remove')}]]; var removeFlag = [[${@permission.hasPermi('carousel:info:remove')}]];
var datas = [[${@dict.getType('sys_carousel_status')}]]; var datas = [[${@dict.getType('sys_carousel_status')}]];
var datasType = [[${@dict.getType('lyy_business_type')}]]; var datasType = [[${@dict.getType('business_type')}]];
var datasUrlType = [[${@dict.getType('sys_carousel_urltype')}]]; var datasUrlType = [[${@dict.getType('sys_carousel_urltype')}]];
var prefix = ctx + "carousel/info"; var prefix = ctx + "carousel/info";
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
var editFlag = [[${@permission.hasPermi('carousel:info:edit')}]]; var editFlag = [[${@permission.hasPermi('carousel:info:edit')}]];
var removeFlag = [[${@permission.hasPermi('carousel:info:remove')}]]; var removeFlag = [[${@permission.hasPermi('carousel:info:remove')}]];
var datas = [[${@dict.getType('sys_carousel_status')}]]; var datas = [[${@dict.getType('sys_carousel_status')}]];
var datasType = [[${@dict.getType('lyy_business_type')}]]; var datasType = [[${@dict.getType('business_type')}]];
var datasUrlType = [[${@dict.getType('sys_carousel_urltype')}]]; var datasUrlType = [[${@dict.getType('sys_carousel_urltype')}]];
var prefix = ctx + "carousel/info"; var prefix = ctx + "carousel/info";
function cover() { function cover() {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<input type="text" name="associationName"/> <input type="text" name="associationName"/>
</li> </li>
<li> <li>
类型:<select name="type" th:with="type=${@dict.getType('lyy_business_type')}"> 类型:<select name="type" th:with="type=${@dict.getType('business_type')}">
<option value="">所有</option> <option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
var datasExamineSource = [[${@dict.getType('lyy_info_source')}]]; var datasExamineSource = [[${@dict.getType('lyy_info_source')}]];
var datasExamineStatus = [[${@dict.getType('lyy_examine_status')}]]; var datasExamineStatus = [[${@dict.getType('lyy_examine_status')}]];
var datasChannelStatus = [[${@dict.getType('lyy_channel_source')}]]; var datasChannelStatus = [[${@dict.getType('lyy_channel_source')}]];
var datasBusinessType = [[${@dict.getType('lyy_business_type')}]]; var datasBusinessType = [[${@dict.getType('business_type')}]];
var prefix = ctx + "examine/log"; var prefix = ctx + "examine/log";
$(function() { $(function() {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<input type="text" name="associationName"/> <input type="text" name="associationName"/>
</li> </li>
<li> <li>
类型:<select name="type" th:with="type=${@dict.getType('lyy_business_type')}"> 类型:<select name="type" th:with="type=${@dict.getType('business_type')}">
<option value="">所有</option> <option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
var datasExamineSource = [[${@dict.getType('lyy_info_source')}]]; var datasExamineSource = [[${@dict.getType('lyy_info_source')}]];
var datasExamineStatus = [[${@dict.getType('lyy_examine_status')}]]; var datasExamineStatus = [[${@dict.getType('lyy_examine_status')}]];
var datasChannelStatus = [[${@dict.getType('lyy_channel_source')}]]; var datasChannelStatus = [[${@dict.getType('lyy_channel_source')}]];
var datasBusinessType = [[${@dict.getType('lyy_business_type')}]]; var datasBusinessType = [[${@dict.getType('business_type')}]];
var prefix = ctx + "examine/logView"; var prefix = ctx + "examine/logView";
$(function() { $(function() {
......
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增首页数据推荐')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-recommend-add">
<div class="form-group">
<label class="col-sm-3 control-label">使用场景:</label>
<div class="col-sm-8">
<select name="type" class="form-control m-b" th:with="type=${@dict.getType('lyy_channel_source')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否启用:</label>
<div class="col-sm-8">
<select name="status" class="form-control m-b" th:with="type=${@dict.getType('sys_carousel_status')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">业务类型:</label>
<div class="col-sm-8">
<select id="businessType" name="businessType" class="form-control m-b" th:with="type=${@dict.getType('business_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<input id="businessId" name="businessId" th:value="${businessId}" class="form-control" type="hidden" readonly="readonly">
<div class="form-group">
<label class="col-sm-3 control-label">业务名称:</label>
<div class="col-sm-8">
<div class="input-group">
<input class="form-control" type="text" id="name" name="name" onclick="selectType()" >
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
</div>
</div>
<!--<div class="form-group">
<label class="col-sm-3 control-label">业务id:</label>
<div class="col-sm-8">
<input name="businessId" class="form-control" type="text">
</div>
</div>-->
<div class="form-group">
<label class="col-sm-3 control-label">排序:</label>
<div class="col-sm-8">
<input name="sort" class="form-control" type="number">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/recommend"
var prefix11 = ctx + "carousel/info"
$("#form-recommend-add").validate({
focusCleanup: true
});
function selectType(){
var options = {
title: '选择',
url: prefix11 + "/selectType?type="+$("#businessType").val(),
callBack: doSubmit2
};
$.modal.openOptions(options);
}
function doSubmit2(index, layero){
var rows = layero.find("iframe")[0].contentWindow.getSelections();
if (rows.length == 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
// $('#userids').html('我是通过方式二来的:' + rows.join())
$('#name').val(rows.name);
$('#businessId').val(rows.id);
$.modal.close(index);
}
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-recommend-add').serialize());
}
}
</script>
</body>
</html>
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改首页数据推荐')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-recommend-edit" th:object="${sysHomeRecommend}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">使用场景:</label>
<div class="col-sm-8">
<select name="type" class="form-control m-b" th:with="type=${@dict.getType('lyy_channel_source')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{type}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否启用:</label>
<div class="col-sm-8">
<select name="status" class="form-control m-b" th:with="type=${@dict.getType('sys_carousel_status')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{status}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">业务类型:</label>
<div class="col-sm-8">
<select id="businessType" name="businessType" class="form-control m-b" onchange="change()" th:with="type=${@dict.getType('business_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{businessType}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">关联id:</label>
<div class="col-sm-8">
<input id="businessId" name="businessId" onclick="change()" th:field="*{businessId}" class="form-control" type="text" readonly="readonly">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">业务名称:</label>
<div class="col-sm-8">
<div class="input-group">
<input class="form-control" type="text" id="name" name="name" onclick="selectType()" th:field="*{name}">
<span class="input-group-addon"><i class="fa fa-search"></i></span>
</div>
<!-- <input name="associationName" th:field="*{associationName}" class="form-control" type="text">-->
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">排序:</label>
<div class="col-sm-8">
<input name="sort" th:field="*{sort}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/recommend";
var prefix11 = ctx + "carousel/info"
$("#form-recommend-edit").validate({
focusCleanup: true
});
function change(){
$('#name').val(null);
$('#businessId').val(null);
}
function selectType(){
var options = {
title: '选择',
url: prefix11 + "/selectType?type="+$("#businessType").val(),
callBack: doSubmit2
};
$.modal.openOptions(options);
}
function doSubmit2(index, layero){
var rows = layero.find("iframe")[0].contentWindow.getSelections();
if (rows.length == 0) {
$.modal.alertWarning("请至少选择一条记录");
return;
}
// $('#userids').html('我是通过方式二来的:' + rows.join())
$('#name').val(rows.name);
$('#businessId').val(rows.id);
$.modal.close(index);
}
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-recommend-edit').serialize());
}
}
</script>
</body>
</html>
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('首页数据推荐列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<!-- <div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>业务id:</label>
<input type="text" name="businessId"/>
</li>
<li>
<label>排序:</label>
<input type="text" name="sort"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>-->
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:recommend:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:recommend:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:recommend:remove">
<i class="fa fa-remove"></i> 删除
</a>
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:recommend:export">
<i class="fa fa-download"></i> 导出
</a>-->
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:recommend:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:recommend:remove')}]];
var type = [[${@dict.getType('lyy_channel_source')}]];
var datasType = [[${@dict.getType('business_type')}]];
var prefix = ctx + "system/recommend";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "首页数据推荐",
columns: [{
checkbox: true
},
{
field: 'id',
title: '注解id',
visible: false
},
{
field: 'type',
title: '使用场景',
formatter: function (value, row, index) {
return $.table.selectDictLabel(type, value);
}
},
{
field: 'status',
title: '是否启用',
formatter: function (value, row, index) {
return value===1?"是":"否";
}
},
{
field: 'businessType',
title: '业务类型',
formatter: function (value, row, index) {
return $.table.selectDictLabel(datasType, value);
}
},
{
field: 'name',
title: '业务名称'
},
{
field: 'businessId',
title: '业务id',
visible: false
},
{
field: 'sort',
title: '排序'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<!-- <div class="form-group"> <!-- <div class="form-group">
<label class="col-sm-3 control-label">类别:</label> <label class="col-sm-3 control-label">类别:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="objectType" name="objectType" class="form-control m-b" th:with="type=${@dict.getType('lyy_business_type')}"> <select id="objectType" name="objectType" class="form-control m-b" th:with="type=${@dict.getType('business_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>
</div> </div>
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<label class="col-sm-3 control-label">类型:</label> <label class="col-sm-3 control-label">类型:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="objectType" name="objectType" class="form-control m-b" <select id="objectType" name="objectType" class="form-control m-b"
th:with="type=${@dict.getType('lyy_business_type')}"> th:with="type=${@dict.getType('business_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
th:field="*{objectType}"></option> th:field="*{objectType}"></option>
</select> </select>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<select id="objectType" name="objectType" class="form-control m-b" <select id="objectType" name="objectType" class="form-control m-b"
th:with="type=${@dict.getType('lyy_business_type')}"> th:with="type=${@dict.getType('business_type')}">
<option value="">所有</option> <option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option> th:value="${dict.dictValue}"></option>
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
var editFlag = [[${@permission.hasPermi('star_object:info:edit')}]]; var editFlag = [[${@permission.hasPermi('star_object:info:edit')}]];
var removeFlag = [[${@permission.hasPermi('star_object:info:remove')}]]; var removeFlag = [[${@permission.hasPermi('star_object:info:remove')}]];
var prefix = ctx + "star_object/info"; var prefix = ctx + "star_object/info";
var datasType = [[${@dict.getType('lyy_business_type')}]]; var datasType = [[${@dict.getType('business_type')}]];
$(function () { $(function () {
var options = { var options = {
url: prefix + "/list", url: prefix + "/list",
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<select id="objectType" name="objectType" class="form-control m-b" <select id="objectType" name="objectType" class="form-control m-b"
th:with="type=${@dict.getType('lyy_business_type')}"> th:with="type=${@dict.getType('business_type')}">
<option value="">所有</option> <option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option> th:value="${dict.dictValue}"></option>
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
var editFlag = [[${@permission.hasPermi('star_object:info:edit')}]]; var editFlag = [[${@permission.hasPermi('star_object:info:edit')}]];
var removeFlag = [[${@permission.hasPermi('star_object:info:remove')}]]; var removeFlag = [[${@permission.hasPermi('star_object:info:remove')}]];
var prefix = ctx + "star_object/info"; var prefix = ctx + "star_object/info";
var datasType = [[${@dict.getType('lyy_business_type')}]]; var datasType = [[${@dict.getType('business_type')}]];
var type= $("#type").val(); var type= $("#type").val();
var businessId= $("#businessId").val(); var businessId= $("#businessId").val();
$(function () { $(function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment