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
80884866
Commit
80884866
authored
Dec 15, 2021
by
唐功亮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【修改】 个人中心BUG
parent
ba384dc0
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
61 additions
and
48 deletions
+61
-48
TycpdmFirmController.java
...ffice/modules/manage/controller/TycpdmFirmController.java
+32
-41
MemberDao.java
src/main/java/io/office/modules/manage/dao/MemberDao.java
+3
-0
TycpdmFirmChangeDao.java
...ava/io/office/modules/manage/dao/TycpdmFirmChangeDao.java
+5
-2
TycpdmFirmDao.java
...main/java/io/office/modules/manage/dao/TycpdmFirmDao.java
+5
-1
TycpdmFirmService.java
...a/io/office/modules/manage/service/TycpdmFirmService.java
+13
-2
LogLoginServiceImpl.java
...fice/modules/manage/service/impl/LogLoginServiceImpl.java
+1
-1
TycpdmFirmChangeServiceImpl.java
...ules/manage/service/impl/TycpdmFirmChangeServiceImpl.java
+2
-1
TycpdmFirmServiceImpl.java
...ce/modules/manage/service/impl/TycpdmFirmServiceImpl.java
+0
-0
No files found.
src/main/java/io/office/modules/manage/controller/TycpdmFirmController.java
View file @
80884866
...
...
@@ -34,6 +34,8 @@ import io.office.common.utils.PageUtils;
import
io.office.common.utils.R
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
static
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
IdWorker
.
getId
;
...
...
@@ -107,43 +109,9 @@ public class TycpdmFirmController extends AbstractController {
@RequestMapping
(
"/authApi/save"
)
// @RequiresPermissions("manage:tycpdmfirm:save")
public
R
save
(
@RequestBody
Map
body
)
throws
InvocationTargetException
,
IllegalAccessException
{
TycpdmFirmEntity
tycpdmFirm
=
new
TycpdmFirmEntity
();
TycpdmFirmChangeEntity
tycpdmFirmChangeEntity
=
new
TycpdmFirmChangeEntity
();
Integer
status
=
body
.
get
(
"status"
)==
null
?
0
:
Integer
.
valueOf
(
String
.
valueOf
(
body
.
get
(
"status"
)));
Integer
id
=
0
;
if
(
status
==
1
){
BeanUtils
.
populate
(
tycpdmFirm
,
body
);
String
baseUser
=
tycpdmFirm
.
getBaseUser
();
if
(
baseUser
==
null
){
throw
new
RRException
(
"用户名不能为空"
);
}
String
firmname
=
tycpdmFirm
.
getFirmname
();
if
(
firmname
==
null
||
""
.
equals
(
tycpdmFirm
)){
throw
new
RRException
(
"企业名称不能为空"
);
}
int
count
=
tycpdmFirmDao
.
selectByIdFirmName
(
firmname
,
1
);
if
(
count
>
0
){
throw
new
RRException
(
"企业名称已经存在"
);
}
//第一步不存储状态 第二部存储
//tycpdmFirm.setLogoutFlag(0); //审核状态 0待审核 1审核成功 2审核失败
tycpdmFirmService
.
save
(
tycpdmFirm
);
id
=
tycpdmFirm
.
getFId
();
}
else
if
(
status
==
2
){
Integer
fId
=
Integer
.
valueOf
(
String
.
valueOf
(
body
.
get
(
"fId"
)));
BeanUtils
.
populate
(
tycpdmFirmChangeEntity
,
body
);
String
baseUser
=
tycpdmFirmChangeEntity
.
getBaseUser
();
if
(
baseUser
==
null
){
throw
new
RRException
(
"用户名不能为空"
);
}
tycpdmFirmChangeEntity
.
setFId
(
fId
);
tycpdmFirmChangeService
.
save
(
tycpdmFirmChangeEntity
);
id
=
tycpdmFirmChangeEntity
.
getId
();
}
else
{
return
R
.
error
(
"请选择业务类型"
);
}
MemberEntity
memberUser
=
getMemberUser
();
Integer
id
=
tycpdmFirmService
.
saveTycpdmFirmInfo
(
body
,
memberUser
.
getUsername
());
return
R
.
ok
().
put
(
"data"
,
id
);
}
...
...
@@ -161,10 +129,13 @@ public class TycpdmFirmController extends AbstractController {
@RequestMapping
(
"/authApi/findUserName"
)
// @RequiresPermissions("manage:tycpdmfirm:save")
public
R
findUserName
(
@RequestParam
(
"userName"
)
String
userName
){
TycpdmFirmEntity
tycpdmFirmEntity
=
tycpdmFirmService
.
findUserName
(
userName
);
return
R
.
ok
().
put
(
"data"
,
tycpdmFirmEntity
);
//查询 业务类型 1.首次 2.变更
int
logoutFlag
=
tycpdmFirmService
.
findLogoutFlag
(
userName
);
JSONObject
tycpdmFirmEntity
=
tycpdmFirmService
.
findUserName
(
logoutFlag
,
userName
);
R
ok
=
R
.
ok
();
tycpdmFirmEntity
.
put
(
"status"
,
logoutFlag
);
ok
.
put
(
"data"
,
tycpdmFirmEntity
);
return
ok
;
}
/**
...
...
@@ -251,8 +222,9 @@ public class TycpdmFirmController extends AbstractController {
@RequestMapping
(
"/authApi/audit"
)
// @RequiresPermissions("manage:tycpdmfirm:delete")
public
R
audit
(
@RequestBody
Map
map
){
Integer
memberUserId
=
getMemberUserId
();
try
{
tycpdmFirmService
.
audit
(
map
);
tycpdmFirmService
.
audit
(
map
,
memberUserId
);
}
catch
(
InvocationTargetException
e
)
{
e
.
printStackTrace
();
}
catch
(
IllegalAccessException
e
)
{
...
...
@@ -261,4 +233,23 @@ public class TycpdmFirmController extends AbstractController {
return
R
.
ok
();
}
/**
* 根据文件地址返回文件
*/
@RequestMapping
(
"/authApi/returnFile"
)
public
R
returnFile
(
@RequestBody
Map
<
String
,
Object
>
params
,
HttpServletResponse
response
){
tycpdmFirmService
.
returnFile
(
params
,
response
);
return
R
.
ok
();
}
/**
* 切换分中心管理员
*/
@RequestMapping
(
"/authApi/updateSystem"
)
public
R
updateSystem
(
@RequestBody
Map
<
String
,
Object
>
params
){
tycpdmFirmService
.
updateSystem
(
params
);
return
R
.
ok
();
}
}
src/main/java/io/office/modules/manage/dao/MemberDao.java
View file @
80884866
...
...
@@ -42,6 +42,9 @@ public interface MemberDao extends BaseMapper<MemberEntity> {
@Update
(
"UPDATE member SET phone = #{phone} WHERE id = #{id}"
)
void
updateByIDPhone
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"phone"
)
String
phone
);
@Update
(
"UPDATE member SET Applystate = #{applystate} WHERE username = #{userName}"
)
void
updateByIdApplystate
(
@Param
(
"applystate"
)
String
applystate
,
@Param
(
"userName"
)
String
userName
);
/*@Select("select * from member where username=#{userName} or firmcode=#{userName}")
MemberEntity selectByNameAndSn(@Param("userName") String userName);*/
...
...
src/main/java/io/office/modules/manage/dao/TycpdmFirmChangeDao.java
View file @
80884866
...
...
@@ -31,7 +31,10 @@ public interface TycpdmFirmChangeDao extends BaseMapper<TycpdmFirmChangeEntity>
List
<
TycpdmFirmChangeEntity
>
selectTycpdmFirmList
(
Map
<
String
,
Object
>
params
,
Page
page
);
@Select
(
"select * from tycpdm_firm_change where base_user=#{userName}"
)
TycpdmFirmChangeEntity
findUserName
(
@Param
(
"userName"
)
String
userName
);
@Select
(
"select * from tycpdm_firm_change where base_user=#{userName} ORDER BY id DESC"
)
List
<
TycpdmFirmChangeEntity
>
findUserName
(
@Param
(
"userName"
)
String
userName
);
@Update
(
"UPDATE tycpdm_firm_change SET branchCode = #{branchCode} WHERE id = #{id}"
)
void
updateByIdBranchCode
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"branchCode"
)
Integer
branchCode
);
}
src/main/java/io/office/modules/manage/dao/TycpdmFirmDao.java
View file @
80884866
...
...
@@ -20,7 +20,7 @@ import java.util.Map;
*/
@Mapper
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
);
Integer
findTycpdmFirmLogoutFlagCountALL
(
@Param
(
"levels"
)
Integer
levels
,
@Param
(
"logout_flag"
)
Integer
logout_flag
);
...
...
@@ -38,4 +38,8 @@ public interface TycpdmFirmDao extends BaseMapper<TycpdmFirmEntity> {
@Select
(
"select count(1) from tycpdm_firm where firmName=#{firmname} and logout_flag=#{logout_flag}"
)
int
selectByIdFirmName
(
@Param
(
"firmname"
)
String
firmname
,
@Param
(
"logout_flag"
)
int
logout_flag
);
@Update
(
"UPDATE tycpdm_firm SET branchCode = #{branchCode} WHERE f_id = #{id}"
)
void
updateByIdBranchCode
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"branchCode"
)
Integer
branchCode
);
}
src/main/java/io/office/modules/manage/service/TycpdmFirmService.java
View file @
80884866
package
io
.
office
.
modules
.
manage
.
service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
io.office.common.utils.PageUtils
;
...
...
@@ -9,6 +10,8 @@ import io.office.modules.manage.entity.TycpdmFirmEntity;
import
io.office.modules.sys.entity.SysUserEntity
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.List
;
...
...
@@ -25,7 +28,7 @@ public interface TycpdmFirmService extends IService<TycpdmFirmEntity> {
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
TycpdmFirmEntity
findUserName
(
String
userName
);
JSONObject
findUserName
(
Integer
logoutFlag
,
String
userName
);
Map
<
String
,
Integer
>
findTycpdmFirmLogoutFlagCount
(
MemberEntity
userEntity
);
...
...
@@ -35,6 +38,14 @@ public interface TycpdmFirmService extends IService<TycpdmFirmEntity> {
Page
<
TycpdmFirmEntity
>
findlist
(
Map
<
String
,
Object
>
params
,
Page
page
);
void
audit
(
Map
map
)
throws
InvocationTargetException
,
IllegalAccessException
;
void
audit
(
Map
map
,
Integer
memberUserId
)
throws
InvocationTargetException
,
IllegalAccessException
;
int
findLogoutFlag
(
String
userName
);
Integer
saveTycpdmFirmInfo
(
Map
body
,
String
userName
)
throws
InvocationTargetException
,
IllegalAccessException
;
void
returnFile
(
Map
<
String
,
Object
>
params
,
HttpServletResponse
response
)
;
void
updateSystem
(
Map
<
String
,
Object
>
params
);
}
src/main/java/io/office/modules/manage/service/impl/LogLoginServiceImpl.java
View file @
80884866
...
...
@@ -93,7 +93,7 @@ public class LogLoginServiceImpl extends ServiceImpl<LogLoginDao, LogLoginEntity
if
(
levels
==
null
){
if
(
userType
==
3
){
//判断是否通过企业认证
if
(
"通过审核"
.
equals
(
applystate
)){
if
(
"通过审核"
.
equals
(
applystate
.
substring
(
0
,
4
)
)){
isQY
=
1
;
}
//判断是否是系统成员
...
...
src/main/java/io/office/modules/manage/service/impl/TycpdmFirmChangeServiceImpl.java
View file @
80884866
...
...
@@ -96,7 +96,7 @@ public class TycpdmFirmChangeServiceImpl extends ServiceImpl<TycpdmFirmChangeDao
@Override
public
TycpdmFirmChangeEntity
findUserName
(
String
userName
)
{
return
tycpdmFirmChangeDao
.
findUserName
(
userName
);
return
tycpdmFirmChangeDao
.
findUserName
(
userName
)
.
get
(
0
)
;
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/service/impl/TycpdmFirmServiceImpl.java
View file @
80884866
This diff is collapsed.
Click to expand it.
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