Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
Overview
Overview
Details
Activity
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
吴迪
gs1-office-web-sit
Commits
73ba4347
Commit
73ba4347
authored
Dec 14, 2021
by
唐功亮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交部分代码
parent
640a36b3
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
453 additions
and
22 deletions
+453
-22
TycpdmFirmController.java
...ffice/modules/manage/controller/TycpdmFirmController.java
+70
-9
TycpdmVipUserController.java
...ce/modules/manage/controller/TycpdmVipUserController.java
+90
-0
TycpdmFirmDao.java
...main/java/io/office/modules/manage/dao/TycpdmFirmDao.java
+14
-1
TycpdmVipUserDao.java
...n/java/io/office/modules/manage/dao/TycpdmVipUserDao.java
+17
-0
TycpdmVipUserEntity.java
.../io/office/modules/manage/entity/TycpdmVipUserEntity.java
+47
-0
TycpdmFirmService.java
...a/io/office/modules/manage/service/TycpdmFirmService.java
+14
-1
TycpdmVipUserService.java
...o/office/modules/manage/service/TycpdmVipUserService.java
+20
-0
TycpdmFirmServiceImpl.java
...ce/modules/manage/service/impl/TycpdmFirmServiceImpl.java
+111
-5
TycpdmVipUserServiceImpl.java
...modules/manage/service/impl/TycpdmVipUserServiceImpl.java
+30
-0
AbstractController.java
.../io/office/modules/sys/controller/AbstractController.java
+9
-0
OAuth2Realm.java
src/main/java/io/office/modules/sys/oauth2/OAuth2Realm.java
+4
-1
application.yml
src/main/resources/application.yml
+5
-2
TycpdmFirmDao.xml
src/main/resources/mapper/manage/TycpdmFirmDao.xml
+22
-3
No files found.
src/main/java/io/office/modules/manage/controller/TycpdmFirmController.java
View file @
73ba4347
package
io
.
office
.
modules
.
manage
.
controller
;
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.io.IOException
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.common.exception.RRException
;
import
io.office.common.exception.RRException
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.manage.dao.MemberDao
;
import
io.office.modules.manage.entity.MemberEntity
;
import
io.office.modules.manage.entity.ProductEntity
;
import
io.office.modules.sys.controller.AbstractController
;
import
io.office.modules.sys.controller.AbstractController
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
...
@@ -19,7 +26,7 @@ import io.office.modules.manage.entity.TycpdmFirmEntity;
...
@@ -19,7 +26,7 @@ import io.office.modules.manage.entity.TycpdmFirmEntity;
import
io.office.modules.manage.service.TycpdmFirmService
;
import
io.office.modules.manage.service.TycpdmFirmService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
import
io.office.common.utils.R
;
import
org.springframework.web.multipart.MultipartFile
;
/**
/**
...
@@ -35,15 +42,37 @@ public class TycpdmFirmController extends AbstractController {
...
@@ -35,15 +42,37 @@ public class TycpdmFirmController extends AbstractController {
@Autowired
@Autowired
private
TycpdmFirmService
tycpdmFirmService
;
private
TycpdmFirmService
tycpdmFirmService
;
@Autowired
private
MemberDao
memberDao
;
/**
/**
* 列表
* 列表
*/
*/
@RequestMapping
(
"/list"
)
@RequestMapping
(
"/
api/
list"
)
// @RequiresPermissions("manage:tycpdmfirm:list")
// @RequiresPermissions("manage:tycpdmfirm:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
@Login
public
R
list
(
@RequestBody
Map
<
String
,
Object
>
params
){
Object
firmName
=
params
.
get
(
"firmName"
);
if
(
firmName
!=
null
){
firmName
=
"'%"
+
firmName
+
"%'"
;
}
params
.
put
(
"firmName"
,
firmName
);
PageUtils
page
=
tycpdmFirmService
.
queryPage
(
params
);
PageUtils
page
=
tycpdmFirmService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
return
R
.
ok
().
put
(
"data"
,
page
);
}
/**
* 列表
*/
@RequestMapping
(
"/api/findlist"
)
@Login
public
R
findlist
(
@RequestBody
Map
<
String
,
Object
>
params
){
Page
<
TycpdmFirmEntity
>
findlist
=
tycpdmFirmService
.
findlist
(
params
,
new
Page
(
Integer
.
valueOf
(
params
.
get
(
"page"
).
toString
()),
Integer
.
valueOf
(
params
.
get
(
"limit"
).
toString
())));
PageUtils
pageUtils
=
new
PageUtils
(
findlist
);
return
R
.
ok
().
put
(
"data"
,
pageUtils
);
}
}
...
@@ -64,7 +93,7 @@ public class TycpdmFirmController extends AbstractController {
...
@@ -64,7 +93,7 @@ public class TycpdmFirmController extends AbstractController {
@RequestMapping
(
"/api/save"
)
@RequestMapping
(
"/api/save"
)
@Login
@Login
// @RequiresPermissions("manage:tycpdmfirm:save")
// @RequiresPermissions("manage:tycpdmfirm:save")
public
R
save
(
@RequestBody
TycpdmFirmEntity
tycpdmFirm
){
public
R
save
(
@RequestBody
TycpdmFirmEntity
tycpdmFirm
,
@RequestParam
(
"file"
)
MultipartFile
file
){
String
baseUser
=
tycpdmFirm
.
getBaseUser
();
String
baseUser
=
tycpdmFirm
.
getBaseUser
();
if
(
baseUser
==
null
){
if
(
baseUser
==
null
){
throw
new
RRException
(
"用户名不能为空"
);
throw
new
RRException
(
"用户名不能为空"
);
...
@@ -118,13 +147,45 @@ public class TycpdmFirmController extends AbstractController {
...
@@ -118,13 +147,45 @@ public class TycpdmFirmController extends AbstractController {
*/
*/
@RequestMapping
(
"/api/findTycpdmFirmLogoutFlagCount"
)
@RequestMapping
(
"/api/findTycpdmFirmLogoutFlagCount"
)
// @RequiresPermissions("manage:tycpdmfirm:delete")
// @RequiresPermissions("manage:tycpdmfirm:delete")
public
R
findTycpdmFirmLogoutFlagCount
(){
@Login
Integer
id
=
getUserId
().
intValue
();
public
R
findTycpdmFirmLogoutFlagCount
(
@RequestParam
(
"userId"
)
Integer
userId
){
/*Integer id=getMemberUserId().intValue();
if(id==null){
if(id==null){
return R.error("用户信息有误");
return R.error("用户信息有误");
}
}
SysUserEntity
user
=
getUser
();
MemberEntity userMember = getMemberUser();*/
Map
<
String
,
Integer
>
map
=
tycpdmFirmService
.
findTycpdmFirmLogoutFlagCount
(
user
);
MemberEntity
memberEntity
=
memberDao
.
selectById
(
userId
);
Map
<
String
,
Integer
>
map
=
tycpdmFirmService
.
findTycpdmFirmLogoutFlagCount
(
memberEntity
);
return
R
.
ok
().
put
(
"data"
,
map
);
return
R
.
ok
().
put
(
"data"
,
map
);
}
}
/**
* 上传文件(第二步)
*/
@RequestMapping
(
"/api/uploadFile"
)
// @RequiresPermissions("manage:tycpdmfirm:delete")
@Login
public
R
uploadFile
(
@RequestParam
(
"file"
)
MultipartFile
file
,
@RequestParam
(
"id"
)
Integer
id
){
try
{
tycpdmFirmService
.
uploadFile
(
file
,
id
);
return
R
.
ok
();
}
catch
(
Exception
e
)
{
return
R
.
error
(
e
.
getLocalizedMessage
());
}
}
/**
* 上传文件(第一步)
*/
@RequestMapping
(
"/api/uploadFileOne"
)
// @RequiresPermissions("manage:tycpdmfirm:delete")
@Login
public
R
uploadFileOne
(
@RequestParam
(
"file"
)
MultipartFile
file
){
try
{
String
filePath
=
tycpdmFirmService
.
uploadFileOne
(
file
);
return
R
.
ok
().
put
(
"data"
,
filePath
);
}
catch
(
Exception
e
)
{
return
R
.
error
(
e
.
getLocalizedMessage
());
}
}
}
}
src/main/java/io/office/modules/manage/controller/TycpdmVipUserController.java
0 → 100644
View file @
73ba4347
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.Arrays
;
import
java.util.Map
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.office.modules.manage.entity.TycpdmVipUserEntity
;
import
io.office.modules.manage.service.TycpdmVipUserService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-13 16:44:40
*/
@RestController
@RequestMapping
(
"/tycpdmvipuser"
)
public
class
TycpdmVipUserController
{
@Autowired
private
TycpdmVipUserService
tycpdmVipUserService
;
/**
* 列表
*/
@RequestMapping
(
"/list"
)
// @RequiresPermissions("manage:tycpdmvipuser:list")
public
R
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
PageUtils
page
=
tycpdmVipUserService
.
queryPage
(
params
);
return
R
.
ok
().
put
(
"page"
,
page
);
}
/**
* 信息
*/
@RequestMapping
(
"/info/{id}"
)
// @RequiresPermissions("manage:tycpdmvipuser:info")
public
R
info
(
@PathVariable
(
"id"
)
Integer
id
){
TycpdmVipUserEntity
tycpdmVipUser
=
tycpdmVipUserService
.
getById
(
id
);
return
R
.
ok
().
put
(
"tycpdmVipUser"
,
tycpdmVipUser
);
}
/**
* 保存
*/
@RequestMapping
(
"/save"
)
// @RequiresPermissions("manage:tycpdmvipuser:save")
public
R
save
(
@RequestBody
TycpdmVipUserEntity
tycpdmVipUser
){
tycpdmVipUserService
.
save
(
tycpdmVipUser
);
return
R
.
ok
();
}
/**
* 修改
*/
@RequestMapping
(
"/update"
)
// @RequiresPermissions("manage:tycpdmvipuser:update")
public
R
update
(
@RequestBody
TycpdmVipUserEntity
tycpdmVipUser
){
tycpdmVipUserService
.
updateById
(
tycpdmVipUser
);
return
R
.
ok
();
}
/**
* 删除
*/
@RequestMapping
(
"/delete"
)
// @RequiresPermissions("manage:tycpdmvipuser:delete")
public
R
delete
(
@RequestBody
Integer
[]
ids
){
tycpdmVipUserService
.
removeByIds
(
Arrays
.
asList
(
ids
));
return
R
.
ok
();
}
}
src/main/java/io/office/modules/manage/dao/TycpdmFirmDao.java
View file @
73ba4347
package
io
.
office
.
modules
.
manage
.
dao
;
package
io
.
office
.
modules
.
manage
.
dao
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.manage.entity.TycpdmFirmEntity
;
import
io.office.modules.manage.entity.TycpdmFirmEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.Update
;
import
org.springframework.data.repository.query.Param
;
import
org.springframework.data.repository.query.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* ${comments}
* ${comments}
*
*
...
@@ -18,5 +23,13 @@ public interface TycpdmFirmDao extends BaseMapper<TycpdmFirmEntity> {
...
@@ -18,5 +23,13 @@ public interface TycpdmFirmDao extends BaseMapper<TycpdmFirmEntity> {
@Select
(
"select * from tycpdm_firm where base_user=#{userName}"
)
@Select
(
"select * from tycpdm_firm where base_user=#{userName}"
)
TycpdmFirmEntity
findUserName
(
@Param
(
"userName"
)
String
userName
);
TycpdmFirmEntity
findUserName
(
@Param
(
"userName"
)
String
userName
);
Integer
findTycpdmFirmLogoutFlagCountALL
(
@Param
(
"levels"
)
Integer
levels
);
Integer
findTycpdmFirmLogoutFlagCountALL
(
@Param
(
"levels"
)
Integer
levels
,
@Param
(
"logout_flag"
)
Integer
logout_flag
);
/* @Update("UPDATE tycpdm_firm SET firmBusinessLicenseFile = #{firmBusinessLicenseFile} , logout_flag=#{logout_flag} WHERE f_id = #{id}")
void updateByIdFirmBusinessLicenseFile(@Param("firmBusinessLicenseFile")String firmBusinessLicenseFile,@Param("id") Integer id,@Param("logout_flag")int logout_flag );
*/
@Update
(
"UPDATE tycpdm_firm SET firm_archivesFile = #{firm_archivesFile} , logout_flag=#{logout_flag} WHERE f_id = #{id}"
)
void
updateByIdfirmArchivesFile
(
@Param
(
"firm_archivesFile"
)
String
firm_archivesFile
,
@Param
(
"id"
)
Integer
id
,
@Param
(
"logout_flag"
)
int
logout_flag
);
List
<
TycpdmFirmEntity
>
selectTycpdmFirmList
(
@org
.
apache
.
ibatis
.
annotations
.
Param
(
"params"
)
Map
<
String
,
Object
>
params
,
Page
page
);
}
}
src/main/java/io/office/modules/manage/dao/TycpdmVipUserDao.java
0 → 100644
View file @
73ba4347
package
io
.
office
.
modules
.
manage
.
dao
;
import
io.office.modules.manage.entity.TycpdmVipUserEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-13 16:44:40
*/
@Mapper
public
interface
TycpdmVipUserDao
extends
BaseMapper
<
TycpdmVipUserEntity
>
{
}
src/main/java/io/office/modules/manage/entity/TycpdmVipUserEntity.java
0 → 100644
View file @
73ba4347
package
io
.
office
.
modules
.
manage
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-13 16:44:40
*/
@Data
@TableName
(
"tycpdm_vip_user"
)
public
class
TycpdmVipUserEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* $column.comments
*/
@TableId
private
Integer
id
;
/**
* $column.comments
*/
private
String
fId
;
/**
* $column.comments
*/
private
String
firmName
;
/**
* $column.comments
*/
private
String
userId
;
public
TycpdmVipUserEntity
(
Integer
id
,
String
fId
,
String
firmName
,
String
userId
)
{
this
.
id
=
id
;
this
.
fId
=
fId
;
this
.
firmName
=
firmName
;
this
.
userId
=
userId
;
}
}
src/main/java/io/office/modules/manage/service/TycpdmFirmService.java
View file @
73ba4347
package
io
.
office
.
modules
.
manage
.
service
;
package
io
.
office
.
modules
.
manage
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.PageUtils
;
import
io.office.modules.manage.entity.MemberEntity
;
import
io.office.modules.manage.entity.ProductEntity
;
import
io.office.modules.manage.entity.TycpdmFirmEntity
;
import
io.office.modules.manage.entity.TycpdmFirmEntity
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -20,6 +26,13 @@ public interface TycpdmFirmService extends IService<TycpdmFirmEntity> {
...
@@ -20,6 +26,13 @@ public interface TycpdmFirmService extends IService<TycpdmFirmEntity> {
TycpdmFirmEntity
findUserName
(
String
userName
);
TycpdmFirmEntity
findUserName
(
String
userName
);
Map
<
String
,
Integer
>
findTycpdmFirmLogoutFlagCount
(
SysUserEntity
userEntity
);
Map
<
String
,
Integer
>
findTycpdmFirmLogoutFlagCount
(
MemberEntity
userEntity
);
void
uploadFile
(
MultipartFile
file
,
Integer
id
);
String
uploadFileOne
(
MultipartFile
file
);
Page
<
TycpdmFirmEntity
>
findlist
(
Map
<
String
,
Object
>
params
,
Page
page
);
}
}
src/main/java/io/office/modules/manage/service/TycpdmVipUserService.java
0 → 100644
View file @
73ba4347
package
io
.
office
.
modules
.
manage
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.office.common.utils.PageUtils
;
import
io.office.modules.manage.entity.TycpdmVipUserEntity
;
import
java.util.Map
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-13 16:44:40
*/
public
interface
TycpdmVipUserService
extends
IService
<
TycpdmVipUserEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
}
src/main/java/io/office/modules/manage/service/impl/TycpdmFirmServiceImpl.java
View file @
73ba4347
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.common.exception.RRException
;
import
io.office.common.exception.RRException
;
import
io.office.modules.manage.dao.MemberDao
;
import
io.office.modules.manage.dao.MemberDao
;
import
io.office.modules.manage.dao.TycpdmVipUserDao
;
import
io.office.modules.manage.entity.MemberEntity
;
import
io.office.modules.manage.entity.ProductEntity
;
import
io.office.modules.manage.entity.TycpdmVipUserEntity
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.UUID
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
...
@@ -17,6 +28,8 @@ import io.office.common.utils.Query;
...
@@ -17,6 +28,8 @@ import io.office.common.utils.Query;
import
io.office.modules.manage.dao.TycpdmFirmDao
;
import
io.office.modules.manage.dao.TycpdmFirmDao
;
import
io.office.modules.manage.entity.TycpdmFirmEntity
;
import
io.office.modules.manage.entity.TycpdmFirmEntity
;
import
io.office.modules.manage.service.TycpdmFirmService
;
import
io.office.modules.manage.service.TycpdmFirmService
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.multipart.MultipartFile
;
@Service
(
"tycpdmFirmService"
)
@Service
(
"tycpdmFirmService"
)
...
@@ -26,8 +39,16 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
...
@@ -26,8 +39,16 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
private
TycpdmFirmDao
tycpdmFirmDao
;
private
TycpdmFirmDao
tycpdmFirmDao
;
@Autowired
@Autowired
private
TycpdmVipUserDao
tycpdmVipUserDao
;
@Autowired
private
MemberDao
memberDao
;
private
MemberDao
memberDao
;
@Value
(
"${uploadFileQY}"
)
String
uploadFileQY
;
@Value
(
"${uploadFileQYOne}"
)
String
uploadFileQYOne
;
@Override
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
TycpdmFirmEntity
>
page
=
this
.
page
(
IPage
<
TycpdmFirmEntity
>
page
=
this
.
page
(
...
@@ -44,16 +65,16 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
...
@@ -44,16 +65,16 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
}
}
@Override
@Override
public
Map
<
String
,
Integer
>
findTycpdmFirmLogoutFlagCount
(
SysUs
erEntity
userEntity
)
{
public
Map
<
String
,
Integer
>
findTycpdmFirmLogoutFlagCount
(
Memb
erEntity
userEntity
)
{
HashMap
map
=
new
HashMap
<>();
HashMap
map
=
new
HashMap
<>();
String
username
=
userEntity
.
getUsername
();
String
username
=
userEntity
.
getUsername
();
//获取管理员是 中心管理员还是分中心管理员
//获取管理员是 中心管理员还是分中心管理员
Integer
levels
=
memberDao
.
selectCode_agen
(
username
);
//用户权限 空.代表普通用户 0.代表中心管理员,1.代表校验管理员 其他4位.代表分中心管理员
Integer
levels
=
memberDao
.
selectCode_agen
(
username
);
//用户权限 空.代表普通用户 0.代表中心管理员,1.代表校验管理员 其他4位.代表分中心管理员
if
(
levels
==
0
){
if
(
levels
==
null
){
}
else
if
(
levels
==
null
){
throw
new
RRException
(
"无权访问"
);
throw
new
RRException
(
"无权访问"
);
}
else
if
(
levels
==
0
){
}
else
if
(
levels
==
1
){
}
else
if
(
levels
==
1
){
throw
new
RRException
(
"无权访问"
);
throw
new
RRException
(
"无权访问"
);
}
else
if
(
String
.
valueOf
(
levels
).
length
()==
4
){
}
else
if
(
String
.
valueOf
(
levels
).
length
()==
4
){
...
@@ -61,9 +82,93 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
...
@@ -61,9 +82,93 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
}
else
{
}
else
{
throw
new
RRException
(
"无权访问"
);
throw
new
RRException
(
"无权访问"
);
}
}
Integer
countAll
=
tycpdmFirmDao
.
findTycpdmFirmLogoutFlagCountALL
(
levels
);
//查询 申请总数
//审核状态 0待审核 1审核成功 2审核失败
Integer
countAll
=
tycpdmFirmDao
.
findTycpdmFirmLogoutFlagCountALL
(
levels
,
null
);
//查询 申请总数
Integer
auditCount
=
tycpdmFirmDao
.
findTycpdmFirmLogoutFlagCountALL
(
levels
,
0
);
//查询 等待审核 0
Integer
throughCount
=
tycpdmFirmDao
.
findTycpdmFirmLogoutFlagCountALL
(
levels
,
1
);
//查询 通过审核 1
Integer
notThroughCount
=
tycpdmFirmDao
.
findTycpdmFirmLogoutFlagCountALL
(
levels
,
2
);
//查询 未通过审核 2
map
.
put
(
"countAll"
,
countAll
);
map
.
put
(
"countAll"
,
countAll
);
map
.
put
(
"auditCount"
,
auditCount
);
map
.
put
(
"throughCount"
,
throughCount
);
map
.
put
(
"notThroughCount"
,
notThroughCount
);
return
map
;
return
map
;
}
}
@Override
public
void
uploadFile
(
MultipartFile
file
,
Integer
id
)
{
//要删除原来的文件
TycpdmFirmEntity
tycpdmFirmEntity
=
tycpdmFirmDao
.
selectById
(
id
);
String
firmArchivesfile
=
tycpdmFirmEntity
.
getFirmArchivesfile
();
if
(
file
.
isEmpty
())
{
throw
new
RRException
(
"上传失败,请选择文件"
);
}
File
dir
=
new
File
(
uploadFileQY
);
if
(!
dir
.
exists
()){
boolean
mkdirs
=
dir
.
mkdirs
();
System
.
out
.
println
(
mkdirs
);
}
String
fileName
=
file
.
getOriginalFilename
();
String
substring
=
fileName
.
substring
(
fileName
.
lastIndexOf
(
"."
));
//文件后缀
String
uuid
=
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
File
dest
=
new
File
(
uploadFileQY
+
uuid
+
substring
);
try
{
file
.
transferTo
(
dest
);
//保存路径 firm_archivesFile
tycpdmFirmDao
.
updateByIdfirmArchivesFile
(
uploadFileQY
+
uuid
+
substring
,
id
,
0
);
//tycpdm_vip_user表中新增数据
/*TycpdmFirmEntity tycpdmFirmEntity = tycpdmFirmDao.selectById(id);
String baseUser = tycpdmFirmEntity.getBaseUser();
String firmname = tycpdmFirmEntity.getFirmname();
tycpdmVipUserDao.insert(new TycpdmVipUserEntity(null,id+"",firmname,baseUser));*/
//删除原来的照片
if
(
firmArchivesfile
!=
null
){
File
file1
=
new
File
(
firmArchivesfile
);
if
(
file1
.
exists
()){
file1
.
delete
();
}
}
return
;
}
catch
(
Exception
e
)
{
dir
.
delete
();
e
.
printStackTrace
();
throw
new
RRException
(
"上传失败"
);
}
}
@Override
public
String
uploadFileOne
(
MultipartFile
file
)
{
if
(
file
.
isEmpty
())
{
throw
new
RRException
(
"上传失败,请选择文件"
);
}
File
dir
=
new
File
(
uploadFileQYOne
);
if
(!
dir
.
exists
()){
boolean
mkdirs
=
dir
.
mkdirs
();
System
.
out
.
println
(
mkdirs
);
}
String
fileName
=
file
.
getOriginalFilename
();
String
substring
=
fileName
.
substring
(
fileName
.
lastIndexOf
(
"."
));
//文件后缀
String
uuid
=
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
File
dest
=
new
File
(
uploadFileQYOne
+
uuid
+
substring
);
try
{
file
.
transferTo
(
dest
);
return
uploadFileQYOne
+
uuid
+
substring
;
}
catch
(
Exception
e
)
{
dir
.
delete
();
e
.
printStackTrace
();
throw
new
RRException
(
"上传失败"
);
}
}
@Override
public
Page
<
TycpdmFirmEntity
>
findlist
(
Map
<
String
,
Object
>
params
,
Page
page
)
{
List
<
TycpdmFirmEntity
>
list
=
tycpdmFirmDao
.
selectTycpdmFirmList
(
params
,
page
);
page
.
setRecords
(
list
);
return
page
;
}
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/service/impl/TycpdmVipUserServiceImpl.java
0 → 100644
View file @
73ba4347
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.Query
;
import
io.office.modules.manage.dao.TycpdmVipUserDao
;
import
io.office.modules.manage.entity.TycpdmVipUserEntity
;
import
io.office.modules.manage.service.TycpdmVipUserService
;
@Service
(
"tycpdmVipUserService"
)
public
class
TycpdmVipUserServiceImpl
extends
ServiceImpl
<
TycpdmVipUserDao
,
TycpdmVipUserEntity
>
implements
TycpdmVipUserService
{
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
TycpdmVipUserEntity
>
page
=
this
.
page
(
new
Query
<
TycpdmVipUserEntity
>().
getPage
(
params
),
new
QueryWrapper
<
TycpdmVipUserEntity
>()
);
return
new
PageUtils
(
page
);
}
}
\ No newline at end of file
src/main/java/io/office/modules/sys/controller/AbstractController.java
View file @
73ba4347
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
package
io
.
office
.
modules
.
sys
.
controller
;
package
io
.
office
.
modules
.
sys
.
controller
;
import
io.office.modules.manage.entity.MemberEntity
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
org.apache.shiro.SecurityUtils
;
import
org.apache.shiro.SecurityUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -28,4 +29,12 @@ public abstract class AbstractController {
...
@@ -28,4 +29,12 @@ public abstract class AbstractController {
protected
Long
getUserId
()
{
protected
Long
getUserId
()
{
return
getUser
().
getUserId
();
return
getUser
().
getUserId
();
}
}
protected
MemberEntity
getMemberUser
()
{
return
(
MemberEntity
)
SecurityUtils
.
getSubject
().
getPrincipal
();
}
protected
Integer
getMemberUserId
()
{
return
getMemberUser
().
getId
();
}
}
}
src/main/java/io/office/modules/sys/oauth2/OAuth2Realm.java
View file @
73ba4347
...
@@ -56,7 +56,10 @@ public class OAuth2Realm extends AuthorizingRealm {
...
@@ -56,7 +56,10 @@ public class OAuth2Realm extends AuthorizingRealm {
info
=
new
SimpleAuthorizationInfo
();
info
=
new
SimpleAuthorizationInfo
();
info
.
setStringPermissions
(
permsSet
);
info
.
setStringPermissions
(
permsSet
);
}
else
{
}
else
if
(
object
instanceof
MemberEntity
){
return
null
;
}
else
{
return
null
;
}
}
return
info
;
return
info
;
...
...
src/main/resources/application.yml
View file @
73ba4347
...
@@ -76,4 +76,7 @@ renren:
...
@@ -76,4 +76,7 @@ renren:
secret
:
f4e2e52034348f86b67cde581c0f9eb5[www.renren.io]
secret
:
f4e2e52034348f86b67cde581c0f9eb5[www.renren.io]
# token有效时长,7天,单位秒
# token有效时长,7天,单位秒
expire
:
60480000
expire
:
60480000
header
:
token
header
:
token
\ No newline at end of file
uploadFileQY
:
C:\upload_img\firm_archives_file\
#/第二步,电子表格上传路径(企业认证)
uploadFileQYOne
:
C:\upload_img\firmBusinessLicenseFile\
#第一步,营业执照上传路径(企业认证)
\ No newline at end of file
src/main/resources/mapper/manage/TycpdmFirmDao.xml
View file @
73ba4347
...
@@ -53,14 +53,32 @@
...
@@ -53,14 +53,32 @@
<result
property=
"servicetype"
column=
"serviceType"
/>
<result
property=
"servicetype"
column=
"serviceType"
/>
</resultMap>
</resultMap>
<select
id=
"findTycpdmFirmLogoutFlagCountALL"
parameterType=
"java.lang.Integer"
>
<select
id=
"findTycpdmFirmLogoutFlagCountALL"
parameterType=
"java.lang.Integer"
resultType=
"java.lang.Integer"
>
select count(*) from tycpdm_firm a left join tycpdm_user_service b on a.f_id=b.f_id
select count(*) from tycpdm_firm a left join tycpdm_user_service b on a.f_id=b.f_id
where branchcode='5305'
where 1=1
where 1=1
<if
test=
"levels ==-99"
>
<if
test=
"levels ==-99"
>
and branchcode=#{levels}
and branchcode=#{levels}
</if>
</if>
and logout_flag
<
>
-1;
<if
test=
"logout_flag !=null"
>
and logout_flag=#{logout_flag}
</if>
and logout_flag
<>
-1;
</select>
</select>
<select
id=
"selectTycpdmFirmList"
resultMap=
"tycpdmFirmMap"
parameterType=
"java.util.Map"
>
select * from tycpdm_firm where 1=1
<if
test=
"params.firmName !='' and params.firmName !=null"
>
and firmName like concat('%',#{params.firmName},'%')
</if>
<if
test=
"params.logout_flag !='' and params.logout_flag !=null"
>
and logout_flag =#{params.logout_flag}
</if>
<if
test=
"params.branchCode !='' and params.branchCode !=null"
>
and branchCode =#{params.branchCode}
</if>
</select>
</mapper>
</mapper>
\ No newline at end of file
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