Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李丛阳
education
Commits
2c408354
Commit
2c408354
authored
May 03, 2018
by
YangZhaoJun1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户管理
parent
3bd00270
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
24 deletions
+29
-24
BCompanyController.java
...soft/business/bcompany/controller/BCompanyController.java
+10
-19
BCompanyRepository.java
...org/rcisoft/business/bcompany/dao/BCompanyRepository.java
+9
-3
BCompany.java
...n/java/org/rcisoft/business/bcompany/entity/BCompany.java
+6
-0
BCompanyService.java
...rg/rcisoft/business/bcompany/service/BCompanyService.java
+1
-1
BCompanyServiceImpl.java
...t/business/bcompany/service/impl/BCompanyServiceImpl.java
+3
-1
No files found.
src/main/java/org/rcisoft/business/bcompany/controller/BCompanyController.java
View file @
2c408354
...
...
@@ -41,9 +41,9 @@ public class BCompanyController extends PaginationController<BCompany> {
@Autowired
private
Global
global
;
@ApiOperation
(
value
=
"添加/编辑
学生
信息"
,
notes
=
"businessId为空时是添加方法,不为空时是修改方法"
)
@ApiOperation
(
value
=
"添加/编辑
公司用户
信息"
,
notes
=
"businessId为空时是添加方法,不为空时是修改方法"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"code"
,
value
=
"
工号
"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"code"
,
value
=
"
登录名
"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"name"
,
value
=
"姓名"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"agencyCode"
,
value
=
"所属教学单位"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"roleId"
,
value
=
"角色Id"
,
required
=
true
,
dataType
=
"varchar"
)})
...
...
@@ -69,14 +69,10 @@ public class BCompanyController extends PaginationController<BCompany> {
}
@ApiOperation
(
value
=
"根据条件分页查询"
,
notes
=
"根据条件分页查询
学生
信息"
)
@ApiOperation
(
value
=
"根据条件分页查询"
,
notes
=
"根据条件分页查询
公司用户
信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"code"
,
value
=
"学号"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"isRecommend"
,
value
=
"0:未推荐,1:推荐"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"recommendDate"
,
value
=
"推荐时间,排序依据"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"recommendOrder"
,
value
=
"推荐排序"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"recommendCourse"
,
value
=
"推荐原因"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"remarks"
,
value
=
"备注"
,
required
=
false
,
dataType
=
"varchar"
)})
@ApiImplicitParam
(
name
=
"code"
,
value
=
"登录名"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"name"
,
value
=
"姓名"
,
required
=
false
,
dataType
=
"varchar"
)})
@GetMapping
(
value
=
"/queryCompanysByPagination"
)
public
GridModel
queryCompanysByPagination
(
BCompany
param
)
{
bCompanyService
.
queryCompanysByPagination
(
getPaginationUtility
(),
param
);
...
...
@@ -87,7 +83,6 @@ public class BCompanyController extends PaginationController<BCompany> {
@ApiOperation
(
value
=
"逻辑删除"
,
notes
=
"根据ID删除一条记录"
)
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
true
,
dataType
=
"varchar"
)
@PreAuthorize
(
"hasRole('ROLE_1001')"
)
@PostMapping
(
value
=
"/remove"
)
public
Result
remove
(
String
businessId
)
{
PersistModel
data
=
bCompanyService
.
removeBCompany
(
businessId
);
...
...
@@ -97,20 +92,16 @@ public class BCompanyController extends PaginationController<BCompany> {
businessId
);
}
@ApiOperation
(
value
=
"根据条件查询"
,
notes
=
"根据条件查询
学生
信息"
)
@ApiOperation
(
value
=
"根据条件查询"
,
notes
=
"根据条件查询
公司用户
信息"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"businessId"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"code"
,
value
=
"学号"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"isRecommend"
,
value
=
"0:未推荐,1:推荐"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"recommendDate"
,
value
=
"推荐时间,排序依据"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"recommendOrder"
,
value
=
"推荐排序"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"recommendCourse"
,
value
=
"推荐原因"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"remarks"
,
value
=
"备注"
,
required
=
false
,
dataType
=
"varchar"
)})
@ApiImplicitParam
(
name
=
"code"
,
value
=
"登录名"
,
required
=
false
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"name"
,
value
=
"姓名"
,
required
=
false
,
dataType
=
"varchar"
)})
@GetMapping
(
value
=
"/queryBStudents"
)
public
Result
query
BStudent
s
(
BCompany
param
)
{
public
Result
query
Company
s
(
BCompany
param
)
{
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bCompanyService
.
query
BStudent
s
(
param
));
bCompanyService
.
query
Company
s
(
param
));
}
}
src/main/java/org/rcisoft/business/bcompany/dao/BCompanyRepository.java
View file @
2c408354
...
...
@@ -4,19 +4,25 @@ import org.apache.ibatis.annotations.ResultMap;
import
org.apache.ibatis.annotations.Select
;
import
org.rcisoft.business.bcompany.entity.BCompany
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* Created by Administrator on 2018/5/2.
*/
@Repository
public
interface
BCompanyRepository
extends
BaseMapper
<
BCompany
>{
@Select
(
"<script>SELECT bc.*,ba.name as agencyName,su.`name` as name FROM b_company bc \n"
+
@Select
(
"<script>SELECT bc.*,ba.name as agencyName,su.`name` as name,"
+
"sr.role_name as roleName,sr.`code` as roleCode "
+
"FROM b_company bc \n"
+
"LEFT JOIN s_user su on su.login_name = bc.`code`\n"
+
"LEFT JOIN b_agency ba on ba.`code` = bc.agency_code"
+
"where bc.del_flag != 1 and bc.flag = 1 "
+
"LEFT JOIN b_agency ba on ba.`code` = bc.agency_code \n"
+
"LEFT JOIN s_r_user_role ur ON su.business_id = ur.user_id\n"
+
"LEFT JOIN s_role sr on ur.role_id = sr.business_id\n"
+
"where bc.del_flag != 1 and bc.flag = 1 and su.del_flag != 1 and su.flag = 1 "
+
"<if test=\"name!=null and name != ''\">and su.`name` like CONCAT('%',#{name},'%') </if>"
+
"<if test=\"code!=null and code != ''\">and bc.`code` like CONCAT('%',#{code},'%') </if></script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
...
...
src/main/java/org/rcisoft/business/bcompany/entity/BCompany.java
View file @
2c408354
...
...
@@ -32,6 +32,12 @@ public class BCompany extends IdEntity<BCompany>{
@Transient
private
String
agencyName
;
@Transient
private
String
roleCode
;
@Transient
private
String
roleName
;
public
BCompany
(
String
businessId
,
String
delFlag
,
String
flag
)
{
this
.
businessId
=
businessId
;
this
.
delFlag
=
delFlag
;
...
...
src/main/java/org/rcisoft/business/bcompany/service/BCompanyService.java
View file @
2c408354
...
...
@@ -20,5 +20,5 @@ public interface BCompanyService {
PersistModel
removeBCompany
(
String
businessId
);
List
<
BCompany
>
query
BStudent
s
(
BCompany
param
);
List
<
BCompany
>
query
Company
s
(
BCompany
param
);
}
src/main/java/org/rcisoft/business/bcompany/service/impl/BCompanyServiceImpl.java
View file @
2c408354
...
...
@@ -87,8 +87,10 @@ public class BCompanyServiceImpl implements BCompanyService{
public
PersistModel
removeBCompany
(
String
businessId
)
{
BCompany
company
=
bCompanyRepository
.
selectOne
(
new
BCompany
(
businessId
,
"0"
,
"1"
));
sysUserMapper
.
deleteByCode
(
company
.
getCode
());
BCompany
bCompany
=
new
BCompany
();
bCompany
.
setDeleted
();
bCompany
.
setBusinessId
(
businessId
);
UserUtil
.
setCurrentMergeOperation
(
bCompany
);
int
line
=
bCompanyRepository
.
logicalDelete
(
bCompany
);
...
...
@@ -97,7 +99,7 @@ public class BCompanyServiceImpl implements BCompanyService{
}
@Override
public
List
<
BCompany
>
query
BStudent
s
(
BCompany
param
)
{
public
List
<
BCompany
>
query
Company
s
(
BCompany
param
)
{
return
bCompanyRepository
.
queryCompanys
(
param
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment