Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
nyx
概览
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
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
发现
nyx
Commits
22eadc83
Commit
22eadc83
authored
Aug 12, 2020
by
jscat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nyx javaapp: 功能优化
1. 按matchId查询优化为两种方式 1) matchId=mid_001 2) matchId=mid_001::mid_002 可支持多id查询;
parent
bbe9c286
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
22 行增加
和
5 行删除
+22
-5
增值产品-小程序及app/nyx_app_key/api/src/main/java/cn/com/fun/nyxkey/api/domain/query/Rockwell_keyT_matchQuery.java
+3
-1
增值产品-小程序及app/nyx_app_key/api/src/main/java/cn/com/fun/nyxkey/api/service/impl/Rockwell_keyServiceImpl.java
+12
-2
增值产品-小程序及app/nyx_app_key/api/src/main/resources/cn/com/fun/nyxkey/api/repository/Rockwell_keyMapper.xml
+7
-2
没有找到文件。
增值产品-小程序及app/nyx_app_key/api/src/main/java/cn/com/fun/nyxkey/api/domain/query/Rockwell_keyT_matchQuery.java
查看文件 @
22eadc83
packa
ge
cn
.
com
.
fun
.
nyxkey
.
api
.
domain
.
query
;
packa
ge
cn
.
com
.
fun
.
nyxkey
.
api
.
domain
.
query
;
...
@@ -19,6 +19,7 @@ public class Rockwell_keyT_matchQuery {
...
@@ -19,6 +19,7 @@ public class Rockwell_keyT_matchQuery {
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
createDatetime
;
private
Date
createDatetime
;
private
String
matchId
;
private
String
matchId
;
private
List
<
String
>
ids
;
private
String
memberId
;
private
String
memberId
;
private
String
userId
;
private
String
userId
;
private
String
matchStatus
;
// 积分状态, 可用|不可用
private
String
matchStatus
;
// 积分状态, 可用|不可用
...
@@ -91,6 +92,7 @@ public class Rockwell_keyT_matchQuery {
...
@@ -91,6 +92,7 @@ public class Rockwell_keyT_matchQuery {
"userId='"
+
userId
+
'\''
+
"userId='"
+
userId
+
'\''
+
"pagination='"
+
pagination
+
'\''
+
"pagination='"
+
pagination
+
'\''
+
"listRockwell_keyT_match='"
+
listRockwell_keyT_match
+
'\''
+
"listRockwell_keyT_match='"
+
listRockwell_keyT_match
+
'\''
+
"ids='"
+
ids
+
'\''
+
'}'
;
'}'
;
}
}
}
}
增值产品-小程序及app/nyx_app_key/api/src/main/java/cn/com/fun/nyxkey/api/service/impl/Rockwell_keyServiceImpl.java
查看文件 @
22eadc83
packa
ge
cn
.
com
.
fun
.
nyxkey
.
api
.
service
.
impl
;
packa
ge
cn
.
com
.
fun
.
nyxkey
.
api
.
service
.
impl
;
...
@@ -147,7 +147,17 @@ public class Rockwell_keyServiceImpl implements Rockwell_keyService {
...
@@ -147,7 +147,17 @@ public class Rockwell_keyServiceImpl implements Rockwell_keyService {
List
<
Rockwell_keyT_match
>
listRockwell_keyT_match
=
new
ArrayList
<
Rockwell_keyT_match
>();
List
<
Rockwell_keyT_match
>
listRockwell_keyT_match
=
new
ArrayList
<
Rockwell_keyT_match
>();
Rockwell_keyT_matchQuery
rockwell_keyT_matchQuery
=
new
Rockwell_keyT_matchQuery
();
Rockwell_keyT_matchQuery
rockwell_keyT_matchQuery
=
new
Rockwell_keyT_matchQuery
();
rockwell_keyT_matchQuery
.
setMatchId
(
matchId
);
// 判断某字符串是否为空,为空的标准是 str==null 或 str.length()==0
// 对于 http://localhost:8085/api/nyx/match/query/id?matchId=
// matchId=="", ids.size == 1;
// sql 语句为 AND match_id IN ( "" )
// 问题, 需不需要禁掉,如何禁
if
(
StringUtils
.
isEmpty
(
matchId
)
||
matchId
.
equals
(
"0"
))
{
return
new
JSONResult
(
ExceptionMsg
.
ParamError
);
}
List
<
String
>
ids
=
Arrays
.
asList
(
matchId
.
split
(
"::"
));
rockwell_keyT_matchQuery
.
setIds
(
ids
);
listRockwell_keyT_match
=
rockwell_keyMapper
.
getT_match_by_matchid
(
rockwell_keyT_matchQuery
);
listRockwell_keyT_match
=
rockwell_keyMapper
.
getT_match_by_matchid
(
rockwell_keyT_matchQuery
);
int
totalCount
=
listRockwell_keyT_match
.
size
();
int
totalCount
=
listRockwell_keyT_match
.
size
();
JSONResult
jsonResult
=
new
JSONResult
(
totalCount
,
listRockwell_keyT_match
);
JSONResult
jsonResult
=
new
JSONResult
(
totalCount
,
listRockwell_keyT_match
);
...
...
增值产品-小程序及app/nyx_app_key/api/src/main/resources/cn/com/fun/nyxkey/api/repository/Rockwell_keyMapper.xml
查看文件 @
22eadc83
<?xml
version="1.0" encoding="UTF-8"?>
<?xml
version="1.0" encoding="UTF-8"?>
...
@@ -142,7 +142,12 @@ limitations under the License.
...
@@ -142,7 +142,12 @@ limitations under the License.
resultType=
"cn.com.fun.nyxkey.api.domain.Rockwell_keyT_match"
>
resultType=
"cn.com.fun.nyxkey.api.domain.Rockwell_keyT_match"
>
select * from tbl_match
select * from tbl_match
where 1=1
where 1=1
AND match_id=#{matchId}
<if
test=
"ids != null and ids.size > 0"
>
AND match_id IN
<foreach
item=
"item"
index=
"index"
collection=
"ids"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</select>
</select>
<!-- match api 1-5 获取t_match的值 update jscat 20200731 -->
<!-- match api 1-5 获取t_match的值 update jscat 20200731 -->
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论