Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rs-cloud-platform
Project
Project
Details
Activity
Releases
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
周健威
rs-cloud-platform
Commits
ccea5ec7
Commit
ccea5ec7
authored
Nov 25, 2020
by
unset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增banner,咨询,行业应用等信息接口
parent
fcab2f44
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
185 additions
and
41 deletions
+185
-41
generator.properties
...les/ace-generator/src/main/resources/generator.properties
+3
-3
controller.java.vm
...-generator/src/main/resources/template/controller.java.vm
+0
-1
entity.java.vm
.../ace-generator/src/main/resources/template/entity.java.vm
+1
-1
mapper.java.vm
.../ace-generator/src/main/resources/template/mapper.java.vm
+0
-1
mapper.xml.vm
...s/ace-generator/src/main/resources/template/mapper.xml.vm
+0
-7
generator.properties
...modules/ace-generator/target/classes/generator.properties
+3
-3
controller.java.vm
.../ace-generator/target/classes/template/controller.java.vm
+0
-1
entity.java.vm
...ules/ace-generator/target/classes/template/entity.java.vm
+1
-1
mapper.java.vm
...ules/ace-generator/target/classes/template/mapper.java.vm
+0
-1
mapper.xml.vm
...dules/ace-generator/target/classes/template/mapper.xml.vm
+0
-7
Banner.java
...in/java/com/upyuns/platform/rs/website/entity/Banner.java
+8
-1
CommonInfo.java
...ava/com/upyuns/platform/rs/website/entity/CommonInfo.java
+94
-0
BannerBiz.java
...in/java/com/upyuns/platform/rs/website/biz/BannerBiz.java
+2
-1
CommonInfoBiz.java
...ava/com/upyuns/platform/rs/website/biz/CommonInfoBiz.java
+27
-0
IndustryApplicationInfoBiz.java
...s/platform/rs/website/biz/IndustryApplicationInfoBiz.java
+1
-0
IndustryApplicationTypeBiz.java
...s/platform/rs/website/biz/IndustryApplicationTypeBiz.java
+3
-2
NewsTypeBiz.java
.../java/com/upyuns/platform/rs/website/biz/NewsTypeBiz.java
+3
-6
CommonInfoController.java
.../platform/rs/website/controller/CommonInfoController.java
+13
-0
IndustryApplicationTypeController.java
...website/controller/IndustryApplicationTypeController.java
+2
-2
NewsTypeController.java
...ns/platform/rs/website/controller/NewsTypeController.java
+2
-2
CommonInfoMapper.java
...m/upyuns/platform/rs/website/mapper/CommonInfoMapper.java
+15
-0
CommonInfoMapper.xml
...ite-server/src/main/resources/mapper/CommonInfoMapper.xml
+6
-0
IndustryApplicationInfoMapper.xml
...c/main/resources/mapper/IndustryApplicationInfoMapper.xml
+1
-1
No files found.
ace-modules/ace-generator/src/main/resources/generator.properties
View file @
ccea5ec7
#\u4EE3\u7801\u751F\u6210\u5668\uFF0C\u914D\u7F6E\u4FE1\u606F
#\u5305\u540D
package
=
com.upyuns.platform.rs.
universal
package
=
com.upyuns.platform.rs.
website
#\u4F5C\u8005
author
=
libi
n
author
=
jiaoruizhe
n
#Email
email
=
18178966185@163
.com
email
=
jiaoruizhen@126
.com
#\u8868\u524D\u9519\u8BEF\u7684Unicode\u5B57\u7B26\u4E32!
tablePrefix
=
#\u524D\u7AEF\u6A21\u5757\u524D\u7F00
...
...
ace-modules/ace-generator/src/main/resources/template/controller.java.vm
View file @
ccea5ec7
...
...
@@ -3,7 +3,6 @@ package ${package}.rest;
import
com
.
github
.
wxiaoqi
.
security
.
common
.
rest
.
BaseController
;
import
${
package
}.
biz
.${
className
}
Biz
;
import
${
package
}.
entity
.${
className
};
import
org
.
springframework
.
stereotype
.
Controller
;
import
org
.
springframework
.
web
.
bind
.
annotation
.
RequestMapping
;
import
org
.
springframework
.
web
.
bind
.
annotation
.
RestController
;
...
...
ace-modules/ace-generator/src/main/resources/template/entity.java.vm
View file @
ccea5ec7
...
...
@@ -28,7 +28,7 @@ public class ${className} implements Serializable {
*
$
column
.
comments
*/
@
Id
@
GeneratedValue
(
generator
=
"JDBC"
)
@
GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@
ApiModelProperty
(
"$column.comments"
)
private
$
column
.
attrType
$
column
.
attrname
;
#
else
...
...
ace-modules/ace-generator/src/main/resources/template/mapper.java.vm
View file @
ccea5ec7
...
...
@@ -10,7 +10,6 @@ import tk.mybatis.mapper.common.Mapper;
*
@
email
${
email
}
*
@
date
${
datetime
}
*/
@
Mapper
public
interface
${
className
}
Mapper
extends
Mapper
<${
className
}>
{
}
ace-modules/ace-generator/src/main/resources/template/mapper.xml.vm
View file @
ccea5ec7
...
...
@@ -3,11 +3,4 @@
<mapper
namespace=
"${package}.mapper.${className}Mapper"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"${package}.entity.${className}"
id=
"${classname}Map"
>
#foreach($column in $columns)
<result
property=
"${column.attrname}"
column=
"${column.columnName}"
/>
#end
</resultMap>
</mapper>
\ No newline at end of file
ace-modules/ace-generator/target/classes/generator.properties
View file @
ccea5ec7
#\u4EE3\u7801\u751F\u6210\u5668\uFF0C\u914D\u7F6E\u4FE1\u606F
#\u5305\u540D
package
=
com.upyuns.platform.rs.
universal
package
=
com.upyuns.platform.rs.
website
#\u4F5C\u8005
author
=
libi
n
author
=
jiaoruizhe
n
#Email
email
=
18178966185@163
.com
email
=
jiaoruizhen@126
.com
#\u8868\u524D\u9519\u8BEF\u7684Unicode\u5B57\u7B26\u4E32!
tablePrefix
=
#\u524D\u7AEF\u6A21\u5757\u524D\u7F00
...
...
ace-modules/ace-generator/target/classes/template/controller.java.vm
View file @
ccea5ec7
...
...
@@ -3,7 +3,6 @@ package ${package}.rest;
import
com
.
github
.
wxiaoqi
.
security
.
common
.
rest
.
BaseController
;
import
${
package
}.
biz
.${
className
}
Biz
;
import
${
package
}.
entity
.${
className
};
import
org
.
springframework
.
stereotype
.
Controller
;
import
org
.
springframework
.
web
.
bind
.
annotation
.
RequestMapping
;
import
org
.
springframework
.
web
.
bind
.
annotation
.
RestController
;
...
...
ace-modules/ace-generator/target/classes/template/entity.java.vm
View file @
ccea5ec7
...
...
@@ -28,7 +28,7 @@ public class ${className} implements Serializable {
*
$
column
.
comments
*/
@
Id
@
GeneratedValue
(
generator
=
"JDBC"
)
@
GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@
ApiModelProperty
(
"$column.comments"
)
private
$
column
.
attrType
$
column
.
attrname
;
#
else
...
...
ace-modules/ace-generator/target/classes/template/mapper.java.vm
View file @
ccea5ec7
...
...
@@ -10,7 +10,6 @@ import tk.mybatis.mapper.common.Mapper;
*
@
email
${
email
}
*
@
date
${
datetime
}
*/
@
Mapper
public
interface
${
className
}
Mapper
extends
Mapper
<${
className
}>
{
}
ace-modules/ace-generator/target/classes/template/mapper.xml.vm
View file @
ccea5ec7
...
...
@@ -3,11 +3,4 @@
<mapper
namespace=
"${package}.mapper.${className}Mapper"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"${package}.entity.${className}"
id=
"${classname}Map"
>
#foreach($column in $columns)
<result
property=
"${column.attrname}"
column=
"${column.columnName}"
/>
#end
</resultMap>
</mapper>
\ No newline at end of file
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/entity/Banner.java
View file @
ccea5ec7
...
...
@@ -89,6 +89,13 @@ public class Banner implements Serializable {
@Column
(
name
=
"index_show"
)
@ApiModelProperty
(
value
=
"是否首页展示:1、展示,2、不展示"
)
private
Integer
indexShow
;
//banner位置 0:所有 1:首页
private
Integer
location
;
//跳转类型 0--不跳转;1--商品详情页;2--店铺主页;
private
Integer
jumpType
;
private
String
jumpId
;
}
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/entity/CommonInfo.java
0 → 100644
View file @
ccea5ec7
package
com
.
upyuns
.
platform
.
rs
.
website
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
import
javax.persistence.*
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 通用信息
*
* @author jiaoruizhen
* @email jiaoruizhen@126.com
* @date 2020-11-24 14:37:58
*/
@Data
@Table
(
name
=
"common_info"
)
public
class
CommonInfo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
*
*/
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@ApiModelProperty
(
""
)
private
Integer
id
;
/**
* 1、交易保障
*/
@Column
(
name
=
"type"
)
@ApiModelProperty
(
value
=
"1、交易保障"
)
private
Integer
type
;
/**
* 标题
*/
@Column
(
name
=
"title"
)
@ApiModelProperty
(
value
=
"标题"
)
private
String
title
;
/**
* 内容
*/
@Column
(
name
=
"detail"
)
@ApiModelProperty
(
value
=
"内容"
)
private
String
detail
;
/**
* 1、启用,2、禁用
*/
@Column
(
name
=
"status"
)
@ApiModelProperty
(
value
=
"1、启用,2、禁用"
)
private
Integer
status
;
/**
* 是否删除:0、否,1、是
*/
@Column
(
name
=
"is_del"
)
@ApiModelProperty
(
value
=
"是否删除:0、否,1、是"
)
private
Integer
isDel
;
/**
* 标题背景色,16进制
*/
@Column
(
name
=
"color"
)
@ApiModelProperty
(
value
=
"标题背景色,16进制"
)
private
String
color
;
/**
* 创建时间
*/
@Column
(
name
=
"crt_time"
)
@ApiModelProperty
(
value
=
"创建时间"
,
hidden
=
true
)
private
Date
crtTime
;
/**
* 更新时间
*/
@Column
(
name
=
"upd_time"
)
@ApiModelProperty
(
value
=
"更新时间"
,
hidden
=
true
)
private
Date
updTime
;
/**
* 排序
*/
@Column
(
name
=
"rank"
)
@ApiModelProperty
(
value
=
"排序"
)
private
Integer
rank
;
}
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/BannerBiz.java
View file @
ccea5ec7
...
...
@@ -55,6 +55,7 @@ public class BannerBiz extends BaseBiz<BannerMapper, Banner> {
}
else
{
example
.
createCriteria
().
andEqualTo
(
"isDel"
,
0
).
andEqualTo
(
"status"
,
1
);
}
example
.
orderBy
(
"rank"
);
return
ObjectRestResponse
.
succ
(
mapper
.
selectByExample
(
example
));
}
...
...
@@ -68,7 +69,7 @@ public class BannerBiz extends BaseBiz<BannerMapper, Banner> {
Example
example
=
new
Example
(
Banner
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andEqualTo
(
"isDel"
,
0
);
example
.
orderBy
(
"updTime
DESC"
);
example
.
orderBy
(
"updTime
"
).
desc
(
);
Query
query
=
new
Query
(
bannerDto
);
PageDataVO
<
Banner
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
selectByExample
(
example
));
return
ObjectRestResponse
.
succ
(
pageDataVO
);
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/CommonInfoBiz.java
0 → 100644
View file @
ccea5ec7
package
com
.
upyuns
.
platform
.
rs
.
website
.
biz
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
org.springframework.stereotype.Service
;
import
com.upyuns.platform.rs.website.entity.CommonInfo
;
import
com.upyuns.platform.rs.website.mapper.CommonInfoMapper
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
/**
* 通用信息
*
* @author jiaoruizhen
* @email jiaoruizhen@126.com
* @date 2020-11-24 14:37:58
*/
@Service
public
class
CommonInfoBiz
extends
BaseBiz
<
CommonInfoMapper
,
CommonInfo
>
{
public
ObjectRestResponse
addUpdate
(
CommonInfo
commonInfo
)
{
if
(
commonInfo
==
null
)
{
return
ObjectRestResponse
.
paramIsEmpty
();
}
return
ObjectRestResponse
.
succ
();
}
}
\ No newline at end of file
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/IndustryApplicationInfoBiz.java
View file @
ccea5ec7
...
...
@@ -93,6 +93,7 @@ public class IndustryApplicationInfoBiz extends BaseBiz<IndustryApplicationInfoM
Map
<
Integer
,
List
<
IndustryApplicationType
>>
map
=
industryApplicationTypeList
.
stream
().
collect
(
Collectors
.
groupingBy
(
IndustryApplicationType:
:
getId
));
Example
example
=
new
Example
(
IndustryApplicationInfo
.
class
);
example
.
createCriteria
().
andEqualTo
(
"isDel"
,
0
).
andEqualTo
(
"status"
,
1
).
andEqualTo
(
"indexShow"
,
1
).
andIn
(
"firstTypeId"
,
map
.
keySet
());
example
.
orderBy
(
"rank"
);
List
<
IndustryApplicationInfo
>
industryApplicationInfoList
=
mapper
.
selectByExample
(
example
);
if
(
industryApplicationInfoList
!=
null
&&
industryApplicationInfoList
.
size
()
>
0
)
{
industryApplicationInfoList
.
parallelStream
().
forEach
(
industryApplicationInfo
->
{
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/IndustryApplicationTypeBiz.java
View file @
ccea5ec7
...
...
@@ -36,7 +36,7 @@ public class IndustryApplicationTypeBiz extends BaseBiz<IndustryApplicationTypeM
* @return
*/
public
ObjectRestResponse
add
(
IndustryApplicationType
industryApplicationType
)
{
if
(
industryApplicationType
!
=
null
)
{
if
(
industryApplicationType
=
=
null
)
{
return
ObjectRestResponse
.
paramIsEmpty
();
}
if
(
industryApplicationType
.
getId
()
!=
null
)
{
...
...
@@ -77,6 +77,7 @@ public class IndustryApplicationTypeBiz extends BaseBiz<IndustryApplicationTypeM
}
else
{
example
.
createCriteria
().
andEqualTo
(
"isDel"
,
0
).
andEqualTo
(
"status"
,
1
);
}
example
.
orderBy
(
"rank"
);
return
ObjectRestResponse
.
succ
(
mapper
.
selectByExample
(
example
));
}
...
...
@@ -93,7 +94,7 @@ public class IndustryApplicationTypeBiz extends BaseBiz<IndustryApplicationTypeM
if
(
StringUtils
.
isNotBlank
(
industryApplicationTypeDto
.
getTitle
()))
{
criteria
.
andLike
(
"title"
,
"%"
+
industryApplicationTypeDto
.
getTitle
()
+
"%"
);
}
example
.
orderBy
(
"updTime
DESC"
);
example
.
orderBy
(
"updTime
"
).
desc
(
);
Query
query
=
new
Query
(
industryApplicationTypeDto
);
PageDataVO
<
IndustryApplicationType
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
selectByExample
(
example
));
return
ObjectRestResponse
.
succ
(
pageDataVO
);
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/NewsTypeBiz.java
View file @
ccea5ec7
...
...
@@ -64,11 +64,8 @@ public class NewsTypeBiz extends BaseBiz<NewsTypeMapper, NewsType> {
*/
public
ObjectRestResponse
<
List
<
NewsType
>>
getAll
(
Integer
indexShow
)
{
Example
example
=
new
Example
(
NewsType
.
class
);
if
(
indexShow
!=
null
)
{
example
.
createCriteria
().
andEqualTo
(
"isDel"
,
0
).
andEqualTo
(
"status"
,
1
).
andEqualTo
(
"indexShow"
,
indexShow
);
}
else
{
example
.
createCriteria
().
andEqualTo
(
"isDel"
,
0
).
andEqualTo
(
"status"
,
1
);
}
example
.
createCriteria
().
andEqualTo
(
"isDel"
,
0
).
andEqualTo
(
"status"
,
1
);
example
.
orderBy
(
"rank"
);
return
ObjectRestResponse
.
succ
(
mapper
.
selectByExample
(
example
));
}
...
...
@@ -85,7 +82,7 @@ public class NewsTypeBiz extends BaseBiz<NewsTypeMapper, NewsType> {
if
(
StringUtils
.
isNotBlank
(
newsTypeDto
.
getName
()))
{
criteria
.
andLike
(
"nameCn"
,
"%"
+
newsTypeDto
.
getName
()
+
"%"
);
}
example
.
orderBy
(
"updTime
DESC"
);
example
.
orderBy
(
"updTime
"
).
desc
(
);
Query
query
=
new
Query
(
newsTypeDto
);
PageDataVO
<
NewsType
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
selectByExample
(
example
));
return
ObjectRestResponse
.
succ
(
pageDataVO
);
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/controller/CommonInfoController.java
0 → 100644
View file @
ccea5ec7
package
com
.
upyuns
.
platform
.
rs
.
website
.
controller
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.upyuns.platform.rs.website.biz.CommonInfoBiz
;
import
com.upyuns.platform.rs.website.entity.CommonInfo
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"commonInfo"
)
public
class
CommonInfoController
extends
BaseController
<
CommonInfoBiz
,
CommonInfo
>
{
}
\ No newline at end of file
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/controller/IndustryApplicationTypeController.java
View file @
ccea5ec7
...
...
@@ -22,8 +22,8 @@ public class IndustryApplicationTypeController extends BaseController<IndustryAp
}
@GetMapping
(
value
=
"getAll"
)
public
ObjectRestResponse
getAll
()
{
return
baseBiz
.
getAll
(
1
);
public
ObjectRestResponse
getAll
(
Integer
indexShow
)
{
return
baseBiz
.
getAll
(
indexShow
);
}
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/controller/NewsTypeController.java
View file @
ccea5ec7
...
...
@@ -17,8 +17,8 @@ public class NewsTypeController extends BaseController<NewsTypeBiz, NewsType> {
}
@GetMapping
(
value
=
"getAll"
)
public
ObjectRestResponse
getAll
()
{
return
baseBiz
.
getAll
(
1
);
public
ObjectRestResponse
getAll
(
Integer
indexShow
)
{
return
baseBiz
.
getAll
(
indexShow
);
}
@GetMapping
(
value
=
"getList"
)
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/mapper/CommonInfoMapper.java
0 → 100644
View file @
ccea5ec7
package
com
.
upyuns
.
platform
.
rs
.
website
.
mapper
;
import
com.upyuns.platform.rs.website.entity.CommonInfo
;
import
tk.mybatis.mapper.common.Mapper
;
/**
* 通用信息
*
* @author jiaoruizhen
* @email jiaoruizhen@126.com
* @date 2020-11-24 14:37:58
*/
public
interface
CommonInfoMapper
extends
Mapper
<
CommonInfo
>
{
}
rs-website/rs-website-server/src/main/resources/mapper/CommonInfoMapper.xml
0 → 100644
View file @
ccea5ec7
<?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.upyuns.platform.rs.website.mapper.CommonInfoMapper"
>
</mapper>
\ No newline at end of file
rs-website/rs-website-server/src/main/resources/mapper/IndustryApplicationInfoMapper.xml
View file @
ccea5ec7
...
...
@@ -24,7 +24,7 @@
and iai.title like concat('%', #{title}, '%')
</if>
</where>
order by upd
T
ime DESC
order by upd
_t
ime DESC
</select>
</mapper>
\ 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