Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
cfld-liyeyun-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cfld-backend
cfld-liyeyun-admin
Commits
20da0f8e
Commit
20da0f8e
authored
Oct 20, 2023
by
yaobaizheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
//立业云后台提交
parent
0bfac3d2
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1307 additions
and
1 deletion
+1307
-1
BaseInfoParam.java
...stem/src/main/java/com/ruoyi/system/VO/BaseInfoParam.java
+38
-0
BaseInfoVO.java
...-system/src/main/java/com/ruoyi/system/VO/BaseInfoVO.java
+38
-0
SysCarouselInfoController.java
...om/ruoyi/system/controller/SysCarouselInfoController.java
+205
-0
DevelopmentInfo.java
...rc/main/java/com/ruoyi/system/domain/DevelopmentInfo.java
+13
-0
SysCarouselInfo.java
...rc/main/java/com/ruoyi/system/domain/SysCarouselInfo.java
+151
-0
SysCarouselInfoMapper.java
...n/java/com/ruoyi/system/mapper/SysCarouselInfoMapper.java
+61
-0
ISysCarouselInfoService.java
...ava/com/ruoyi/system/service/ISysCarouselInfoService.java
+61
-0
SysCarouselInfoServiceImpl.java
...ruoyi/system/service/impl/SysCarouselInfoServiceImpl.java
+97
-0
SysCarouselInfoMapper.xml
.../main/resources/mapper/carousel/SysCarouselInfoMapper.xml
+101
-0
DevelopmentInfoMapper.xml
...esources/mapper/developmentInfo/DevelopmentInfoMapper.xml
+6
-1
add.html
...ystem/src/main/resources/templates/carousel/info/add.html
+134
-0
edit.html
...stem/src/main/resources/templates/carousel/info/edit.html
+132
-0
info.html
...stem/src/main/resources/templates/carousel/info/info.html
+147
-0
selectType.html
...rc/main/resources/templates/carousel/info/selectType.html
+123
-0
No files found.
ruoyi-system/src/main/java/com/ruoyi/system/VO/BaseInfoParam.java
0 → 100644
View file @
20da0f8e
package
com
.
ruoyi
.
system
.
VO
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.core.domain.BaseEntity
;
public
class
BaseInfoParam
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 主键id */
private
Integer
type
;
/** 片区名称 */
private
String
name
;
public
Integer
getType
()
{
return
type
;
}
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
@Override
public
String
toString
()
{
return
"BaseInfoParam{"
+
"type="
+
type
+
", name='"
+
name
+
'\''
+
'}'
;
}
}
ruoyi-system/src/main/java/com/ruoyi/system/VO/BaseInfoVO.java
0 → 100644
View file @
20da0f8e
package
com
.
ruoyi
.
system
.
VO
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.core.domain.BaseEntity
;
public
class
BaseInfoVO
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 主键id */
private
Long
id
;
/** 名称 */
private
String
name
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
@Override
public
String
toString
()
{
return
"BaseInfoVO{"
+
"id="
+
id
+
", name='"
+
name
+
'\''
+
'}'
;
}
}
ruoyi-system/src/main/java/com/ruoyi/system/controller/SysCarouselInfoController.java
0 → 100644
View file @
20da0f8e
package
com
.
ruoyi
.
system
.
controller
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
com.github.pagehelper.PageInfo
;
import
com.ruoyi.system.VO.BaseInfoParam
;
import
com.ruoyi.system.VO.BaseInfoVO
;
import
com.ruoyi.system.domain.DevelopmentInfo
;
import
com.ruoyi.system.domain.MegalopolisInfo
;
import
com.ruoyi.system.domain.ParkInfo
;
import
com.ruoyi.system.service.*
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.BeanUtils
;
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.SysCarouselInfo
;
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
;
import
javax.servlet.http.HttpServletRequest
;
/**
* 轮播图信息Controller
*
* @author ruoyi
* @date 2023-10-19
*/
@Controller
@RequestMapping
(
"/carousel/info"
)
public
class
SysCarouselInfoController
extends
BaseController
{
private
String
prefix
=
"carousel/info"
;
@Autowired
private
ISysCarouselInfoService
sysCarouselInfoService
;
@Autowired
private
IParkInfoService
parkInfoService
;
@Autowired
private
IDevelopmentInfoService
developmentInfoService
;
@Autowired
private
IMegalopolisInfoService
megalopolisInfoService
;
@RequiresPermissions
(
"carousel:info:view"
)
@GetMapping
()
public
String
info
()
{
return
prefix
+
"/info"
;
}
/**
* 查询轮播图信息列表
*/
@RequiresPermissions
(
"carousel:info:list"
)
@PostMapping
(
"/list"
)
@ResponseBody
public
TableDataInfo
list
(
SysCarouselInfo
sysCarouselInfo
)
{
startPage
();
List
<
SysCarouselInfo
>
list
=
sysCarouselInfoService
.
selectSysCarouselInfoList
(
sysCarouselInfo
);
return
getDataTable
(
list
);
}
/**
* 导出轮播图信息列表
*/
@RequiresPermissions
(
"carousel:info:export"
)
@Log
(
title
=
"轮播图信息"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
@ResponseBody
public
AjaxResult
export
(
SysCarouselInfo
sysCarouselInfo
)
{
List
<
SysCarouselInfo
>
list
=
sysCarouselInfoService
.
selectSysCarouselInfoList
(
sysCarouselInfo
);
ExcelUtil
<
SysCarouselInfo
>
util
=
new
ExcelUtil
<
SysCarouselInfo
>(
SysCarouselInfo
.
class
);
return
util
.
exportExcel
(
list
,
"轮播图信息数据"
);
}
/**
* 新增轮播图信息
*/
@GetMapping
(
"/add"
)
public
String
add
()
{
return
prefix
+
"/add"
;
}
/**
* 新增保存轮播图信息
*/
@RequiresPermissions
(
"carousel:info:add"
)
@Log
(
title
=
"轮播图信息"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
(
"/add"
)
@ResponseBody
public
AjaxResult
addSave
(
SysCarouselInfo
sysCarouselInfo
)
{
return
toAjax
(
sysCarouselInfoService
.
insertSysCarouselInfo
(
sysCarouselInfo
));
}
/**
* 修改轮播图信息
*/
@RequiresPermissions
(
"carousel:info:edit"
)
@GetMapping
(
"/edit/{id}"
)
public
String
edit
(
@PathVariable
(
"id"
)
Long
id
,
ModelMap
mmap
)
{
SysCarouselInfo
sysCarouselInfo
=
sysCarouselInfoService
.
selectSysCarouselInfoById
(
id
);
mmap
.
put
(
"sysCarouselInfo"
,
sysCarouselInfo
);
return
prefix
+
"/edit"
;
}
/**
* 修改保存轮播图信息
*/
@RequiresPermissions
(
"carousel:info:edit"
)
@Log
(
title
=
"轮播图信息"
,
businessType
=
BusinessType
.
UPDATE
)
@PostMapping
(
"/edit"
)
@ResponseBody
public
AjaxResult
editSave
(
SysCarouselInfo
sysCarouselInfo
)
{
return
toAjax
(
sysCarouselInfoService
.
updateSysCarouselInfo
(
sysCarouselInfo
));
}
/**
* 删除轮播图信息
*/
@RequiresPermissions
(
"carousel:info:remove"
)
@Log
(
title
=
"轮播图信息"
,
businessType
=
BusinessType
.
DELETE
)
@PostMapping
(
"/remove"
)
@ResponseBody
public
AjaxResult
remove
(
String
ids
)
{
return
toAjax
(
sysCarouselInfoService
.
deleteSysCarouselInfoByIds
(
ids
));
}
@GetMapping
(
"/selectType"
)
public
String
selectType
(
HttpServletRequest
httpServletRequest
,
ModelMap
mmap
)
{
String
type
=
httpServletRequest
.
getParameter
(
"type"
);
mmap
.
put
(
"type"
,
type
);
return
prefix
+
"/selectType"
;
}
// @PostMapping("/listSelectType/{type}/{name}")
@PostMapping
(
"/listSelectType"
)
@ResponseBody
// public TableDataInfo listSelectType(@PathVariable Integer type,@PathVariable String name)
public
TableDataInfo
listSelectType
(
BaseInfoParam
baseInfoParam
)
{
startPage
();
List
<
BaseInfoVO
>
list
=
new
ArrayList
<>();
TableDataInfo
rspData
=
new
TableDataInfo
();
Integer
type
=
baseInfoParam
.
getType
();
if
(
type
==
0
){
MegalopolisInfo
megalopolisInfo
=
new
MegalopolisInfo
();
megalopolisInfo
.
setName
(
baseInfoParam
.
getName
());
List
<
MegalopolisInfo
>
megalopolisInfos
=
megalopolisInfoService
.
selectMegalopolisInfoList
(
megalopolisInfo
);
list
=
megalopolisInfos
.
stream
().
map
(
e
->
{
BaseInfoVO
baseInfoVO
=
new
BaseInfoVO
();
BeanUtils
.
copyProperties
(
e
,
baseInfoVO
);
return
baseInfoVO
;
}).
collect
(
Collectors
.
toList
());
rspData
.
setRows
(
list
);
rspData
.
setTotal
(
new
PageInfo
(
megalopolisInfos
).
getTotal
());
}
else
if
(
type
==
1
){
DevelopmentInfo
developmentInfo
=
new
DevelopmentInfo
();
developmentInfo
.
setName
(
baseInfoParam
.
getName
());
List
<
DevelopmentInfo
>
developmentInfos
=
developmentInfoService
.
selectDevelopmentInfoList
(
developmentInfo
);
list
=
developmentInfos
.
stream
().
map
(
e
->
{
BaseInfoVO
baseInfoVO
=
new
BaseInfoVO
();
BeanUtils
.
copyProperties
(
e
,
baseInfoVO
);
return
baseInfoVO
;
}).
collect
(
Collectors
.
toList
());
rspData
.
setRows
(
list
);
rspData
.
setTotal
(
new
PageInfo
(
developmentInfos
).
getTotal
());
}
else
if
(
type
==
2
){
ParkInfo
parkInfo
=
new
ParkInfo
();
parkInfo
.
setName
(
baseInfoParam
.
getName
());
List
<
ParkInfo
>
parkInfos
=
parkInfoService
.
selectParkInfoList
(
parkInfo
);
list
=
parkInfos
.
stream
().
map
(
e
->
{
BaseInfoVO
baseInfoVO
=
new
BaseInfoVO
();
BeanUtils
.
copyProperties
(
e
,
baseInfoVO
);
return
baseInfoVO
;
}).
collect
(
Collectors
.
toList
());
rspData
.
setRows
(
list
);
rspData
.
setTotal
(
new
PageInfo
(
parkInfos
).
getTotal
());
}
rspData
.
setCode
(
0
);
return
rspData
;
}
}
ruoyi-system/src/main/java/com/ruoyi/system/domain/DevelopmentInfo.java
View file @
20da0f8e
...
...
@@ -311,6 +311,10 @@ public class DevelopmentInfo extends BaseEntity
@Excel
(
name
=
"图片链接"
)
private
String
imgUrl
;
/** 图片链接 */
@Excel
(
name
=
"所属都市圈"
)
private
String
megalopolisId
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
...
...
@@ -977,6 +981,14 @@ public class DevelopmentInfo extends BaseEntity
return
imgUrl
;
}
public
String
getMegalopolisId
()
{
return
megalopolisId
;
}
public
void
setMegalopolisId
(
String
megalopolisId
)
{
this
.
megalopolisId
=
megalopolisId
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
...
...
@@ -1056,6 +1068,7 @@ public class DevelopmentInfo extends BaseEntity
.
append
(
"countryLevel"
,
getCountryLevel
())
.
append
(
"imgUrl"
,
getImgUrl
())
.
append
(
"type"
,
getType
())
.
append
(
"megalopolisId"
,
getMegalopolisId
())
.
toString
();
}
}
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysCarouselInfo.java
0 → 100644
View file @
20da0f8e
package
com
.
ruoyi
.
system
.
domain
;
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
;
/**
* 轮播图信息对象 sys_carousel_info
*
* @author ruoyi
* @date 2023-10-19
*/
public
class
SysCarouselInfo
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 主键id */
private
Long
id
;
/** 图片地址链接 */
@Excel
(
name
=
"图片地址链接"
)
private
String
imgUrl
;
/** 图片描述 */
@Excel
(
name
=
"图片描述"
)
private
String
description
;
/** 图片状态(0-禁用;1-可用) */
@Excel
(
name
=
"图片状态"
,
readConverterExp
=
"0=-禁用;1-可用"
)
private
Integer
status
;
/** 类型(0 -都市圈、1-开发区、2-园区、3-首页) */
@Excel
(
name
=
"类型"
,
readConverterExp
=
"0=,-=都市圈、1-开发区、2-园区、3-首页"
)
private
Integer
type
;
/** 排序 */
@Excel
(
name
=
"排序"
)
private
Integer
orderNumber
;
/** 关联id */
@Excel
(
name
=
"关联id"
)
private
Long
associationId
;
/** 关联名称 */
@Excel
(
name
=
"关联名称"
)
private
String
associationName
;
/** 转跳链接 */
@Excel
(
name
=
"转跳链接"
)
private
String
linkUrl
;
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setImgUrl
(
String
imgUrl
)
{
this
.
imgUrl
=
imgUrl
;
}
public
String
getImgUrl
()
{
return
imgUrl
;
}
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
}
public
String
getDescription
()
{
return
description
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
public
Integer
getType
()
{
return
type
;
}
public
void
setOrderNumber
(
Integer
orderNumber
)
{
this
.
orderNumber
=
orderNumber
;
}
public
Integer
getOrderNumber
()
{
return
orderNumber
;
}
public
void
setAssociationId
(
Long
associationId
)
{
this
.
associationId
=
associationId
;
}
public
Long
getAssociationId
()
{
return
associationId
;
}
public
void
setAssociationName
(
String
associationName
)
{
this
.
associationName
=
associationName
;
}
public
String
getAssociationName
()
{
return
associationName
;
}
public
void
setLinkUrl
(
String
linkUrl
)
{
this
.
linkUrl
=
linkUrl
;
}
public
String
getLinkUrl
()
{
return
linkUrl
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"imgUrl"
,
getImgUrl
())
.
append
(
"description"
,
getDescription
())
.
append
(
"status"
,
getStatus
())
.
append
(
"type"
,
getType
())
.
append
(
"orderNumber"
,
getOrderNumber
())
.
append
(
"associationId"
,
getAssociationId
())
.
append
(
"associationName"
,
getAssociationName
())
.
append
(
"linkUrl"
,
getLinkUrl
())
.
toString
();
}
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysCarouselInfoMapper.java
0 → 100644
View file @
20da0f8e
package
com
.
ruoyi
.
system
.
mapper
;
import
java.util.List
;
import
com.ruoyi.system.domain.SysCarouselInfo
;
/**
* 轮播图信息Mapper接口
*
* @author ruoyi
* @date 2023-10-19
*/
public
interface
SysCarouselInfoMapper
{
/**
* 查询轮播图信息
*
* @param id 轮播图信息主键
* @return 轮播图信息
*/
public
SysCarouselInfo
selectSysCarouselInfoById
(
Long
id
);
/**
* 查询轮播图信息列表
*
* @param sysCarouselInfo 轮播图信息
* @return 轮播图信息集合
*/
public
List
<
SysCarouselInfo
>
selectSysCarouselInfoList
(
SysCarouselInfo
sysCarouselInfo
);
/**
* 新增轮播图信息
*
* @param sysCarouselInfo 轮播图信息
* @return 结果
*/
public
int
insertSysCarouselInfo
(
SysCarouselInfo
sysCarouselInfo
);
/**
* 修改轮播图信息
*
* @param sysCarouselInfo 轮播图信息
* @return 结果
*/
public
int
updateSysCarouselInfo
(
SysCarouselInfo
sysCarouselInfo
);
/**
* 删除轮播图信息
*
* @param id 轮播图信息主键
* @return 结果
*/
public
int
deleteSysCarouselInfoById
(
Long
id
);
/**
* 批量删除轮播图信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deleteSysCarouselInfoByIds
(
String
[]
ids
);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysCarouselInfoService.java
0 → 100644
View file @
20da0f8e
package
com
.
ruoyi
.
system
.
service
;
import
java.util.List
;
import
com.ruoyi.system.domain.SysCarouselInfo
;
/**
* 轮播图信息Service接口
*
* @author ruoyi
* @date 2023-10-19
*/
public
interface
ISysCarouselInfoService
{
/**
* 查询轮播图信息
*
* @param id 轮播图信息主键
* @return 轮播图信息
*/
public
SysCarouselInfo
selectSysCarouselInfoById
(
Long
id
);
/**
* 查询轮播图信息列表
*
* @param sysCarouselInfo 轮播图信息
* @return 轮播图信息集合
*/
public
List
<
SysCarouselInfo
>
selectSysCarouselInfoList
(
SysCarouselInfo
sysCarouselInfo
);
/**
* 新增轮播图信息
*
* @param sysCarouselInfo 轮播图信息
* @return 结果
*/
public
int
insertSysCarouselInfo
(
SysCarouselInfo
sysCarouselInfo
);
/**
* 修改轮播图信息
*
* @param sysCarouselInfo 轮播图信息
* @return 结果
*/
public
int
updateSysCarouselInfo
(
SysCarouselInfo
sysCarouselInfo
);
/**
* 批量删除轮播图信息
*
* @param ids 需要删除的轮播图信息主键集合
* @return 结果
*/
public
int
deleteSysCarouselInfoByIds
(
String
ids
);
/**
* 删除轮播图信息信息
*
* @param id 轮播图信息主键
* @return 结果
*/
public
int
deleteSysCarouselInfoById
(
Long
id
);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysCarouselInfoServiceImpl.java
0 → 100644
View file @
20da0f8e
package
com
.
ruoyi
.
system
.
service
.
impl
;
import
java.util.List
;
import
com.ruoyi.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.ruoyi.system.mapper.SysCarouselInfoMapper
;
import
com.ruoyi.system.domain.SysCarouselInfo
;
import
com.ruoyi.system.service.ISysCarouselInfoService
;
import
com.ruoyi.common.core.text.Convert
;
/**
* 轮播图信息Service业务层处理
*
* @author ruoyi
* @date 2023-10-19
*/
@Service
public
class
SysCarouselInfoServiceImpl
implements
ISysCarouselInfoService
{
@Autowired
private
SysCarouselInfoMapper
sysCarouselInfoMapper
;
/**
* 查询轮播图信息
*
* @param id 轮播图信息主键
* @return 轮播图信息
*/
@Override
public
SysCarouselInfo
selectSysCarouselInfoById
(
Long
id
)
{
return
sysCarouselInfoMapper
.
selectSysCarouselInfoById
(
id
);
}
/**
* 查询轮播图信息列表
*
* @param sysCarouselInfo 轮播图信息
* @return 轮播图信息
*/
@Override
public
List
<
SysCarouselInfo
>
selectSysCarouselInfoList
(
SysCarouselInfo
sysCarouselInfo
)
{
return
sysCarouselInfoMapper
.
selectSysCarouselInfoList
(
sysCarouselInfo
);
}
/**
* 新增轮播图信息
*
* @param sysCarouselInfo 轮播图信息
* @return 结果
*/
@Override
public
int
insertSysCarouselInfo
(
SysCarouselInfo
sysCarouselInfo
)
{
sysCarouselInfo
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
sysCarouselInfoMapper
.
insertSysCarouselInfo
(
sysCarouselInfo
);
}
/**
* 修改轮播图信息
*
* @param sysCarouselInfo 轮播图信息
* @return 结果
*/
@Override
public
int
updateSysCarouselInfo
(
SysCarouselInfo
sysCarouselInfo
)
{
sysCarouselInfo
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
sysCarouselInfoMapper
.
updateSysCarouselInfo
(
sysCarouselInfo
);
}
/**
* 批量删除轮播图信息
*
* @param ids 需要删除的轮播图信息主键
* @return 结果
*/
@Override
public
int
deleteSysCarouselInfoByIds
(
String
ids
)
{
return
sysCarouselInfoMapper
.
deleteSysCarouselInfoByIds
(
Convert
.
toStrArray
(
ids
));
}
/**
* 删除轮播图信息信息
*
* @param id 轮播图信息主键
* @return 结果
*/
@Override
public
int
deleteSysCarouselInfoById
(
Long
id
)
{
return
sysCarouselInfoMapper
.
deleteSysCarouselInfoById
(
id
);
}
}
ruoyi-system/src/main/resources/mapper/carousel/SysCarouselInfoMapper.xml
0 → 100644
View file @
20da0f8e
<?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.SysCarouselInfoMapper"
>
<resultMap
type=
"SysCarouselInfo"
id=
"SysCarouselInfoResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"imgUrl"
column=
"img_url"
/>
<result
property=
"description"
column=
"description"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"orderNumber"
column=
"order_number"
/>
<result
property=
"associationId"
column=
"association_id"
/>
<result
property=
"associationName"
column=
"association_name"
/>
<result
property=
"linkUrl"
column=
"link_url"
/>
</resultMap>
<sql
id=
"selectSysCarouselInfoVo"
>
select id, create_time, update_time, img_url, description, status, type, order_number, association_id, association_name, link_url from sys_carousel_info
</sql>
<select
id=
"selectSysCarouselInfoList"
parameterType=
"SysCarouselInfo"
resultMap=
"SysCarouselInfoResult"
>
<include
refid=
"selectSysCarouselInfoVo"
/>
<where>
<if
test=
"imgUrl != null and imgUrl != ''"
>
and img_url = #{imgUrl}
</if>
<if
test=
"description != null and description != ''"
>
and description = #{description}
</if>
<if
test=
"status != null "
>
and status = #{status}
</if>
<if
test=
"type != null "
>
and type = #{type}
</if>
<if
test=
"orderNumber != null "
>
and order_number = #{orderNumber}
</if>
<if
test=
"associationId != null "
>
and association_id = #{associationId}
</if>
<if
test=
"associationName != null and associationName != ''"
>
and association_name like concat('%', #{associationName}, '%')
</if>
<if
test=
"linkUrl != null and linkUrl != ''"
>
and link_url = #{linkUrl}
</if>
</where>
</select>
<select
id=
"selectSysCarouselInfoById"
parameterType=
"Long"
resultMap=
"SysCarouselInfoResult"
>
<include
refid=
"selectSysCarouselInfoVo"
/>
where id = #{id}
</select>
<insert
id=
"insertSysCarouselInfo"
parameterType=
"SysCarouselInfo"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into sys_carousel_info
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"imgUrl != null"
>
img_url,
</if>
<if
test=
"description != null"
>
description,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"type != null"
>
type,
</if>
<if
test=
"orderNumber != null"
>
order_number,
</if>
<if
test=
"associationId != null"
>
association_id,
</if>
<if
test=
"associationName != null"
>
association_name,
</if>
<if
test=
"linkUrl != null"
>
link_url,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"imgUrl != null"
>
#{imgUrl},
</if>
<if
test=
"description != null"
>
#{description},
</if>
<if
test=
"status != null"
>
#{status},
</if>
<if
test=
"type != null"
>
#{type},
</if>
<if
test=
"orderNumber != null"
>
#{orderNumber},
</if>
<if
test=
"associationId != null"
>
#{associationId},
</if>
<if
test=
"associationName != null"
>
#{associationName},
</if>
<if
test=
"linkUrl != null"
>
#{linkUrl},
</if>
</trim>
</insert>
<update
id=
"updateSysCarouselInfo"
parameterType=
"SysCarouselInfo"
>
update sys_carousel_info
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"imgUrl != null"
>
img_url = #{imgUrl},
</if>
<if
test=
"description != null"
>
description = #{description},
</if>
<if
test=
"status != null"
>
status = #{status},
</if>
<if
test=
"type != null"
>
type = #{type},
</if>
<if
test=
"orderNumber != null"
>
order_number = #{orderNumber},
</if>
<if
test=
"associationId != null"
>
association_id = #{associationId},
</if>
<if
test=
"associationName != null"
>
association_name = #{associationName},
</if>
<if
test=
"linkUrl != null"
>
link_url = #{linkUrl},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deleteSysCarouselInfoById"
parameterType=
"Long"
>
delete from sys_carousel_info where id = #{id}
</delete>
<delete
id=
"deleteSysCarouselInfoByIds"
parameterType=
"String"
>
delete from sys_carousel_info where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
ruoyi-system/src/main/resources/mapper/developmentInfo/DevelopmentInfoMapper.xml
View file @
20da0f8e
...
...
@@ -81,10 +81,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"countryLevel"
column=
"country_level"
/>
<result
property=
"imgUrl"
column=
"img_url"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"megalopolisId"
column=
"megalopolis_id"
/>
</resultMap>
<sql
id=
"selectDevelopmentInfoVo"
>
select id, name, group_id, group_name, level_code, level_name, level_other, location, plan_area, core_area, developed_area, owner_description, description, location_east, location_west, location_south, location_north, intra_railway, intra_highway, location_other, overall_positioning, permanent_population, register_population, floating_population, permanent_ratio, register_ratio, floating_ratio, gdp, add_value, budget_income, add_value_tax, income_tax, comprehensive, industry_space_plan, industry_plan1, industry_plan2, industry_plan3, industry_plan4, industry_plan5, primary_industry, industry_base, key_industry_direction, investment_level, industry_forms, other_appeal, prohibited_directory, prohibited_url, investment_strength, taxation_strength, average_output_value, environmental_equirements, value_added_energy, total_value_energy, access_other, policy_file_url1, policy_file_url2, policy_file_url3, policy_file_url4, policy_file_url5, create_time, update_time, wenjuanxingid, province_code, province_name, city_code, city_name, region_code, region_name, address, company_number, son_park_number, establish_time, province_level, country_level, img_url,type from development_info
select id, name, group_id, group_name, level_code, level_name, level_other, location, plan_area, core_area, developed_area, owner_description, description, location_east, location_west, location_south, location_north, intra_railway, intra_highway, location_other, overall_positioning, permanent_population, register_population, floating_population, permanent_ratio, register_ratio, floating_ratio, gdp, add_value, budget_income, add_value_tax, income_tax, comprehensive, industry_space_plan, industry_plan1, industry_plan2, industry_plan3, industry_plan4, industry_plan5, primary_industry, industry_base, key_industry_direction, investment_level, industry_forms, other_appeal, prohibited_directory, prohibited_url, investment_strength, taxation_strength, average_output_value, environmental_equirements, value_added_energy, total_value_energy, access_other, policy_file_url1, policy_file_url2, policy_file_url3, policy_file_url4, policy_file_url5, create_time, update_time, wenjuanxingid, province_code, province_name, city_code, city_name, region_code, region_name, address, company_number, son_park_number, establish_time, province_level, country_level, img_url,type
,megalopolis_id
from development_info
</sql>
<select
id=
"selectDevelopmentInfoList"
parameterType=
"DevelopmentInfo"
resultMap=
"DevelopmentInfoResult"
>
...
...
@@ -164,6 +165,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"countryLevel != null and countryLevel != ''"
>
and country_level = #{countryLevel}
</if>
<if
test=
"imgUrl != null and imgUrl != ''"
>
and img_url = #{imgUrl}
</if>
<if
test=
"type != null and type != ''"
>
and type = #{type}
</if>
<if
test=
"megalopolisId != null and megalopolisId != ''"
>
and megalopolis_id = #{megalopolisId}
</if>
</where>
</select>
...
...
@@ -251,6 +253,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"countryLevel != null"
>
country_level,
</if>
<if
test=
"imgUrl != null"
>
img_url,
</if>
<if
test=
"type != null"
>
type,
</if>
<if
test=
"megalopolisId != null"
>
megalopolis_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
#{name},
</if>
...
...
@@ -328,6 +331,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"countryLevel != null"
>
#{countryLevel},
</if>
<if
test=
"imgUrl != null"
>
#{imgUrl},
</if>
<if
test=
"type != null"
>
#{type},
</if>
<if
test=
"megalopolisId != null"
>
#{megalopolisId},
</if>
</trim>
</insert>
...
...
@@ -409,6 +413,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"countryLevel != null"
>
country_level = #{countryLevel},
</if>
<if
test=
"imgUrl != null"
>
img_url = #{imgUrl},
</if>
<if
test=
"type != null"
>
type = #{type},
</if>
<if
test=
"megalopolisId != null"
>
megalopolis_id = #{megalopolisId},
</if>
</trim>
where id = #{id}
</update>
...
...
ruoyi-system/src/main/resources/templates/carousel/info/add.html
0 → 100644
View file @
20da0f8e
<!DOCTYPE html>
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<th:block
th:include=
"include :: header('新增轮播图信息')"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-css"
/>
</head>
<body
class=
"white-bg"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
<form
class=
"form-horizontal m"
id=
"form-info-add"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
图片地址链接:
</label>
<div
class=
"col-sm-8"
>
<!-- <input name="imgUrl" class="form-control" type="text">-->
<input
type=
"hidden"
name=
"imgUrl"
>
<div
class=
"file-loading"
>
<input
class=
"form-control img-upload"
id=
"imgUrl"
name=
"file"
type=
"file"
>
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
图片描述:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"description"
class=
"form-control"
type=
"text"
>
</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=
"type"
name=
"type"
class=
"form-control m-b"
th:with=
"type=${@dict.getType('lyy_business_type')}"
>
<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"
>
<input
name=
"orderNumber"
class=
"form-control"
type=
"text"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
关联id:
</label>
<div
class=
"col-sm-8"
>
<input
id=
"associationId"
name=
"associationId"
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=
"associationName"
name=
"associationName"
onclick=
"selectType()"
>
<span
class=
"input-group-addon"
><i
class=
"fa fa-search"
></i></span>
</div>
<!-- <input name="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="linkUrl" class="form-control" type="text">-->
<!-- </div>-->
<!-- </div>-->
</form>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-js"
/>
<script
th:inline=
"javascript"
>
var
prefix
=
ctx
+
"carousel/info"
$
(
"#form-info-add"
).
validate
({
focusCleanup
:
true
});
function
submitHandler
()
{
if
(
$
.
validate
.
form
())
{
$
.
operate
.
save
(
prefix
+
"/add"
,
$
(
'#form-info-add'
).
serialize
());
}
}
// 根据当前激活的选项卡获取(方式一)
function
selectType
(){
console
.
info
(
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
+
$
(
"#type"
).
val
());
if
(
$
(
"#type"
).
val
()
==
null
||
$
(
"#type"
).
val
()
==
undefined
){
return
;
}
if
(
$
(
"#type"
).
val
()
==
'0'
||
$
(
"#type"
).
val
()
==
'1'
||
$
(
"#type"
).
val
()
==
'2'
){
// $.modal.open("选择", prefix + "/selectType?type="+$("#type").val());
var
options
=
{
title
:
'选择'
,
url
:
prefix
+
"/selectType?type="
+
$
(
"#type"
).
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())
$
(
'#associationName'
).
val
(
rows
.
name
);
$
(
'#associationId'
).
val
(
rows
.
id
);
$
.
modal
.
close
(
index
);
}
$
(
".img-upload"
).
each
(
function
(
i
)
{
var
val
=
$
(
"input[name='"
+
this
.
id
+
"']"
).
val
()
$
(
this
).
fileinput
({
// 'uploadUrl': ctx + 'common/upload',
'uploadUrl'
:
ctx
+
'sysFile/uploadImgHuawei'
,
initialPreviewAsData
:
true
,
initialPreview
:
[
val
],
maxFileCount
:
1
,
autoReplace
:
true
}).
on
(
'fileuploaded'
,
function
(
event
,
data
,
previewId
,
index
)
{
$
(
"input[name='"
+
event
.
currentTarget
.
id
+
"']"
).
val
(
data
.
response
.
url
)
}).
on
(
'fileremoved'
,
function
(
event
,
id
,
index
)
{
$
(
"input[name='"
+
event
.
currentTarget
.
id
+
"']"
).
val
(
''
)
})
$
(
this
).
fileinput
(
'_initFileActions'
);
});
</script>
</body>
</html>
\ No newline at end of file
ruoyi-system/src/main/resources/templates/carousel/info/edit.html
0 → 100644
View file @
20da0f8e
<!DOCTYPE html>
<html
lang=
"zh"
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<th:block
th:include=
"include :: header('修改轮播图信息')"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-css"
/>
</head>
<body
class=
"white-bg"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
<form
class=
"form-horizontal m"
id=
"form-info-edit"
th:object=
"${sysCarouselInfo}"
>
<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"
>
<!-- <input name="imgUrl" th:field="*{imgUrl}" class="form-control" type="text">-->
<input
type=
"hidden"
name=
"imgUrl"
th:field=
"*{imgUrl}"
>
<div
class=
"file-loading"
>
<input
class=
"form-control img-upload"
id=
"imgUrl"
name=
"file"
type=
"file"
>
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
图片描述:
</label>
<div
class=
"col-sm-8"
>
<input
name=
"description"
th:field=
"*{description}"
class=
"form-control"
type=
"text"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
图片状态:
</label>
<div
class=
"col-sm-8"
>
<select
id=
"selectId"
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=
"type"
name=
"type"
class=
"form-control m-b"
th:with=
"type=${@dict.getType('lyy_business_type')}"
>
<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"
>
<input
name=
"orderNumber"
th:field=
"*{orderNumber}"
class=
"form-control"
type=
"text"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
关联id:
</label>
<div
class=
"col-sm-8"
>
<input
id=
"associationId"
name=
"associationId"
th:field=
"*{associationId}"
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=
"associationName"
name=
"associationName"
onclick=
"selectType()"
th:field=
"*{associationName}"
>
<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="linkUrl" th:field="*{linkUrl}" class="form-control" type="text">-->
<!-- </div>-->
<!-- </div>-->
</form>
</div>
<th:block
th:include=
"include :: footer"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-js"
/>
<script
th:inline=
"javascript"
>
var
prefix
=
ctx
+
"carousel/info"
;
$
(
"#form-info-edit"
).
validate
({
focusCleanup
:
true
});
function
submitHandler
()
{
if
(
$
.
validate
.
form
())
{
$
.
operate
.
save
(
prefix
+
"/edit"
,
$
(
'#form-info-edit'
).
serialize
());
}
}
// 根据当前激活的选项卡获取(方式一)
function
selectType
(){
if
(
$
(
"#type"
).
val
()
==
null
||
$
(
"#type"
).
val
()
==
undefined
){
return
;
}
if
(
$
(
"#type"
).
val
()
==
'0'
||
$
(
"#type"
).
val
()
==
'1'
||
$
(
"#type"
).
val
()
==
'2'
){
// $.modal.open("选择", prefix + "/selectType?type="+$("#type").val());
var
options
=
{
title
:
'选择'
,
url
:
prefix
+
"/selectType?type="
+
$
(
"#type"
).
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
;
}
$
(
'#associationName'
).
val
(
rows
.
name
);
$
(
'#associationId'
).
val
(
rows
.
id
);
$
.
modal
.
close
(
index
);
}
$
(
".img-upload"
).
each
(
function
(
i
)
{
var
val
=
$
(
"input[name='"
+
this
.
id
+
"']"
).
val
()
$
(
this
).
fileinput
({
// 'uploadUrl': ctx + 'common/upload',
'uploadUrl'
:
ctx
+
'sysFile/uploadImgHuawei'
,
initialPreviewAsData
:
true
,
initialPreview
:
[
val
],
maxFileCount
:
1
,
autoReplace
:
true
}).
on
(
'fileuploaded'
,
function
(
event
,
data
,
previewId
,
index
)
{
$
(
"input[name='"
+
event
.
currentTarget
.
id
+
"']"
).
val
(
data
.
response
.
url
)
}).
on
(
'fileremoved'
,
function
(
event
,
id
,
index
)
{
$
(
"input[name='"
+
event
.
currentTarget
.
id
+
"']"
).
val
(
''
)
})
$
(
this
).
fileinput
(
'_initFileActions'
);
});
</script>
</body>
</html>
\ No newline at end of file
ruoyi-system/src/main/resources/templates/carousel/info/info.html
0 → 100644
View file @
20da0f8e
<!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>图片地址链接:</label>-->
<!-- <input type="text" name="imgUrl"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>图片描述:</label>-->
<!-- <input type="text" name="description"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>排序:</label>-->
<!-- <input type="text" name="orderNumber"/>-->
<!-- </li>-->
<!-- <li>-->
<!-- <label>关联id:</label>-->
<!-- <input type="text" name="associationId"/>-->
<!-- </li>-->
<li>
<label>
关联名称:
</label>
<input
type=
"text"
name=
"associationName"
/>
</li>
<li>
<label>
类型:
</label>
<input
type=
"type"
name=
"associationName"
/>
</li>
<!-- <li>-->
<!-- <label>转跳链接:</label>-->
<!-- <input type="text" name="linkUrl"/>-->
<!-- </li>-->
<li>
<a
class=
"btn btn-primary btn-rounded btn-sm"
onclick=
"$.table.search()"
><i
class=
"fa fa-search"
></i>
搜索
</a>
<a
class=
"btn btn-warning btn-rounded btn-sm"
onclick=
"$.form.reset()"
><i
class=
"fa fa-refresh"
></i>
重置
</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=
"carousel:info:add"
>
<i
class=
"fa fa-plus"
></i>
添加
</a>
<a
class=
"btn btn-primary single disabled"
onclick=
"$.operate.edit()"
shiro:hasPermission=
"carousel:info:edit"
>
<i
class=
"fa fa-edit"
></i>
修改
</a>
<a
class=
"btn btn-danger multiple disabled"
onclick=
"$.operate.removeAll()"
shiro:hasPermission=
"carousel:info:remove"
>
<i
class=
"fa fa-remove"
></i>
删除
</a>
<a
class=
"btn btn-warning"
onclick=
"$.table.exportExcel()"
shiro:hasPermission=
"carousel:info: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
(
'carousel:info:edit'
)}]];
var
removeFlag
=
[[
$
{@
permission
.
hasPermi
(
'carousel:info:remove'
)}]];
var
datas
=
[[
$
{@
dict
.
getType
(
'sys_carousel_status'
)}]];
var
datasType
=
[[
$
{@
dict
.
getType
(
'lyy_business_type'
)}]];
var
prefix
=
ctx
+
"carousel/info"
;
$
(
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
:
'imgUrl'
,
title
:
'图片地址链接'
},
{
field
:
'description'
,
title
:
'图片描述'
},
{
field
:
'status'
,
title
:
'图片状态'
,
formatter
:
function
(
value
,
row
,
index
)
{
return
$
.
table
.
selectDictLabel
(
datas
,
value
);
}
},
{
field
:
'type'
,
title
:
'类型'
,
formatter
:
function
(
value
,
row
,
index
)
{
return
$
.
table
.
selectDictLabel
(
datasType
,
value
);
}
},
{
field
:
'orderNumber'
,
title
:
'排序'
},
// {
// field: 'associationId',
// title: '关联id'
// },
{
field
:
'associationName'
,
title
:
'关联名称'
},
// {
// field: 'linkUrl',
// 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>
\ No newline at end of file
ruoyi-system/src/main/resources/templates/carousel/info/selectType.html
0 → 100644
View file @
20da0f8e
<!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"
>
<input
type=
"hidden"
id=
"rowIds"
>
<div
class=
"container-div"
>
<div
class=
"row"
>
<div
class=
"col-sm-12 search-collapse"
>
<form
id=
"formId"
>
<div
class=
"select-list"
>
<ul>
<li>
<label>
名称:
</label>
<input
type=
"text"
name=
"name"
/>
</li>
<li>
<input
type=
"hidden"
name=
"type"
id=
"type"
th:value=
"${type}"
>
</li>
<li>
<a
class=
"btn btn-primary btn-rounded btn-sm"
onclick=
"$.table.search()"
><i
class=
"fa fa-search"
></i>
搜索
</a>
<a
class=
"btn btn-warning btn-rounded btn-sm"
onclick=
"$.form.reset()"
><i
class=
"fa fa-refresh"
></i>
重置
</a>
</li>
</ul>
</div>
</form>
</div>
<div
class=
"col-sm-12 select-table table-striped"
>
<table
id=
"bootstrap-table"
></table>
</div>
</div>
</div>
<div
th:include=
"include :: footer"
></div>
<script
th:inline=
"javascript"
>
var
prefix
=
ctx
+
"carousel/info"
;
console
.
info
(
"type"
+
$
(
"#type"
).
val
());
var
datacarriers
=
[
// {
// id: "100",
// type: "1",
// name: "商品名称",
// distance: "100",
// costTime: "12.5",
// }
];
$
(
function
()
{
var
options
=
{
// url: prefix + "/listSelectType/"+$("#type").val()+"/"+$("#name").val(),
url
:
prefix
+
"/listSelectType"
,
// data: 'type='+$("#type"),
showSearch
:
false
,
showRefresh
:
false
,
showToggle
:
false
,
showColumns
:
false
,
columns
:
[{
radio
:
true
},
{
field
:
'id'
,
title
:
'类型id'
},
{
field
:
'name'
,
title
:
'名称'
}
// ,
// {
// title: '操作',
// align: 'center',
// formatter: function(value, row, index) {
// var actions = [];
// actions.push('
<
a
class
=
"btn btn-success btn-xs"
href
=
"#"
><
i
class
=
"fa fa-edit"
><
/i>编辑</
a
>
');
// actions.push('
<
a
class
=
"btn btn-danger btn-xs"
href
=
"#"
><
i
class
=
"fa fa-remove"
><
/i>删除</
a
>
');
// return actions.join('');
// }
// }
]
};
$.table.init(options);
});
/* 添加用户-选择用户-提交(子页面调用父页面形式) */
// function submitHandler(index, layero) {
// var id = $.table.selectFirstColumns();
// if (id.length == 0) {
// $.modal.alertWarning("请选择一条记录");
// return;
// }
// var name = $.table.selectColumns('
name
');
// $.modal.close();
// // 父页面的方法
// // activeWindow().selectUsers();
// // 父页面的变量
// console.info("qqqqqq",id[0],name[0]);
// debugger;
// activeWindow().$('
#
associationName
').val(name[0]);
// activeWindow().$('
#
associationId
').val(id[0]);
// }
/* 添加用户-选择用户-提交(回调形式-父页面调用子页面) */
function getSelections() {
var dataObject = {};
var name = $.table.selectColumns('
name
');
dataObject.name = name[0];
var id = $.table.selectFirstColumns();
dataObject.id = id[0];
// return $.table.selectFirstColumns();
return dataObject;
}
// $("#bootstrap-table").on("check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table", function (e, rowsAfter, rowsBefore) {
// var rows = $.common.equals("uncheck-all", e.type) ? rowsBefore : rowsAfter;
// var rowIds = $.table.affectedRowIds(rows);
// $("#rowIds").val(rowIds);
// });
</script>
</body>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment