Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
roncoo
roncoo-education
提交
0064e5af
R
roncoo-education
项目概览
roncoo
/
roncoo-education
12 个月 前同步成功
通知
146
Star
5
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
1
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roncoo-education
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
1
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0064e5af
编写于
8月 25, 2022
作者:
F
fengyw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
架构调整
上级
9ba2295e
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
1 addition
and
773 deletion
+1
-773
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/common/ReportExcelUtil.java
...ava/com/roncoo/education/user/common/ReportExcelUtil.java
+0
-82
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/LecturerAuditDao.java
.../java/com/roncoo/education/user/dao/LecturerAuditDao.java
+0
-29
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/LecturerExtDao.java
...in/java/com/roncoo/education/user/dao/LecturerExtDao.java
+0
-35
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/LecturerProfitDao.java
...java/com/roncoo/education/user/dao/LecturerProfitDao.java
+0
-17
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/PlatformDao.java
.../main/java/com/roncoo/education/user/dao/PlatformDao.java
+0
-21
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/SendSmsLogDao.java
...ain/java/com/roncoo/education/user/dao/SendSmsLogDao.java
+0
-17
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/UserExtDao.java
...c/main/java/com/roncoo/education/user/dao/UserExtDao.java
+0
-40
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/UserLogLoginDao.java
...n/java/com/roncoo/education/user/dao/UserLogLoginDao.java
+0
-17
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/UserLogModifiedDao.java
...ava/com/roncoo/education/user/dao/UserLogModifiedDao.java
+0
-17
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/impl/LecturerAuditDaoImpl.java
.../roncoo/education/user/dao/impl/LecturerAuditDaoImpl.java
+0
-64
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/impl/LecturerExtDaoImpl.java
...om/roncoo/education/user/dao/impl/LecturerExtDaoImpl.java
+0
-76
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/impl/LecturerProfitDaoImpl.java
...roncoo/education/user/dao/impl/LecturerProfitDaoImpl.java
+0
-44
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/impl/PlatformDaoImpl.java
...a/com/roncoo/education/user/dao/impl/PlatformDaoImpl.java
+0
-74
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/impl/SendSmsLogDaoImpl.java
...com/roncoo/education/user/dao/impl/SendSmsLogDaoImpl.java
+0
-44
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/impl/UserExtDaoImpl.java
...va/com/roncoo/education/user/dao/impl/UserExtDaoImpl.java
+0
-107
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/impl/UserLogLoginDaoImpl.java
...m/roncoo/education/user/dao/impl/UserLogLoginDaoImpl.java
+0
-44
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/impl/UserLogModifiedDaoImpl.java
...oncoo/education/user/dao/impl/UserLogModifiedDaoImpl.java
+0
-44
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/impl/mapper/MsgUserMapper.java
.../roncoo/education/user/dao/impl/mapper/MsgUserMapper.java
+1
-1
未找到文件。
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/common/ReportExcelUtil.java
已删除
100644 → 0
浏览文件 @
9ba2295e
package
com.roncoo.education.user.common
;
import
com.roncoo.education.common.core.base.Page
;
import
com.roncoo.education.user.feign.interfaces.vo.LecturerProfitVO
;
import
org.apache.poi.ss.usermodel.CellStyle
;
import
org.apache.poi.ss.usermodel.Font
;
import
org.apache.poi.ss.usermodel.HorizontalAlignment
;
import
org.apache.poi.ss.usermodel.VerticalAlignment
;
import
org.apache.poi.xssf.streaming.SXSSFCell
;
import
org.apache.poi.xssf.streaming.SXSSFRow
;
import
org.apache.poi.xssf.streaming.SXSSFSheet
;
import
org.apache.poi.xssf.streaming.SXSSFWorkbook
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
/**
* @author WY
*/
public
final
class
ReportExcelUtil
{
private
final
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ReportExcelUtil
.
class
);
public
static
void
exportExcelForLecturerProfit
(
HttpServletResponse
response
,
Page
<
LecturerProfitVO
>
result
)
throws
IOException
{
// 创建一个workbook 对应一个excel文件
final
SXSSFWorkbook
workBook
=
new
SXSSFWorkbook
();
SXSSFSheet
sheet
=
workBook
.
createSheet
(
"讲师分润报表"
);
// 列名和列宽
String
[]
names
=
{
"讲师名称"
,
"银行卡号"
,
"银行名称"
,
"银行开户名"
,
"讲师分润(元)"
,
"平台分润(元)"
,
"时间"
};
// 表头
Integer
[]
widths
=
{
25
,
15
,
15
,
25
,
25
,
25
,
25
};
// 列宽
// 创建第一行
SXSSFRow
row
=
sheet
.
createRow
(
0
);
// 设置第一行样式
CellStyle
headStyle
=
workBook
.
createCellStyle
();
headStyle
.
setAlignment
(
HorizontalAlignment
.
CENTER_SELECTION
);
// 水平居中
headStyle
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
// 垂直居中
// 设置第一行字体
Font
headFont
=
workBook
.
createFont
();
headFont
.
setBold
(
true
);
headStyle
.
setFont
(
headFont
);
// 设置第一行单元格内容、单元格样式
for
(
int
i
=
0
;
i
<
names
.
length
;
i
++)
{
SXSSFCell
cell
=
row
.
createCell
(
i
);
cell
.
setCellValue
(
names
[
i
]);
cell
.
setCellStyle
(
headStyle
);
sheet
.
setColumnWidth
(
i
,
widths
[
i
]
*
256
);
}
// 从第二行开始遍历出分润记录表的数据,再写入单元格
SXSSFRow
row1
=
sheet
.
createRow
(
1
);
int
r
=
1
;
for
(
LecturerProfitVO
bean
:
result
.
getList
())
{
row1
=
sheet
.
createRow
(
r
++);
row1
.
createCell
(
0
).
setCellValue
(
bean
.
getLecturerVO
().
getLecturerName
());
row1
.
createCell
(
1
).
setCellValue
(
bean
.
getBankCardNo
());
row1
.
createCell
(
2
).
setCellValue
(
bean
.
getBankName
());
row1
.
createCell
(
3
).
setCellValue
(
bean
.
getBankUserName
());
row1
.
createCell
(
4
).
setCellValue
(
bean
.
getLecturerProfit
().
doubleValue
());
row1
.
createCell
(
5
).
setCellValue
(
bean
.
getPlatformProfit
().
doubleValue
());
row1
.
createCell
(
6
).
setCellValue
(
new
SimpleDateFormat
(
"yyyy/MM/dd"
).
format
(
bean
.
getGmtCreate
()));
}
try
{
workBook
.
write
(
response
.
getOutputStream
());
response
.
getOutputStream
().
flush
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
finally
{
if
(
response
.
getOutputStream
()
!=
null
)
response
.
getOutputStream
().
close
();
if
(
workBook
!=
null
)
workBook
.
close
();
}
}
}
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/LecturerAuditDao.java
已删除
100644 → 0
浏览文件 @
9ba2295e
package
com.roncoo.education.user.dao
;
import
com.roncoo.education.common.core.base.Page
;
import
com.roncoo.education.user.dao.impl.mapper.entity.LecturerAudit
;
import
com.roncoo.education.user.dao.impl.mapper.entity.LecturerAuditExample
;
public
interface
LecturerAuditDao
{
int
save
(
LecturerAudit
record
);
int
deleteById
(
Long
id
);
int
updateById
(
LecturerAudit
record
);
LecturerAudit
getById
(
Long
id
);
Page
<
LecturerAudit
>
listForPage
(
int
pageCurrent
,
int
pageSize
,
LecturerAuditExample
example
);
/**
* 根据讲师编号查询讲师账户信息
*
* @param orgNo
* @param lecturerUserNo
* @return
* @author LHR
*/
LecturerAudit
getByLecturerUserNo
(
Long
lecturerUserNo
);
}
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/LecturerExtDao.java
已删除
100644 → 0
浏览文件 @
9ba2295e
package
com.roncoo.education.user.dao
;
import
com.roncoo.education.common.core.base.Page
;
import
com.roncoo.education.user.dao.impl.mapper.entity.LecturerExt
;
import
com.roncoo.education.user.dao.impl.mapper.entity.LecturerExtExample
;
public
interface
LecturerExtDao
{
int
save
(
LecturerExt
record
);
int
deleteById
(
Long
id
);
int
updateById
(
LecturerExt
record
);
LecturerExt
getById
(
Long
id
);
Page
<
LecturerExt
>
listForPage
(
int
pageCurrent
,
int
pageSize
,
LecturerExtExample
example
);
/**
* 根据传入讲师用户编号获取讲师账户信息
*
* @param lecturerUserNo
* @return
*/
LecturerExt
getByLecturerUserNo
(
Long
lecturerUserNo
);
/**
* 根据传入讲师用户编号更新讲师账户信息
*
* @param lecturerUserNo
* @return
* @author wuyun
*/
int
updateByLecturerUserNo
(
LecturerExt
record
);
}
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/LecturerProfitDao.java
已删除
100644 → 0
浏览文件 @
9ba2295e
package
com.roncoo.education.user.dao
;
import
com.roncoo.education.common.core.base.Page
;
import
com.roncoo.education.user.dao.impl.mapper.entity.LecturerProfit
;
import
com.roncoo.education.user.dao.impl.mapper.entity.LecturerProfitExample
;
public
interface
LecturerProfitDao
{
int
save
(
LecturerProfit
record
);
int
deleteById
(
Long
id
);
int
updateById
(
LecturerProfit
record
);
LecturerProfit
getById
(
Long
id
);
Page
<
LecturerProfit
>
listForPage
(
int
pageCurrent
,
int
pageSize
,
LecturerProfitExample
example
);
}
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/PlatformDao.java
已删除
100644 → 0
浏览文件 @
9ba2295e
package
com.roncoo.education.user.dao
;
import
com.roncoo.education.common.core.base.Page
;
import
com.roncoo.education.user.dao.impl.mapper.entity.Platform
;
import
com.roncoo.education.user.dao.impl.mapper.entity.PlatformExample
;
public
interface
PlatformDao
{
int
save
(
Platform
record
);
int
deleteById
(
Long
id
);
int
updateById
(
Platform
record
);
Platform
getById
(
Long
id
);
Page
<
Platform
>
listForPage
(
int
pageCurrent
,
int
pageSize
,
PlatformExample
example
);
Platform
getByClientId
(
String
clientId
);
Platform
getByClientName
(
String
clientName
);
}
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/SendSmsLogDao.java
已删除
100644 → 0
浏览文件 @
9ba2295e
package
com.roncoo.education.user.dao
;
import
com.roncoo.education.common.core.base.Page
;
import
com.roncoo.education.user.dao.impl.mapper.entity.SendSmsLog
;
import
com.roncoo.education.user.dao.impl.mapper.entity.SendSmsLogExample
;
public
interface
SendSmsLogDao
{
int
save
(
SendSmsLog
record
);
int
deleteById
(
Long
id
);
int
updateById
(
SendSmsLog
record
);
SendSmsLog
getById
(
Long
id
);
Page
<
SendSmsLog
>
listForPage
(
int
pageCurrent
,
int
pageSize
,
SendSmsLogExample
example
);
}
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/UserExtDao.java
已删除
100644 → 0
浏览文件 @
9ba2295e
package
com.roncoo.education.user.dao
;
import
com.roncoo.education.common.core.base.Page
;
import
com.roncoo.education.user.dao.impl.mapper.entity.UserExt
;
import
com.roncoo.education.user.dao.impl.mapper.entity.UserExtExample
;
public
interface
UserExtDao
{
int
save
(
UserExt
record
);
int
deleteById
(
Long
id
);
int
updateById
(
UserExt
record
);
UserExt
getById
(
Long
id
);
Page
<
UserExt
>
listForPage
(
int
pageCurrent
,
int
pageSize
,
UserExtExample
example
);
UserExt
getByUserNo
(
Long
userNo
);
int
updateByUserNo
(
UserExt
record
);
/**
* 根据手机号码获取用户信息
*
* @param mobile
* @return
* @author wuyun
*/
UserExt
getByMobile
(
String
mobile
);
/**
* 获取用户注册量
*
* @param date
* @return
* @author wuyun
*/
Integer
sumByCountOrders
(
String
date
);
}
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/UserLogLoginDao.java
已删除
100644 → 0
浏览文件 @
9ba2295e
package
com.roncoo.education.user.dao
;
import
com.roncoo.education.common.core.base.Page
;
import
com.roncoo.education.user.dao.impl.mapper.entity.UserLogLogin
;
import
com.roncoo.education.user.dao.impl.mapper.entity.UserLogLoginExample
;
public
interface
UserLogLoginDao
{
int
save
(
UserLogLogin
record
);
int
deleteById
(
Long
id
);
int
updateById
(
UserLogLogin
record
);
UserLogLogin
getById
(
Long
id
);
Page
<
UserLogLogin
>
listForPage
(
int
pageCurrent
,
int
pageSize
,
UserLogLoginExample
example
);
}
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/UserLogModifiedDao.java
已删除
100644 → 0
浏览文件 @
9ba2295e
package
com.roncoo.education.user.dao
;
import
com.roncoo.education.common.core.base.Page
;
import
com.roncoo.education.user.dao.impl.mapper.entity.UserLogModified
;
import
com.roncoo.education.user.dao.impl.mapper.entity.UserLogModifiedExample
;
public
interface
UserLogModifiedDao
{
int
save
(
UserLogModified
record
);
int
deleteById
(
Long
id
);
int
updateById
(
UserLogModified
record
);
UserLogModified
getById
(
Long
id
);
Page
<
UserLogModified
>
listForPage
(
int
pageCurrent
,
int
pageSize
,
UserLogModifiedExample
example
);
}
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/impl/LecturerAuditDaoImpl.java
已删除
100644 → 0
浏览文件 @
9ba2295e
package
com.roncoo.education.user.dao.impl
;
import
com.roncoo.education.common.core.base.Page
;
import
com.roncoo.education.common.core.base.PageUtil
;
import
com.roncoo.education.common.core.tools.IdWorker
;
import
com.roncoo.education.user.dao.LecturerAuditDao
;
import
com.roncoo.education.user.dao.impl.mapper.LecturerAuditMapper
;
import
com.roncoo.education.user.dao.impl.mapper.entity.LecturerAudit
;
import
com.roncoo.education.user.dao.impl.mapper.entity.LecturerAuditExample
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
class
LecturerAuditDaoImpl
implements
LecturerAuditDao
{
@Autowired
private
LecturerAuditMapper
lecturerAuditMapper
;
@Override
public
int
save
(
LecturerAudit
record
)
{
record
.
setId
(
IdWorker
.
getId
());
return
this
.
lecturerAuditMapper
.
insertSelective
(
record
);
}
@Override
public
int
deleteById
(
Long
id
)
{
return
this
.
lecturerAuditMapper
.
deleteByPrimaryKey
(
id
);
}
@Override
public
int
updateById
(
LecturerAudit
record
)
{
record
.
setGmtCreate
(
null
);
record
.
setGmtModified
(
null
);
return
this
.
lecturerAuditMapper
.
updateByPrimaryKeySelective
(
record
);
}
@Override
public
LecturerAudit
getById
(
Long
id
)
{
return
this
.
lecturerAuditMapper
.
selectByPrimaryKey
(
id
);
}
@Override
public
Page
<
LecturerAudit
>
listForPage
(
int
pageCurrent
,
int
pageSize
,
LecturerAuditExample
example
)
{
int
count
=
this
.
lecturerAuditMapper
.
countByExample
(
example
);
pageSize
=
PageUtil
.
checkPageSize
(
pageSize
);
pageCurrent
=
PageUtil
.
checkPageCurrent
(
count
,
pageSize
,
pageCurrent
);
int
totalPage
=
PageUtil
.
countTotalPage
(
count
,
pageSize
);
example
.
setLimitStart
(
PageUtil
.
countOffset
(
pageCurrent
,
pageSize
));
example
.
setPageSize
(
pageSize
);
return
new
Page
<
LecturerAudit
>(
count
,
totalPage
,
pageCurrent
,
pageSize
,
this
.
lecturerAuditMapper
.
selectByExample
(
example
));
}
@Override
public
LecturerAudit
getByLecturerUserNo
(
Long
lecturerUserNo
)
{
LecturerAuditExample
example
=
new
LecturerAuditExample
();
example
.
createCriteria
().
andLecturerUserNoEqualTo
(
lecturerUserNo
);
List
<
LecturerAudit
>
list
=
this
.
lecturerAuditMapper
.
selectByExample
(
example
);
if
(
list
.
isEmpty
())
{
return
null
;
}
return
list
.
get
(
0
);
}
}
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/impl/LecturerExtDaoImpl.java
已删除
100644 → 0
浏览文件 @
9ba2295e
package
com.roncoo.education.user.dao.impl
;
import
com.roncoo.education.common.core.base.Page
;
import
com.roncoo.education.common.core.base.PageUtil
;
import
com.roncoo.education.common.core.tools.IdWorker
;
import
com.roncoo.education.user.dao.LecturerExtDao
;
import
com.roncoo.education.user.dao.impl.mapper.LecturerExtMapper
;
import
com.roncoo.education.user.dao.impl.mapper.entity.LecturerExt
;
import
com.roncoo.education.user.dao.impl.mapper.entity.LecturerExtExample
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
class
LecturerExtDaoImpl
implements
LecturerExtDao
{
@Autowired
private
LecturerExtMapper
lecturerExtMapper
;
@Override
public
int
save
(
LecturerExt
record
)
{
record
.
setId
(
IdWorker
.
getId
());
return
this
.
lecturerExtMapper
.
insertSelective
(
record
);
}
@Override
public
int
deleteById
(
Long
id
)
{
return
this
.
lecturerExtMapper
.
deleteByPrimaryKey
(
id
);
}
@Override
public
int
updateById
(
LecturerExt
record
)
{
return
this
.
lecturerExtMapper
.
updateByPrimaryKeySelective
(
record
);
}
@Override
public
LecturerExt
getById
(
Long
id
)
{
return
this
.
lecturerExtMapper
.
selectByPrimaryKey
(
id
);
}
@Override
public
Page
<
LecturerExt
>
listForPage
(
int
pageCurrent
,
int
pageSize
,
LecturerExtExample
example
)
{
int
count
=
this
.
lecturerExtMapper
.
countByExample
(
example
);
pageSize
=
PageUtil
.
checkPageSize
(
pageSize
);
pageCurrent
=
PageUtil
.
checkPageCurrent
(
count
,
pageSize
,
pageCurrent
);
int
totalPage
=
PageUtil
.
countTotalPage
(
count
,
pageSize
);
example
.
setLimitStart
(
PageUtil
.
countOffset
(
pageCurrent
,
pageSize
));
example
.
setPageSize
(
pageSize
);
return
new
Page
<
LecturerExt
>(
count
,
totalPage
,
pageCurrent
,
pageSize
,
this
.
lecturerExtMapper
.
selectByExample
(
example
));
}
/**
* 根据传入讲师用户编号获取讲师信息
*/
@Override
public
LecturerExt
getByLecturerUserNo
(
Long
lecturerUserNo
)
{
LecturerExtExample
example
=
new
LecturerExtExample
();
LecturerExtExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andLecturerUserNoEqualTo
(
lecturerUserNo
);
List
<
LecturerExt
>
resultList
=
this
.
lecturerExtMapper
.
selectByExample
(
example
);
if
(
resultList
.
isEmpty
())
{
return
null
;
}
return
resultList
.
get
(
0
);
}
@Override
public
int
updateByLecturerUserNo
(
LecturerExt
record
)
{
record
.
setGmtCreate
(
null
);
record
.
setGmtModified
(
null
);
LecturerExtExample
example
=
new
LecturerExtExample
();
LecturerExtExample
.
Criteria
c
=
example
.
createCriteria
();
c
.
andLecturerUserNoEqualTo
(
record
.
getLecturerUserNo
());
return
this
.
lecturerExtMapper
.
updateByExampleSelective
(
record
,
example
);
}
}
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/impl/LecturerProfitDaoImpl.java
已删除
100644 → 0
浏览文件 @
9ba2295e
package
com.roncoo.education.user.dao.impl
;
import
com.roncoo.education.common.core.base.Page
;
import
com.roncoo.education.common.core.base.PageUtil
;
import
com.roncoo.education.common.core.tools.IdWorker
;
import
com.roncoo.education.user.dao.LecturerProfitDao
;
import
com.roncoo.education.user.dao.impl.mapper.LecturerProfitMapper
;
import
com.roncoo.education.user.dao.impl.mapper.entity.LecturerProfit
;
import
com.roncoo.education.user.dao.impl.mapper.entity.LecturerProfitExample
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
@Repository
public
class
LecturerProfitDaoImpl
implements
LecturerProfitDao
{
@Autowired
private
LecturerProfitMapper
lecturerProfitMapper
;
public
int
save
(
LecturerProfit
record
)
{
record
.
setId
(
IdWorker
.
getId
());
return
this
.
lecturerProfitMapper
.
insertSelective
(
record
);
}
public
int
deleteById
(
Long
id
)
{
return
this
.
lecturerProfitMapper
.
deleteByPrimaryKey
(
id
);
}
public
int
updateById
(
LecturerProfit
record
)
{
return
this
.
lecturerProfitMapper
.
updateByPrimaryKeySelective
(
record
);
}
public
LecturerProfit
getById
(
Long
id
)
{
return
this
.
lecturerProfitMapper
.
selectByPrimaryKey
(
id
);
}
public
Page
<
LecturerProfit
>
listForPage
(
int
pageCurrent
,
int
pageSize
,
LecturerProfitExample
example
)
{
int
count
=
this
.
lecturerProfitMapper
.
countByExample
(
example
);
pageSize
=
PageUtil
.
checkPageSize
(
pageSize
);
pageCurrent
=
PageUtil
.
checkPageCurrent
(
count
,
pageSize
,
pageCurrent
);
int
totalPage
=
PageUtil
.
countTotalPage
(
count
,
pageSize
);
example
.
setLimitStart
(
PageUtil
.
countOffset
(
pageCurrent
,
pageSize
));
example
.
setPageSize
(
pageSize
);
return
new
Page
<
LecturerProfit
>(
count
,
totalPage
,
pageCurrent
,
pageSize
,
this
.
lecturerProfitMapper
.
selectByExample
(
example
));
}
}
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/impl/PlatformDaoImpl.java
已删除
100644 → 0
浏览文件 @
9ba2295e
package
com.roncoo.education.user.dao.impl
;
import
com.roncoo.education.common.core.base.Page
;
import
com.roncoo.education.common.core.base.PageUtil
;
import
com.roncoo.education.common.core.tools.IdWorker
;
import
com.roncoo.education.user.dao.PlatformDao
;
import
com.roncoo.education.user.dao.impl.mapper.PlatformMapper
;
import
com.roncoo.education.user.dao.impl.mapper.entity.Platform
;
import
com.roncoo.education.user.dao.impl.mapper.entity.PlatformExample
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
class
PlatformDaoImpl
implements
PlatformDao
{
@Autowired
private
PlatformMapper
platformMapper
;
@Override
public
int
save
(
Platform
record
)
{
record
.
setId
(
IdWorker
.
getId
());
return
this
.
platformMapper
.
insertSelective
(
record
);
}
@Override
public
int
deleteById
(
Long
id
)
{
return
this
.
platformMapper
.
deleteByPrimaryKey
(
id
);
}
@Override
public
int
updateById
(
Platform
record
)
{
return
this
.
platformMapper
.
updateByPrimaryKeySelective
(
record
);
}
@Override
public
Platform
getById
(
Long
id
)
{
return
this
.
platformMapper
.
selectByPrimaryKey
(
id
);
}
@Override
public
Page
<
Platform
>
listForPage
(
int
pageCurrent
,
int
pageSize
,
PlatformExample
example
)
{
int
count
=
this
.
platformMapper
.
countByExample
(
example
);
pageSize
=
PageUtil
.
checkPageSize
(
pageSize
);
pageCurrent
=
PageUtil
.
checkPageCurrent
(
count
,
pageSize
,
pageCurrent
);
int
totalPage
=
PageUtil
.
countTotalPage
(
count
,
pageSize
);
example
.
setLimitStart
(
PageUtil
.
countOffset
(
pageCurrent
,
pageSize
));
example
.
setPageSize
(
pageSize
);
return
new
Page
<
Platform
>(
count
,
totalPage
,
pageCurrent
,
pageSize
,
this
.
platformMapper
.
selectByExample
(
example
));
}
@Override
public
Platform
getByClientId
(
String
clientId
)
{
PlatformExample
example
=
new
PlatformExample
();
example
.
createCriteria
().
andClientIdEqualTo
(
clientId
);
List
<
Platform
>
list
=
this
.
platformMapper
.
selectByExample
(
example
);
if
(
list
.
isEmpty
())
{
return
null
;
}
return
list
.
get
(
0
);
}
@Override
public
Platform
getByClientName
(
String
clientName
)
{
PlatformExample
example
=
new
PlatformExample
();
example
.
createCriteria
().
andClientNameEqualTo
(
clientName
);
List
<
Platform
>
list
=
this
.
platformMapper
.
selectByExample
(
example
);
if
(
list
.
isEmpty
())
{
return
null
;
}
return
list
.
get
(
0
);
}
}
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/impl/SendSmsLogDaoImpl.java
已删除
100644 → 0
浏览文件 @
9ba2295e
package
com.roncoo.education.user.dao.impl
;
import
com.roncoo.education.common.core.base.Page
;
import
com.roncoo.education.common.core.base.PageUtil
;
import
com.roncoo.education.common.core.tools.IdWorker
;
import
com.roncoo.education.user.dao.SendSmsLogDao
;
import
com.roncoo.education.user.dao.impl.mapper.SendSmsLogMapper
;
import
com.roncoo.education.user.dao.impl.mapper.entity.SendSmsLog
;
import
com.roncoo.education.user.dao.impl.mapper.entity.SendSmsLogExample
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
@Repository
public
class
SendSmsLogDaoImpl
implements
SendSmsLogDao
{
@Autowired
private
SendSmsLogMapper
sendSmsLogMapper
;
public
int
save
(
SendSmsLog
record
)
{
record
.
setId
(
IdWorker
.
getId
());
return
this
.
sendSmsLogMapper
.
insertSelective
(
record
);
}
public
int
deleteById
(
Long
id
)
{
return
this
.
sendSmsLogMapper
.
deleteByPrimaryKey
(
id
);
}
public
int
updateById
(
SendSmsLog
record
)
{
return
this
.
sendSmsLogMapper
.
updateByPrimaryKeySelective
(
record
);
}
public
SendSmsLog
getById
(
Long
id
)
{
return
this
.
sendSmsLogMapper
.
selectByPrimaryKey
(
id
);
}
public
Page
<
SendSmsLog
>
listForPage
(
int
pageCurrent
,
int
pageSize
,
SendSmsLogExample
example
)
{
int
count
=
this
.
sendSmsLogMapper
.
countByExample
(
example
);
pageSize
=
PageUtil
.
checkPageSize
(
pageSize
);
pageCurrent
=
PageUtil
.
checkPageCurrent
(
count
,
pageSize
,
pageCurrent
);
int
totalPage
=
PageUtil
.
countTotalPage
(
count
,
pageSize
);
example
.
setLimitStart
(
PageUtil
.
countOffset
(
pageCurrent
,
pageSize
));
example
.
setPageSize
(
pageSize
);
return
new
Page
<
SendSmsLog
>(
count
,
totalPage
,
pageCurrent
,
pageSize
,
this
.
sendSmsLogMapper
.
selectByExample
(
example
));
}
}
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/impl/UserExtDaoImpl.java
已删除
100644 → 0
浏览文件 @
9ba2295e
package
com.roncoo.education.user.dao.impl
;
import
com.roncoo.education.common.core.base.Page
;
import
com.roncoo.education.common.core.base.PageUtil
;
import
com.roncoo.education.common.core.tools.IdWorker
;
import
com.roncoo.education.user.dao.UserExtDao
;
import
com.roncoo.education.user.dao.impl.mapper.UserExtMapper
;
import
com.roncoo.education.user.dao.impl.mapper.entity.UserExt
;
import
com.roncoo.education.user.dao.impl.mapper.entity.UserExtExample
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.util.StringUtils
;
import
java.util.List
;
import
java.util.Map
;
@Repository
public
class
UserExtDaoImpl
implements
UserExtDao
{
@Autowired
private
UserExtMapper
userExtMapper
;
@Autowired
private
JdbcTemplate
jdbcTemplate
;
@Override
public
int
save
(
UserExt
record
)
{
record
.
setId
(
IdWorker
.
getId
());
return
this
.
userExtMapper
.
insertSelective
(
record
);
}
@Override
public
int
deleteById
(
Long
id
)
{
return
this
.
userExtMapper
.
deleteByPrimaryKey
(
id
);
}
@Override
public
int
updateById
(
UserExt
record
)
{
return
this
.
userExtMapper
.
updateByPrimaryKeySelective
(
record
);
}
@Override
public
UserExt
getById
(
Long
id
)
{
return
this
.
userExtMapper
.
selectByPrimaryKey
(
id
);
}
@Override
public
Page
<
UserExt
>
listForPage
(
int
pageCurrent
,
int
pageSize
,
UserExtExample
example
)
{
int
count
=
this
.
userExtMapper
.
countByExample
(
example
);
pageSize
=
PageUtil
.
checkPageSize
(
pageSize
);
pageCurrent
=
PageUtil
.
checkPageCurrent
(
count
,
pageSize
,
pageCurrent
);
int
totalPage
=
PageUtil
.
countTotalPage
(
count
,
pageSize
);
example
.
setLimitStart
(
PageUtil
.
countOffset
(
pageCurrent
,
pageSize
));
example
.
setPageSize
(
pageSize
);
return
new
Page
<
UserExt
>(
count
,
totalPage
,
pageCurrent
,
pageSize
,
this
.
userExtMapper
.
selectByExample
(
example
));
}
@Override
public
UserExt
getByUserNo
(
Long
userNo
)
{
UserExtExample
example
=
new
UserExtExample
();
UserExtExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andUserNoEqualTo
(
userNo
);
List
<
UserExt
>
list
=
this
.
userExtMapper
.
selectByExample
(
example
);
if
(
list
.
isEmpty
())
{
return
null
;
}
return
list
.
get
(
0
);
}
@Override
public
int
updateByUserNo
(
UserExt
record
)
{
UserExtExample
example
=
new
UserExtExample
();
example
.
createCriteria
().
andUserNoEqualTo
(
record
.
getUserNo
());
return
this
.
userExtMapper
.
updateByExampleSelective
(
record
,
example
);
}
@Override
public
UserExt
getByMobile
(
String
mobile
)
{
UserExtExample
example
=
new
UserExtExample
();
UserExtExample
.
Criteria
c
=
example
.
createCriteria
();
c
.
andMobileEqualTo
(
mobile
);
List
<
UserExt
>
list
=
this
.
userExtMapper
.
selectByExample
(
example
);
if
(
list
.
size
()
<
0
||
list
.
isEmpty
())
{
return
null
;
}
return
list
.
get
(
0
);
}
/**
* 获取用户注册量
*/
@Override
public
Integer
sumByCountOrders
(
String
date
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
append
(
"select count(*) as count from user_ext where"
);
builder
.
append
(
" status_id = 1 "
);
builder
.
append
(
"and gmt_create >= '"
).
append
(
date
).
append
(
" 00:00:00' "
);
builder
.
append
(
"and gmt_create <= '"
).
append
(
date
).
append
(
" 23:59:59'"
);
String
sql
=
builder
.
toString
();
Integer
count
=
0
;
Map
<
String
,
Object
>
map
=
jdbcTemplate
.
queryForMap
(
sql
);
if
(!
StringUtils
.
isEmpty
(
map
.
get
(
"count"
)))
{
count
=
Integer
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"count"
)));
}
return
count
;
}
}
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/impl/UserLogLoginDaoImpl.java
已删除
100644 → 0
浏览文件 @
9ba2295e
package
com.roncoo.education.user.dao.impl
;
import
com.roncoo.education.common.core.base.Page
;
import
com.roncoo.education.common.core.base.PageUtil
;
import
com.roncoo.education.common.core.tools.IdWorker
;
import
com.roncoo.education.user.dao.UserLogLoginDao
;
import
com.roncoo.education.user.dao.impl.mapper.UserLogLoginMapper
;
import
com.roncoo.education.user.dao.impl.mapper.entity.UserLogLogin
;
import
com.roncoo.education.user.dao.impl.mapper.entity.UserLogLoginExample
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
@Repository
public
class
UserLogLoginDaoImpl
implements
UserLogLoginDao
{
@Autowired
private
UserLogLoginMapper
userLogLoginMapper
;
public
int
save
(
UserLogLogin
record
)
{
record
.
setId
(
IdWorker
.
getId
());
return
this
.
userLogLoginMapper
.
insertSelective
(
record
);
}
public
int
deleteById
(
Long
id
)
{
return
this
.
userLogLoginMapper
.
deleteByPrimaryKey
(
id
);
}
public
int
updateById
(
UserLogLogin
record
)
{
return
this
.
userLogLoginMapper
.
updateByPrimaryKeySelective
(
record
);
}
public
UserLogLogin
getById
(
Long
id
)
{
return
this
.
userLogLoginMapper
.
selectByPrimaryKey
(
id
);
}
public
Page
<
UserLogLogin
>
listForPage
(
int
pageCurrent
,
int
pageSize
,
UserLogLoginExample
example
)
{
int
count
=
this
.
userLogLoginMapper
.
countByExample
(
example
);
pageSize
=
PageUtil
.
checkPageSize
(
pageSize
);
pageCurrent
=
PageUtil
.
checkPageCurrent
(
count
,
pageSize
,
pageCurrent
);
int
totalPage
=
PageUtil
.
countTotalPage
(
count
,
pageSize
);
example
.
setLimitStart
(
PageUtil
.
countOffset
(
pageCurrent
,
pageSize
));
example
.
setPageSize
(
pageSize
);
return
new
Page
<
UserLogLogin
>(
count
,
totalPage
,
pageCurrent
,
pageSize
,
this
.
userLogLoginMapper
.
selectByExample
(
example
));
}
}
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/impl/UserLogModifiedDaoImpl.java
已删除
100644 → 0
浏览文件 @
9ba2295e
package
com.roncoo.education.user.dao.impl
;
import
com.roncoo.education.common.core.base.Page
;
import
com.roncoo.education.common.core.base.PageUtil
;
import
com.roncoo.education.common.core.tools.IdWorker
;
import
com.roncoo.education.user.dao.UserLogModifiedDao
;
import
com.roncoo.education.user.dao.impl.mapper.UserLogModifiedMapper
;
import
com.roncoo.education.user.dao.impl.mapper.entity.UserLogModified
;
import
com.roncoo.education.user.dao.impl.mapper.entity.UserLogModifiedExample
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
@Repository
public
class
UserLogModifiedDaoImpl
implements
UserLogModifiedDao
{
@Autowired
private
UserLogModifiedMapper
userLogModifiedMapper
;
public
int
save
(
UserLogModified
record
)
{
record
.
setId
(
IdWorker
.
getId
());
return
this
.
userLogModifiedMapper
.
insertSelective
(
record
);
}
public
int
deleteById
(
Long
id
)
{
return
this
.
userLogModifiedMapper
.
deleteByPrimaryKey
(
id
);
}
public
int
updateById
(
UserLogModified
record
)
{
return
this
.
userLogModifiedMapper
.
updateByPrimaryKeySelective
(
record
);
}
public
UserLogModified
getById
(
Long
id
)
{
return
this
.
userLogModifiedMapper
.
selectByPrimaryKey
(
id
);
}
public
Page
<
UserLogModified
>
listForPage
(
int
pageCurrent
,
int
pageSize
,
UserLogModifiedExample
example
)
{
int
count
=
this
.
userLogModifiedMapper
.
countByExample
(
example
);
pageSize
=
PageUtil
.
checkPageSize
(
pageSize
);
pageCurrent
=
PageUtil
.
checkPageCurrent
(
count
,
pageSize
,
pageCurrent
);
int
totalPage
=
PageUtil
.
countTotalPage
(
count
,
pageSize
);
example
.
setLimitStart
(
PageUtil
.
countOffset
(
pageCurrent
,
pageSize
));
example
.
setPageSize
(
pageSize
);
return
new
Page
<
UserLogModified
>(
count
,
totalPage
,
pageCurrent
,
pageSize
,
this
.
userLogModifiedMapper
.
selectByExample
(
example
));
}
}
roncoo-education-user/roncoo-education-user-service/src/main/java/com/roncoo/education/user/dao/impl/mapper/MsgUserMapper.java
浏览文件 @
0064e5af
...
@@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Param;
...
@@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Param;
import
java.util.List
;
import
java.util.List
;
@Mapper
@Mapper
public
interface
Msg
users
Mapper
{
public
interface
Msg
User
Mapper
{
int
countByExample
(
MsgUserExample
example
);
int
countByExample
(
MsgUserExample
example
);
int
deleteByExample
(
MsgUserExample
example
);
int
deleteByExample
(
MsgUserExample
example
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录