Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
涂亚平
/
subsidy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 49d090c5
authored
Feb 11, 2022
by
涂亚平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.2.1 年后第一个版本
1 parent
a74b24ef
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
541 additions
and
14 deletions
src/main/java/com/subsidy/controller/AdministerController.java
src/main/java/com/subsidy/controller/ClassDictController.java
src/main/java/com/subsidy/controller/CompanyFieldMappingController.java
src/main/java/com/subsidy/controller/JobDictController.java
src/main/java/com/subsidy/controller/JobMemberMappingController.java
src/main/java/com/subsidy/jobs/Scheduler.java
src/main/java/com/subsidy/mapper/CompanyFieldMappingMapper.java
src/main/java/com/subsidy/mapper/FieldDictMapper.java
src/main/java/com/subsidy/mapper/JobDictMapper.java
src/main/java/com/subsidy/mapper/JobMemberMappingMapper.java
src/main/java/com/subsidy/model/CompanyFieldMappingDO.java
src/main/java/com/subsidy/model/JobDictDO.java
src/main/java/com/subsidy/model/JobMemberMappingDO.java
src/main/java/com/subsidy/service/CompanyFieldMappingService.java
src/main/java/com/subsidy/service/JobDictService.java
src/main/java/com/subsidy/service/JobMemberMappingService.java
src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java
src/main/java/com/subsidy/service/impl/CompanyFieldMappingServiceImpl.java
src/main/java/com/subsidy/service/impl/JobDictServiceImpl.java
src/main/java/com/subsidy/service/impl/JobMemberMappingServiceImpl.java
src/main/java/com/subsidy/service/impl/MemberServiceImpl.java
src/main/java/com/subsidy/service/impl/SignInRecordServiceImpl.java
src/main/java/com/subsidy/vo/administer/OperatorsVO.java
src/main/resources/application.properties
src/main/resources/mapper/CompanyDictMapper.xml
src/main/resources/mapper/CompanyFieldMappingMapper.xml
src/main/resources/mapper/ExerciseDoneResultMapper.xml
src/main/resources/mapper/JobDictMapper.xml
src/main/resources/mapper/JobMemberMappingMapper.xml
src/main/java/com/subsidy/controller/AdministerController.java
View file @
49d090c
...
...
@@ -87,7 +87,7 @@ public class AdministerController {
@PostMapping
(
"classSummary"
)
@ApiOperation
(
"课程汇总 id 班级id "
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
//
@LoginRequired(value = {ConstantUtils.ADMINISTER_TERMINATE})
public
ResponseVO
classSummary
(
@RequestBody
ClassDetailDTO
classDetailDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
administerService
.
classSummary
(
classDetailDTO
));
}
...
...
src/main/java/com/subsidy/controller/ClassDictController.java
View file @
49d090c
...
...
@@ -36,7 +36,7 @@ public class ClassDictController {
private
ClassDictService
classDictService
;
@PostMapping
(
"getAllClasses"
)
@ApiOperation
(
"获取某
老师
下的所有课程 companyId 所选企业id className 班级名称"
)
@ApiOperation
(
"获取某
公司
下的所有课程 companyId 所选企业id className 班级名称"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
getAllClasses
(
@RequestBody
ClassDictDO
classDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
getAllClasses
(
classDictDO
));
...
...
@@ -50,7 +50,7 @@ public class ClassDictController {
}
@PostMapping
(
"addClass"
)
@ApiOperation
(
"添加课程 userId:登录人id companyId courseId classType className startDate endDate memberId [] 班级学员 classNoticeDOS[noticeType isAuto noticeTime]"
)
@ApiOperation
(
"添加课程 userId:登录人id companyId courseId classType className startDate endDate
isOrder 是否按照顺序播放 isFastPlay 是否快进
memberId [] 班级学员 classNoticeDOS[noticeType isAuto noticeTime]"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
addClass
(
@RequestBody
AddClassDTO
addClassDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
addClass
(
addClassDTO
));
...
...
@@ -85,7 +85,7 @@ public class ClassDictController {
}
@PostMapping
(
"addMemberToClass"
)
@ApiOperation
(
"将
某
个成员加入到某个班级里 classId memberIds []"
)
@ApiOperation
(
"将
多
个成员加入到某个班级里 classId memberIds []"
)
@LoginRequired
(
value
=
{
ConstantUtils
.
ADMINISTER_TERMINATE
})
public
ResponseVO
addMemberToClass
(
@RequestBody
AddMemberToClassDTO
addMemberToClassDTO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
classDictService
.
addMemberToClass
(
addMemberToClassDTO
));
...
...
src/main/java/com/subsidy/controller/CompanyFieldMappingController.java
0 → 100644
View file @
49d090c
package
com
.
subsidy
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.swagger.annotations.Api
;
/**
* <p>
* 前端控制器
* </p>
*
* @author DengMin
* @since 2022-02-11
*/
@RestController
@Api
(
tags
=
""
)
@RequestMapping
(
"/company-field-mapping-do"
)
public
class
CompanyFieldMappingController
{
}
src/main/java/com/subsidy/controller/JobDictController.java
0 → 100644
View file @
49d090c
package
com
.
subsidy
.
controller
;
import
com.subsidy.common.ResponseData
;
import
com.subsidy.common.ResponseVO
;
import
com.subsidy.model.JobDictDO
;
import
com.subsidy.service.JobDictService
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.swagger.annotations.Api
;
/**
* <p>
* 岗位表 前端控制器
* </p>
*
* @author DengMin
* @since 2022-02-10
*/
@RestController
@Api
(
tags
=
"岗位表"
)
@RequestMapping
(
"/jobDict"
)
//TODO: 字段类型不全
public
class
JobDictController
{
@Autowired
private
JobDictService
jobDictService
;
@PostMapping
(
"queryJobs"
)
@ApiOperation
(
"查询某公司的岗位 companyId"
)
public
ResponseVO
queryJobs
(
@RequestBody
JobDictDO
jobDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
jobDictService
.
queryJobs
(
jobDictDO
));
}
@PostMapping
(
"deleteJob"
)
@ApiOperation
(
"删除某个岗位 id"
)
public
ResponseVO
deleteJob
(
@RequestBody
JobDictDO
jobDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
jobDictService
.
deleteJob
(
jobDictDO
));
}
@PostMapping
(
"addJob"
)
@ApiOperation
(
"添加岗位 companyId jobName"
)
public
ResponseVO
addJob
(
@RequestBody
JobDictDO
jobDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
jobDictService
.
addJob
(
jobDictDO
));
}
@PostMapping
(
"updateJob"
)
@ApiOperation
(
"更新岗位 jobName"
)
public
ResponseVO
updateJob
(
@RequestBody
JobDictDO
jobDictDO
){
return
ResponseData
.
generateCreatedResponse
(
0
,
jobDictService
.
updateJob
(
jobDictDO
));
}
}
src/main/java/com/subsidy/controller/JobMemberMappingController.java
0 → 100644
View file @
49d090c
package
com
.
subsidy
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.swagger.annotations.Api
;
/**
* <p>
* 岗位人员表 前端控制器
* </p>
*
* @author DengMin
* @since 2022-02-10
*/
@RestController
@Api
(
tags
=
"岗位人员表"
)
@RequestMapping
(
"/jobMemberMapping"
)
public
class
JobMemberMappingController
{
}
src/main/java/com/subsidy/jobs/Scheduler.java
View file @
49d090c
...
...
@@ -126,6 +126,10 @@ public class Scheduler {
List
<
SignInRecordDO
>
list
=
signInRecordMapper
.
getSignInRecord
();
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
for
(
SignInRecordDO
signInRecordDO
:
list
)
{
Set
<
String
>
set
=
redisUtil
.
scan
(
RedisPrefixConstant
.
SUBSIDY_SIGN_INFO_PREFIX
+
signInRecordDO
.
getMemberId
()
+
":classId:"
+
signInRecordDO
.
getClassId
()
+
":"
+
DateFormatUtil
.
format
(
signInRecordDO
.
getSignInDate
(),
"yyyy-MM-dd"
)+
":*"
);
if
(
set
!=
null
&&
set
.
size
()
>
0
)
{
redisUtil
.
del
(
set
);
}
redisUtil
.
set
(
RedisPrefixConstant
.
SUBSIDY_SIGN_INFO_PREFIX
+
signInRecordDO
.
getMemberId
()
+
":classId:"
+
signInRecordDO
.
getClassId
()
+
":"
+
DateFormatUtil
.
format
(
signInRecordDO
.
getSignInDate
(),
"yyyy-MM-dd"
)
+
":"
+
DateFormatUtil
.
LocalDateTimeToSecond
(
signInRecordDO
.
getSignInDate
()),
null
);
}
}
...
...
src/main/java/com/subsidy/mapper/CompanyFieldMappingMapper.java
0 → 100644
View file @
49d090c
package
com
.
subsidy
.
mapper
;
import
com.subsidy.model.CompanyFieldMappingDO
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author DengMin
* @since 2022-02-11
*/
@Repository
public
interface
CompanyFieldMappingMapper
extends
BaseMapper
<
CompanyFieldMappingDO
>
{
}
src/main/java/com/subsidy/mapper/FieldDictMapper.java
View file @
49d090c
...
...
@@ -6,6 +6,8 @@ import com.subsidy.model.FieldDictDO;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* <p>
* 行业字典表 Mapper 接口
...
...
@@ -19,4 +21,5 @@ public interface FieldDictMapper extends BaseMapper<FieldDictDO> {
IPage
<
FieldDictDO
>
queryFields
(
IPage
ipage
,
String
fieldName
);
}
src/main/java/com/subsidy/mapper/JobDictMapper.java
0 → 100644
View file @
49d090c
package
com
.
subsidy
.
mapper
;
import
com.subsidy.model.JobDictDO
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
/**
* <p>
* 岗位表 Mapper 接口
* </p>
*
* @author DengMin
* @since 2022-02-10
*/
@Repository
public
interface
JobDictMapper
extends
BaseMapper
<
JobDictDO
>
{
}
src/main/java/com/subsidy/mapper/JobMemberMappingMapper.java
0 → 100644
View file @
49d090c
package
com
.
subsidy
.
mapper
;
import
com.subsidy.model.JobMemberMappingDO
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
/**
* <p>
* 岗位人员表 Mapper 接口
* </p>
*
* @author DengMin
* @since 2022-02-10
*/
@Repository
public
interface
JobMemberMappingMapper
extends
BaseMapper
<
JobMemberMappingDO
>
{
}
src/main/java/com/subsidy/model/CompanyFieldMappingDO.java
0 → 100644
View file @
49d090c
package
com
.
subsidy
.
model
;
import
com.subsidy.util.BaseModel
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
*
* </p>
*
* @author DengMin
* @since 2022-02-11
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"company_field_mapping"
)
public
class
CompanyFieldMappingDO
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
private
Long
companyId
;
private
Long
fieldId
;
}
src/main/java/com/subsidy/model/JobDictDO.java
0 → 100644
View file @
49d090c
package
com
.
subsidy
.
model
;
import
com.subsidy.util.BaseModel
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
* 岗位表
* </p>
*
* @author DengMin
* @since 2022-02-10
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"job_dict"
)
public
class
JobDictDO
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
* 公司id
*/
private
Long
companyId
;
/**
* 岗位名称
*/
private
String
jobName
;
/**
* 排序
*/
private
Integer
orderNo
;
}
src/main/java/com/subsidy/model/JobMemberMappingDO.java
0 → 100644
View file @
49d090c
package
com
.
subsidy
.
model
;
import
com.subsidy.util.BaseModel
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* <p>
* 岗位人员表
* </p>
*
* @author DengMin
* @since 2022-02-10
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"job_member_mapping"
)
public
class
JobMemberMappingDO
extends
BaseModel
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
/**
* 岗位id
*/
private
Long
jobId
;
private
Long
memberId
;
}
src/main/java/com/subsidy/service/CompanyFieldMappingService.java
0 → 100644
View file @
49d090c
package
com
.
subsidy
.
service
;
import
com.subsidy.model.CompanyFieldMappingDO
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 服务类
* </p>
*
* @author DengMin
* @since 2022-02-11
*/
public
interface
CompanyFieldMappingService
extends
IService
<
CompanyFieldMappingDO
>
{
}
src/main/java/com/subsidy/service/JobDictService.java
0 → 100644
View file @
49d090c
package
com
.
subsidy
.
service
;
import
com.subsidy.model.JobDictDO
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
java.util.List
;
/**
* <p>
* 岗位表 服务类
* </p>
*
* @author DengMin
* @since 2022-02-10
*/
public
interface
JobDictService
extends
IService
<
JobDictDO
>
{
List
<
JobDictDO
>
queryJobs
(
JobDictDO
jobDictDO
);
String
deleteJob
(
JobDictDO
jobDictDO
);
String
addJob
(
JobDictDO
jobDictDO
);
String
updateJob
(
JobDictDO
jobDictDO
);
}
src/main/java/com/subsidy/service/JobMemberMappingService.java
0 → 100644
View file @
49d090c
package
com
.
subsidy
.
service
;
import
com.subsidy.model.JobMemberMappingDO
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* <p>
* 岗位人员表 服务类
* </p>
*
* @author DengMin
* @since 2022-02-10
*/
public
interface
JobMemberMappingService
extends
IService
<
JobMemberMappingDO
>
{
}
src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java
View file @
49d090c
...
...
@@ -43,6 +43,7 @@ import com.subsidy.model.SignInRecordDO;
import
com.subsidy.model.VodDictDO
;
import
com.subsidy.model.OprAdmDictDO
;
import
com.subsidy.service.AdministerService
;
import
com.subsidy.service.FieldDictService
;
import
com.subsidy.util.ConstantUtils
;
import
com.subsidy.util.DateFormatUtil
;
import
com.subsidy.util.ExcelFormatUtils
;
...
...
@@ -181,6 +182,9 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
@Autowired
private
OprAdmDictMapper
oprAdmDictMapper
;
@Autowired
private
FieldDictService
fieldDictService
;
//@Autowired
//private MongoTemplate mongoTemplate;
...
...
@@ -325,7 +329,14 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
operatorsDTO
.
setId
(
null
);
}
return
companyDictMapper
.
operators
(
pager
,
operatorsDTO
.
getCompanyName
(),
operatorsDTO
.
getId
(),
operatorsDTO
.
getUserName
(),
0
);
IPage
<
OperatorsVO
>
operatorsVOIPage
=
companyDictMapper
.
operators
(
pager
,
operatorsDTO
.
getCompanyName
(),
operatorsDTO
.
getId
(),
operatorsDTO
.
getUserName
(),
0
);
List
<
OperatorsVO
>
operatorsVOS
=
operatorsVOIPage
.
getRecords
();
for
(
OperatorsVO
operatorsVO
:
operatorsVOS
){
//operatorsVO.getField()
}
return
operatorsVOIPage
;
}
public
String
addAdminister
(
AdministerDO
administerDO
)
{
...
...
@@ -412,6 +423,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
if
(
totalLength
>=
vodDictDO
.
getVodLength
())
{
totalStudyVods
++;
}
totalStudyLength
+=
totalLength
;
}
}
classSummaryVO
.
setStudyVodCounts
(
MathUtil
.
intDivCeil
(
totalStudyVods
,
classMemberMappingDOS
.
size
()));
...
...
src/main/java/com/subsidy/service/impl/CompanyFieldMappingServiceImpl.java
0 → 100644
View file @
49d090c
package
com
.
subsidy
.
service
.
impl
;
import
com.subsidy.model.CompanyFieldMappingDO
;
import
com.subsidy.mapper.CompanyFieldMappingMapper
;
import
com.subsidy.service.CompanyFieldMappingService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 服务实现类
* </p>
*
* @author DengMin
* @since 2022-02-11
*/
@Service
public
class
CompanyFieldMappingServiceImpl
extends
ServiceImpl
<
CompanyFieldMappingMapper
,
CompanyFieldMappingDO
>
implements
CompanyFieldMappingService
{
}
src/main/java/com/subsidy/service/impl/JobDictServiceImpl.java
0 → 100644
View file @
49d090c
package
com
.
subsidy
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.subsidy.model.JobDictDO
;
import
com.subsidy.mapper.JobDictMapper
;
import
com.subsidy.service.JobDictService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.subsidy.util.ConstantUtils
;
import
com.tencentcloudapi.tia.v20180226.models.Job
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* <p>
* 岗位表 服务实现类
* </p>
*
* @author DengMin
* @since 2022-02-10
*/
@Service
public
class
JobDictServiceImpl
extends
ServiceImpl
<
JobDictMapper
,
JobDictDO
>
implements
JobDictService
{
public
List
<
JobDictDO
>
queryJobs
(
JobDictDO
jobDictDO
)
{
return
this
.
baseMapper
.
selectList
(
new
QueryWrapper
<
JobDictDO
>()
.
lambda
()
.
eq
(
JobDictDO:
:
getCompanyId
,
jobDictDO
.
getCompanyId
())
.
orderByAsc
(
JobDictDO:
:
getOrderNo
));
}
public
String
deleteJob
(
JobDictDO
jobDictDO
)
{
this
.
baseMapper
.
deleteById
(
jobDictDO
.
getId
());
return
ConstantUtils
.
DELETE_SUCCESS
;
}
public
String
addJob
(
JobDictDO
jobDictDO
)
{
int
orderNo
=
0
;
List
<
JobDictDO
>
jobDictDOS
=
this
.
baseMapper
.
selectList
(
new
QueryWrapper
<
JobDictDO
>()
.
lambda
()
.
eq
(
JobDictDO:
:
getCompanyId
,
jobDictDO
.
getCompanyId
())
.
orderByDesc
(
JobDictDO:
:
getOrderNo
));
if
(
jobDictDOS
.
size
()
>
0
)
{
orderNo
=
jobDictDOS
.
get
(
0
).
getOrderNo
();
}
jobDictDO
.
setOrderNo
(
orderNo
+
1
);
this
.
baseMapper
.
insert
(
jobDictDO
);
return
ConstantUtils
.
SUCCESS_SEND_OUT
;
}
public
String
updateJob
(
JobDictDO
jobDictDO
)
{
this
.
baseMapper
.
updateById
(
jobDictDO
);
return
ConstantUtils
.
SET_SUCCESS
;
}
}
src/main/java/com/subsidy/service/impl/JobMemberMappingServiceImpl.java
0 → 100644
View file @
49d090c
package
com
.
subsidy
.
service
.
impl
;
import
com.subsidy.model.JobMemberMappingDO
;
import
com.subsidy.mapper.JobMemberMappingMapper
;
import
com.subsidy.service.JobMemberMappingService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 岗位人员表 服务实现类
* </p>
*
* @author DengMin
* @since 2022-02-10
*/
@Service
public
class
JobMemberMappingServiceImpl
extends
ServiceImpl
<
JobMemberMappingMapper
,
JobMemberMappingDO
>
implements
JobMemberMappingService
{
}
src/main/java/com/subsidy/service/impl/MemberServiceImpl.java
View file @
49d090c
...
...
@@ -212,7 +212,8 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
MemberDO
memberDO
=
new
MemberDO
();
BeanUtils
.
copyProperties
(
addMemberDTO
,
memberDO
);
this
.
baseMapper
.
updateById
(
memberDO
);
redisUtil
.
set
(
RedisPrefixConstant
.
SUBSIDY_COMPANY_MEMBER_PREFIX
+
memberDO
.
getCompanyId
()
+
":"
+
memberDO
.
getAccountName
(),
memberDO
);
MemberDO
memberDO1
=
this
.
baseMapper
.
selectById
(
addMemberDTO
.
getId
());
redisUtil
.
set
(
RedisPrefixConstant
.
SUBSIDY_COMPANY_MEMBER_PREFIX
+
memberDO
.
getCompanyId
()
+
":"
+
memberDO
.
getAccountName
(),
memberDO1
);
if
(
null
!=
addMemberDTO
.
getDepartmentIds
())
{
memberDepartmentMappingMapper
.
delete
(
new
QueryWrapper
<
MemberDepartmentMappingDO
>()
...
...
@@ -336,6 +337,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
//oprMemDictDO.setCompanyName(companyDictDO.getCompanyName());
//mongoTemplate.insert(oprMemDictDO);
oprMemDictMapper
.
insert
(
oprMemDictDO
);
redisUtil
.
set
(
RedisPrefixConstant
.
SUBSIDY_COMPANY_MEMBER_PREFIX
+
passwordLoginDTO
.
getCompanyId
()
+
":"
+
passwordLoginDTO
.
getAccountName
(),
memberDO
);
//redisUtil.set(RedisPrefixConstant.SUBSIDY_MEMBER_LOGIN_PREFIX + memberDO.getId() + ":" + System.currentTimeMillis(), 1);
return
memberVO
;
}
else
{
...
...
src/main/java/com/subsidy/service/impl/SignInRecordServiceImpl.java
View file @
49d090c
...
...
@@ -84,6 +84,10 @@ public class SignInRecordServiceImpl extends ServiceImpl<SignInRecordMapper, Sig
List
<
ClassDictDO
>
classDictDOS
=
classMemberMappingMapper
.
getMemberClass
(
signInRecordDO
.
getMemberId
());
for
(
ClassDictDO
classDictDO
:
classDictDOS
)
{
Set
<
String
>
set
=
redisUtil
.
scan
(
RedisPrefixConstant
.
SUBSIDY_SIGN_INFO_PREFIX
+
signInRecordDO
.
getMemberId
()
+
":classId:"
+
signInRecordDO
.
getClassId
()
+
":"
+
DateFormatUtil
.
format
(
signInRecordDO
.
getSignInDate
(),
"yyyy-MM-dd"
)+
":*"
);
if
(
set
!=
null
&&
set
.
size
()
>
0
)
{
redisUtil
.
del
(
set
);
}
redisUtil
.
set
(
RedisPrefixConstant
.
SUBSIDY_SIGN_INFO_PREFIX
+
signInRecordDO
.
getMemberId
()
+
":classId:"
+
classDictDO
.
getId
()
+
":"
+
DateFormatUtil
.
format
(
new
Date
(),
"yyyy-MM-dd"
)
+
":"
+
System
.
currentTimeMillis
(),
null
);
// 存储到缓存到同时保存到数据库
...
...
@@ -136,7 +140,7 @@ public class SignInRecordServiceImpl extends ServiceImpl<SignInRecordMapper, Sig
long
count
=
classMemberMappingMapper
.
getMemberClassCount
(
signInRecordDO
.
getMemberId
());
long
size
=
redisUtil
.
scan
(
RedisPrefixConstant
.
SUBSIDY_SIGN_INFO_PREFIX
+
signInRecordDO
.
getMemberId
()
+
"*:"
+
DateFormatUtil
.
format
(
new
Date
(),
"yyyy-MM-dd"
)+
"*"
).
stream
().
count
();
if
(
size
<
=
count
)
{
if
(
size
<
count
)
{
signInStatusVO
.
setStatus
(
false
);
}
...
...
src/main/java/com/subsidy/vo/administer/OperatorsVO.java
View file @
49d090c
package
com
.
subsidy
.
vo
.
administer
;
import
com.subsidy.model.FieldDictDO
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
OperatorsVO
{
...
...
@@ -11,7 +14,7 @@ public class OperatorsVO {
private
String
telephone
;
private
String
field
;
private
List
<
FieldDictDO
>
field
;
private
String
banner
;
...
...
src/main/resources/application.properties
View file @
49d090c
# 环境配置
spring.profiles.active
=
dev
spring.profiles.active
=
prod
# 端口号
spring.server.port
=
2345
7
spring.server.port
=
2345
9
#嵌入tomcat配置
#和CPU数
spring.server.acceptorThreadCount
=
600
...
...
src/main/resources/mapper/CompanyDictMapper.xml
View file @
49d090c
...
...
@@ -25,7 +25,6 @@
t2.id as companyId,
t.telephone,
t.user_name,
t2.field,
t2.banner,
t2.short_name,
t.account_name,
...
...
src/main/resources/mapper/CompanyFieldMappingMapper.xml
0 → 100644
View file @
49d090c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.subsidy.mapper.CompanyFieldMappingMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.CompanyFieldMappingDO"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"create_date"
property=
"createDate"
/>
<result
column=
"update_date"
property=
"updateDate"
/>
<result
column=
"delete_date"
property=
"deleteDate"
/>
<result
column=
"company_id"
property=
"companyId"
/>
<result
column=
"field_id"
property=
"fieldId"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
delete_date,
id, company_id, field_id
</sql>
</mapper>
src/main/resources/mapper/ExerciseDoneResultMapper.xml
View file @
49d090c
...
...
@@ -138,12 +138,12 @@
<select
id=
"getClassTestPassRate"
parameterType=
"long"
resultType=
"integer"
>
SELECT
sum( t11.result
)
IFNULL( sum( t11.result ), 0
)
FROM
(
SELECT
IF
( sum( cnt )= sum( result ), 1, 0 ) AS result
( sum( cnt )
= sum( result ), 1, 0 ) AS result
FROM
(
SELECT
...
...
@@ -158,12 +158,14 @@
LEFT JOIN paper_dict t2 ON t.paper_id = t2.id
WHERE
t.delete_date IS NULL
AND t.class_id =
2
AND t.class_id =
#{classId}
GROUP BY
t.class_id,
t.paper_id,
t.member_id
) t10
GROUP BY
t10.member_id
) t11
</select>
</mapper>
src/main/resources/mapper/JobDictMapper.xml
0 → 100644
View file @
49d090c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.subsidy.mapper.JobDictMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.JobDictDO"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"create_date"
property=
"createDate"
/>
<result
column=
"update_date"
property=
"updateDate"
/>
<result
column=
"delete_date"
property=
"deleteDate"
/>
<result
column=
"company_id"
property=
"companyId"
/>
<result
column=
"job_name"
property=
"jobName"
/>
<result
column=
"order_no"
property=
"orderNo"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
delete_date,
id, company_id, job_name, order_no
</sql>
</mapper>
src/main/resources/mapper/JobMemberMappingMapper.xml
0 → 100644
View file @
49d090c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.subsidy.mapper.JobMemberMappingMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.subsidy.model.JobMemberMappingDO"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"create_date"
property=
"createDate"
/>
<result
column=
"update_date"
property=
"updateDate"
/>
<result
column=
"delete_date"
property=
"deleteDate"
/>
<result
column=
"job_id"
property=
"jobId"
/>
<result
column=
"member_id"
property=
"memberId"
/>
</resultMap>
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
create_date,
update_date,
delete_date,
id, job_id, member_id
</sql>
</mapper>
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment