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
423e8f6b
Commit
423e8f6b
authored
Dec 14, 2021
by
rongkailun
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
aa16dea5
67fb45b7
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
474 additions
and
28 deletions
+474
-28
SysLog.java
src/main/java/io/office/common/annotation/SysLog.java
+1
-1
ShiroConfig.java
src/main/java/io/office/config/ShiroConfig.java
+1
-1
MemberController.java
...io/office/modules/manage/controller/MemberController.java
+6
-3
PlanBranchController.java
...ffice/modules/manage/controller/PlanBranchController.java
+16
-0
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
TimescodeRegiEntity.java
.../io/office/modules/manage/entity/TimescodeRegiEntity.java
+1
-1
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
+0
-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/common/annotation/SysLog.java
View file @
423e8f6b
...
...
@@ -24,6 +24,6 @@ import java.lang.annotation.Target;
@Documented
public
@interface
SysLog
{
String
value
()
default
""
;
}
src/main/java/io/office/config/ShiroConfig.java
View file @
423e8f6b
...
...
@@ -61,7 +61,7 @@ public class ShiroConfig {
filterMap
.
put
(
"/captcha.jpg"
,
"anon"
);
filterMap
.
put
(
"/aaa.txt"
,
"anon"
);
//不需要登录的接口
filterMap
.
put
(
"/
*/api/**
"
,
"anon"
);
filterMap
.
put
(
"/
api/login
"
,
"anon"
);
filterMap
.
put
(
"/**"
,
"oauth2"
);
shiroFilter
.
setFilterChainDefinitionMap
(
filterMap
);
...
...
src/main/java/io/office/modules/manage/controller/MemberController.java
View file @
423e8f6b
...
...
@@ -4,6 +4,7 @@ import java.util.Arrays;
import
java.util.Map
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.sys.controller.AbstractController
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -30,7 +31,7 @@ import javax.servlet.http.HttpServletResponse;
*/
@RestController
@RequestMapping
(
"/member"
)
public
class
MemberController
{
public
class
MemberController
extends
AbstractController
{
@Autowired
private
MemberService
memberService
;
...
...
@@ -107,10 +108,12 @@ public class MemberController {
* 修改
*/
@RequestMapping
(
"/api/update"
)
@Login
// @RequiresPermissions("manage:member:update")
public
R
update
(
@RequestBody
MemberEntity
member
){
memberService
.
updateById
(
member
);
MemberEntity
memberUser
=
getMemberUser
();
System
.
out
.
println
(
memberUser
);
memberService
.
updateById
(
member
);
return
R
.
ok
();
}
...
...
src/main/java/io/office/modules/manage/controller/PlanBranchController.java
View file @
423e8f6b
...
...
@@ -3,6 +3,7 @@ package io.office.modules.manage.controller;
import
java.util.Arrays
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -43,6 +44,7 @@ public class PlanBranchController {
}
/**
* 信息
*/
...
...
@@ -87,4 +89,18 @@ public class PlanBranchController {
return
R
.
ok
();
}
@RequestMapping
(
"/api/getList"
)
// @RequiresPermissions("manage:planbranch:delete")
public
R
getList
(
@RequestBody
PlanBranchEntity
planBranch
){
QueryWrapper
<
PlanBranchEntity
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"classnum"
,
planBranch
.
getClassnum
());
queryWrapper
.
orderByDesc
(
"id"
);
return
R
.
ok
().
put
(
"data"
,
planBranchService
.
list
(
queryWrapper
));
}
}
src/main/java/io/office/modules/manage/controller/TycpdmFirmController.java
View file @
423e8f6b
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.io.IOException
;
import
java.util.Arrays
;
import
java.util.List
;
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.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.entity.SysUserEntity
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
...
...
@@ -19,7 +26,7 @@ import io.office.modules.manage.entity.TycpdmFirmEntity;
import
io.office.modules.manage.service.TycpdmFirmService
;
import
io.office.common.utils.PageUtils
;
import
io.office.common.utils.R
;
import
org.springframework.web.multipart.MultipartFile
;
/**
...
...
@@ -35,15 +42,37 @@ public class TycpdmFirmController extends AbstractController {
@Autowired
private
TycpdmFirmService
tycpdmFirmService
;
@Autowired
private
MemberDao
memberDao
;
/**
* 列表
*/
@RequestMapping
(
"/list"
)
@RequestMapping
(
"/
api/
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
);
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 {
@RequestMapping
(
"/api/save"
)
@Login
// @RequiresPermissions("manage:tycpdmfirm:save")
public
R
save
(
@RequestBody
TycpdmFirmEntity
tycpdmFirm
){
public
R
save
(
@RequestBody
TycpdmFirmEntity
tycpdmFirm
,
@RequestParam
(
"file"
)
MultipartFile
file
){
String
baseUser
=
tycpdmFirm
.
getBaseUser
();
if
(
baseUser
==
null
){
throw
new
RRException
(
"用户名不能为空"
);
...
...
@@ -118,13 +147,45 @@ public class TycpdmFirmController extends AbstractController {
*/
@RequestMapping
(
"/api/findTycpdmFirmLogoutFlagCount"
)
// @RequiresPermissions("manage:tycpdmfirm:delete")
public
R
findTycpdmFirmLogoutFlagCount
(){
Integer
id
=
getUserId
().
intValue
();
@Login
public
R
findTycpdmFirmLogoutFlagCount
(
@RequestParam
(
"userId"
)
Integer
userId
){
/*Integer id=getMemberUserId().intValue();
if(id==null){
return R.error("用户信息有误");
}
SysUserEntity
user
=
getUser
();
Map
<
String
,
Integer
>
map
=
tycpdmFirmService
.
findTycpdmFirmLogoutFlagCount
(
user
);
MemberEntity userMember = getMemberUser();*/
MemberEntity
memberEntity
=
memberDao
.
selectById
(
userId
);
Map
<
String
,
Integer
>
map
=
tycpdmFirmService
.
findTycpdmFirmLogoutFlagCount
(
memberEntity
);
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 @
423e8f6b
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 @
423e8f6b
package
io
.
office
.
modules
.
manage
.
dao
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.modules.manage.entity.TycpdmFirmEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.Update
;
import
org.springframework.data.repository.query.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* ${comments}
*
...
...
@@ -18,5 +23,13 @@ public interface TycpdmFirmDao extends BaseMapper<TycpdmFirmEntity> {
@Select
(
"select * from tycpdm_firm where base_user=#{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 @
423e8f6b
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/TimescodeRegiEntity.java
View file @
423e8f6b
...
...
@@ -24,7 +24,7 @@ public class TimescodeRegiEntity implements Serializable {
/**
* 手机号
*/
@TableId
(
type
=
IdType
.
NONE
)
@TableId
(
type
=
IdType
.
INPUT
)
private
String
phone
;
/**
* 时间
...
...
src/main/java/io/office/modules/manage/entity/TycpdmVipUserEntity.java
0 → 100644
View file @
423e8f6b
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 @
423e8f6b
package
io
.
office
.
modules
.
manage
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
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.sys.entity.SysUserEntity
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -20,6 +26,13 @@ public interface TycpdmFirmService extends IService<TycpdmFirmEntity> {
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 @
423e8f6b
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 @
423e8f6b
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.office.common.exception.RRException
;
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
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.UUID
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
...
...
@@ -17,6 +28,8 @@ import io.office.common.utils.Query;
import
io.office.modules.manage.dao.TycpdmFirmDao
;
import
io.office.modules.manage.entity.TycpdmFirmEntity
;
import
io.office.modules.manage.service.TycpdmFirmService
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.multipart.MultipartFile
;
@Service
(
"tycpdmFirmService"
)
...
...
@@ -26,8 +39,16 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
private
TycpdmFirmDao
tycpdmFirmDao
;
@Autowired
private
TycpdmVipUserDao
tycpdmVipUserDao
;
@Autowired
private
MemberDao
memberDao
;
@Value
(
"${uploadFileQY}"
)
String
uploadFileQY
;
@Value
(
"${uploadFileQYOne}"
)
String
uploadFileQYOne
;
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
TycpdmFirmEntity
>
page
=
this
.
page
(
...
...
@@ -44,16 +65,16 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
}
@Override
public
Map
<
String
,
Integer
>
findTycpdmFirmLogoutFlagCount
(
SysUs
erEntity
userEntity
)
{
public
Map
<
String
,
Integer
>
findTycpdmFirmLogoutFlagCount
(
Memb
erEntity
userEntity
)
{
HashMap
map
=
new
HashMap
<>();
String
username
=
userEntity
.
getUsername
();
//获取管理员是 中心管理员还是分中心管理员
Integer
levels
=
memberDao
.
selectCode_agen
(
username
);
//用户权限 空.代表普通用户 0.代表中心管理员,1.代表校验管理员 其他4位.代表分中心管理员
if
(
levels
==
0
){
}
else
if
(
levels
==
null
){
if
(
levels
==
null
){
throw
new
RRException
(
"无权访问"
);
}
else
if
(
levels
==
0
){
}
else
if
(
levels
==
1
){
throw
new
RRException
(
"无权访问"
);
}
else
if
(
String
.
valueOf
(
levels
).
length
()==
4
){
...
...
@@ -61,9 +82,93 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
}
else
{
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
(
"auditCount"
,
auditCount
);
map
.
put
(
"throughCount"
,
throughCount
);
map
.
put
(
"notThroughCount"
,
notThroughCount
);
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 @
423e8f6b
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 @
423e8f6b
...
...
@@ -8,6 +8,7 @@
package
io
.
office
.
modules
.
sys
.
controller
;
import
io.office.modules.manage.entity.MemberEntity
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
org.apache.shiro.SecurityUtils
;
import
org.slf4j.Logger
;
...
...
@@ -28,4 +29,12 @@ public abstract class AbstractController {
protected
Long
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 @
423e8f6b
...
...
@@ -56,7 +56,6 @@ public class OAuth2Realm extends AuthorizingRealm {
info
=
new
SimpleAuthorizationInfo
();
info
.
setStringPermissions
(
permsSet
);
}
else
{
}
return
info
;
...
...
src/main/resources/application.yml
View file @
423e8f6b
...
...
@@ -76,4 +76,7 @@ renren:
secret
:
f4e2e52034348f86b67cde581c0f9eb5[www.renren.io]
# token有效时长,7天,单位秒
expire
:
60480000
header
:
token
\ No newline at end of file
header
:
token
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 @
423e8f6b
...
...
@@ -53,14 +53,32 @@
<result
property=
"servicetype"
column=
"serviceType"
/>
</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
where branchcode='5305'
where 1=1
<if
test=
"levels ==-99"
>
and branchcode=#{levels}
</if>
and logout_flag
<
>
-1;
<if
test=
"logout_flag !=null"
>
and logout_flag=#{logout_flag}
</if>
and logout_flag
<>
-1;
</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>
\ 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