Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-auth
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
base_platform_enterprise
gic-platform-auth
Commits
86aaa3c9
Commit
86aaa3c9
authored
Nov 12, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
运营实施管理员
parent
72f05639
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
406 additions
and
0 deletions
+406
-0
TabSysOperationUserMapper.java
...va/com/gic/auth/dao/mapper/TabSysOperationUserMapper.java
+66
-0
TabSysOperationUser.java
...rc/main/java/com/gic/auth/entity/TabSysOperationUser.java
+113
-0
OperationUserService.java
.../main/java/com/gic/auth/service/OperationUserService.java
+26
-0
OperationUserServiceImpl.java
...a/com/gic/auth/service/impl/OperationUserServiceImpl.java
+35
-0
OperationUserApiServiceImpl.java
.../auth/service/outer/impl/OperationUserApiServiceImpl.java
+24
-0
dubbo-gic-platform-auth-service.xml
...ce/src/main/resources/dubbo-gic-platform-auth-service.xml
+2
-0
TabSysOperationUserMapper.xml
...e/src/main/resources/mapper/TabSysOperationUserMapper.xml
+140
-0
No files found.
gic-platform-auth-service/src/main/java/com/gic/auth/dao/mapper/TabSysOperationUserMapper.java
0 → 100644
View file @
86aaa3c9
package
com
.
gic
.
auth
.
dao
.
mapper
;
import
com.gic.auth.entity.TabSysOperationUser
;
import
org.apache.ibatis.annotations.Param
;
public
interface
TabSysOperationUserMapper
{
/**
* 根据主键删除
*
* @param operationUserId 主键
* @return 更新条目数
*/
int
deleteByPrimaryKey
(
Integer
operationUserId
);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insert
(
TabSysOperationUser
record
);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insertSelective
(
TabSysOperationUser
record
);
/**
* 根据主键查询
*
* @param operationUserId 主键
* @return 实体对象
*/
TabSysOperationUser
selectByPrimaryKey
(
Integer
operationUserId
);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKeySelective
(
TabSysOperationUser
record
);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKey
(
TabSysOperationUser
record
);
/**
* 手机号码查询运营
* @Title: getByPhone
* @Description:
* @author guojuxing
* @param phone
* @param enterpriseId
* @return com.gic.auth.entity.TabSysOperationUser
*/
TabSysOperationUser
getByPhone
(
@Param
(
"phone"
)
String
phone
,
@Param
(
"enterpriseId"
)
Integer
enterpriseId
);
}
\ No newline at end of file
gic-platform-auth-service/src/main/java/com/gic/auth/entity/TabSysOperationUser.java
0 → 100644
View file @
86aaa3c9
package
com
.
gic
.
auth
.
entity
;
import
java.util.Date
;
/**
* tab_sys_operation_user
*/
public
class
TabSysOperationUser
{
/**
* 用户id
*/
private
Integer
operationUserId
;
/**
* 用户名
*/
private
String
operationUserName
;
/**
* 手机号码
*/
private
String
phoneNumber
;
/**
* 状态,1有效,0无效
*/
private
Integer
status
;
/**
*
*/
private
Date
createTime
;
/**
*
*/
private
Date
updateTime
;
/**
*
*/
private
Integer
enterpriseId
;
/**
* 国际区号,如中国 86
*/
private
String
phoneAreaCode
;
public
Integer
getOperationUserId
()
{
return
operationUserId
;
}
public
void
setOperationUserId
(
Integer
operationUserId
)
{
this
.
operationUserId
=
operationUserId
;
}
public
String
getOperationUserName
()
{
return
operationUserName
;
}
public
void
setOperationUserName
(
String
operationUserName
)
{
this
.
operationUserName
=
operationUserName
;
}
public
String
getPhoneNumber
()
{
return
phoneNumber
;
}
public
void
setPhoneNumber
(
String
phoneNumber
)
{
this
.
phoneNumber
=
phoneNumber
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
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
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
Integer
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
public
String
getPhoneAreaCode
()
{
return
phoneAreaCode
;
}
public
void
setPhoneAreaCode
(
String
phoneAreaCode
)
{
this
.
phoneAreaCode
=
phoneAreaCode
;
}
}
\ No newline at end of file
gic-platform-auth-service/src/main/java/com/gic/auth/service/OperationUserService.java
0 → 100644
View file @
86aaa3c9
package
com
.
gic
.
auth
.
service
;
import
com.gic.auth.dto.OperationUserDTO
;
public
interface
OperationUserService
{
/**
* 查询运营
* @Title: getByPhone
* @Description:
* @author guojuxing
* @param phone
* @param enterpriseId
* @return com.gic.auth.dto.OperationUserDTO
*/
OperationUserDTO
getByPhone
(
String
phone
,
Integer
enterpriseId
);
/**
* 新增
* @Title: save
* @Description:
* @author guojuxing
* @param dto
* @return void
*/
void
save
(
OperationUserDTO
dto
);
}
gic-platform-auth-service/src/main/java/com/gic/auth/service/impl/OperationUserServiceImpl.java
0 → 100644
View file @
86aaa3c9
package
com
.
gic
.
auth
.
service
.
impl
;
import
com.gic.auth.dao.mapper.TabSysOperationUserMapper
;
import
com.gic.auth.dto.OperationUserDTO
;
import
com.gic.auth.entity.TabSysOperationUser
;
import
com.gic.auth.service.OperationUserService
;
import
com.gic.commons.util.EntityUtil
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
@Service
(
"operationUserService"
)
public
class
OperationUserServiceImpl
implements
OperationUserService
{
@Autowired
private
TabSysOperationUserMapper
tabSysOperationUserMapper
;
@Override
public
OperationUserDTO
getByPhone
(
String
phone
,
Integer
enterpriseId
)
{
TabSysOperationUser
record
=
tabSysOperationUserMapper
.
getByPhone
(
phone
,
enterpriseId
);
return
EntityUtil
.
changeEntityNew
(
OperationUserDTO
.
class
,
record
);
}
@Override
public
void
save
(
OperationUserDTO
dto
)
{
dto
.
setCreateTime
(
new
Date
());
dto
.
setUpdateTime
(
new
Date
());
dto
.
setStatus
(
1
);
if
(
StringUtils
.
isBlank
(
dto
.
getPhoneAreaCode
()))
{
dto
.
setPhoneAreaCode
(
"86"
);
}
TabSysOperationUser
record
=
EntityUtil
.
changeEntityNew
(
TabSysOperationUser
.
class
,
dto
);
tabSysOperationUserMapper
.
insert
(
record
);
}
}
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/OperationUserApiServiceImpl.java
0 → 100644
View file @
86aaa3c9
package
com
.
gic
.
auth
.
service
.
outer
.
impl
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.auth.dto.OperationUserDTO
;
import
com.gic.auth.service.OperationUserApiService
;
import
com.gic.auth.service.OperationUserService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
@Service
(
"operationUserApiService"
)
public
class
OperationUserApiServiceImpl
implements
OperationUserApiService
{
@Autowired
private
OperationUserService
operationUserService
;
@Override
public
ServiceResponse
<
OperationUserDTO
>
getByPhone
(
String
phone
,
Integer
enterpriseId
)
{
return
ServiceResponse
.
success
(
operationUserService
.
getByPhone
(
phone
,
enterpriseId
));
}
@Override
public
ServiceResponse
<
Void
>
save
(
OperationUserDTO
dto
)
{
operationUserService
.
save
(
dto
);
return
ServiceResponse
.
success
();
}
}
gic-platform-auth-service/src/main/resources/dubbo-gic-platform-auth-service.xml
View file @
86aaa3c9
...
@@ -48,6 +48,8 @@
...
@@ -48,6 +48,8 @@
<dubbo:service
interface=
"com.gic.auth.service.AccountGroupApiService"
ref=
"accountGroupApiService"
timeout=
"6000"
/>
<dubbo:service
interface=
"com.gic.auth.service.AccountGroupApiService"
ref=
"accountGroupApiService"
timeout=
"6000"
/>
<!--协作人-->
<!--协作人-->
<dubbo:service
interface=
"com.gic.auth.service.CollaboratorApiService"
ref=
"collaboratorApiService"
timeout=
"6000"
/>
<dubbo:service
interface=
"com.gic.auth.service.CollaboratorApiService"
ref=
"collaboratorApiService"
timeout=
"6000"
/>
<!--运营个管理员-->
<dubbo:service
interface=
"com.gic.auth.service.OperationUserApiService"
ref=
"operationUserApiService"
timeout=
"6000"
/>
<!--角色-->
<!--角色-->
<dubbo:reference
interface=
"com.gic.enterprise.service.EnterpriseApiService"
id=
"enterpriseApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.service.EnterpriseApiService"
id=
"enterpriseApiService"
timeout=
"6000"
/>
...
...
gic-platform-auth-service/src/main/resources/mapper/TabSysOperationUserMapper.xml
0 → 100644
View file @
86aaa3c9
<?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.auth.dao.mapper.TabSysOperationUserMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.auth.entity.TabSysOperationUser"
>
<id
column=
"operation_user_id"
jdbcType=
"INTEGER"
property=
"operationUserId"
/>
<result
column=
"operation_user_name"
jdbcType=
"VARCHAR"
property=
"operationUserName"
/>
<result
column=
"phone_number"
jdbcType=
"VARCHAR"
property=
"phoneNumber"
/>
<result
column=
"status"
jdbcType=
"INTEGER"
property=
"status"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"enterprise_id"
jdbcType=
"INTEGER"
property=
"enterpriseId"
/>
<result
column=
"phone_area_code"
jdbcType=
"VARCHAR"
property=
"phoneAreaCode"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
operation_user_id, operation_user_name, phone_number, status, create_time, update_time,
enterprise_id, phone_area_code
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_sys_operation_user
where operation_user_id = #{operationUserId,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from tab_sys_operation_user
where operation_user_id = #{operationUserId,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.auth.entity.TabSysOperationUser"
>
insert into tab_sys_operation_user (operation_user_id, operation_user_name,
phone_number, status, create_time,
update_time, enterprise_id, phone_area_code
)
values (#{operationUserId,jdbcType=INTEGER}, #{operationUserName,jdbcType=VARCHAR},
#{phoneNumber,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=INTEGER}, #{phoneAreaCode,jdbcType=VARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.auth.entity.TabSysOperationUser"
>
insert into tab_sys_operation_user
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"operationUserId != null"
>
operation_user_id,
</if>
<if
test=
"operationUserName != null"
>
operation_user_name,
</if>
<if
test=
"phoneNumber != null"
>
phone_number,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"phoneAreaCode != null"
>
phone_area_code,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"operationUserId != null"
>
#{operationUserId,jdbcType=INTEGER},
</if>
<if
test=
"operationUserName != null"
>
#{operationUserName,jdbcType=VARCHAR},
</if>
<if
test=
"phoneNumber != null"
>
#{phoneNumber,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=INTEGER},
</if>
<if
test=
"phoneAreaCode != null"
>
#{phoneAreaCode,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.auth.entity.TabSysOperationUser"
>
update tab_sys_operation_user
<set>
<if
test=
"operationUserName != null"
>
operation_user_name = #{operationUserName,jdbcType=VARCHAR},
</if>
<if
test=
"phoneNumber != null"
>
phone_number = #{phoneNumber,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
status = #{status,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=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if
test=
"phoneAreaCode != null"
>
phone_area_code = #{phoneAreaCode,jdbcType=VARCHAR},
</if>
</set>
where operation_user_id = #{operationUserId,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.auth.entity.TabSysOperationUser"
>
update tab_sys_operation_user
set operation_user_name = #{operationUserName,jdbcType=VARCHAR},
phone_number = #{phoneNumber,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
phone_area_code = #{phoneAreaCode,jdbcType=VARCHAR}
where operation_user_id = #{operationUserId,jdbcType=INTEGER}
</update>
<select
id=
"getByPhone"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
></include>
from tab_sys_operation_user
where status = 1
and enterprise_id = #{enterpriseId}
and phone_number = #{phone}
</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