Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
b39eb848
Commit
b39eb848
authored
Apr 20, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://115.159.76.241/haoban3.0/haoban-manage3.0.git
into developer
parents
02dd895d
134e0bfd
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
577 additions
and
33 deletions
+577
-33
HelpDTO.java
.../src/main/java/com/gic/haoban/manage/api/dto/HelpDTO.java
+99
-0
HelpApiService.java
...ava/com/gic/haoban/manage/api/service/HelpApiService.java
+21
-0
HelpController.java
.../com/gic/haoban/manage/web/controller/HelpController.java
+52
-0
TabHaobanHelpMapper.java
...haoban/manage/service/dao/mapper/TabHaobanHelpMapper.java
+26
-0
TabHaobanHelp.java
...a/com/gic/haoban/manage/service/entity/TabHaobanHelp.java
+99
-0
HelpApiServiceImpl.java
...n/manage/service/service/out/impl/HelpApiServiceImpl.java
+71
-0
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+47
-32
TabHaobanHelpMapper.xml
...service/src/main/resources/mapper/TabHaobanHelpMapper.xml
+158
-0
SyncDealContoller.java
...m/gic/haoban/manage/web/controller/SyncDealContoller.java
+4
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/HelpDTO.java
0 → 100644
View file @
b39eb848
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
;
import
java.io.Serializable
;
import
java.util.Date
;
public
class
HelpDTO
implements
Serializable
{
private
String
helpId
;
private
String
helpTitle
;
private
String
helpUrl
;
private
Integer
statusFlag
;
private
Date
createTime
;
private
Date
updateTime
;
private
Integer
openFlag
;
private
String
editPersion
;
private
Integer
sort
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getHelpId
()
{
return
helpId
;
}
public
void
setHelpId
(
String
helpId
)
{
this
.
helpId
=
helpId
==
null
?
null
:
helpId
.
trim
();
}
public
String
getHelpTitle
()
{
return
helpTitle
;
}
public
void
setHelpTitle
(
String
helpTitle
)
{
this
.
helpTitle
=
helpTitle
==
null
?
null
:
helpTitle
.
trim
();
}
public
String
getHelpUrl
()
{
return
helpUrl
;
}
public
void
setHelpUrl
(
String
helpUrl
)
{
this
.
helpUrl
=
helpUrl
==
null
?
null
:
helpUrl
.
trim
();
}
public
Integer
getStatusFlag
()
{
return
statusFlag
;
}
public
void
setStatusFlag
(
Integer
statusFlag
)
{
this
.
statusFlag
=
statusFlag
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getOpenFlag
()
{
return
openFlag
;
}
public
void
setOpenFlag
(
Integer
openFlag
)
{
this
.
openFlag
=
openFlag
;
}
public
String
getEditPersion
()
{
return
editPersion
;
}
public
void
setEditPersion
(
String
editPersion
)
{
this
.
editPersion
=
editPersion
==
null
?
null
:
editPersion
.
trim
();
}
public
Integer
getSort
()
{
return
sort
;
}
public
void
setSort
(
Integer
sort
)
{
this
.
sort
=
sort
;
}
}
\ No newline at end of file
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/HelpApiService.java
0 → 100644
View file @
b39eb848
package
com
.
gic
.
haoban
.
manage
.
api
.
service
;
import
com.gic.api.base.commons.Page
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.manage.api.dto.HelpDTO
;
/**
* Created by tgs on 2020/2/9.
*/
public
interface
HelpApiService
{
int
saveHelp
(
HelpDTO
dto
);
HelpDTO
findOneHelp
(
String
helpId
);
Page
<
HelpDTO
>
pageList
(
BasePageInfo
pageInfo
);
void
deleteOne
(
String
helpId
);
}
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/controller/HelpController.java
0 → 100644
View file @
b39eb848
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.gic.api.base.commons.Page
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.api.dto.DictDTO
;
import
com.gic.haoban.manage.api.dto.HelpDTO
;
import
com.gic.haoban.manage.api.service.DictApiService
;
import
com.gic.haoban.manage.api.service.HelpApiService
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
@RestController
public
class
HelpController
extends
WebBaseController
{
private
static
final
String
LOGIN_URL
=
"/haoban-manage3-web/yw-login"
;
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
HelpController
.
class
);
@Autowired
private
HelpApiService
helpApiService
;
//获取字典列表
@RequestMapping
(
"get-help-list"
)
public
HaobanResponse
getDictList
(
BasePageInfo
pageInfo
)
{
Page
<
HelpDTO
>
page
=
helpApiService
.
pageList
(
pageInfo
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
page
);
}
//保存字典
@RequestMapping
(
"save-help"
)
public
HaobanResponse
saveHelp
(
HelpDTO
dto
)
{
int
i
=
helpApiService
.
saveHelp
(
dto
);
if
(
i
==
8
){
return
resultResponse
(
HaoBanErrCode
.
ERR_10006
);
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
//查看字典详情
@RequestMapping
(
"find-help-detail"
)
public
HaobanResponse
findDictDetail
(
String
helpId
)
{
HelpDTO
helpDTO
=
helpApiService
.
findOneHelp
(
helpId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
helpDTO
);
}
//删除字典
@RequestMapping
(
"del-help"
)
public
HaobanResponse
deleteDict
(
String
helpId
)
{
helpApiService
.
deleteOne
(
helpId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanHelpMapper.java
0 → 100644
View file @
b39eb848
package
com
.
gic
.
haoban
.
manage
.
service
.
dao
.
mapper
;
import
java.util.List
;
import
com.gic.haoban.manage.api.dto.HelpDTO
;
import
com.gic.haoban.manage.service.entity.TabHaobanHelp
;
import
com.github.pagehelper.Page
;
public
interface
TabHaobanHelpMapper
{
int
deleteByPrimaryKey
(
String
helpId
);
int
insert
(
TabHaobanHelp
record
);
int
insertSelective
(
TabHaobanHelp
record
);
TabHaobanHelp
selectByPrimaryKey
(
String
helpId
);
int
updateByPrimaryKeySelective
(
TabHaobanHelp
record
);
int
updateByPrimaryKey
(
TabHaobanHelp
record
);
Page
<
HelpDTO
>
pageList
();
TabHaobanHelp
selectByHelpTitle
(
String
helpTitle
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabHaobanHelp.java
0 → 100644
View file @
b39eb848
package
com
.
gic
.
haoban
.
manage
.
service
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
public
class
TabHaobanHelp
implements
Serializable
{
private
String
helpId
;
private
String
helpTitle
;
private
String
helpUrl
;
private
Integer
statusFlag
;
private
Date
createTime
;
private
Date
updateTime
;
private
Integer
openFlag
;
private
String
editPersion
;
private
Integer
sort
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getHelpId
()
{
return
helpId
;
}
public
void
setHelpId
(
String
helpId
)
{
this
.
helpId
=
helpId
==
null
?
null
:
helpId
.
trim
();
}
public
String
getHelpTitle
()
{
return
helpTitle
;
}
public
void
setHelpTitle
(
String
helpTitle
)
{
this
.
helpTitle
=
helpTitle
==
null
?
null
:
helpTitle
.
trim
();
}
public
String
getHelpUrl
()
{
return
helpUrl
;
}
public
void
setHelpUrl
(
String
helpUrl
)
{
this
.
helpUrl
=
helpUrl
==
null
?
null
:
helpUrl
.
trim
();
}
public
Integer
getStatusFlag
()
{
return
statusFlag
;
}
public
void
setStatusFlag
(
Integer
statusFlag
)
{
this
.
statusFlag
=
statusFlag
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getOpenFlag
()
{
return
openFlag
;
}
public
void
setOpenFlag
(
Integer
openFlag
)
{
this
.
openFlag
=
openFlag
;
}
public
String
getEditPersion
()
{
return
editPersion
;
}
public
void
setEditPersion
(
String
editPersion
)
{
this
.
editPersion
=
editPersion
==
null
?
null
:
editPersion
.
trim
();
}
public
Integer
getSort
()
{
return
sort
;
}
public
void
setSort
(
Integer
sort
)
{
this
.
sort
=
sort
;
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/HelpApiServiceImpl.java
0 → 100644
View file @
b39eb848
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.common.utils.UuidUtil
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.DictDTO
;
import
com.gic.haoban.manage.api.dto.HelpDTO
;
import
com.gic.haoban.manage.api.service.DictApiService
;
import
com.gic.haoban.manage.api.service.HelpApiService
;
import
com.gic.haoban.manage.service.dao.mapper.DictMapper
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanHelpMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanDict
;
import
com.gic.haoban.manage.service.entity.TabHaobanHelp
;
import
com.github.pagehelper.PageHelper
;
import
java.util.List
;
/**
* Created by tgs on 2020/2/9.
*/
@Service
public
class
HelpApiServiceImpl
implements
HelpApiService
{
@Autowired
private
TabHaobanHelpMapper
tabHaobanHelpMapper
;
@Override
public
int
saveHelp
(
HelpDTO
dto
)
{
if
(
StringUtils
.
isBlank
(
dto
.
getHelpId
())){
//空,则新增
dto
.
setHelpId
(
UuidUtil
.
randomUUID
());
TabHaobanHelp
tab
=
EntityUtil
.
changeEntity
(
TabHaobanHelp
.
class
,
dto
);
TabHaobanHelp
tab1
=
tabHaobanHelpMapper
.
selectByHelpTitle
(
dto
.
getHelpTitle
());
if
(
tab1
!=
null
){
return
8
;
}
tabHaobanHelpMapper
.
insert
(
tab
);
}
else
{
TabHaobanHelp
tab
=
EntityUtil
.
changeEntity
(
TabHaobanHelp
.
class
,
dto
);
tabHaobanHelpMapper
.
updateByPrimaryKeySelective
(
tab
);
}
return
1
;
}
@Override
public
HelpDTO
findOneHelp
(
String
helpId
)
{
TabHaobanHelp
tab
=
tabHaobanHelpMapper
.
selectByPrimaryKey
(
helpId
);
if
(
tab
==
null
){
return
null
;
}
HelpDTO
dto
=
EntityUtil
.
changeEntity
(
HelpDTO
.
class
,
tab
);
return
dto
;
}
@Override
public
Page
<
HelpDTO
>
pageList
(
BasePageInfo
pageInfo
)
{
PageHelper
.
startPage
(
pageInfo
.
getPageNum
(),
pageInfo
.
getPageSize
());
return
PageUtil
.
changePageHelperToCurrentPage
(
tabHaobanHelpMapper
.
pageList
(),
HelpDTO
.
class
);
}
@Override
public
void
deleteOne
(
String
helpId
)
{
tabHaobanHelpMapper
.
deleteByPrimaryKey
(
helpId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
b39eb848
...
...
@@ -390,10 +390,9 @@ public class StaffApiServiceImpl implements StaffApiService {
}
}
@Override
public
void
staffEdit
(
StaffDTO
staffDTO
,
String
departmentIds
)
{
TabHaobanStaff
oldStaff
=
staffMapper
.
selectByPrimaryKey
(
staffDTO
.
getStaffId
());
logger
.
info
(
"【员工修改】oldStaff={}"
,
JSON
.
toJSONString
(
oldStaff
));
private
void
staffEditDeal
(
StaffDTO
staffDTO
,
String
departmentIds
,
boolean
syncGic
)
{
TabHaobanStaff
oldStaff
=
staffMapper
.
selectByPrimaryKey
(
staffDTO
.
getStaffId
());
logger
.
info
(
"【员工修改】oldStaff={}"
,
JSON
.
toJSONString
(
oldStaff
));
//1、先更新staff
logger
.
info
(
"【员工修改】staffDTO={}"
,
JSON
.
toJSONString
(
staffDTO
));
TabHaobanStaff
tab
=
EntityUtil
.
changeEntityByJSON
(
TabHaobanStaff
.
class
,
staffDTO
);
...
...
@@ -459,28 +458,33 @@ public class StaffApiServiceImpl implements StaffApiService {
}
enterpriseId
=
store
.
getEnterpriseId
();
}
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByCodeNoStatus
(
enterpriseId
,
related
.
getClerkCode
());
//if(!staffDTO.getPhoneNumber().equals(related.getPhoneNumber())||!staffDTO.getStaffName().equals(clerkDTO.getStaffName())){
logger
.
info
(
"clerkDto:{}"
,
JSONObject
.
toJSONString
(
clerkDTO
));
String
headPic
=
staffDTO
.
getHeadImg
();
if
(
StringUtils
.
isBlank
(
staffDTO
.
getPhoneNumber
()))
{
staffDTO
.
setPhoneNumber
(
""
);
}
if
(
StringUtils
.
isBlank
(
clerkDTO
.
getPhoneNumber
()))
{
clerkDTO
.
setPhoneNumber
(
""
);
if
(!
syncGic
)
{
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByCodeNoStatus
(
enterpriseId
,
related
.
getClerkCode
());
//if(!staffDTO.getPhoneNumber().equals(related.getPhoneNumber())||!staffDTO.getStaffName().equals(clerkDTO.getStaffName())){
logger
.
info
(
"clerkDto:{}"
,
JSONObject
.
toJSONString
(
clerkDTO
));
String
headPic
=
staffDTO
.
getHeadImg
();
if
(
StringUtils
.
isBlank
(
staffDTO
.
getPhoneNumber
()))
{
staffDTO
.
setPhoneNumber
(
""
);
}
if
(
StringUtils
.
isBlank
(
clerkDTO
.
getPhoneNumber
()))
{
clerkDTO
.
setPhoneNumber
(
""
);
}
if
(
clerkDTO
!=
null
&&
(
StringUtils
.
isNotBlank
(
staffName
)
&&
!
clerkDTO
.
getClerkName
().
equals
(
staffName
)
||
!
staffDTO
.
getPhoneNumber
().
equals
(
clerkDTO
.
getPhoneNumber
()))
||
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotBlank
(
headPic
)
&&
!
headPic
.
equals
(
clerkDTO
.
getHeadImgUrl
()))
||
!
staffDTO
.
getSex
().
equals
(
Integer
.
valueOf
(
clerkDTO
.
getClerkGender
())))
{
logger
.
info
(
"【员工修改】clerkDTO={}"
,
JSON
.
toJSONString
(
clerkDTO
));
logger
.
info
(
"【员工修改】{},修改地方:name:{},{};num:{},{};pic:{},{};sex:{},{}"
,
clerkDTO
.
getClerkId
(),
staffName
,
clerkDTO
.
getClerkName
(),
staffDTO
.
getPhoneNumber
(),
clerkDTO
.
getPhoneNumber
(),
headPic
,
clerkDTO
.
getHeadImgUrl
()
,
staffDTO
.
getSex
(),
clerkDTO
.
getClerkGender
());
clerkDTO
.
setClerkName
(
staffDTO
.
getStaffName
());
clerkDTO
.
setPhoneNumber
(
staffDTO
.
getPhoneNumber
());
clerkDTO
.
setHeadImgUrl
(
staffDTO
.
getHeadImg
());
clerkDTO
.
setClerkGender
(
staffDTO
.
getSex
().
toString
());
clerkService
.
updateClerk
(
clerkDTO
);
}
}
if
(
clerkDTO
!=
null
&&
(
StringUtils
.
isNotBlank
(
staffName
)
&&
!
clerkDTO
.
getClerkName
().
equals
(
staffName
)
||
!
staffDTO
.
getPhoneNumber
().
equals
(
clerkDTO
.
getPhoneNumber
()))
||
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotBlank
(
headPic
)
&&
!
headPic
.
equals
(
clerkDTO
.
getHeadImgUrl
()))
||
!
staffDTO
.
getSex
().
equals
(
Integer
.
valueOf
(
clerkDTO
.
getClerkGender
())))
{
logger
.
info
(
"【员工修改】clerkDTO={}"
,
JSON
.
toJSONString
(
clerkDTO
));
clerkDTO
.
setClerkName
(
staffDTO
.
getStaffName
());
clerkDTO
.
setPhoneNumber
(
staffDTO
.
getPhoneNumber
());
clerkDTO
.
setHeadImgUrl
(
staffDTO
.
getHeadImg
());
clerkDTO
.
setClerkGender
(
staffDTO
.
getSex
().
toString
());
clerkService
.
updateClerk
(
clerkDTO
);
}
//}
//}
}
}
...
...
@@ -534,6 +538,11 @@ public class StaffApiServiceImpl implements StaffApiService {
}
}
@Override
public
void
staffEdit
(
StaffDTO
staffDTO
,
String
departmentIds
)
{
staffEditDeal
(
staffDTO
,
departmentIds
,
false
);
}
@Override
public
void
syscGicClerk
(
String
fieldListString
)
{
// TODO Auto-generated method stub
...
...
@@ -652,7 +661,13 @@ public class StaffApiServiceImpl implements StaffApiService {
}
if
(
wxEnterpriseRelatedApiService
.
enterpriseUseNew
(
clerkMid
.
getEnterpriseId
())){
addClerkByGic
(
clerkMid
);
try
{
addClerkByGic
(
clerkMid
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
else
{
throw
new
RuntimeException
(
"使用好办2.0"
);
}
}
...
...
@@ -754,9 +769,9 @@ public class StaffApiServiceImpl implements StaffApiService {
departmentIds
=
departmentIds
.
substring
(
1
,
departmentIds
.
length
());
}
if
(
map
.
get
(
departmentId
)
==
null
){
this
.
staffEdit
(
staff
,
departmentIds
);
}
StaffDepartmentRelatedDTO
staffRelated
=
this
.
getDepartmentIdAndStaffId
(
departmentId
,
staffId
);
this
.
staffEditDeal
(
staff
,
departmentIds
,
true
);
}
StaffDepartmentRelatedDTO
staffRelated
=
this
.
getDepartmentIdAndStaffId
(
departmentId
,
staffId
);
StaffDepartmentRelatedDTO
isCodeExist
=
this
.
getDepartmentIdAndCode
(
departmentId
,
code
);
//如果这个人已经绑定了 先解绑
if
(
isCodeExist
!=
null
){
...
...
@@ -779,9 +794,9 @@ public class StaffApiServiceImpl implements StaffApiService {
// clerkService.updateClerk(clerkDTO);
// }
//}
this
.
staffEdit
(
staff
,
departmentIds
);
}
}
this
.
staffEditDeal
(
staff
,
departmentIds
,
true
);
}
}
}
private
StaffDTO
geCcheckAndInitUser
(
String
wxEnterpriseId
,
String
nationcode
,
String
phoneNumber
)
{
...
...
haoban-manage3-service/src/main/resources/mapper/TabHaobanHelpMapper.xml
0 → 100644
View file @
b39eb848
<?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=
"com.gic.haoban.manage.service.dao.mapper.TabHaobanHelpMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHaobanHelp"
>
<id
column=
"help_id"
property=
"helpId"
jdbcType=
"VARCHAR"
/>
<result
column=
"help_title"
property=
"helpTitle"
jdbcType=
"VARCHAR"
/>
<result
column=
"help_url"
property=
"helpUrl"
jdbcType=
"VARCHAR"
/>
<result
column=
"status_flag"
property=
"statusFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"open_flag"
property=
"openFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"edit_persion"
property=
"editPersion"
jdbcType=
"VARCHAR"
/>
<result
column=
"sort"
property=
"sort"
jdbcType=
"INTEGER"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
help_id, help_title, help_url, status_flag, create_time, update_time, open_flag,
edit_persion, sort
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_help
where help_id = #{helpId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
delete from tab_haoban_help
where help_id = #{helpId,jdbcType=VARCHAR}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanHelp"
>
insert into tab_haoban_help (help_id, help_title, help_url,
status_flag, create_time, update_time,
open_flag, edit_persion, sort
)
values (#{helpId,jdbcType=VARCHAR}, #{helpTitle,jdbcType=VARCHAR}, #{helpUrl,jdbcType=VARCHAR},
#{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{openFlag,jdbcType=INTEGER}, #{editPersion,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanHelp"
>
insert into tab_haoban_help
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"helpId != null"
>
help_id,
</if>
<if
test=
"helpTitle != null"
>
help_title,
</if>
<if
test=
"helpUrl != null"
>
help_url,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"openFlag != null"
>
open_flag,
</if>
<if
test=
"editPersion != null"
>
edit_persion,
</if>
<if
test=
"sort != null"
>
sort,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"helpId != null"
>
#{helpId,jdbcType=VARCHAR},
</if>
<if
test=
"helpTitle != null"
>
#{helpTitle,jdbcType=VARCHAR},
</if>
<if
test=
"helpUrl != null"
>
#{helpUrl,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"openFlag != null"
>
#{openFlag,jdbcType=INTEGER},
</if>
<if
test=
"editPersion != null"
>
#{editPersion,jdbcType=VARCHAR},
</if>
<if
test=
"sort != null"
>
#{sort,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanHelp"
>
update tab_haoban_help
<set
>
<if
test=
"helpTitle != null"
>
help_title = #{helpTitle,jdbcType=VARCHAR},
</if>
<if
test=
"helpUrl != null"
>
help_url = #{helpUrl,jdbcType=VARCHAR},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"openFlag != null"
>
open_flag = #{openFlag,jdbcType=INTEGER},
</if>
<if
test=
"editPersion != null"
>
edit_persion = #{editPersion,jdbcType=VARCHAR},
</if>
<if
test=
"sort != null"
>
sort = #{sort,jdbcType=INTEGER},
</if>
</set>
where help_id = #{helpId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanHelp"
>
update tab_haoban_help
set help_title = #{helpTitle,jdbcType=VARCHAR},
help_url = #{helpUrl,jdbcType=VARCHAR},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
open_flag = #{openFlag,jdbcType=INTEGER},
edit_persion = #{editPersion,jdbcType=VARCHAR},
sort = #{sort,jdbcType=INTEGER}
where help_id = #{helpId,jdbcType=VARCHAR}
</update>
<select
id=
"pageList"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_help
order by update_time desc
</select>
<select
id=
"selectByHelpTitle"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_help
where help_title = #{helpTitleitle,jdbcType=VARCHAR}
and status_flag = 1
</select>
</mapper>
\ No newline at end of file
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/SyncDealContoller.java
View file @
b39eb848
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.common.utils.HaobanResponse
;
...
...
@@ -60,11 +61,13 @@ public class SyncDealContoller extends WebBaseController {
LoginVO
login
=
(
LoginVO
)
AuthRequestUtil
.
getSessionUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
logger
.
info
(
"login:{}"
,
JSONObject
.
toJSONString
(
login
));
String
taskLock
=
dealSyncOperationApiService
.
getTaskLock
(
wxEnterpriseId
);
if
(
null
!=
taskLock
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10011
);
}
task
=
dealSyncOperationApiService
.
createTask
(
wxEnterpriseId
,
"门店同步"
,
login
.
getStaffDTO
().
getStaffId
()
,
"部门同步"
);
task
=
dealSyncOperationApiService
.
createTask
(
wxEnterpriseId
,
"门店同步"
,
"admin"
,
"部门同步"
);
if
(
task
==
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10011
);
}
...
...
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