Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
a597f7b2
提交
a597f7b2
authored
6月 02, 2020
作者:
吴德鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
魔方
上级
033c860a
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
1338 行增加
和
16 行删除
+1338
-16
TbCfCubeController.java
...main/java/com/platform/controller/TbCfCubeController.java
+109
-0
TbCfCubeDao.java
...orm-admin/src/main/java/com/platform/dao/TbCfCubeDao.java
+13
-0
TbCfCubeEntity.java
...min/src/main/java/com/platform/entity/TbCfCubeEntity.java
+153
-0
TbCfCubeService.java
...n/src/main/java/com/platform/service/TbCfCubeService.java
+71
-0
TbCfCubeServiceImpl.java
...n/java/com/platform/service/impl/TbCfCubeServiceImpl.java
+63
-0
TbCfCubeDao.xml
...admin/src/main/resources/com/platform/dao/TbCfCubeDao.xml
+113
-0
platform.properties
platform-admin/src/main/resources/dev/platform.properties
+6
-6
platform.properties
platform-admin/src/main/resources/prod/platform.properties
+6
-6
tbcfcube.html
...form-admin/src/main/webapp/WEB-INF/page/sys/tbcfcube.html
+312
-0
tbcfhomepage.html
...-admin/src/main/webapp/WEB-INF/page/sys/tbcfhomepage.html
+4
-4
tbcfcube.js
platform-admin/src/main/webapp/js/sys/tbcfcube.js
+488
-0
没有找到文件。
platform-admin/src/main/java/com/platform/controller/TbCfCubeController.java
0 → 100644
浏览文件 @
a597f7b2
package
com
.
platform
.
controller
;
import
com.platform.entity.TbCfCubeEntity
;
import
com.platform.service.TbCfCubeService
;
import
com.platform.utils.PageUtils
;
import
com.platform.utils.Query
;
import
com.platform.utils.R
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.util.List
;
import
java.util.Map
;
/**
* 魔方Controller
*
* @author lipengjun
* @date 2020-06-01 14:34:09
*/
@Controller
@RequestMapping
(
"tbcfcube"
)
public
class
TbCfCubeController
{
@Autowired
private
TbCfCubeService
tbCfCubeService
;
/**
* 查看列表
*/
@RequestMapping
(
"/list"
)
@RequiresPermissions
(
"tbcfcube:list"
)
@ResponseBody
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
//查询列表数据
Query
query
=
new
Query
(
params
);
List
<
TbCfCubeEntity
>
tbCfCubeList
=
tbCfCubeService
.
queryList
(
query
);
int
total
=
tbCfCubeService
.
queryTotal
(
query
);
PageUtils
pageUtil
=
new
PageUtils
(
tbCfCubeList
,
total
,
query
.
getLimit
(),
query
.
getPage
());
return
R
.
ok
().
put
(
"page"
,
pageUtil
);
}
/**
* 查看信息
*/
@RequestMapping
(
"/info/{id}"
)
@RequiresPermissions
(
"tbcfcube:info"
)
@ResponseBody
public
R
info
(
@PathVariable
(
"id"
)
String
id
)
{
TbCfCubeEntity
tbCfCube
=
tbCfCubeService
.
queryObject
(
id
);
return
R
.
ok
().
put
(
"tbCfCube"
,
tbCfCube
);
}
/**
* 保存
*/
@RequestMapping
(
"/save"
)
@RequiresPermissions
(
"tbcfcube:save"
)
@ResponseBody
public
R
save
(
@RequestBody
TbCfCubeEntity
tbCfCube
)
{
tbCfCubeService
.
save
(
tbCfCube
);
return
R
.
ok
();
}
/**
* 修改
*/
@RequestMapping
(
"/update"
)
@RequiresPermissions
(
"tbcfcube:update"
)
@ResponseBody
public
R
update
(
@RequestBody
TbCfCubeEntity
tbCfCube
)
{
tbCfCubeService
.
update
(
tbCfCube
);
return
R
.
ok
();
}
/**
* 删除
*/
@RequestMapping
(
"/delete"
)
@RequiresPermissions
(
"tbcfcube:delete"
)
@ResponseBody
public
R
delete
(
@RequestBody
String
[]
ids
)
{
tbCfCubeService
.
deleteBatch
(
ids
);
return
R
.
ok
();
}
/**
* 查看所有列表
*/
@RequestMapping
(
"/queryAll"
)
@ResponseBody
public
R
queryAll
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
List
<
TbCfCubeEntity
>
list
=
tbCfCubeService
.
queryList
(
params
);
return
R
.
ok
().
put
(
"list"
,
list
);
}
}
platform-admin/src/main/java/com/platform/dao/TbCfCubeDao.java
0 → 100644
浏览文件 @
a597f7b2
package
com
.
platform
.
dao
;
import
com.platform.entity.TbCfCubeEntity
;
/**
* 魔方Dao
*
* @author lipengjun
* @date 2020-06-01 14:34:09
*/
public
interface
TbCfCubeDao
extends
BaseDao
<
TbCfCubeEntity
>
{
}
platform-admin/src/main/java/com/platform/entity/TbCfCubeEntity.java
0 → 100644
浏览文件 @
a597f7b2
package
com
.
platform
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 魔方实体
* 表名 tb_cf_cube
*
* @author lipengjun
* @date 2020-06-01 14:43:29
*/
public
class
TbCfCubeEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 魔方ID
*/
private
String
id
;
/**
* 魔方标题
*/
private
String
cubeTitle
;
/**
* 标题图片
*/
private
String
headerImage
;
/**
* 商品ID集合
*/
private
String
itemIds
;
/**
* 排序
*/
private
Integer
sort
;
/**
* 是否可用 0:不可用 1:可用
*/
private
Integer
isEnabled
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 更新时间
*/
private
Date
updateTime
;
/**
* 设置:魔方ID
*/
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
/**
* 获取:魔方ID
*/
public
String
getId
()
{
return
id
;
}
/**
* 设置:魔方标题
*/
public
void
setCubeTitle
(
String
cubeTitle
)
{
this
.
cubeTitle
=
cubeTitle
;
}
/**
* 获取:魔方标题
*/
public
String
getCubeTitle
()
{
return
cubeTitle
;
}
/**
* 设置:标题图片
*/
public
void
setHeaderImage
(
String
headerImage
)
{
this
.
headerImage
=
headerImage
;
}
/**
* 获取:标题图片
*/
public
String
getHeaderImage
()
{
return
headerImage
;
}
/**
* 设置:商品ID集合
*/
public
void
setItemIds
(
String
itemIds
)
{
this
.
itemIds
=
itemIds
;
}
/**
* 获取:商品ID集合
*/
public
String
getItemIds
()
{
return
itemIds
;
}
/**
* 设置:排序
*/
public
void
setSort
(
Integer
sort
)
{
this
.
sort
=
sort
;
}
/**
* 获取:排序
*/
public
Integer
getSort
()
{
return
sort
;
}
/**
* 设置:是否可用 0:不可用 1:可用
*/
public
void
setIsEnabled
(
Integer
isEnabled
)
{
this
.
isEnabled
=
isEnabled
;
}
/**
* 获取:是否可用 0:不可用 1:可用
*/
public
Integer
getIsEnabled
()
{
return
isEnabled
;
}
/**
* 设置:创建时间
*/
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
/**
* 获取:创建时间
*/
public
Date
getCreateTime
()
{
return
createTime
;
}
/**
* 设置:更新时间
*/
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
/**
* 获取:更新时间
*/
public
Date
getUpdateTime
()
{
return
updateTime
;
}
}
platform-admin/src/main/java/com/platform/service/TbCfCubeService.java
0 → 100644
浏览文件 @
a597f7b2
package
com
.
platform
.
service
;
import
com.platform.entity.TbCfCubeEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* 魔方Service接口
*
* @author lipengjun
* @date 2020-06-01 14:34:09
*/
public
interface
TbCfCubeService
{
/**
* 根据主键查询实体
*
* @param id 主键
* @return 实体
*/
TbCfCubeEntity
queryObject
(
String
id
);
/**
* 分页查询
*
* @param map 参数
* @return list
*/
List
<
TbCfCubeEntity
>
queryList
(
Map
<
String
,
Object
>
map
);
/**
* 分页统计总数
*
* @param map 参数
* @return 总数
*/
int
queryTotal
(
Map
<
String
,
Object
>
map
);
/**
* 保存实体
*
* @param tbCfCube 实体
* @return 保存条数
*/
int
save
(
TbCfCubeEntity
tbCfCube
);
/**
* 根据主键更新实体
*
* @param tbCfCube 实体
* @return 更新条数
*/
int
update
(
TbCfCubeEntity
tbCfCube
);
/**
* 根据主键删除
*
* @param id
* @return 删除条数
*/
int
delete
(
String
id
);
/**
* 根据主键批量删除
*
* @param ids
* @return 删除条数
*/
int
deleteBatch
(
String
[]
ids
);
}
platform-admin/src/main/java/com/platform/service/impl/TbCfCubeServiceImpl.java
0 → 100644
浏览文件 @
a597f7b2
package
com
.
platform
.
service
.
impl
;
import
com.platform.dao.TbCfCubeDao
;
import
com.platform.entity.TbCfCubeEntity
;
import
com.platform.service.TbCfCubeService
;
import
com.platform.utils.IdUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* 魔方Service实现类
*
* @author lipengjun
* @date 2020-06-01 14:34:09
*/
@Service
(
"tbCfCubeService"
)
public
class
TbCfCubeServiceImpl
implements
TbCfCubeService
{
@Autowired
private
TbCfCubeDao
tbCfCubeDao
;
@Override
public
TbCfCubeEntity
queryObject
(
String
id
)
{
return
tbCfCubeDao
.
queryObject
(
id
);
}
@Override
public
List
<
TbCfCubeEntity
>
queryList
(
Map
<
String
,
Object
>
map
)
{
return
tbCfCubeDao
.
queryList
(
map
);
}
@Override
public
int
queryTotal
(
Map
<
String
,
Object
>
map
)
{
return
tbCfCubeDao
.
queryTotal
(
map
);
}
@Override
public
int
save
(
TbCfCubeEntity
tbCfCube
)
{
tbCfCube
.
setId
(
IdUtil
.
createIdbyUUID
());
tbCfCube
.
setCreateTime
(
new
Date
());
tbCfCube
.
setUpdateTime
(
new
Date
());
return
tbCfCubeDao
.
save
(
tbCfCube
);
}
@Override
public
int
update
(
TbCfCubeEntity
tbCfCube
)
{
tbCfCube
.
setUpdateTime
(
new
Date
());
return
tbCfCubeDao
.
update
(
tbCfCube
);
}
@Override
public
int
delete
(
String
id
)
{
return
tbCfCubeDao
.
delete
(
id
);
}
@Override
public
int
deleteBatch
(
String
[]
ids
)
{
return
tbCfCubeDao
.
deleteBatch
(
ids
);
}
}
platform-admin/src/main/resources/com/platform/dao/TbCfCubeDao.xml
0 → 100644
浏览文件 @
a597f7b2
<?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.platform.dao.TbCfCubeDao"
>
<resultMap
type=
"com.platform.entity.TbCfCubeEntity"
id=
"tbCfCubeMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"cubeTitle"
column=
"cube_title"
/>
<result
property=
"headerImage"
column=
"header_image"
/>
<result
property=
"itemIds"
column=
"item_ids"
/>
<result
property=
"sort"
column=
"sort"
/>
<result
property=
"isEnabled"
column=
"is_enabled"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfCubeEntity"
>
select
`id`,
`cube_title`,
`header_image`,
`item_ids`,
`sort`,
`is_enabled`,
`create_time`,
`update_time`
from tb_cf_cube
where id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.platform.entity.TbCfCubeEntity"
>
select
`id`,
`cube_title`,
`header_image`,
`item_ids`,
`sort`,
`is_enabled`,
`create_time`,
`update_time`
from tb_cf_cube
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
<choose>
<when
test=
"sidx != null and sidx.trim() != ''"
>
order by ${sidx} ${order}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_cube
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.TbCfCubeEntity"
>
insert into tb_cf_cube(
`id`,
`cube_title`,
`header_image`,
`item_ids`,
`sort`,
`is_enabled`,
`create_time`,
`update_time`)
values(
#{id},
#{cubeTitle},
#{headerImage},
#{itemIds},
#{sort},
#{isEnabled},
#{createTime},
#{updateTime})
</insert>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfCubeEntity"
>
update tb_cf_cube
<set>
<if
test=
"cubeTitle != null"
>
`cube_title` = #{cubeTitle},
</if>
<if
test=
"headerImage != null"
>
`header_image` = #{headerImage},
</if>
<if
test=
"itemIds != null"
>
`item_ids` = #{itemIds},
</if>
<if
test=
"sort != null"
>
`sort` = #{sort},
</if>
<if
test=
"isEnabled != null"
>
`is_enabled` = #{isEnabled},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"updateTime != null"
>
`update_time` = #{updateTime}
</if>
</set>
where id = #{id}
</update>
<delete
id=
"delete"
>
delete from tb_cf_cube where id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_cube where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
platform-admin/src/main/resources/dev/platform.properties
浏览文件 @
a597f7b2
...
...
@@ -2,13 +2,13 @@
#jdbc.username=root
#jdbc.password=root
#
jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
#
jdbc.username=root
#
jdbc.password=diaoyun666
jdbc.url
=
jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
jdbc.username
=
root
jdbc.password
=
diaoyun666
jdbc.url
:
jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
jdbc.username
:
root
jdbc.password
:
Diaoyunnuli.8
#
jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
#
jdbc.username: root
#
jdbc.password: Diaoyunnuli.8
jdbc.initialSize
=
5
jdbc.maxActive
=
30
...
...
platform-admin/src/main/resources/prod/platform.properties
浏览文件 @
a597f7b2
...
...
@@ -2,13 +2,13 @@
#jdbc.username=root
#jdbc.password=root
#
jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
#
jdbc.username=root
#
jdbc.password=diaoyun666
jdbc.url
=
jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
jdbc.username
=
root
jdbc.password
=
diaoyun666
jdbc.url
:
jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
jdbc.username
:
root
jdbc.password
:
Diaoyunnuli.8
#
jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
#
jdbc.username: root
#
jdbc.password: Diaoyunnuli.8
jdbc.initialSize
=
5
jdbc.maxActive
=
30
...
...
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfcube.html
0 → 100644
浏览文件 @
a597f7b2
差异被折叠。
点击展开。
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfhomepage.html
浏览文件 @
a597f7b2
...
...
@@ -298,10 +298,10 @@
<!-- </Form-item>-->
<Form-item
label=
"是否展示"
prop=
"enableFlag"
>
<i-select
placeholder=
"请选择"
v-model=
"tbCfHomePage.enableFlag"
>
<i-option
v-for=
"(el,i) in chooseOptions"
:key=
'i'
:value=
"el.value"
>
{{el.label}}
</i-option>
</i-select>
<i-option
v-for=
"(el,i) in chooseOptions"
:key=
'i'
:value=
"el.value"
>
{{el.label}}
</i-option>
</i-select>
</Form-item>
<Form-item>
<i-button
type=
"primary"
@
click=
"handleSubmit('formValidate')"
>
提交
</i-button>
...
...
platform-admin/src/main/webapp/js/sys/tbcfcube.js
0 → 100644
浏览文件 @
a597f7b2
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论