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
bf5f63c8
Commit
bf5f63c8
authored
Dec 14, 2021
by
吴迪
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
de43edbd
e391e734
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
387 additions
and
48 deletions
+387
-48
MemberController.java
...io/office/modules/manage/controller/MemberController.java
+13
-6
TycpdmFirmController.java
...ffice/modules/manage/controller/TycpdmFirmController.java
+86
-24
UserFunctionBindingController.java
...ules/manage/controller/UserFunctionBindingController.java
+3
-11
TimescodeChphoneDao.java
...ava/io/office/modules/manage/dao/TimescodeChphoneDao.java
+19
-0
TimescodeChphoneIpDao.java
...a/io/office/modules/manage/dao/TimescodeChphoneIpDao.java
+19
-0
TycpdmFirmChangeDao.java
...ava/io/office/modules/manage/dao/TycpdmFirmChangeDao.java
+7
-1
TycpdmFirmDao.java
...main/java/io/office/modules/manage/dao/TycpdmFirmDao.java
+3
-0
TimescodeChphoneEntity.java
.../office/modules/manage/entity/TimescodeChphoneEntity.java
+44
-0
TimescodeChphoneIpEntity.java
...ffice/modules/manage/entity/TimescodeChphoneIpEntity.java
+42
-0
MemberService.java
.../java/io/office/modules/manage/service/MemberService.java
+2
-0
TycpdmFirmChangeService.java
...ffice/modules/manage/service/TycpdmFirmChangeService.java
+3
-0
TycpdmFirmService.java
...a/io/office/modules/manage/service/TycpdmFirmService.java
+2
-0
MemberServiceImpl.java
...office/modules/manage/service/impl/MemberServiceImpl.java
+0
-0
TimescodeRegiServiceImpl.java
...modules/manage/service/impl/TimescodeRegiServiceImpl.java
+1
-1
TycpdmFirmChangeServiceImpl.java
...ules/manage/service/impl/TycpdmFirmChangeServiceImpl.java
+59
-0
TycpdmFirmServiceImpl.java
...ce/modules/manage/service/impl/TycpdmFirmServiceImpl.java
+53
-5
TimescodeChphoneDao.xml
src/main/resources/mapper/manage/TimescodeChphoneDao.xml
+16
-0
TimescodeChphoneIpDao.xml
src/main/resources/mapper/manage/TimescodeChphoneIpDao.xml
+15
-0
No files found.
src/main/java/io/office/modules/manage/controller/MemberController.java
View file @
bf5f63c8
...
...
@@ -50,8 +50,7 @@ public class MemberController extends AbstractController {
/**
* 用户信息管理-修改登录密码
*/
@Login
@RequestMapping
(
"/api/updatePass"
)
@RequestMapping
(
"/authApi/updatePass"
)
// @RequiresPermissions("manage:member:list")
public
R
updatePass
(
@RequestBody
Map
<
String
,
Object
>
params
){
memberService
.
updatePass
(
params
);
...
...
@@ -61,13 +60,21 @@ public class MemberController extends AbstractController {
/**
* 用户信息管理-修改手机号码
*/
@Login
@RequestMapping
(
"/api/updatephone"
)
@RequestMapping
(
"/authApi/updatephone"
)
// @RequiresPermissions("manage:member:list")
public
R
updatephone
(
@RequestBody
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
){
memberService
.
updatephone
(
params
,
request
,
response
);
return
R
.
ok
();
}
/**
* 获取验证码
*/
@RequestMapping
(
"/authApi/getVerificationCode"
)
// @RequiresPermissions("manage:timescoderegi:list")
public
R
getVerificationCode
(
@RequestBody
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
){
String
msg
=
memberService
.
getVerificationCode
(
params
,
request
,
response
);
return
R
.
ok
();
}
/**
* 列表
...
...
@@ -84,7 +91,7 @@ public class MemberController extends AbstractController {
/**
* 信息
*/
@RequestMapping
(
"/a
pi/info/
"
)
@RequestMapping
(
"/a
uthApi/info
"
)
// @RequiresPermissions("manage:member:info")
public
R
info
(){
Integer
memberUserId
=
getMemberUserId
();
...
...
@@ -107,7 +114,7 @@ public class MemberController extends AbstractController {
/**
* 修改
*/
@RequestMapping
(
"/api/update"
)
@RequestMapping
(
"/a
uthA
pi/update"
)
// @RequiresPermissions("manage:member:update")
public
R
update
(
@RequestBody
MemberEntity
member
){
...
...
src/main/java/io/office/modules/manage/controller/TycpdmFirmController.java
View file @
bf5f63c8
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.io.IOException
;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -12,8 +14,11 @@ 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.manage.entity.TycpdmFirmChangeEntity
;
import
io.office.modules.manage.service.TycpdmFirmChangeService
;
import
io.office.modules.sys.controller.AbstractController
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -28,6 +33,8 @@ import io.office.common.utils.PageUtils;
import
io.office.common.utils.R
;
import
org.springframework.web.multipart.MultipartFile
;
import
static
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
IdWorker
.
getId
;
/**
* ${comments}
...
...
@@ -43,10 +50,12 @@ public class TycpdmFirmController extends AbstractController {
private
TycpdmFirmService
tycpdmFirmService
;
@Autowired
private
TycpdmFirmChangeService
tycpdmFirmChangeService
;
@Autowired
private
MemberDao
memberDao
;
/**
/* */
/**
* 列表
*/
*/
/*
@RequestMapping("/api/list")
// @RequiresPermissions("manage:tycpdmfirm:list")
@Login
...
...
@@ -59,14 +68,13 @@ public class TycpdmFirmController extends AbstractController {
PageUtils page = tycpdmFirmService.queryPage(params);
return R.ok().put("data", page);
}
}
*/
/**
* 列表
*/
@RequestMapping
(
"/api/findlist"
)
@Login
@RequestMapping
(
"/authApi/findlist"
)
public
R
findlist
(
@RequestBody
Map
<
String
,
Object
>
params
){
Page
<
TycpdmFirmEntity
>
findlist
=
tycpdmFirmService
.
findlist
(
params
,
new
Page
(
Integer
.
valueOf
(
params
.
get
(
"page"
).
toString
()),
...
...
@@ -89,27 +97,56 @@ public class TycpdmFirmController extends AbstractController {
/**
* 保存(保存企业信息)
* @param
* @param status 申请状态 1.新增 2.修改
* @return
*/
@RequestMapping
(
"/api/save"
)
@RequestMapping
(
"/a
uthA
pi/save"
)
// @RequiresPermissions("manage:tycpdmfirm:save")
public
R
save
(
@RequestBody
TycpdmFirmEntity
tycpdmFirm
,
@RequestParam
(
"file"
)
MultipartFile
file
){
String
baseUser
=
tycpdmFirm
.
getBaseUser
();
if
(
baseUser
==
null
){
throw
new
RRException
(
"用户名不能为空"
);
public
R
save
(
@RequestBody
Map
body
,
@RequestParam
(
"status"
)
int
status
)
throws
InvocationTargetException
,
IllegalAccessException
{
TycpdmFirmEntity
tycpdmFirm
=
new
TycpdmFirmEntity
();
TycpdmFirmChangeEntity
tycpdmFirmChangeEntity
=
new
TycpdmFirmChangeEntity
();
Integer
id
=
0
;
if
(
status
==
1
){
BeanUtils
.
populate
(
tycpdmFirm
,
body
);
String
baseUser
=
tycpdmFirm
.
getBaseUser
();
if
(
baseUser
==
null
){
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
(
"请选择业务类型"
);
}
//第一步不存储状态 第二部存储
//tycpdmFirm.setLogoutFlag(0); //审核状态 0待审核 1审核成功 2审核失败
tycpdmFirmService
.
save
(
tycpdmFirm
);
return
R
.
ok
();
return
R
.
ok
()
.
put
(
"data"
,
id
)
;
}
public
static
void
main
(
String
[]
args
)
throws
InvocationTargetException
,
IllegalAccessException
{
MemberEntity
memberEntity
=
new
MemberEntity
();
Map
<
String
,
Object
>
body
=
new
HashMap
<>();
body
.
put
(
"username"
,
"xiaoz"
);
BeanUtils
.
populate
(
memberEntity
,
body
);
System
.
out
.
println
(
memberEntity
.
getUsername
());
}
/**
* 根据用户名获取企业认证信息
*/
@RequestMapping
(
"/api/findUserName"
)
@Login
@RequestMapping
(
"/authApi/findUserName"
)
// @RequiresPermissions("manage:tycpdmfirm:save")
public
R
findUserName
(
@RequestParam
(
"userName"
)
String
userName
){
...
...
@@ -144,7 +181,7 @@ public class TycpdmFirmController extends AbstractController {
/**
* 查询企业实名认证各个状态的数量(中心管理员查询所有,分中心查询)
*/
@RequestMapping
(
"/api/findTycpdmFirmLogoutFlagCount"
)
@RequestMapping
(
"/a
uthA
pi/findTycpdmFirmLogoutFlagCount"
)
// @RequiresPermissions("manage:tycpdmfirm:delete")
public
R
findTycpdmFirmLogoutFlagCount
(){
/*Integer id=getMemberUserId().intValue();
...
...
@@ -161,13 +198,20 @@ public class TycpdmFirmController extends AbstractController {
/**
* 上传文件(第二步)
*/
@RequestMapping
(
"/api/uploadFile"
)
@RequestMapping
(
"/a
uthA
pi/uploadFile"
)
// @RequiresPermissions("manage:tycpdmfirm:delete")
@Login
public
R
uploadFile
(
@RequestParam
(
"file"
)
MultipartFile
file
,
@RequestParam
(
"id"
)
Integer
id
){
public
R
uploadFile
(
@RequestParam
(
"file"
)
MultipartFile
file
,
@RequestParam
(
"id"
)
Integer
id
,
@RequestParam
(
"status"
)
Integer
status
){
try
{
tycpdmFirmService
.
uploadFile
(
file
,
id
);
return
R
.
ok
();
if
(
status
==
1
){
tycpdmFirmService
.
uploadFile
(
file
,
id
);
return
R
.
ok
();
}
else
if
(
status
==
2
){
tycpdmFirmChangeService
.
uploadFile
(
file
,
id
);
return
R
.
ok
();
}
else
{
return
R
.
error
(
"请前端人员传递业务类型 变更过新增"
);
}
}
catch
(
Exception
e
)
{
return
R
.
error
(
e
.
getLocalizedMessage
());
}
...
...
@@ -176,7 +220,7 @@ public class TycpdmFirmController extends AbstractController {
/**
* 上传文件(第一步)
*/
@RequestMapping
(
"/api/uploadFileOne"
)
@RequestMapping
(
"/a
uthA
pi/uploadFileOne"
)
// @RequiresPermissions("manage:tycpdmfirm:delete")
@Login
public
R
uploadFileOne
(
@RequestParam
(
"file"
)
MultipartFile
file
){
...
...
@@ -187,4 +231,22 @@ public class TycpdmFirmController extends AbstractController {
return
R
.
error
(
e
.
getLocalizedMessage
());
}
}
/**
* 审批
*/
@RequestMapping
(
"/authApi/audit"
)
// @RequiresPermissions("manage:tycpdmfirm:delete")
public
R
audit
(
@RequestBody
Map
map
){
try
{
tycpdmFirmService
.
audit
(
map
);
}
catch
(
InvocationTargetException
e
)
{
e
.
printStackTrace
();
}
catch
(
IllegalAccessException
e
)
{
e
.
printStackTrace
();
}
return
R
.
ok
();
}
}
src/main/java/io/office/modules/manage/controller/UserFunctionBindingController.java
View file @
bf5f63c8
package
io
.
office
.
modules
.
manage
.
controller
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
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.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -39,8 +34,7 @@ public class UserFunctionBindingController extends AbstractController {
/**
* 查询
*/
@Login
@RequestMapping
(
"/api/find"
)
@RequestMapping
(
"/authApi/find"
)
public
R
find
(){
Integer
id
=
getUserId
().
intValue
();
if
(
id
==
null
){
...
...
@@ -52,8 +46,7 @@ public class UserFunctionBindingController extends AbstractController {
/**
* 修改
*/
@Login
@RequestMapping
(
"/api/update"
)
@RequestMapping
(
"/authApi/update"
)
// @RequiresPermissions("manage:userfunctionbinding:update")
public
R
update
(
@RequestBody
Integer
[]
functionids
){
Integer
id
=
getUserId
().
intValue
();
...
...
@@ -66,8 +59,7 @@ public class UserFunctionBindingController extends AbstractController {
/**
* 保存
*/
@Login
@RequestMapping
(
"/api/save"
)
@RequestMapping
(
"/authApi/save"
)
// @RequiresPermissions("manage:userfunctionbinding:save")
public
R
save
(
@RequestBody
Integer
[]
functionids
){
//遍历插入数据
...
...
src/main/java/io/office/modules/manage/dao/TimescodeChphoneDao.java
0 → 100644
View file @
bf5f63c8
package
io
.
office
.
modules
.
manage
.
dao
;
import
io.office.modules.manage.entity.TimescodeChphoneEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Component
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-13 17:24:17
*/
@Mapper
@Component
public
interface
TimescodeChphoneDao
extends
BaseMapper
<
TimescodeChphoneEntity
>
{
}
src/main/java/io/office/modules/manage/dao/TimescodeChphoneIpDao.java
0 → 100644
View file @
bf5f63c8
package
io
.
office
.
modules
.
manage
.
dao
;
import
io.office.modules.manage.entity.TimescodeChphoneIpEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Component
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-13 17:24:17
*/
@Mapper
@Component
public
interface
TimescodeChphoneIpDao
extends
BaseMapper
<
TimescodeChphoneIpEntity
>
{
}
src/main/java/io/office/modules/manage/dao/TycpdmFirmChangeDao.java
View file @
bf5f63c8
...
...
@@ -3,6 +3,8 @@ package io.office.modules.manage.dao;
import
io.office.modules.manage.entity.TycpdmFirmChangeEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Update
;
import
org.springframework.data.repository.query.Param
;
/**
* ${comments}
...
...
@@ -13,5 +15,9 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public
interface
TycpdmFirmChangeDao
extends
BaseMapper
<
TycpdmFirmChangeEntity
>
{
@Update
(
"UPDATE tycpdm_firm_change SET firm_archivesFile = #{firm_archivesFile} , logout_flag=#{logout_flag} WHERE id = #{id}"
)
void
updateByIdfirmArchivesFile
(
@Param
(
"firm_archivesFile"
)
String
firm_archivesFile
,
@Param
(
"id"
)
Integer
id
,
@Param
(
"logout_flag"
)
int
logout_flag
);
@Update
(
"UPDATE tycpdm_firm_change SET logout_flag = #{logout_flag} WHERE id = #{id}"
)
void
updateBYIdLogoutFlag
(
@Param
(
"logout_flag"
)
String
logout_flag
,
@Param
(
"id"
)
String
id
);
}
src/main/java/io/office/modules/manage/dao/TycpdmFirmDao.java
View file @
bf5f63c8
...
...
@@ -32,4 +32,7 @@ public interface TycpdmFirmDao extends BaseMapper<TycpdmFirmEntity> {
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
);
@Update
(
"UPDATE tycpdm_firm SET logout_flag = #{logout_flag} WHERE f_id = #{id}"
)
void
updateBYIdLogoutFlag
(
@Param
(
"logout_flag"
)
String
logout_flag
,
@Param
(
"id"
)
String
id
);
}
src/main/java/io/office/modules/manage/entity/TimescodeChphoneEntity.java
0 → 100644
View file @
bf5f63c8
package
io
.
office
.
modules
.
manage
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-13 17:24:17
*/
@Data
@AllArgsConstructor
@TableName
(
"timescode_chPhone"
)
public
class
TimescodeChphoneEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* $column.comments
*/
@TableId
(
type
=
IdType
.
INPUT
)
private
String
phone
;
/**
* $column.comments
*/
private
String
date
;
/**
* $column.comments
*/
private
Integer
times
;
/**
* $column.comments
*/
private
Integer
timesValidate
;
}
src/main/java/io/office/modules/manage/entity/TimescodeChphoneIpEntity.java
0 → 100644
View file @
bf5f63c8
package
io
.
office
.
modules
.
manage
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Getter
;
import
lombok.Setter
;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-12-13 17:24:17
*/
@Data
@AllArgsConstructor
@TableName
(
"timescode_chPhone_ip"
)
public
class
TimescodeChphoneIpEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* $column.comments
*/
@TableId
(
type
=
IdType
.
INPUT
)
private
String
ip
;
/**
* $column.comments
*/
private
String
date
;
/**
* $column.comments
*/
private
Integer
timesIp
;
}
src/main/java/io/office/modules/manage/service/MemberService.java
View file @
bf5f63c8
...
...
@@ -25,5 +25,7 @@ public interface MemberService extends IService<MemberEntity> {
void
updatephone
(
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
);
String
getVerificationCode
(
Map
<
String
,
Object
>
params
,
HttpServletRequest
request
,
HttpServletResponse
response
);
}
src/main/java/io/office/modules/manage/service/TycpdmFirmChangeService.java
View file @
bf5f63c8
...
...
@@ -3,6 +3,7 @@ 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.TycpdmFirmChangeEntity
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.Map
;
...
...
@@ -16,5 +17,7 @@ import java.util.Map;
public
interface
TycpdmFirmChangeService
extends
IService
<
TycpdmFirmChangeEntity
>
{
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
);
void
uploadFile
(
MultipartFile
file
,
Integer
id
);
}
src/main/java/io/office/modules/manage/service/TycpdmFirmService.java
View file @
bf5f63c8
...
...
@@ -10,6 +10,7 @@ import io.office.modules.sys.entity.SysUserEntity;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.IOException
;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -34,5 +35,6 @@ public interface TycpdmFirmService extends IService<TycpdmFirmEntity> {
Page
<
TycpdmFirmEntity
>
findlist
(
Map
<
String
,
Object
>
params
,
Page
page
);
void
audit
(
Map
map
)
throws
InvocationTargetException
,
IllegalAccessException
;
}
src/main/java/io/office/modules/manage/service/impl/MemberServiceImpl.java
View file @
bf5f63c8
This diff is collapsed.
Click to expand it.
src/main/java/io/office/modules/manage/service/impl/TimescodeRegiServiceImpl.java
View file @
bf5f63c8
...
...
@@ -103,7 +103,7 @@ public class TimescodeRegiServiceImpl extends ServiceImpl<TimescodeRegiDao, Time
//写入session
HttpSession
session
=
request
.
getSession
();
session
.
setAttribute
(
"subjoin"
,
pass
);
//验证码
session
.
setAttribute
(
"tel"
,
p
ass
);
//手机号
session
.
setAttribute
(
"tel"
,
p
hone
);
//手机号
session
.
setAttribute
(
"date"
,
System
.
currentTimeMillis
());
//毫秒值
//发送状态
...
...
src/main/java/io/office/modules/manage/service/impl/TycpdmFirmChangeServiceImpl.java
View file @
bf5f63c8
package
io
.
office
.
modules
.
manage
.
service
.
impl
;
import
io.office.common.exception.RRException
;
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.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
;
...
...
@@ -11,11 +19,23 @@ import io.office.common.utils.Query;
import
io.office.modules.manage.dao.TycpdmFirmChangeDao
;
import
io.office.modules.manage.entity.TycpdmFirmChangeEntity
;
import
io.office.modules.manage.service.TycpdmFirmChangeService
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
sun.dc.pr.PRError
;
@Service
(
"tycpdmFirmChangeService"
)
public
class
TycpdmFirmChangeServiceImpl
extends
ServiceImpl
<
TycpdmFirmChangeDao
,
TycpdmFirmChangeEntity
>
implements
TycpdmFirmChangeService
{
@Autowired
private
TycpdmFirmChangeDao
tycpdmFirmChangeDao
;
@Value
(
"${uploadFileQY}"
)
String
uploadFileQY
;
@Value
(
"${uploadFileQYOne}"
)
String
uploadFileQYOne
;
@Override
public
PageUtils
queryPage
(
Map
<
String
,
Object
>
params
)
{
IPage
<
TycpdmFirmChangeEntity
>
page
=
this
.
page
(
...
...
@@ -26,4 +46,42 @@ public class TycpdmFirmChangeServiceImpl extends ServiceImpl<TycpdmFirmChangeDao
return
new
PageUtils
(
page
);
}
@Override
@Transactional
public
void
uploadFile
(
MultipartFile
file
,
Integer
id
)
{
//删除原来的文件
TycpdmFirmChangeEntity
tycpdmFirmChangeEntity
=
tycpdmFirmChangeDao
.
selectById
(
id
);
String
firmArchivesfile
=
tycpdmFirmChangeEntity
.
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
tycpdmFirmChangeDao
.
updateByIdfirmArchivesFile
(
uploadFileQY
+
uuid
+
substring
,
id
,
0
);
//删除原来的照片
if
(
firmArchivesfile
!=
null
){
File
file1
=
new
File
(
firmArchivesfile
);
if
(
file1
.
exists
()){
file1
.
delete
();
}
}
return
;
}
catch
(
IOException
e
)
{
dir
.
delete
();
e
.
printStackTrace
();
throw
new
RRException
(
"上传失败"
);
}
}
}
\ No newline at end of file
src/main/java/io/office/modules/manage/service/impl/TycpdmFirmServiceImpl.java
View file @
bf5f63c8
...
...
@@ -3,17 +3,20 @@ 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.TycpdmFirmChangeDao
;
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.manage.entity.*
;
import
io.office.modules.sys.entity.SysUserEntity
;
import
org.apache.commons.beanutils.BeanMap
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.annotation.Id
;
import
org.springframework.stereotype.Service
;
import
java.io.File
;
import
java.io.IOException
;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -26,8 +29,8 @@ import io.office.common.utils.PageUtils;
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.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.multipart.MultipartFile
;
...
...
@@ -39,6 +42,9 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
private
TycpdmFirmDao
tycpdmFirmDao
;
@Autowired
private
TycpdmFirmChangeDao
tycpdmFirmChangeDao
;
@Autowired
private
TycpdmVipUserDao
tycpdmVipUserDao
;
@Autowired
...
...
@@ -95,6 +101,7 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
}
@Override
@Transactional
public
void
uploadFile
(
MultipartFile
file
,
Integer
id
)
{
//要删除原来的文件
TycpdmFirmEntity
tycpdmFirmEntity
=
tycpdmFirmDao
.
selectById
(
id
);
...
...
@@ -132,7 +139,7 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
}
return
;
}
catch
(
Exception
e
)
{
}
catch
(
IO
Exception
e
)
{
dir
.
delete
();
e
.
printStackTrace
();
throw
new
RRException
(
"上传失败"
);
...
...
@@ -171,4 +178,44 @@ public class TycpdmFirmServiceImpl extends ServiceImpl<TycpdmFirmDao, TycpdmFirm
return
page
;
}
@Override
@Transactional
public
void
audit
(
Map
map
)
throws
InvocationTargetException
,
IllegalAccessException
{
Integer
status
=
map
.
get
(
"status"
)==
null
?
0
:
Integer
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"status"
)));
//1.新增(新增时id为fId) 2.变更(id为fId)
String
id
=
map
.
get
(
"id"
)==
null
?
""
:
String
.
valueOf
(
map
.
get
(
"id"
));
//id
String
auditStatus
=
map
.
get
(
"auditStatus"
)==
null
?
""
:
String
.
valueOf
(
map
.
get
(
"auditStatus"
));
//审核状态 1.通过 2.不通过
//logout_flag
if
(
status
==
1
){
//新增
//直接修改tycpmFirm表 状态
tycpdmFirmDao
.
updateBYIdLogoutFlag
(
auditStatus
,
id
);
//在tycpdm_vip_user表中记录
if
(
"1"
.
equals
(
auditStatus
)){
TycpdmFirmEntity
tycpdmFirmEntity
=
tycpdmFirmDao
.
selectById
(
id
);
String
baseUser
=
tycpdmFirmEntity
.
getBaseUser
();
String
firmname
=
tycpdmFirmEntity
.
getFirmname
();
tycpdmVipUserDao
.
insert
(
new
TycpdmVipUserEntity
(
null
,
id
+
""
,
firmname
,
baseUser
));
}
}
else
if
(
status
==
2
){
//变更
tycpdmFirmChangeDao
.
updateBYIdLogoutFlag
(
auditStatus
,
id
);
if
(
"1"
.
equals
(
auditStatus
)){
//通过将变更表的数据同步到tycpdmFirm表
TycpdmFirmChangeEntity
tycpdmFirmChangeEntity
=
tycpdmFirmChangeDao
.
selectById
(
id
);
Integer
fId
=
tycpdmFirmChangeEntity
.
getFId
();
TycpdmFirmEntity
tycpdmFirmEntity
=
new
TycpdmFirmEntity
();
Map
testMap
=
new
BeanMap
(
tycpdmFirmChangeEntity
);
BeanUtils
.
populate
(
tycpdmFirmEntity
,
testMap
);
//数据更新到tycpdmFirm表
tycpdmFirmDao
.
updateById
(
tycpdmFirmEntity
);
tycpdmFirmEntity
=
tycpdmFirmDao
.
selectById
(
fId
);
String
baseUser
=
tycpdmFirmEntity
.
getBaseUser
();
String
firmname
=
tycpdmFirmEntity
.
getFirmname
();
tycpdmVipUserDao
.
insert
(
new
TycpdmVipUserEntity
(
null
,
id
+
""
,
firmname
,
baseUser
));
}
}
}
}
\ No newline at end of file
src/main/resources/mapper/manage/TimescodeChphoneDao.xml
0 → 100644
View file @
bf5f63c8
<?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=
"io.office.modules.manage.dao.TimescodeChphoneDao"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"io.office.modules.manage.entity.TimescodeChphoneEntity"
id=
"timescodeChphoneMap"
>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"date"
column=
"date"
/>
<result
property=
"times"
column=
"times"
/>
<result
property=
"timesValidate"
column=
"times_validate"
/>
</resultMap>
</mapper>
\ No newline at end of file
src/main/resources/mapper/manage/TimescodeChphoneIpDao.xml
0 → 100644
View file @
bf5f63c8
<?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=
"io.office.modules.manage.dao.TimescodeChphoneIpDao"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"io.office.modules.manage.entity.TimescodeChphoneIpEntity"
id=
"timescodeChphoneIpMap"
>
<result
property=
"ip"
column=
"ip"
/>
<result
property=
"date"
column=
"date"
/>
<result
property=
"timesIp"
column=
"times_ip"
/>
</resultMap>
</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