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
5de6b90e
Commit
5de6b90e
authored
Aug 18, 2020
by
jscat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nyx javaapp: 数据优化
1. 为活动添加精简标题(6字以内) 2. 为order查询添加类似 00::20的查询方式 ids字段 3. 为活动查询添加日期范围查询 curDate字段 4.
parent
c4be01c5
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
43 行增加
和
13 行删除
+43
-13
增值产品-小程序及app/nyx_app_key/api/src/main/java/cn/com/fun/nyxkey/api/domain/Rockwell_keyV_activity_info.java
+2
-1
增值产品-小程序及app/nyx_app_key/api/src/main/java/cn/com/fun/nyxkey/api/domain/query/Rockwell_keyT_activityQuery.java
+16
-1
增值产品-小程序及app/nyx_app_key/api/src/main/java/cn/com/fun/nyxkey/api/domain/query/Rockwell_keyT_orderQuery.java
+3
-1
增值产品-小程序及app/nyx_app_key/api/src/main/java/cn/com/fun/nyxkey/api/service/Rockwell_keyService.java
+2
-2
增值产品-小程序及app/nyx_app_key/api/src/main/java/cn/com/fun/nyxkey/api/service/impl/Rockwell_keyServiceImpl.java
+6
-3
增值产品-小程序及app/nyx_app_key/api/src/main/java/cn/com/fun/nyxkey/api/web/controller/NyxApiController.java
+4
-2
增值产品-小程序及app/nyx_app_key/api/src/main/resources/cn/com/fun/nyxkey/api/repository/Rockwell_keyMapper.xml
+10
-3
没有找到文件。
增值产品-小程序及app/nyx_app_key/api/src/main/java/cn/com/fun/nyxkey/api/domain/Rockwell_keyV_activity_info.java
查看文件 @
5de6b90e
packa
ge
cn
.
com
.
fun
.
nyxkey
.
api
.
domain
;
packa
ge
cn
.
com
.
fun
.
nyxkey
.
api
.
domain
;
...
...
@@ -24,6 +24,7 @@ public class Rockwell_keyV_activity_info{
private
String
tag
;
// 活动的标签
private
String
title
;
// 活动的标题
private
String
titleAbbr
;
// 活动的标题.简称
private
String
numLike
;
// 针对每条activity的点赞次数,每点一次,则累加
private
String
content
;
// 活动内容
private
String
quiz
;
// quiz题目列表, 通过::做间隔,
...
...
增值产品-小程序及app/nyx_app_key/api/src/main/java/cn/com/fun/nyxkey/api/domain/query/Rockwell_keyT_activityQuery.java
查看文件 @
5de6b90e
packa
ge
cn
.
com
.
fun
.
nyxkey
.
api
.
domain
.
query
;
packa
ge
cn
.
com
.
fun
.
nyxkey
.
api
.
domain
.
query
;
...
...
@@ -25,6 +25,8 @@ public class Rockwell_keyT_activityQuery {
private
String
tag
;
// 发布的标签,比如: 酒单;;活动;;心情;;饮事;;最热Gluh Wein
private
String
title
;
// 发布标题,比如:此生必去系列。
private
String
curDate
;
// format: 202008
private
Pagination
pagination
;
//默认返回1页4条记录
...
...
@@ -105,6 +107,18 @@ public class Rockwell_keyT_activityQuery {
}
}
public
void
setCurDate
(
String
strCurDate
)
{
if
(
strCurDate
.
equals
(
"0"
))
{
this
.
curDate
=
null
;
}
else
{
this
.
curDate
=
strCurDate
;
}
}
@Override
public
String
toString
()
{
...
...
@@ -116,6 +130,7 @@ public class Rockwell_keyT_activityQuery {
"memberStatus='"
+
memberStatus
+
'\''
+
"tag='"
+
tag
+
'\''
+
"title='"
+
title
+
'\''
+
"curDate='"
+
curDate
+
'\''
+
"pagination='"
+
pagination
+
'\''
+
'}'
;
}
...
...
增值产品-小程序及app/nyx_app_key/api/src/main/java/cn/com/fun/nyxkey/api/domain/query/Rockwell_keyT_orderQuery.java
查看文件 @
5de6b90e
packa
ge
cn
.
com
.
fun
.
nyxkey
.
api
.
domain
.
query
;
packa
ge
cn
.
com
.
fun
.
nyxkey
.
api
.
domain
.
query
;
...
...
@@ -21,6 +21,7 @@ public class Rockwell_keyT_orderQuery {
private
String
memberId
;
// 商家id
private
String
userId
;
// 用户名称
private
String
orderStatus
;
// 订单状态: 00-订单取消, 10-未付款, 20-可使用, 30-已完成
private
List
<
String
>
ids
;
// 订单状态: 00-订单取消, 10-未付款, 20-可使用, 30-已完成
private
String
title
;
// 发布标题,比如:此生必去系列。
...
...
@@ -102,6 +103,7 @@ public class Rockwell_keyT_orderQuery {
"userId='"
+
userId
+
'\''
+
"orderStatus='"
+
orderStatus
+
'\''
+
"title='"
+
title
+
'\''
+
"ids='"
+
ids
+
'\''
+
"pagination='"
+
pagination
+
'\''
+
'}'
;
}
...
...
增值产品-小程序及app/nyx_app_key/api/src/main/java/cn/com/fun/nyxkey/api/service/Rockwell_keyService.java
查看文件 @
5de6b90e
packa
ge
cn
.
com
.
fun
.
nyxkey
.
api
.
service
;
packa
ge
cn
.
com
.
fun
.
nyxkey
.
api
.
service
;
...
...
@@ -44,7 +44,7 @@ public interface Rockwell_keyService {
activity api
*/
JSONResult
Rockwell_keyServiceGetV_activity_info
(
String
tag
,
String
title
,
String
memberId
,
String
memberName
,
String
memberStatus
,
String
memberId
,
String
memberName
,
String
memberStatus
,
String
curDate
,
int
pageNum
,
int
pageCount
);
JSONResult
Rockwell_keyServiceGetV_activity_detail_by_id
(
String
activityId
);
...
...
增值产品-小程序及app/nyx_app_key/api/src/main/java/cn/com/fun/nyxkey/api/service/impl/Rockwell_keyServiceImpl.java
查看文件 @
5de6b90e
packa
ge
cn
.
com
.
fun
.
nyxkey
.
api
.
service
.
impl
;
packa
ge
cn
.
com
.
fun
.
nyxkey
.
api
.
service
.
impl
;
...
...
@@ -303,7 +303,7 @@ public class Rockwell_keyServiceImpl implements Rockwell_keyService {
public
JSONResult
Rockwell_keyServiceGetV_activity_info
(
String
tag
,
String
title
,
String
memberId
,
String
memberName
,
String
memberStatus
,
String
memberId
,
String
memberName
,
String
memberStatus
,
String
curDate
,
int
pageNum
,
int
pageCount
)
{
LOGGER
.
debug
(
"find Rockwell_keyServiceGetV_activity_info"
);
...
...
@@ -325,6 +325,7 @@ public class Rockwell_keyServiceImpl implements Rockwell_keyService {
rockwell_keyT_activityQuery
.
setMemberName
(
memberName
);
rockwell_keyT_activityQuery
.
setTag
(
tag
);
rockwell_keyT_activityQuery
.
setTitle
(
title
);
rockwell_keyT_activityQuery
.
setCurDate
(
curDate
);
rockwell_keyT_activityQuery
.
setPagination
(
new
Pagination
(
pageNum
,
pageCount
));
listRockwell_keyV_activity_info
=
rockwell_keyMapper
.
getV_activity_info_by_page
(
rockwell_keyT_activityQuery
);
...
...
@@ -430,7 +431,9 @@ public class Rockwell_keyServiceImpl implements Rockwell_keyService {
// }
rockwell_keyT_orderQuery
.
setUserId
(
userId
);
rockwell_keyT_orderQuery
.
setOrderStatus
(
orderStatus
);
// rockwell_keyT_orderQuery.setOrderStatus(orderStatus);
List
<
String
>
ids
=
Arrays
.
asList
(
orderStatus
.
split
(
"::"
));
rockwell_keyT_orderQuery
.
setIds
(
ids
);
rockwell_keyT_orderQuery
.
setPagination
(
new
Pagination
(
pageNum
,
pageCount
));
listRockwell_keyV_order_info
=
rockwell_keyMapper
.
getV_order_detail_by_page
(
rockwell_keyT_orderQuery
);
...
...
增值产品-小程序及app/nyx_app_key/api/src/main/java/cn/com/fun/nyxkey/api/web/controller/NyxApiController.java
查看文件 @
5de6b90e
packa
ge
cn
.
com
.
fun
.
nyxkey
.
api
.
web
.
controller
;
packa
ge
cn
.
com
.
fun
.
nyxkey
.
api
.
web
.
controller
;
...
...
@@ -269,6 +269,7 @@ public class NyxApiController {
@ApiImplicitParam
(
name
=
"memberId"
,
value
=
"按商家id查找"
,
required
=
false
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"memberName"
,
value
=
"按商家名称查找"
,
required
=
false
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"memberStatus"
,
value
=
"按商家 状态查找"
,
required
=
false
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"curDate"
,
value
=
"按月份查找"
,
required
=
false
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"pageNum"
,
value
=
"页码,从1开始"
,
required
=
false
,
dataType
=
"String"
,
defaultValue
=
"1"
),
@ApiImplicitParam
(
name
=
"pageCount"
,
value
=
"每页的数据个数,默认是4个"
,
required
=
false
,
dataType
=
"String"
,
defaultValue
=
"4"
)
})
...
...
@@ -279,10 +280,11 @@ public class NyxApiController {
@RequestParam
(
value
=
"memberId"
,
required
=
false
,
defaultValue
=
"0"
)
String
memberId
,
@RequestParam
(
value
=
"memberName"
,
required
=
false
,
defaultValue
=
"0"
)
String
memberName
,
@RequestParam
(
value
=
"memberStatus"
,
required
=
false
,
defaultValue
=
"0"
)
String
memberStatus
,
@RequestParam
(
value
=
"curDate"
,
required
=
false
,
defaultValue
=
"0"
)
String
curDate
,
@RequestParam
(
value
=
"pageNum"
,
required
=
false
,
defaultValue
=
"1"
)
int
pageNum
,
@RequestParam
(
value
=
"pageCount"
,
required
=
false
,
defaultValue
=
"4"
)
int
pageCount
)
{
return
keyService
.
Rockwell_keyServiceGetV_activity_info
(
tag
,
title
,
memberId
,
memberName
,
memberStatus
,
pageNum
,
pageCount
);
return
keyService
.
Rockwell_keyServiceGetV_activity_info
(
tag
,
title
,
memberId
,
memberName
,
memberStatus
,
curDate
,
pageNum
,
pageCount
);
}
// 3.2 获取 view_activity_detail 的数据 by activityId
...
...
增值产品-小程序及app/nyx_app_key/api/src/main/resources/cn/com/fun/nyxkey/api/repository/Rockwell_keyMapper.xml
查看文件 @
5de6b90e
<?xml
version="1.0" encoding="UTF-8"?>
<?xml
version="1.0" encoding="UTF-8"?>
...
...
@@ -242,6 +242,10 @@ limitations under the License.
<if
test=
"title != null and title != '' "
>
AND ( tag LIKE CONCAT('%', #{title} ,'%') OR title LIKE CONCAT('%', #{title} ,'%') OR member_name LIKE CONCAT('%', #{title} ,'%') )
</if>
<if
test=
"curDate != null and curDate != '' "
>
AND #{curDate}
>
= DATE_FORMAT(start_datetime,'%Y-%m')
AND #{curDate}
<
= DATE_FORMAT(end_datetime,'%Y-%m')
</if>
<if
test=
"pagination != null "
>
<include
refid=
"pagination"
/>
</if>
...
...
@@ -307,8 +311,11 @@ limitations under the License.
<if
test=
"userId != null and userId != '' "
>
AND user_id=#{userId}
</if>
<if
test=
"orderStatus != null and orderStatus != '' "
>
AND order_status=#{orderStatus}
<if
test=
"ids != null and ids.size > 0"
>
AND order_status IN
<foreach
item=
"item"
index=
"index"
collection=
"ids"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
<if
test=
"pagination != null "
>
<include
refid=
"pagination"
/>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论