Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
3425a0a2
提交
3425a0a2
authored
3月 26, 2021
作者:
吴德鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
用户导出
上级
76fc3d59
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
196 行增加
和
21 行删除
+196
-21
TbCfUserInfoController.java
.../java/com/platform/controller/TbCfUserInfoController.java
+8
-0
TbCfUserInfoDao.java
...admin/src/main/java/com/platform/dao/TbCfUserInfoDao.java
+4
-0
TbCfUserInfoService.java
...c/main/java/com/platform/service/TbCfUserInfoService.java
+2
-0
TbCfUserInfoServiceImpl.java
...va/com/platform/service/impl/TbCfUserInfoServiceImpl.java
+64
-2
TbCfUserInfoDao.xml
...n/src/main/resources/com/platform/dao/TbCfUserInfoDao.xml
+64
-0
tbcfstationitem.html
...min/src/main/webapp/WEB-INF/page/sys/tbcfstationitem.html
+1
-1
tbcfuserinfo.html
...-admin/src/main/webapp/WEB-INF/page/sys/tbcfuserinfo.html
+4
-0
common.js
platform-admin/src/main/webapp/js/common.js
+1
-1
tbcfuserinfo.js
platform-admin/src/main/webapp/js/sys/tbcfuserinfo.js
+32
-17
pom.xml
platform-common/pom.xml
+16
-0
没有找到文件。
platform-admin/src/main/java/com/platform/controller/TbCfUserInfoController.java
浏览文件 @
3425a0a2
...
...
@@ -240,4 +240,12 @@ public class TbCfUserInfoController {
}
@PostMapping
(
"/exportUserData"
)
@RequiresPermissions
(
"tbcfuserinfo:export"
)
@ResponseBody
public
R
exportUserData
(
@RequestBody
String
[]
ids
,
@RequestParam
Map
<
String
,
Object
>
map
)
{
tbCfUserInfoService
.
exportUserData
(
ids
,
map
);
return
R
.
ok
();
}
}
platform-admin/src/main/java/com/platform/dao/TbCfUserInfoDao.java
浏览文件 @
3425a0a2
...
...
@@ -58,4 +58,8 @@ public interface TbCfUserInfoDao extends BaseDao<TbCfUserInfoEntity> {
BigDecimal
getUserBonus
(
String
userId
);
String
getParentUser
(
String
userId
);
List
<
TbCfUserInfoEntity
>
getUsers
(
String
[]
userIds
);
List
<
TbCfUserInfoEntity
>
getUserList
(
Map
<
String
,
Object
>
map
);
}
platform-admin/src/main/java/com/platform/service/TbCfUserInfoService.java
浏览文件 @
3425a0a2
...
...
@@ -109,4 +109,6 @@ public interface TbCfUserInfoService {
int
getUserNetworkCount
(
Map
<
String
,
Object
>
params
);
String
getParentUser
(
String
userId
);
void
exportUserData
(
String
[]
userIds
,
Map
<
String
,
Object
>
map
);
}
platform-admin/src/main/java/com/platform/service/impl/TbCfUserInfoServiceImpl.java
浏览文件 @
3425a0a2
...
...
@@ -10,6 +10,7 @@ import com.platform.utils.excel.ExcelExport;
import
com.platform.utils.excel.ExcelImport
;
import
com.platform.vo.Network
;
import
com.platform.vo.StatisticalVo
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -256,12 +257,73 @@ public class TbCfUserInfoServiceImpl implements TbCfUserInfoService {
* @param filename 文件名称
*/
public
String
getAbsoluteFile
(
String
filename
)
{
// String downloadPath = "D:\\virtual
\\" + filename;
String
downloadPath
=
"/home/virtual
/uploadPath"
+
filename
;
String
downloadPath
=
"D:\\afrishop
\\"
+
filename
;
// String downloadPath = "/home/afrishop
/uploadPath" + filename;
File
desc
=
new
File
(
downloadPath
);
if
(!
desc
.
getParentFile
().
exists
())
{
desc
.
getParentFile
().
mkdirs
();
}
return
downloadPath
;
}
public
void
exportUserData
(
String
[]
userIds
,
Map
<
String
,
Object
>
map
)
{
ExcelExport
ee1
=
new
ExcelExport
();
List
<
Object
[]>
list1
=
new
ArrayList
<
Object
[]>();
List
<
TbCfUserInfoEntity
>
users
;
if
(
userIds
==
null
||
userIds
.
length
==
0
)
{
//查询符合条件的用户
users
=
tbCfUserInfoDao
.
getUserList
(
map
);
}
else
{
//查询勾选的用户
users
=
tbCfUserInfoDao
.
getUsers
(
userIds
);
}
String
[]
header
=
new
String
[]{
"账号"
,
"昵称"
,
"国家"
,
"注册来源"
,
"注册时间"
,
"电话号码"
,
"邮箱"
,
"性别"
,
"facebook账号"
};
users
.
forEach
(
user
->
{
System
.
err
.
println
(
user
.
getSex
());
List
<
Object
>
obj
=
new
ArrayList
<
Object
>();
obj
.
add
(
user
.
getAccount
());
obj
.
add
(
user
.
getNick
());
obj
.
add
(
user
.
getCountry
());
String
str
=
null
;
if
(
user
.
getSource
()
!=
null
)
{
if
(
user
.
getSource
()
==
1
)
{
str
=
"app"
;
}
else
if
(
user
.
getSource
()
==
2
)
{
str
=
"pc"
;
}
else
if
(
user
.
getSource
()
==
3
)
{
str
=
"mobile"
;
}
}
obj
.
add
(
str
);
obj
.
add
(
user
.
getCreateTime
());
obj
.
add
(
user
.
getPhone
());
obj
.
add
(
user
.
getEmail
());
String
sex
=
user
.
getSex
()
==
null
?
null
:
user
.
getSex
()
==
1
?
"男"
:
user
.
getSex
()
==
2
?
"女"
:
"未知"
;
obj
.
add
(
sex
);
obj
.
add
(
user
.
getFacebook
());
list1
.
add
(
obj
.
toArray
());
});
ee1
.
addSheetByArray
(
"user"
,
list1
,
header
);
OutputStream
fis
;
try
{
String
filename
=
encodingFilename
(
"user"
);
fis
=
new
FileOutputStream
(
getAbsoluteFile
(
filename
));
ee1
.
getWorkbook
().
write
(
fis
);
}
catch
(
FileNotFoundException
e
)
{
e
.
printStackTrace
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
platform-admin/src/main/resources/com/platform/dao/TbCfUserInfoDao.xml
浏览文件 @
3425a0a2
...
...
@@ -55,6 +55,70 @@
from tb_cf_user_info
where user_id = #{id}
</select>
<select
id=
"getUsers"
resultType=
"com.platform.entity.TbCfUserInfoEntity"
>
select
`user_id`,
`user_no`,
`user_type`,
`account`,
`avatar`,
`nick`,
`phone`,
`phone_flag`,
`password`,
`last_login_time`,
`last_login_ip`,
`login_count`,
`email`,
`facebook`,
`create_time`,
`sex`,
`default_address_id`,
`invited_user_id`,
`invited_count`,
`enable_flag`,
`email_flag`,
country,
source
from tb_cf_user_info
where user_id in
<foreach
item=
"userId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{userId}
</foreach>
</select>
<select
id=
"getUserList"
resultType=
"com.platform.entity.TbCfUserInfoEntity"
>
select
`user_id`,
`user_no`,
`user_type`,
`account`,
`avatar`,
`nick`,
`phone`,
`phone_flag`,
`password`,
`last_login_time`,
`last_login_ip`,
`login_count`,
`email`,
`facebook`,
`create_time`,
`sex`,
`default_address_id`,
`invited_user_id`,
`invited_count`,
`enable_flag`,
`email_flag`,
country,
source
from tb_cf_user_info
where 1=1
<if
test=
"startTime != null and endTime != ''"
>
AND create_time between #{startTime} and #{endTime}
</if>
</select>
<!--查询每日注册量-->
<select
id=
"getDailyRegistered"
resultType=
"com.platform.vo.StatisticalVo"
>
SELECT
...
...
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfstationitem.html
浏览文件 @
3425a0a2
...
...
@@ -606,7 +606,7 @@
</i-button>
#end
#if($shiro.hasPermission("tbcfstationitem:export"))
<i-button
type=
"info"
@
click=
"export
Excel
"
><i
class=
"fa fa-chevron-down"
></i>
导出
<i-button
type=
"info"
@
click=
"export
UserData
"
><i
class=
"fa fa-chevron-down"
></i>
导出
</i-button>
#end
...
...
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfuserinfo.html
浏览文件 @
3425a0a2
...
...
@@ -99,6 +99,10 @@
#if($shiro.hasPermission("tbcfuserinfo:update"))
<i-button
type=
"warning"
@
click=
"update"
><i
class=
"fa fa-pencil-square-o"
></i>
修改
</i-button>
#end
#if($shiro.hasPermission("tbcfuserinfo:export"))
<i-button
type=
"info"
@
click=
"exportUserData"
><i
class=
"fa fa-chevron-down"
></i>
导出
</i-button>
#end
#if($shiro.hasPermission("tbcfuserinfo:delete"))
<i-button
type=
"error"
@
click=
"del"
><i
class=
"fa fa-trash-o"
></i>
删除
</i-button>
#end
...
...
platform-admin/src/main/webapp/js/common.js
浏览文件 @
3425a0a2
...
...
@@ -511,7 +511,7 @@ sexFormat = function (cellvalue) {
returnStr = "女";
}
}*/
return
cellvalue
==
0
?
'男'
:
'女'
;
return
cellvalue
==
1
?
"男"
:
cellvalue
==
2
?
"女"
:
"未知"
;
};
/**
...
...
platform-admin/src/main/webapp/js/sys/tbcfuserinfo.js
浏览文件 @
3425a0a2
...
...
@@ -61,14 +61,29 @@ let vm = new Vue({
q
:
{
name
:
''
},
isuserlist
:
false
,
//是否显示
userpage
:
1
,
//下级页码
selflist
:[],
//自己
sonlist
:[],
//下级列表
sonid
:
''
,
//查看更多时请求的id
seemore
:
true
,
//是否还有更多
isuserlist
:
false
,
//是否显示
userpage
:
1
,
//下级页码
selflist
:
[],
//自己
sonlist
:
[],
//下级列表
sonid
:
''
,
//查看更多时请求的id
seemore
:
true
,
//是否还有更多
},
methods
:
{
exportUserData
()
{
let
userIds
=
$
(
"#jqGrid"
).
getGridParam
(
"selarrrow"
);
console
.
log
(
'userIds'
,
userIds
)
Ajax
.
request
({
url
:
"../tbcfuserinfo/exportUserData"
,
params
:
JSON
.
stringify
(
userIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
query
:
function
()
{
vm
.
reload
();
},
...
...
@@ -88,7 +103,7 @@ let vm = new Vue({
vm
.
getInfo
(
userId
);
},
// 查看下级
takeman
:
function
()
{
takeman
:
function
()
{
let
userId
=
getSelectedRow
(
"#jqGrid"
);
if
(
userId
==
null
)
{
return
;
...
...
@@ -99,28 +114,28 @@ let vm = new Vue({
},
// 获取下线接口
getnext
:
function
(
id
)
{
getnext
:
function
(
id
)
{
vm
.
sonid
=
id
let
url
=
"../tbcfuserinfo/getUserNetwork?_search=falsec&nd=1615534841220&limit=12&page="
+
vm
.
userpage
+
"&sidx=order_time&order=desc&userId="
+
id
;
let
url
=
"../tbcfuserinfo/getUserNetwork?_search=falsec&nd=1615534841220&limit=12&page="
+
vm
.
userpage
+
"&sidx=order_time&order=desc&userId="
+
id
;
Ajax
.
request
({
url
:
url
,
type
:
"get"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
console
.
log
(
r
)
if
(
r
.
code
==
0
){
if
(
r
.
code
==
0
)
{
vm
.
selflist
=
r
.
list
.
parent
if
(
vm
.
userpage
==
1
){
if
(
vm
.
userpage
==
1
)
{
vm
.
sonlist
=
r
.
list
.
networks
.
list
}
else
if
(
r
.
list
.
networks
.
list
.
length
>
0
)
{
}
else
if
(
r
.
list
.
networks
.
list
.
length
>
0
)
{
var
list
=
r
.
list
.
networks
.
list
var
con
=
vm
.
sonlist
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
)
{
con
.
push
(
list
[
i
])
}
vm
.
sonlist
=
con
}
if
(
r
.
list
.
networks
.
list
.
length
!=
12
){
if
(
r
.
list
.
networks
.
list
.
length
!=
12
)
{
vm
.
seemore
=
false
}
...
...
@@ -131,12 +146,12 @@ let vm = new Vue({
});
},
// 查看更多
lookmore
:
function
()
{
lookmore
:
function
()
{
vm
.
userpage
=
vm
.
userpage
+
1
vm
.
getnext
(
vm
.
sonid
)
},
// 关闭下级列表
closebtn
:
function
()
{
closebtn
:
function
()
{
vm
.
isuserlist
=
false
vm
.
userpage
=
1
vm
.
sonid
=
''
...
...
platform-common/pom.xml
浏览文件 @
3425a0a2
...
...
@@ -25,6 +25,22 @@
</properties>
<dependencies>
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-base
</artifactId>
<version>
4.1.0
</version>
</dependency>
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-web
</artifactId>
<version>
4.1.0
</version>
</dependency>
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-annotation
</artifactId>
<version>
4.1.0
</version>
</dependency>
<dependency>
<groupId>
net.coobird
</groupId>
<artifactId>
thumbnailator
</artifactId>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论