Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gk
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
micro_app
gk
Commits
1d656452
Commit
1d656452
authored
Apr 21, 2025
by
daniel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(richText+module): 迁移自助服务模块
parent
ff8353d7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
1261 additions
and
762 deletions
+1261
-762
RichTextBean.java
...ava/com/dlbridge/jadp/plugins/cmpt/bean/RichTextBean.java
+3
-1
JoyfulRichTextMapper.java
...ge/jadp/plugins/cmpt/dao/mapper/JoyfulRichTextMapper.java
+0
-24
JoyfunModuleMapper.java
...idge/jadp/plugins/cmpt/dao/mapper/JoyfunModuleMapper.java
+0
-28
ModuleMapper.java
...m/dlbridge/jadp/plugins/cmpt/dao/mapper/ModuleMapper.java
+29
-0
ModuleMapper.xml
...om/dlbridge/jadp/plugins/cmpt/dao/mapper/ModuleMapper.xml
+17
-17
RichTextMapper.java
...dlbridge/jadp/plugins/cmpt/dao/mapper/RichTextMapper.java
+24
-0
RichTextMapper.xml
.../dlbridge/jadp/plugins/cmpt/dao/mapper/RichTextMapper.xml
+134
-0
Module.java
...java/com/dlbridge/jadp/plugins/cmpt/dao/model/Module.java
+1
-1
RichText.java
...va/com/dlbridge/jadp/plugins/cmpt/dao/model/RichText.java
+9
-8
JoyfunModuleService.java
...bridge/jadp/plugins/cmpt/service/JoyfunModuleService.java
+0
-46
ModuleService.java
...com/dlbridge/jadp/plugins/cmpt/service/ModuleService.java
+46
-0
RichTextService.java
...m/dlbridge/jadp/plugins/cmpt/service/RichTextService.java
+122
-0
ModuleController.java
.../com/dlbridge/jadp/plugins/cmpt/web/ModuleController.java
+115
-0
RichTextController.java
...om/dlbridge/jadp/plugins/cmpt/web/RichTextController.java
+97
-0
module.jsp
src/main/webapp/WEB-INF/views/cmpt/module.jsp
+583
-594
service.jsp
src/main/webapp/WEB-INF/views/cmpt/service.jsp
+81
-43
No files found.
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/
Joyful
RichTextBean.java
→
src/main/java/com/dlbridge/jadp/plugins/cmpt/bean/RichTextBean.java
View file @
1d656452
...
@@ -3,13 +3,15 @@ package com.dlbridge.jadp.plugins.cmpt.bean;
...
@@ -3,13 +3,15 @@ package com.dlbridge.jadp.plugins.cmpt.bean;
import
lombok.Data
;
import
lombok.Data
;
@Data
@Data
public
class
Joyful
RichTextBean
{
public
class
RichTextBean
{
// 服务类型(3:特色民宿:4:旅游景点,5:特色餐饮 6:当地特产 7: 应急避险 8: 医疗点位 9:运动产品)
// 服务类型(3:特色民宿:4:旅游景点,5:特色餐饮 6:当地特产 7: 应急避险 8: 医疗点位 9:运动产品)
private
String
type
;
private
String
type
;
// 点位类型 (1:打卡点,2:服务驿站,3:民宿:4:景点,5:餐饮)
// 点位类型 (1:打卡点,2:服务驿站,3:民宿:4:景点,5:餐饮)
private
String
category
;
private
String
category
;
private
String
title
;
private
String
title
;
private
String
lng
;
private
String
lng
;
// 赛事id
private
Integer
cmptId
;
private
String
lat
;
private
String
lat
;
private
String
distance
;
private
String
distance
;
}
}
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/JoyfulRichTextMapper.java
deleted
100644 → 0
View file @
ff8353d7
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
dao
.
mapper
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.JoyfulRichText
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 用户积分
*
* @author LI
*/
public
interface
JoyfulRichTextMapper
{
int
insJoyfulRichText
(
JoyfulRichText
joyfulRichText
);
int
updJoyfulRichText
(
JoyfulRichText
joyfulRichText
);
int
delJoyfulRichText
(
JoyfulRichText
joyfulRichText
);
List
<
JoyfulRichText
>
getJoyfulRichTextById
(
@Param
(
"id"
)
String
id
);
List
<
JoyfulRichText
>
getJoyfulRichTextList
(
@Param
(
"type"
)
String
type
,
@Param
(
"title"
)
String
title
,
@Param
(
"category"
)
String
category
);
}
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/JoyfunModuleMapper.java
deleted
100644 → 0
View file @
ff8353d7
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
dao
.
mapper
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.JoyfunModule
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
@Mapper
public
interface
JoyfunModuleMapper
{
int
insertModule
(
JoyfunModule
joyfunModule
);
int
logicDeleteModule
(
JoyfunModule
joyfunModule
);
List
<
JoyfunModule
>
selectModuleList
(
@Param
(
"status"
)
Integer
status
);
int
updateModuleStatus
(
JoyfunModule
joyfunModule
);
int
updateModuleSort
(
JoyfunModule
joyfunModule
);
JoyfunModule
getModuleById
(
Integer
moduleId
);
JoyfunModule
getModuleByName
(
String
name
);
int
updateModule
(
JoyfunModule
joyfunModule
);
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/ModuleMapper.java
0 → 100644
View file @
1d656452
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
dao
.
mapper
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.Module
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
@Mapper
public
interface
ModuleMapper
{
int
add
(
Module
module
);
int
delete
(
Module
module
);
List
<
Module
>
getList
(
@Param
(
"status"
)
Integer
status
);
int
update
(
Module
module
);
int
updateSort
(
Module
module
);
Module
getById
(
Integer
moduleId
);
Module
getByName
(
String
name
);
int
updateStatus
(
Module
module
);
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/
Joyfun
ModuleMapper.xml
→
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/ModuleMapper.xml
View file @
1d656452
<?xml version="1.0" encoding="UTF-8" ?>
<?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">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.dlbridge.jadp.plugins.cmpt.dao.mapper.
Joyfun
ModuleMapper"
>
<mapper
namespace=
"com.dlbridge.jadp.plugins.cmpt.dao.mapper.ModuleMapper"
>
<insert
id=
"
insertModule
"
>
<insert
id=
"
add
"
>
INSERT INTO
joyfun
_module (
INSERT INTO
gk
_module (
icon, name, sort, path, is_deleted, status, create_time, update_time
icon, name, sort, path, is_deleted, status, create_time, update_time
) VALUES (
) VALUES (
#{icon}, #{name}, #{sort}, #{path}, #{isDeleted}, #{status}, NOW(), NOW()
#{icon}, #{name}, #{sort}, #{path}, #{isDeleted}, #{status}, NOW(), NOW()
...
@@ -11,45 +11,45 @@
...
@@ -11,45 +11,45 @@
</insert>
</insert>
<update
id=
"
logicDeleteModul
e"
>
<update
id=
"
delet
e"
>
UPDATE
joyfun
_module
UPDATE
gk
_module
SET is_deleted = true
SET is_deleted = true
WHERE id = #{id}
WHERE id = #{id}
</update>
</update>
<select
id=
"
selectModuleList"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.Joyfun
Module"
>
<select
id=
"
getList"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.
Module"
>
SELECT id, icon, name,path, sort, is_deleted AS isDeleted, status, create_time AS createTime, update_time AS updateTime
SELECT id, icon, name,path, sort, is_deleted AS isDeleted, status, create_time AS createTime, update_time AS updateTime
FROM
joyfun
_module
FROM
gk
_module
WHERE is_deleted = 0
WHERE is_deleted = 0
<if
test=
"status!= null"
>
<if
test=
"status!= null"
>
AND status = #{status}
AND status = #{status}
</if>
</if>
ORDER BY sort ASC
ORDER BY sort ASC
</select>
</select>
<select
id=
"get
ModuleById"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.Joyfun
Module"
>
<select
id=
"get
ById"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.
Module"
>
SELECT id, icon, name,path, sort, is_deleted AS isDeleted, status, create_time AS createTime, update_time AS updateTime
SELECT id, icon, name,path, sort, is_deleted AS isDeleted, status, create_time AS createTime, update_time AS updateTime
FROM
joyfun
_module
FROM
gk
_module
WHERE id = #{id} AND is_deleted = 0
WHERE id = #{id} AND is_deleted = 0
</select>
</select>
<select
id=
"get
ModuleByName"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.Joyfun
Module"
>
<select
id=
"get
ByName"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.
Module"
>
SELECT id, icon, name,path, sort, is_deleted AS isDeleted, status, create_time AS createTime, update_time AS updateTime
SELECT id, icon, name,path, sort, is_deleted AS isDeleted, status, create_time AS createTime, update_time AS updateTime
FROM
joyfun
_module
FROM
gk
_module
WHERE name = #{name} AND is_deleted = 0
WHERE name = #{name} AND is_deleted = 0
</select>
</select>
<update
id=
"update
Module
Status"
>
<update
id=
"updateStatus"
>
UPDATE
joyfun
_module
UPDATE
gk
_module
SET status = #{status}, update_time = NOW()
SET status = #{status}, update_time = NOW()
WHERE id = #{id}
WHERE id = #{id}
</update>
</update>
<update
id=
"update
Module
Sort"
>
<update
id=
"updateSort"
>
UPDATE
joyfun
_module
UPDATE
gk
_module
SET sort = #{sort}, update_time = NOW()
SET sort = #{sort}, update_time = NOW()
WHERE id = #{id}
WHERE id = #{id}
</update>
</update>
<update
id=
"update
Module
"
>
<update
id=
"update"
>
UPDATE
joyfun
_module
UPDATE
gk
_module
<set>
<set>
<if
test=
"icon != null and icon != ''"
>
<if
test=
"icon != null and icon != ''"
>
icon = #{icon},
icon = #{icon},
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/RichTextMapper.java
0 → 100644
View file @
1d656452
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
dao
.
mapper
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.RichText
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 用户积分
*
* @author LI
*/
public
interface
RichTextMapper
{
int
add
(
RichText
richText
);
int
update
(
RichText
richText
);
int
delete
(
RichText
richText
);
List
<
RichText
>
getById
(
@Param
(
"id"
)
String
id
);
List
<
RichText
>
getPage
(
@Param
(
"type"
)
String
type
,
@Param
(
"title"
)
String
title
,
@Param
(
"category"
)
String
category
,
@Param
(
"cmptId"
)
Integer
cmptId
,
@Param
(
"page"
)
Integer
page
,
@Param
(
"pageSize"
)
Integer
pageSize
);
}
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/RichTextMapper.xml
0 → 100644
View file @
1d656452
<?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.dlbridge.jadp.plugins.cmpt.dao.mapper.RichTextMapper"
>
<insert
id=
"add"
>
INSERT INTO gksite.gk_rich_text( userId
, type
, category
, title
, address
, lng
, lat
, content
, img_url
, remark1
, remark2
, remark3
, remark4
, status
, del_flg
, create_time
, create_user
, cmpt_id)
VALUES ( #{userId}
, #{type}
, #{category}
, #{title}
, #{address}
, #{lng}
, #{lat}
, #{content}
, #{imgUrl}
, #{remark1}
, #{remark2}
, #{remark3}
, #{remark4}
, #{status}
, '0'
, now()
, #{userId}
, #{cmptId})
</insert>
<update
id=
"update"
>
UPDATE
gksite.gk_rich_text
SET
userId = #{userId}
,type = #{type}
,category = #{category}
,title = #{title}
,address = #{address}
,lng = #{lng}
,lat = #{lat}
,content = #{content}
,img_url = #{imgUrl}
,remark1 = #{remark1}
,remark2 = #{remark2}
,remark3 = #{remark3}
,remark4 = #{remark4}
,status = #{status}
,update_time = now()
,update_user = #{userId}
,cmpt_id = #{cmptId}
WHERE
id = #{id}
</update>
<update
id=
"delete"
>
UPDATE
gksite.gk_rich_text
SET
del_flg = '1'
,update_time = now()
,update_user = #{userId}
WHERE
id = #{id}
</update>
<select
id=
"getById"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.RichText"
>
SELECT id
, userId
, cmpt_id AS cmptId
, type
, title
, address
, lng
, lat
, content
, img_url AS imgUrl
, remark1
, remark2
, remark3
, remark4
, status
, category
FROM gksite.gk_rich_text
WHERE id = #{id}
</select>
<select
id=
"getPage"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.RichText"
>
SELECT
id
,title
,address
,lng
,lat
,img_url AS imgUrl
,remark1
,remark2
,remark3
,remark4
,type
,status
,category
FROM
gksite.gk_rich_text
WHERE
del_flg = '0'
<if
test=
"type != null and type != ''"
>
AND type = #{type}
</if>
<if
test=
"cmptId != null and cmptId != ''"
>
AND cmpt_id = #{cmptId}
</if>
<if
test=
"title != null and title != ''"
>
AND title like concat('%',#{title},'%')
</if>
<if
test=
"category != null and category != ''"
>
AND FIND_IN_SET(#{category}, category)
</if>
LIMIT #{pageSize} OFFSET #{page}
</select>
</mapper>
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/model/
Joyfun
Module.java
→
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/model/Module.java
View file @
1d656452
...
@@ -6,7 +6,7 @@ import lombok.Data;
...
@@ -6,7 +6,7 @@ import lombok.Data;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
@Data
@Data
public
class
Joyfun
Module
{
public
class
Module
{
private
Long
id
;
private
Long
id
;
// 图标URL
// 图标URL
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/model/
Joyful
RichText.java
→
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/model/RichText.java
View file @
1d656452
...
@@ -3,23 +3,24 @@ package com.dlbridge.jadp.plugins.cmpt.dao.model;
...
@@ -3,23 +3,24 @@ package com.dlbridge.jadp.plugins.cmpt.dao.model;
import
lombok.Data
;
import
lombok.Data
;
@Data
@Data
public
class
JoyfulRichText
{
public
class
RichText
{
private
String
id
;
private
Integer
id
;
private
String
userId
;
private
Integer
userId
;
private
Integer
cmptId
;
// 服务类型(3:特色民宿:4:旅游景点,5:特色餐饮 6:当地特产 7: 应急避险 8: 医疗点位 9:运动产品)
// 服务类型(3:特色民宿:4:旅游景点,5:特色餐饮 6:当地特产 7: 应急避险 8: 医疗点位 9:运动产品)
private
String
type
;
private
Integer
type
;
// 点位类型 (1:打卡点,2:服务驿站,3:民宿:4:景点,5:餐饮)
// 点位类型 (1:打卡点,2:服务驿站,3:民宿:4:景点,5:餐饮)
private
String
category
;
private
String
category
;
private
String
title
;
private
String
title
;
private
String
address
;
private
String
address
;
private
String
lng
;
private
Double
lng
;
private
String
lat
;
private
Double
lat
;
private
String
content
;
private
String
content
;
private
String
imgUrl
;
private
String
imgUrl
;
private
String
remark1
;
private
String
remark1
;
private
String
remark2
;
private
String
remark2
;
private
String
remark3
;
private
String
remark3
;
private
String
remark4
;
private
String
remark4
;
private
String
status
;
private
Integer
status
;
private
String
delFlg
;
private
Integer
delFlg
;
}
}
\ No newline at end of file
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/JoyfunModuleService.java
deleted
100644 → 0
View file @
ff8353d7
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
service
;
import
com.dlbridge.jadp.plugins.cmpt.dao.mapper.JoyfunModuleMapper
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.JoyfunModule
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Service
public
class
JoyfunModuleService
{
@Resource
private
JoyfunModuleMapper
joyfunModuleMapper
;
public
int
addModule
(
JoyfunModule
joyfunModule
)
{
return
joyfunModuleMapper
.
insertModule
(
joyfunModule
);
}
public
int
deleteModule
(
JoyfunModule
joyfunModule
)
{
return
joyfunModuleMapper
.
logicDeleteModule
(
joyfunModule
);
}
public
List
<
JoyfunModule
>
listModules
(
Integer
status
)
{
return
joyfunModuleMapper
.
selectModuleList
(
status
);
}
public
int
updateModuleStatus
(
JoyfunModule
joyfunModule
)
{
return
joyfunModuleMapper
.
updateModuleStatus
(
joyfunModule
);
}
public
int
updateModuleSort
(
JoyfunModule
joyfunModule
)
{
return
joyfunModuleMapper
.
updateModuleSort
(
joyfunModule
);
}
public
JoyfunModule
getModuleByName
(
String
name
)
{
return
joyfunModuleMapper
.
getModuleByName
(
name
);
}
public
JoyfunModule
getModuleById
(
Integer
id
)
{
return
joyfunModuleMapper
.
getModuleById
(
id
);
}
public
int
updateModule
(
JoyfunModule
joyfunModule
)
{
return
joyfunModuleMapper
.
updateModule
(
joyfunModule
);
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/ModuleService.java
0 → 100644
View file @
1d656452
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
service
;
import
com.dlbridge.jadp.plugins.cmpt.dao.mapper.ModuleMapper
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.Module
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Service
public
class
ModuleService
{
@Resource
private
ModuleMapper
moduleMapper
;
public
int
addModule
(
Module
module
)
{
return
moduleMapper
.
add
(
module
);
}
public
int
deleteModule
(
Module
module
)
{
return
moduleMapper
.
delete
(
module
);
}
public
List
<
Module
>
listModules
(
Integer
status
)
{
return
moduleMapper
.
getList
(
status
);
}
public
int
updateModuleStatus
(
Module
module
)
{
return
moduleMapper
.
updateStatus
(
module
);
}
public
int
updateModuleSort
(
Module
module
)
{
return
moduleMapper
.
updateSort
(
module
);
}
public
Module
getModuleByName
(
String
name
)
{
return
moduleMapper
.
getByName
(
name
);
}
public
Module
getModuleById
(
Integer
id
)
{
return
moduleMapper
.
getById
(
id
);
}
public
int
updateModule
(
Module
module
)
{
return
moduleMapper
.
update
(
module
);
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/
Joyful
RichTextService.java
→
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/RichTextService.java
View file @
1d656452
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
service
;
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
service
;
import
com.dlbridge.jadp.plugins.cmpt.bean.
Joyful
RichTextBean
;
import
com.dlbridge.jadp.plugins.cmpt.bean.RichTextBean
;
import
com.dlbridge.jadp.plugins.cmpt.dao.mapper.
Joyful
RichTextMapper
;
import
com.dlbridge.jadp.plugins.cmpt.dao.mapper.RichTextMapper
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.
Joyful
RichText
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.RichText
;
import
com.dlbridge.jadp.plugins.cmpt.utils.GpsUtil
;
import
com.dlbridge.jadp.plugins.cmpt.utils.GpsUtil
;
import
com.dlbridge.jadp.plugins.cmpt.utils.QRCodeUtil
;
import
com.dlbridge.jadp.plugins.cmpt.utils.QRCodeUtil
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
...
@@ -25,40 +25,40 @@ import java.util.stream.Collectors;
...
@@ -25,40 +25,40 @@ import java.util.stream.Collectors;
* @author LI
* @author LI
*/
*/
@Service
@Service
public
class
Joyful
RichTextService
{
public
class
RichTextService
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
Joyful
RichTextService
.
class
);
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
RichTextService
.
class
);
@Resource
@Resource
JoyfulRichTextMapper
joyfulR
ichTextMapper
;
RichTextMapper
r
ichTextMapper
;
/**
/**
* 悦行冬奥路富文本表 追加
* 悦行冬奥路富文本表 追加
*
*
* @param
joyful
RichText
* @param RichText
* @return
* @return
*/
*/
public
int
insJoyfulRichText
(
JoyfulRichText
joyful
RichText
)
{
public
int
add
(
RichText
RichText
)
{
return
joyfulRichTextMapper
.
insJoyfulRichText
(
joyful
RichText
);
return
richTextMapper
.
add
(
RichText
);
}
}
/**
/**
* 悦行冬奥路富文本表 修改
* 悦行冬奥路富文本表 修改
*
*
* @param
joyful
RichText
* @param RichText
* @return
* @return
*/
*/
public
int
upd
JoyfulRichText
(
JoyfulRichText
joyful
RichText
)
{
public
int
upd
ate
(
RichText
RichText
)
{
return
joyfulRichTextMapper
.
updJoyfulRichText
(
joyful
RichText
);
return
richTextMapper
.
update
(
RichText
);
}
}
/**
/**
* 悦行冬奥路富文本表 逻辑删除
* 悦行冬奥路富文本表 逻辑删除
*
*
* @param
joyful
RichText
* @param RichText
* @return
* @return
*/
*/
public
int
del
JoyfulRichText
(
JoyfulRichText
joyful
RichText
)
{
public
int
del
ete
(
RichText
RichText
)
{
return
joyfulRichTextMapper
.
delJoyfulRichText
(
joyful
RichText
);
return
richTextMapper
.
delete
(
RichText
);
}
}
/**
/**
...
@@ -67,26 +67,26 @@ public class JoyfulRichTextService {
...
@@ -67,26 +67,26 @@ public class JoyfulRichTextService {
* @param id
* @param id
* @return
* @return
*/
*/
public
JoyfulRichText
getJoyfulRichText
(
String
id
)
{
public
RichText
detail
(
String
id
)
{
List
<
JoyfulRichText
>
joyfulRichTextList
=
joyfulRichTextMapper
.
getJoyfulRichTex
tById
(
id
);
List
<
RichText
>
RichTextList
=
richTextMapper
.
ge
tById
(
id
);
if
(
joyful
RichTextList
.
isEmpty
())
{
if
(
RichTextList
.
isEmpty
())
{
return
null
;
return
null
;
}
}
return
joyful
RichTextList
.
get
(
0
);
return
RichTextList
.
get
(
0
);
}
}
/**
/**
* 悦行冬奥路富文本表 条件检索
* 悦行冬奥路富文本表 条件检索
*
*
* @param
joyfulR
ichTextBean
* @param
r
ichTextBean
* @return
* @return
*/
*/
public
List
<
JoyfulRichText
>
getJoyfulRichTextList
(
JoyfulRichTextBean
joyfulRichTextBean
)
{
public
List
<
RichText
>
getPage
(
RichTextBean
richTextBean
,
int
page
,
int
pageSize
)
{
List
<
JoyfulRichText
>
joyfulRichTextList
=
joyfulRichTextMapper
.
getJoyfulRichTextList
(
joyfulRichTextBean
.
getType
(),
joyfulRichTextBean
.
getTitle
(),
joyfulRichTextBean
.
getCategory
()
);
List
<
RichText
>
RichTextList
=
richTextMapper
.
getPage
(
richTextBean
.
getType
(),
richTextBean
.
getTitle
(),
richTextBean
.
getCategory
(),
richTextBean
.
getCmptId
(),
page
,
pageSize
);
if
(
StringUtils
.
isNotBlank
(
joyfulR
ichTextBean
.
getDistance
()))
{
if
(
StringUtils
.
isNotBlank
(
r
ichTextBean
.
getDistance
()))
{
joyfulRichTextList
=
joyfulRichTextList
.
stream
().
filter
(
model
->
this
.
notGtDistance
(
model
,
joyfulR
ichTextBean
)).
collect
(
Collectors
.
toList
());
RichTextList
=
RichTextList
.
stream
().
filter
(
model
->
this
.
notGtDistance
(
model
,
r
ichTextBean
)).
collect
(
Collectors
.
toList
());
}
}
return
joyful
RichTextList
;
return
RichTextList
;
}
}
/**
/**
...
@@ -95,7 +95,7 @@ public class JoyfulRichTextService {
...
@@ -95,7 +95,7 @@ public class JoyfulRichTextService {
* @param id
* @param id
* @return
* @return
*/
*/
public
BufferedImage
get
JoyfulRichText
QrCode
(
int
id
)
{
public
BufferedImage
getQrCode
(
int
id
)
{
Map
<
String
,
Integer
>
map
=
new
HashMap
();
Map
<
String
,
Integer
>
map
=
new
HashMap
();
map
.
put
(
"id"
,
id
);
map
.
put
(
"id"
,
id
);
Gson
gson
=
new
Gson
();
Gson
gson
=
new
Gson
();
...
@@ -103,8 +103,8 @@ public class JoyfulRichTextService {
...
@@ -103,8 +103,8 @@ public class JoyfulRichTextService {
return
QRCodeUtil
.
getBufferedImage
(
null
,
json
);
return
QRCodeUtil
.
getBufferedImage
(
null
,
json
);
}
}
private
boolean
notGtDistance
(
JoyfulRichText
model
,
Joyful
RichTextBean
bean
)
{
private
boolean
notGtDistance
(
RichText
model
,
RichTextBean
bean
)
{
double
distance
=
GpsUtil
.
getDistance
(
Double
.
parseDouble
(
model
.
getLat
()),
Double
.
parseDouble
(
model
.
getLng
()
),
Double
.
parseDouble
(
bean
.
getLat
()),
Double
.
parseDouble
(
bean
.
getLng
()));
double
distance
=
GpsUtil
.
getDistance
(
model
.
getLat
(),
model
.
getLng
(
),
Double
.
parseDouble
(
bean
.
getLat
()),
Double
.
parseDouble
(
bean
.
getLng
()));
return
distance
<=
Double
.
parseDouble
(
bean
.
getDistance
())
*
1000.0
;
return
distance
<=
Double
.
parseDouble
(
bean
.
getDistance
())
*
1000.0
;
}
}
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/ModuleController.java
0 → 100644
View file @
1d656452
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
web
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.Module
;
import
com.dlbridge.jadp.plugins.cmpt.service.ModuleService
;
import
com.neusoft.www.utils.web.Result
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiSort
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Log4j2
@RestController
@RequestMapping
(
value
=
"gk/module"
)
@Api
(
value
=
"自助服务模块"
,
tags
=
"自助服务模块"
)
@ApiSort
(
10
)
public
class
ModuleController
{
@Resource
private
ModuleService
moduleService
;
//-------------------------自助服务模块-----------------------
@PostMapping
(
"/add"
)
@ApiOperation
(
value
=
"新增服务模块"
,
notes
=
"新增一个新的服务模块"
)
public
Result
addModule
(
@RequestBody
Module
module
)
{
// 判断内容
if
(
StringUtils
.
isBlank
(
module
.
getName
()))
{
return
Result
.
fail
().
setMsg
(
"服务模块名称不能为空!"
);
}
if
(
StringUtils
.
isBlank
(
module
.
getIcon
()))
{
return
Result
.
fail
().
setMsg
(
"服务模块图标不能为空!"
);
}
if
(
StringUtils
.
isBlank
(
module
.
getIcon
()))
{
return
Result
.
fail
().
setMsg
(
"服务模块图标不能为空!"
);
}
Module
exitModule
=
moduleService
.
getModuleByName
(
module
.
getName
());
if
(
exitModule
!=
null
){
return
Result
.
fail
().
setMsg
(
"服务模块已存在!"
);
}
int
result
=
moduleService
.
addModule
(
module
);
if
(
result
!=
1
)
{
return
Result
.
fail
().
setMsg
(
"新增失败!"
);
}
return
Result
.
success
().
setMsg
(
"新增成功。"
);
}
@PostMapping
(
"/update"
)
@ApiOperation
(
value
=
"更新服务模块"
,
notes
=
"更新服务模块"
)
public
Result
updateModule
(
@RequestBody
Module
module
)
{
// 判断内容
if
(
StringUtils
.
isBlank
(
module
.
getName
()))
{
return
Result
.
fail
().
setMsg
(
"服务模块名称不能为空!"
);
}
if
(
StringUtils
.
isBlank
(
module
.
getIcon
()))
{
return
Result
.
fail
().
setMsg
(
"服务模块图标不能为空!"
);
}
if
(
StringUtils
.
isBlank
(
module
.
getPath
()))
{
return
Result
.
fail
().
setMsg
(
"跳转路径不能为空!"
);
}
int
result
=
moduleService
.
updateModule
(
module
);
if
(
result
!=
1
)
{
return
Result
.
fail
().
setMsg
(
"更新失败!"
);
}
return
Result
.
success
().
setMsg
(
"更新成功。"
);
}
@PostMapping
(
"/delete"
)
@ApiOperation
(
value
=
"逻辑删除服务模块"
,
notes
=
"逻辑删除一个服务模块"
)
public
Result
deleteModule
(
@RequestBody
Module
module
)
{
int
result
=
moduleService
.
deleteModule
(
module
);
if
(
result
!=
1
)
{
return
Result
.
fail
().
setMsg
(
"删除失败!"
);
}
return
Result
.
success
().
setMsg
(
"删除成功。"
);
}
@GetMapping
(
"/detail/{id}"
)
@ApiOperation
(
value
=
"获取服务模块详情"
,
notes
=
"获取服务模块详情"
)
public
Result
getModule
(
@PathVariable
(
"id"
)
Integer
id
)
{
Module
data
=
moduleService
.
getModuleById
(
id
);
return
Result
.
success
().
setContent
(
data
);
}
@GetMapping
(
"/list"
)
@ApiOperation
(
value
=
"获取服务模块列表"
,
notes
=
"获取所有服务模块列表"
)
public
Result
<
List
<
Module
>>
listModules
(
@RequestParam
(
value
=
"status"
,
required
=
false
)
Integer
status
)
{
List
<
Module
>
serviceModules
=
moduleService
.
listModules
(
status
);
return
Result
.
success
().
setContent
(
serviceModules
);
}
@PostMapping
(
"/updateStatus"
)
@ApiOperation
(
value
=
"修改服务模块状态"
,
notes
=
"修改服务模块的状态"
)
public
Result
updateModuleStatus
(
@RequestBody
Module
module
)
{
int
result
=
moduleService
.
updateModuleStatus
(
module
);
if
(
result
!=
1
)
{
return
Result
.
fail
().
setMsg
(
"状态修改失败!"
);
}
return
Result
.
success
().
setMsg
(
"状态修改成功。"
);
}
@PostMapping
(
"/updateSort"
)
@ApiOperation
(
value
=
"更新服务模块排序"
,
notes
=
"更新服务模块的排序序号"
)
public
Result
updateModuleSort
(
@RequestBody
Module
module
)
{
int
result
=
moduleService
.
updateModuleSort
(
module
);
if
(
result
!=
1
)
{
return
Result
.
fail
().
setMsg
(
"排序更新失败!"
);
}
return
Result
.
success
().
setMsg
(
"排序更新成功。"
);
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/RichTextController.java
0 → 100644
View file @
1d656452
package
com
.
dlbridge
.
jadp
.
plugins
.
cmpt
.
web
;
import
com.dlbridge.jadp.plugins.cmpt.bean.RichTextBean
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.RichText
;
import
com.dlbridge.jadp.plugins.cmpt.service.RichTextService
;
import
com.neusoft.www.utils.web.Result
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiSort
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.imageio.ImageIO
;
import
javax.servlet.http.HttpServletResponse
;
import
java.awt.image.BufferedImage
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.util.List
;
@Log4j2
@RestController
@RequestMapping
(
value
=
"gk/richText"
)
@Api
(
value
=
"自助服务详情"
,
tags
=
"自助服务详情"
)
@ApiSort
(
10
)
public
class
RichTextController
{
@Resource
private
RichTextService
richTextService
;
@PostMapping
(
value
=
"/add"
)
@ApiOperation
(
value
=
"自助服务管理新增"
,
notes
=
"自助服务管理新增"
,
tags
=
"自助服务管理新增"
)
public
Result
addRichText
(
@RequestBody
RichText
richText
)
{
int
result
=
richTextService
.
add
(
richText
);
if
(
result
!=
1
)
{
return
Result
.
fail
().
setMsg
(
"新增失败!"
);
}
return
Result
.
success
().
setMsg
(
"新增成功。"
);
}
@PostMapping
(
value
=
"/update"
)
@ApiOperation
(
value
=
"自助服务管理修改"
,
notes
=
"自助服务管理修改"
,
tags
=
"自助服务管理修改"
)
public
Result
updateRichText
(
@RequestBody
RichText
richText
)
{
int
result
=
richTextService
.
update
(
richText
);
if
(
result
!=
1
)
{
return
Result
.
fail
().
setMsg
(
"修改失败!"
);
}
return
Result
.
success
().
setMsg
(
"修改成功。"
);
}
@PostMapping
(
value
=
"/delete"
)
@ApiOperation
(
value
=
"自助服务管理删除"
,
notes
=
"自助服务管理删除"
,
tags
=
"自助服务管理删除"
)
public
Result
deleteRichText
(
@RequestBody
RichText
richText
)
{
int
result
=
richTextService
.
delete
(
richText
);
if
(
result
!=
1
)
{
return
Result
.
fail
().
setMsg
(
"删除失败!"
);
}
return
Result
.
success
().
setMsg
(
"删除成功。"
);
}
@GetMapping
(
value
=
"/detail/{id}"
)
@ApiOperation
(
value
=
"自助服务管理主键检索"
,
notes
=
"自助服务管理主键检索"
,
tags
=
"自助服务管理主键检索"
)
public
Result
<
RichText
>
getRichText
(
@PathVariable
(
"id"
)
String
id
)
{
RichText
richText
=
richTextService
.
detail
(
id
);
if
(
richText
==
null
)
{
return
Result
.
fail
().
setMsg
(
"数据不存在。"
);
}
return
Result
.
success
().
setContent
(
richText
);
}
@PostMapping
(
value
=
"/page/{page}/{pageSize}"
)
@ApiOperation
(
value
=
"自助服务管理条件检索"
,
notes
=
"自助服务管理条件检索"
,
tags
=
"自助服务管理条件检索"
)
public
Result
<
List
<
RichText
>>
getRichTextList
(
@RequestBody
RichTextBean
richTextBean
,
@PathVariable
(
"page"
)
int
page
,
@PathVariable
(
"pageSize"
)
int
pageSize
)
{
List
<
RichText
>
richTextList
=
richTextService
.
getPage
(
richTextBean
,
page
-
1
,
pageSize
);
//int fromIndex = pointService.getOffset(pageNo, pageCount);
//richTextList = JoyfulRichTextService.subList(richTextList, fromIndex, fromIndex + pageCount);
return
Result
.
success
().
setContent
(
richTextList
);
}
@GetMapping
(
value
=
"/qrCode/{id}"
)
@ApiOperation
(
value
=
"生成签到二维码"
,
notes
=
"生成签到二维码"
,
tags
=
"生成签到二维码"
)
public
void
getRichTextQrCode
(
@PathVariable
(
"id"
)
int
id
,
HttpServletResponse
response
)
{
log
.
info
(
"Generating QR Code for ID: "
+
id
);
response
.
setContentType
(
"image/png"
);
response
.
setHeader
(
"Pragma"
,
"no-cache"
);
response
.
setHeader
(
"Cache-Control"
,
"no-cache"
);
response
.
setDateHeader
(
"Expires"
,
0
);
try
(
OutputStream
os
=
response
.
getOutputStream
())
{
BufferedImage
buffImg
=
richTextService
.
getQrCode
(
id
);
ImageIO
.
write
(
buffImg
,
"png"
,
os
);
}
catch
(
IOException
e
)
{
log
.
error
(
"Error generating QR Code: "
+
e
.
getMessage
(),
e
);
}
}
}
src/main/webapp/WEB-INF/views/cmpt/module.jsp
View file @
1d656452
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/views/cmpt/service.jsp
View file @
1d656452
This diff is collapsed.
Click to expand it.
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