Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
auth-master
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
吴超
auth-master
Commits
0c051ab4
Commit
0c051ab4
authored
Oct 28, 2025
by
周海峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
菜谱线路改为查询
parent
d4dde8fe
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
120 行增加
和
104 行删除
+120
-104
src/main/java/com/metro/auth/platform/controller/PlatformRecipesController.java
+8
-0
src/main/java/com/metro/auth/platform/mapper/PlatformRecipesMapper.java
+6
-0
src/main/java/com/metro/auth/platform/mapper/PlatformRecipesMapper.xml
+43
-63
src/main/java/com/metro/auth/platform/service/PlatformRecipesService.java
+5
-0
src/main/java/com/metro/auth/platform/service/PlatformRecipesServiceImpl.java
+58
-41
没有找到文件。
src/main/java/com/metro/auth/platform/controller/PlatformRecipesController.java
View file @
0c051ab4
...
...
@@ -185,4 +185,12 @@ public class PlatformRecipesController {
Pagination
pagination
=
new
Pagination
(
page
.
getList
(),
new
Long
(
page
.
getTotal
()),
pageSize
,
pageIndex
);
return
ResultJson
.
ok
(
pagination
);
}
/**
* 查询所有线路
*/
@GetMapping
(
"/lineList"
)
public
ResultJson
lineList
(){
return
ResultJson
.
ok
(
platformRecipesService
.
selectLine
());
}
}
src/main/java/com/metro/auth/platform/mapper/PlatformRecipesMapper.java
View file @
0c051ab4
...
...
@@ -99,4 +99,9 @@ public interface PlatformRecipesMapper {
int
updateStatusByPrimaryKey
(
PlatformRecipes
record
);
PlatformRecipes
loadByDateAndLine
(
Map
params
);
/**
* 查询所有线路
*/
List
<
PlatformRecipes
>
selectLine
();
}
\ No newline at end of file
src/main/java/com/metro/auth/platform/mapper/PlatformRecipesMapper.xml
View file @
0c051ab4
...
...
@@ -2,31 +2,24 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.metro.auth.platform.mapper.PlatformRecipesMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.metro.auth.platform.domain.auth.PlatformRecipes"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"id"
jdbcType=
"VARCHAR"
property=
"id"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"datetime"
jdbcType=
"VARCHAR"
property=
"datetime"
/>
<result
column=
"weekday"
jdbcType=
"VARCHAR"
property=
"weekday"
/>
<result
column=
"memo"
jdbcType=
"VARCHAR"
property=
"memo"
/>
<result
column=
"status"
jdbcType=
"VARCHAR"
property=
"status"
/>
<result
column=
"am_zs"
jdbcType=
"VARCHAR"
property=
"am_zs"
/>
<result
column=
"am_fs"
jdbcType=
"VARCHAR"
property=
"am_fs"
/>
<result
column=
"am_qt"
jdbcType=
"VARCHAR"
property=
"am_qt"
/>
<result
column=
"pm_zs"
jdbcType=
"VARCHAR"
property=
"pm_zs"
/>
<result
column=
"pm_fs"
jdbcType=
"VARCHAR"
property=
"pm_fs"
/>
<result
column=
"pm_bc"
jdbcType=
"VARCHAR"
property=
"pm_bc"
/>
<result
column=
"pm_qt"
jdbcType=
"VARCHAR"
property=
"pm_qt"
/>
<result
column=
"soup"
jdbcType=
"VARCHAR"
property=
"soup"
/>
<result
column=
"line"
jdbcType=
"VARCHAR"
property=
"line"
/>
<id
column=
"id"
jdbcType=
"VARCHAR"
property=
"id"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"datetime"
jdbcType=
"VARCHAR"
property=
"datetime"
/>
<result
column=
"weekday"
jdbcType=
"VARCHAR"
property=
"weekday"
/>
<result
column=
"memo"
jdbcType=
"VARCHAR"
property=
"memo"
/>
<result
column=
"status"
jdbcType=
"VARCHAR"
property=
"status"
/>
<result
column=
"am_zs"
jdbcType=
"VARCHAR"
property=
"am_zs"
/>
<result
column=
"am_fs"
jdbcType=
"VARCHAR"
property=
"am_fs"
/>
<result
column=
"am_qt"
jdbcType=
"VARCHAR"
property=
"am_qt"
/>
<result
column=
"pm_zs"
jdbcType=
"VARCHAR"
property=
"pm_zs"
/>
<result
column=
"pm_fs"
jdbcType=
"VARCHAR"
property=
"pm_fs"
/>
<result
column=
"pm_bc"
jdbcType=
"VARCHAR"
property=
"pm_bc"
/>
<result
column=
"pm_qt"
jdbcType=
"VARCHAR"
property=
"pm_qt"
/>
<result
column=
"soup"
jdbcType=
"VARCHAR"
property=
"soup"
/>
<result
column=
"line"
jdbcType=
"VARCHAR"
property=
"line"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -44,7 +37,8 @@
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
...
...
@@ -55,11 +49,8 @@
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
...
...
@@ -77,7 +68,8 @@
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
...
...
@@ -88,65 +80,52 @@
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, title, datetime, weekday, memo, status,am_zs,am_fs,am_qt,pm_zs,pm_fs,pm_qt,pm_bc,soup,line
</sql>
<select
id=
"selectByExample"
parameterType=
"com.metro.auth.platform.domain.auth.PlatformRecipesExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<select
id=
"selectByExample"
parameterType=
"com.metro.auth.platform.domain.auth.PlatformRecipesExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from platform_recipes
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from platform_recipes
where id = #{id,jdbcType=VARCHAR}
</select>
<select
id=
"loadByDateAndLine"
resultMap=
"BaseResultMap"
parameterType=
"map"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select * from platform_recipes where datetime = #{datetime} and line = #{line} limit 1
</select>
<!-- 查询所有线路-->
<select
id=
"selectLine"
resultMap=
"BaseResultMap"
>
select line from platform_recipes group by line
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from platform_recipes
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.metro.auth.platform.domain.auth.PlatformRecipesExample"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from platform_recipes
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.metro.auth.platform.domain.auth.PlatformRecipes"
>
...
...
@@ -214,14 +193,15 @@
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.metro.auth.platform.domain.auth.PlatformRecipesExample"
resultType=
"java.lang.Long"
>
<select
id=
"countByExample"
parameterType=
"com.metro.auth.platform.domain.auth.PlatformRecipesExample"
resultType=
"java.lang.Long"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from platform_recipes
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
...
...
@@ -278,7 +258,7 @@
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
...
...
@@ -303,7 +283,7 @@
soup = #{record.soup,jdbcType=VARCHAR},
line = #{record.line,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.metro.auth.platform.domain.auth.PlatformRecipes"
>
...
...
@@ -380,7 +360,7 @@
line = #{line,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<update
id=
"updateStatusByPrimaryKey"
parameterType=
"com.metro.auth.platform.domain.auth.PlatformRecipes"
>
<update
id=
"updateStatusByPrimaryKey"
parameterType=
"com.metro.auth.platform.domain.auth.PlatformRecipes"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
...
...
src/main/java/com/metro/auth/platform/service/PlatformRecipesService.java
View file @
0c051ab4
...
...
@@ -40,4 +40,9 @@ public interface PlatformRecipesService {
PlatformRecipes
loadByDateAndLine
(
Map
params
);
void
updateRecipesStatus
(
String
status
,
String
ids
);
/**
* 查询所有线路
*/
List
<
PlatformRecipes
>
selectLine
();
}
src/main/java/com/metro/auth/platform/service/PlatformRecipesServiceImpl.java
View file @
0c051ab4
...
...
@@ -21,24 +21,27 @@ import java.util.UUID;
@Slf4j
@Service
public
class
PlatformRecipesServiceImpl
implements
PlatformRecipesService
{
public
class
PlatformRecipesServiceImpl
implements
PlatformRecipesService
{
@Resource
private
PlatformRecipesMapper
platformRecipesMapper
;
private
final
JwtUtils
jwtTokenUtil
;
public
PlatformRecipesServiceImpl
(
JwtUtils
jwtTokenUtil
)
{
this
.
jwtTokenUtil
=
jwtTokenUtil
;
}
@Resource
public
HttpAPIService
httpAPIService
;
@Override
@DataDictClass
public
List
<
PlatformRecipes
>
selectByExample
(
PlatformRecipes
platformRecipes
)
{
PlatformRecipesExample
example
=
new
PlatformRecipesExample
();
PlatformRecipesExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(!
EmptyUtilHelper
.
isEmpty
(
platformRecipes
.
getDatetime
())){
PlatformRecipesExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(!
EmptyUtilHelper
.
isEmpty
(
platformRecipes
.
getDatetime
()))
{
criteria
.
andDatetimeGreaterThanOrEqualTo
(
platformRecipes
.
getDatetime
());
}
if
(!
EmptyUtilHelper
.
isEmpty
(
platformRecipes
.
getLine
())){
if
(!
EmptyUtilHelper
.
isEmpty
(
platformRecipes
.
getLine
()))
{
criteria
.
andLineEqualTo
(
platformRecipes
.
getLine
());
}
criteria
.
andStatusEqualTo
(
"1"
);
...
...
@@ -46,15 +49,16 @@ public class PlatformRecipesServiceImpl implements PlatformRecipesService{
return
platformRecipesMapper
.
selectByExample
(
example
);
}
@Override
@DataDictClass
public
List
<
PlatformRecipes
>
selectByExampleForexcel
(
PlatformRecipes
platformRecipes
)
{
PlatformRecipesExample
example
=
new
PlatformRecipesExample
();
PlatformRecipesExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(!
EmptyUtilHelper
.
isEmpty
(
platformRecipes
.
getDatetime
())){
PlatformRecipesExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(!
EmptyUtilHelper
.
isEmpty
(
platformRecipes
.
getDatetime
()))
{
criteria
.
andDatetimeGreaterThanOrEqualTo
(
platformRecipes
.
getDatetime
());
}
if
(!
EmptyUtilHelper
.
isEmpty
(
platformRecipes
.
getLine
())){
if
(!
EmptyUtilHelper
.
isEmpty
(
platformRecipes
.
getLine
()))
{
criteria
.
andLineEqualTo
(
platformRecipes
.
getLine
());
}
// criteria.andStatusEqualTo("1");
...
...
@@ -62,9 +66,10 @@ public class PlatformRecipesServiceImpl implements PlatformRecipesService{
return
platformRecipesMapper
.
selectByExample
(
example
);
}
@Override
public
int
savePlatformRecipes
(
PlatformRecipes
entity
)
{
int
flag
=
0
;
public
int
savePlatformRecipes
(
PlatformRecipes
entity
)
{
int
flag
=
0
;
Date
d
=
new
Date
();
//获取最新id
String
uuid
=
UUID
.
randomUUID
().
toString
();
...
...
@@ -73,48 +78,47 @@ public class PlatformRecipesServiceImpl implements PlatformRecipesService{
if
(
StringUtil
.
isEmpty
(
entity
.
getStatus
()))
{
entity
.
setStatus
(
"1"
);
}
flag
=
platformRecipesMapper
.
insert
(
entity
);
flag
=
platformRecipesMapper
.
insert
(
entity
);
return
flag
;
}
/**
*
* @param entity
* @return
*/
@Override
public
int
saveUpdatePlatformRecipes
(
PlatformRecipes
entity
)
{
int
flag
=
0
;
flag
=
platformRecipesMapper
.
updateByPrimaryKey
(
entity
);
public
int
saveUpdatePlatformRecipes
(
PlatformRecipes
entity
)
{
int
flag
=
0
;
flag
=
platformRecipesMapper
.
updateByPrimaryKey
(
entity
);
return
flag
;
}
/**
*
* @param id
* @return
*/
@Override
public
int
delPlatformRecipes
(
String
id
)
{
int
flag
=
platformRecipesMapper
.
deleteByPrimaryKey
(
id
);
public
int
delPlatformRecipes
(
String
id
)
{
int
flag
=
platformRecipesMapper
.
deleteByPrimaryKey
(
id
);
return
flag
;
}
/**
*根据id更新启用状态
* 根据id更新启用状态
*
* @param entity
* @return
*/
@Override
public
int
updatePlatformRecipesStatusById
(
PlatformRecipes
entity
)
{
int
flag
=
0
;
public
int
updatePlatformRecipesStatusById
(
PlatformRecipes
entity
)
{
int
flag
=
0
;
//更改状态
flag
=
platformRecipesMapper
.
updateStatusByPrimaryKey
(
entity
);
flag
=
platformRecipesMapper
.
updateStatusByPrimaryKey
(
entity
);
return
flag
;
}
/**
*
* @param platformRecipes
* @param pageNum
* @param pageSize
...
...
@@ -128,49 +132,54 @@ public class PlatformRecipesServiceImpl implements PlatformRecipesService{
PlatformRecipesExample
platformRecipesExample
=
new
PlatformRecipesExample
();
PlatformRecipesExample
.
Criteria
criteria
=
platformRecipesExample
.
createCriteria
();
//搜索
if
(
platformRecipes
!=
null
)
{
if
(!
EmptyUtilHelper
.
isEmpty
(
platformRecipes
.
getTitle
()))
{
criteria
.
andTitleLike
(
"%"
+
platformRecipes
.
getTitle
()+
"%"
);
if
(
platformRecipes
!=
null
)
{
if
(!
EmptyUtilHelper
.
isEmpty
(
platformRecipes
.
getTitle
()))
{
criteria
.
andTitleLike
(
"%"
+
platformRecipes
.
getTitle
()
+
"%"
);
}
if
(!
EmptyUtilHelper
.
isEmpty
(
platformRecipes
.
getLine
()))
{
criteria
.
andLineLike
(
"%"
+
platformRecipes
.
getLine
()+
"%"
);
if
(!
EmptyUtilHelper
.
isEmpty
(
platformRecipes
.
getLine
()))
{
criteria
.
andLineLike
(
"%"
+
platformRecipes
.
getLine
()
+
"%"
);
}
if
(!
EmptyUtilHelper
.
isEmpty
(
platformRecipes
.
getDatetime
()))
{
if
(!
EmptyUtilHelper
.
isEmpty
(
platformRecipes
.
getDatetime
()))
{
criteria
.
andDatetimeEqualTo
(
platformRecipes
.
getDatetime
());
}
}
platformRecipesExample
.
setOrderByClause
(
" datetime desc"
);
List
<
PlatformRecipes
>
list
=
platformRecipesMapper
.
selectByExample
(
platformRecipesExample
);
List
<
PlatformRecipes
>
list
=
platformRecipesMapper
.
selectByExample
(
platformRecipesExample
);
PageInfo
<
PlatformRecipes
>
pageInfo
=
new
PageInfo
<>(
list
);
return
pageInfo
;
}
@Override
public
PlatformRecipes
load
(
String
id
)
{
PlatformRecipes
platformRecipes
=
platformRecipesMapper
.
selectByPrimaryKey
(
id
);
public
PlatformRecipes
load
(
String
id
)
{
PlatformRecipes
platformRecipes
=
platformRecipesMapper
.
selectByPrimaryKey
(
id
);
return
platformRecipes
;
}
/**
* 批量启停,微信无操作
*
* @param status
* @param ids
*/
@Override
public
void
updateRecipesStatus
(
String
status
,
String
ids
)
{
public
void
updateRecipesStatus
(
String
status
,
String
ids
)
{
String
[]
id
=
ids
.
split
(
","
);
for
(
int
i
=
0
;
i
<
id
.
length
;
i
++
)
{
PlatformRecipes
platformRecipes
=
platformRecipesMapper
.
selectByPrimaryKey
(
id
[
i
]);
for
(
int
i
=
0
;
i
<
id
.
length
;
i
++
)
{
PlatformRecipes
platformRecipes
=
platformRecipesMapper
.
selectByPrimaryKey
(
id
[
i
]);
platformRecipes
.
setStatus
(
status
);
int
flag
=
platformRecipesMapper
.
updateStatusByPrimaryKey
(
platformRecipes
);
int
flag
=
platformRecipesMapper
.
updateStatusByPrimaryKey
(
platformRecipes
);
}
}
@Override
public
PlatformRecipes
loadByDateAndLine
(
Map
params
)
{
PlatformRecipes
platformRecipes
=
platformRecipesMapper
.
loadByDateAndLine
(
params
);
public
PlatformRecipes
loadByDateAndLine
(
Map
params
)
{
PlatformRecipes
platformRecipes
=
platformRecipesMapper
.
loadByDateAndLine
(
params
);
return
platformRecipes
;
}
@Override
@DataDictClass
public
PageInfo
<
PlatformRecipes
>
pagedlisthome
(
PlatformRecipes
platformRecipes
,
int
pageNum
,
int
pageSize
)
{
...
...
@@ -179,23 +188,31 @@ public class PlatformRecipesServiceImpl implements PlatformRecipesService{
PlatformRecipesExample
platformRecipesExample
=
new
PlatformRecipesExample
();
PlatformRecipesExample
.
Criteria
criteria
=
platformRecipesExample
.
createCriteria
();
//搜索
if
(
platformRecipes
!=
null
)
{
if
(
platformRecipes
!=
null
)
{
// if (!EmptyUtilHelper.isEmpty(platformRecipes.getTitle())){
// criteria.andTitleLike( "%"+platformRecipes.getTitle()+"%");
// }
if
(!
EmptyUtilHelper
.
isEmpty
(
platformRecipes
.
getDatetime
())){
if
(!
EmptyUtilHelper
.
isEmpty
(
platformRecipes
.
getDatetime
()))
{
criteria
.
andDatetimeEqualTo
(
platformRecipes
.
getDatetime
());
}
if
(!
EmptyUtilHelper
.
isEmpty
(
platformRecipes
.
getLine
())){
if
(!
EmptyUtilHelper
.
isEmpty
(
platformRecipes
.
getLine
()))
{
criteria
.
andLineEqualTo
(
platformRecipes
.
getLine
());
}
}
criteria
.
andStatusEqualTo
(
"1"
);
platformRecipesExample
.
setOrderByClause
(
" datetime desc"
);
List
<
PlatformRecipes
>
list
=
platformRecipesMapper
.
selectByExample
(
platformRecipesExample
);
List
<
PlatformRecipes
>
list
=
platformRecipesMapper
.
selectByExample
(
platformRecipesExample
);
PageInfo
<
PlatformRecipes
>
pageInfo
=
new
PageInfo
<>(
list
);
return
pageInfo
;
}
/**
* 查询所有线路
*/
@Override
public
List
<
PlatformRecipes
>
selectLine
()
{
return
platformRecipesMapper
.
selectLine
();
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论