Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
d570760c
Commit
d570760c
authored
Jul 05, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
01701847
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
424 additions
and
22 deletions
+424
-22
AuthController.java
...thub/wxiaoqi/security/auth/controller/AuthController.java
+3
-2
IUserService.java
.../com/github/wxiaoqi/security/auth/feign/IUserService.java
+2
-1
AuthService.java
...com/github/wxiaoqi/security/auth/service/AuthService.java
+1
-1
AppAuthServiceImpl.java
...xiaoqi/security/auth/service/impl/AppAuthServiceImpl.java
+2
-2
AuthServiceImpl.java
...b/wxiaoqi/security/auth/service/impl/AuthServiceImpl.java
+2
-2
AppUserRelation.java
...github/wxiaoqi/security/admin/entity/AppUserRelation.java
+87
-0
AppUserRelationTemp.java
...ub/wxiaoqi/security/admin/entity/AppUserRelationTemp.java
+80
-0
AppUserRelationBiz.java
...github/wxiaoqi/security/admin/biz/AppUserRelationBiz.java
+149
-0
AppUserRelationTempBiz.java
...ub/wxiaoqi/security/admin/biz/AppUserRelationTempBiz.java
+17
-0
AppUserRelationMapper.java
.../wxiaoqi/security/admin/mapper/AppUserRelationMapper.java
+15
-0
AppUserRelationTempMapper.java
...aoqi/security/admin/mapper/AppUserRelationTempMapper.java
+15
-0
AppUserRelationController.java
...xiaoqi/security/admin/rest/AppUserRelationController.java
+29
-0
AppUserRest.java
...va/com/github/wxiaoqi/security/admin/rpc/AppUserRest.java
+4
-2
AppPermissionService.java
...aoqi/security/admin/rpc/service/AppPermissionService.java
+16
-10
application.yml
ace-modules/ace-generator/src/main/resources/application.yml
+1
-1
generator.properties
...les/ace-generator/src/main/resources/generator.properties
+1
-1
No files found.
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/controller/AuthController.java
View file @
d570760c
...
...
@@ -192,8 +192,9 @@ public class AuthController {
public
JSONObject
registryWithApplet
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
@RequestParam
(
value
=
"nickname"
,
defaultValue
=
""
)
String
nickname
,
@RequestParam
(
value
=
"headimgurl"
,
defaultValue
=
""
)
String
headimgurl
)
throws
Exception
{
JSONObject
data
=
appAuthService
.
appletRegistry
(
username
,
nickname
,
headimgurl
);
@RequestParam
(
value
=
"headimgurl"
,
defaultValue
=
""
)
String
headimgurl
,
@RequestParam
(
value
=
"userid"
,
defaultValue
=
"0"
)
Integer
userid
)
throws
Exception
{
JSONObject
data
=
appAuthService
.
appletRegistry
(
username
,
nickname
,
headimgurl
,
userid
);
if
(
data
!=
null
&&
data
.
getInteger
(
"status"
)==
ResultCode
.
SUCCESS_CODE
){
JSONObject
result
=
data
.
getJSONObject
(
"data"
);
if
(
result
==
null
){
...
...
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/feign/IUserService.java
View file @
d570760c
...
...
@@ -65,5 +65,6 @@ public interface IUserService {
* @return
*/
@PostMapping
(
"/api/app/applet/registry"
)
public
JSONObject
appletRegistry
(
@RequestParam
(
value
=
"username"
)
String
username
,
@RequestParam
(
value
=
"nickname"
)
String
nickname
,
@RequestParam
(
value
=
"headimgurl"
)
String
headimgurl
);
public
JSONObject
appletRegistry
(
@RequestParam
(
value
=
"username"
)
String
username
,
@RequestParam
(
value
=
"nickname"
)
String
nickname
,
@RequestParam
(
value
=
"headimgurl"
)
String
headimgurl
,
@RequestParam
(
value
=
"userid"
,
defaultValue
=
"0"
)
Integer
userid
);
}
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/service/AuthService.java
View file @
d570760c
...
...
@@ -32,5 +32,5 @@ public interface AuthService {
* @param nickname
* @return
*/
JSONObject
appletRegistry
(
String
username
,
String
headimgurl
,
String
nickname
);
JSONObject
appletRegistry
(
String
username
,
String
headimgurl
,
String
nickname
,
Integer
userid
);
}
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/service/impl/AppAuthServiceImpl.java
View file @
d570760c
...
...
@@ -92,8 +92,8 @@ public class AppAuthServiceImpl implements AuthService {
}
@Override
public
JSONObject
appletRegistry
(
String
username
,
String
headimgurl
,
String
nickname
)
{
return
userService
.
appletRegistry
(
username
,
headimgurl
,
nickname
);
public
JSONObject
appletRegistry
(
String
username
,
String
headimgurl
,
String
nickname
,
Integer
userid
)
{
return
userService
.
appletRegistry
(
username
,
headimgurl
,
nickname
,
userid
);
}
}
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/service/impl/AuthServiceImpl.java
View file @
d570760c
...
...
@@ -90,7 +90,7 @@ public class AuthServiceImpl implements AuthService {
}
@Override
public
JSONObject
appletRegistry
(
String
username
,
String
headimgurl
,
String
nickname
)
{
return
userService
.
appletRegistry
(
username
,
headimgurl
,
nickname
);
public
JSONObject
appletRegistry
(
String
username
,
String
headimgurl
,
String
nickname
,
Integer
userid
)
{
return
userService
.
appletRegistry
(
username
,
headimgurl
,
nickname
,
userid
);
}
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/AppUserRelation.java
0 → 100644
View file @
d570760c
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
import
javax.persistence.*
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 用户关系表
*
* @author libin
* @email 18178966185@163.com
* @date 2019-07-03 16:36:44
*/
@Data
@Table
(
name
=
"app_user_relation"
)
public
class
AppUserRelation
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键id
*/
@Id
@GeneratedValue
(
generator
=
"JDBC"
)
@ApiModelProperty
(
"主键id"
)
private
Integer
id
;
/**
* 用户id
*/
@Column
(
name
=
"user_id"
)
@ApiModelProperty
(
value
=
"用户id"
)
private
Integer
userId
;
/**
* 父id
*/
@Column
(
name
=
"parent_id"
)
@ApiModelProperty
(
value
=
"父id"
)
private
Integer
parentId
;
/**
* 绑定的来源:1-app;2-小程序
*/
@Column
(
name
=
"bind_type"
)
@ApiModelProperty
(
value
=
"绑定的来源:1-app;2-小程序"
)
private
Integer
bindType
;
/**
* 绑定时间
*/
@Column
(
name
=
"bind_time"
)
@ApiModelProperty
(
value
=
"绑定时间"
)
private
Long
bindTime
;
/**
* 是否永久绑定关系:0-否;1-是
*/
@Column
(
name
=
"is_forever"
)
@ApiModelProperty
(
value
=
"是否永久绑定关系:0-否;1-是"
)
private
Integer
isForever
;
/**
* 创建时间
*/
@Column
(
name
=
"ctr_time"
)
@ApiModelProperty
(
value
=
"创建时间"
)
private
Long
ctrTime
;
/**
* 更新时间
*/
@Column
(
name
=
"upd_time"
)
@ApiModelProperty
(
value
=
"更新时间"
,
hidden
=
true
)
private
Long
updTime
;
/**
* 是否删除:0-正常;1-删除
*/
@Column
(
name
=
"is_del"
)
@ApiModelProperty
(
value
=
"是否删除:0-正常;1-删除"
)
private
Integer
isDel
;
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/AppUserRelationTemp.java
0 → 100644
View file @
d570760c
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
import
javax.persistence.*
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 用户临时关系绑定表
*
* @author libin
* @email 18178966185@163.com
* @date 2019-07-03 16:36:44
*/
@Data
@Table
(
name
=
"app_user_relation_temp"
)
public
class
AppUserRelationTemp
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键id
*/
@Id
@GeneratedValue
(
generator
=
"JDBC"
)
@ApiModelProperty
(
"主键id"
)
private
Integer
id
;
/**
* 别的服务(比如小程序)用户id
*/
@Column
(
name
=
"temp_id"
)
@ApiModelProperty
(
value
=
"别的服务(比如小程序)用户id"
)
private
Integer
tempId
;
/**
* 类型:1-小程序
*/
@Column
(
name
=
"type"
)
@ApiModelProperty
(
value
=
"类型:1-小程序"
)
private
Integer
type
;
/**
* app用户id
*/
@Column
(
name
=
"user_id"
)
@ApiModelProperty
(
value
=
"app用户id"
)
private
Integer
userId
;
/**
* 是否有效:0-有效;1-无效
*/
@Column
(
name
=
"is_valid"
)
@ApiModelProperty
(
value
=
"是否有效:0-有效;1-无效"
)
private
Integer
isValid
;
/**
* 创建时间
*/
@Column
(
name
=
"crt_time"
)
@ApiModelProperty
(
value
=
"创建时间"
,
hidden
=
true
)
private
Long
crtTime
;
/**
* 更新时间
*/
@Column
(
name
=
"upd_time"
)
@ApiModelProperty
(
value
=
"更新时间"
,
hidden
=
true
)
private
Long
updTime
;
/**
* 是否删除:0-正常;1-删除
*/
@Column
(
name
=
"is_del"
)
@ApiModelProperty
(
value
=
"是否删除:0-正常;1-删除"
)
private
Integer
isDel
;
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserRelationBiz.java
0 → 100644
View file @
d570760c
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
biz
;
import
com.ace.cache.annotation.Cache
;
import
com.ace.cache.annotation.CacheClear
;
import
com.github.wxiaoqi.security.admin.entity.AppUserRelationTemp
;
import
com.github.wxiaoqi.security.admin.vo.AppUserVo
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
org.springframework.aop.framework.AopContext
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.github.wxiaoqi.security.admin.entity.AppUserRelation
;
import
com.github.wxiaoqi.security.admin.mapper.AppUserRelationMapper
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
/**
* 用户关系表
*
* @author libin
* @email 18178966185@163.com
* @date 2019-07-03 16:36:44
*/
@Service
public
class
AppUserRelationBiz
extends
BaseBiz
<
AppUserRelationMapper
,
AppUserRelation
>
{
@Autowired
AppUserRelationTempBiz
relationTempBiz
;
@Autowired
AppUserDetailBiz
userDetailBiz
;
/**
* 关系绑定
* @param userId
* @param parentId
*/
public
void
bindRelation
(
Integer
userId
,
Integer
parentId
){
AppUserRelation
relation
=
getMyBiz
().
getRelationByUserId
(
parentId
);
if
(
relation
==
null
){
relation
=
new
AppUserRelation
();
relation
.
setUserId
(
parentId
);
insertSelective
(
relation
);
}
relation
=
getMyBiz
().
getRelationByUserId
(
userId
);
Long
time
=
System
.
currentTimeMillis
();
if
(
relation
==
null
){
relation
=
new
AppUserRelation
();
relation
.
setUserId
(
userId
);
relation
.
setParentId
(
parentId
);
relation
.
setBindType
(
2
);
relation
.
setBindTime
(
time
);
insertSelective
(
relation
);
}
else
{
if
(
relation
.
getParentId
()==
null
||
relation
.
getParentId
()==
0
||(
relation
.
getIsForever
()!=
1
&&(
time
-
relation
.
getBindTime
())>
3600
)){
relation
.
setParentId
(
parentId
);
relation
.
setBindType
(
2
);
relation
.
setBindTime
(
time
);
getMyBiz
().
updRelation
(
relation
);
}
}
}
/**
* 小程序分享上下线绑定
* @param userid 当前人小程序id
* @param pid 分享人id
* @param platform_userid 当前人统一平台id
*/
public
ObjectRestResponse
shareParentByUserId
(
Integer
userid
,
Integer
pid
,
Integer
platform_userid
){
if
(
pid
==
null
||
pid
==
0
||((
platform_userid
==
null
||
platform_userid
==
0
)&&(
userid
==
0
||
userid
==
null
))){
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"参数为空"
);
}
if
(
platform_userid
==
null
||
platform_userid
==
0
){
upRelationTemp
(
pid
,
userid
);
}
else
{
AppUserVo
userVo
=
userDetailBiz
.
getUserInfoById
(
platform_userid
);
if
(
userVo
==
null
){
upRelationTemp
(
pid
,
userid
);
}
else
{
bindRelation
(
platform_userid
,
pid
);
}
}
return
ObjectRestResponse
.
succ
();
}
/**
* 新增临时关系
* @param pid
* @param userid
*/
public
void
upRelationTemp
(
Integer
pid
,
Integer
userid
){
AppUserRelationTemp
relationTemp
=
new
AppUserRelationTemp
();
relationTemp
.
setUserId
(
pid
);
relationTemp
.
setIsDel
(
0
);
relationTemp
.
setType
(
1
);
AppUserRelationTemp
relationTemp1
=
relationTempBiz
.
selectOne
(
relationTemp
);
if
(
relationTemp1
==
null
){
relationTemp
.
setTempId
(
userid
);
relationTempBiz
.
insertSelective
(
relationTemp
);
}
}
/**
* 小程序上下线绑定
* @param platform_userid 当前人统一平台id
* @param userid 当前人小程序id
*/
public
void
bindByUserId
(
Integer
platform_userid
,
Integer
userid
){
if
(
platform_userid
==
null
||
platform_userid
==
0
||
userid
==
null
||
userid
==
0
){
return
;
}
AppUserRelationTemp
relationTemp
=
new
AppUserRelationTemp
();
relationTemp
.
setTempId
(
userid
);
relationTemp
.
setIsValid
(
0
);
relationTemp
.
setType
(
1
);
relationTemp
.
setIsDel
(
0
);
relationTemp
=
relationTempBiz
.
selectOne
(
relationTemp
);
if
(
relationTemp
==
null
){
return
;
}
Integer
parentId
=
relationTemp
.
getUserId
();
bindRelation
(
platform_userid
,
parentId
);
}
/**
* 获取用户的上线关系
* @param userId
* @return
*/
@Cache
(
key
=
"user:relation{1}"
)
public
AppUserRelation
getRelationByUserId
(
Integer
userId
){
AppUserRelation
relation
=
new
AppUserRelation
();
relation
.
setUserId
(
userId
);
return
selectOne
(
relation
);
}
@CacheClear
(
key
=
"user:relation{1.userId}"
)
public
int
updRelation
(
AppUserRelation
appUserRelation
){
return
super
.
updateSelectiveByIdRe
(
appUserRelation
);
}
private
AppUserRelationBiz
getMyBiz
()
{
return
AopContext
.
currentProxy
()
!=
null
?
(
AppUserRelationBiz
)
AopContext
.
currentProxy
()
:
this
;
}
}
\ No newline at end of file
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserRelationTempBiz.java
0 → 100644
View file @
d570760c
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
biz
;
import
org.springframework.stereotype.Service
;
import
com.github.wxiaoqi.security.admin.entity.AppUserRelationTemp
;
import
com.github.wxiaoqi.security.admin.mapper.AppUserRelationTempMapper
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
/**
* 用户临时关系绑定表
*
* @author libin
* @email 18178966185@163.com
* @date 2019-07-03 16:36:44
*/
@Service
public
class
AppUserRelationTempBiz
extends
BaseBiz
<
AppUserRelationTempMapper
,
AppUserRelationTemp
>
{
}
\ No newline at end of file
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/mapper/AppUserRelationMapper.java
0 → 100644
View file @
d570760c
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
mapper
;
import
com.github.wxiaoqi.security.admin.entity.AppUserRelation
;
import
tk.mybatis.mapper.common.Mapper
;
/**
* 用户关系表
*
* @author libin
* @email 18178966185@163.com
* @date 2019-07-03 16:36:44
*/
public
interface
AppUserRelationMapper
extends
Mapper
<
AppUserRelation
>
{
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/mapper/AppUserRelationTempMapper.java
0 → 100644
View file @
d570760c
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
mapper
;
import
com.github.wxiaoqi.security.admin.entity.AppUserRelationTemp
;
import
tk.mybatis.mapper.common.Mapper
;
/**
* 用户临时关系绑定表
*
* @author libin
* @email 18178966185@163.com
* @date 2019-07-03 16:36:44
*/
public
interface
AppUserRelationTempMapper
extends
Mapper
<
AppUserRelationTemp
>
{
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/AppUserRelationController.java
0 → 100644
View file @
d570760c
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
rest
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.admin.biz.AppUserRelationBiz
;
import
com.github.wxiaoqi.security.admin.entity.AppUserRelation
;
import
io.swagger.annotations.ApiModelProperty
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"relation"
)
public
class
AppUserRelationController
extends
BaseController
<
AppUserRelationBiz
,
AppUserRelation
>
{
@RequestMapping
(
value
=
"app/unauth/small/share"
,
method
=
RequestMethod
.
GET
)
@ApiModelProperty
(
"小程序分享绑定"
)
public
ObjectRestResponse
share
(
@RequestParam
(
value
=
"userid"
,
defaultValue
=
"0"
)
Integer
userid
,
@RequestParam
(
value
=
"pid"
,
defaultValue
=
"0"
)
Integer
pid
,
@RequestParam
(
value
=
"platform_userid"
,
defaultValue
=
"0"
)
Integer
platform_userid
){
return
baseBiz
.
shareParentByUserId
(
userid
,
pid
,
platform_userid
);
}
}
\ No newline at end of file
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rpc/AppUserRest.java
View file @
d570760c
...
...
@@ -186,14 +186,16 @@ public class AppUserRest {
public
JSONObject
appletRegistry
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
,
@RequestParam
(
value
=
"nickname"
,
defaultValue
=
""
)
String
nickname
,
@RequestParam
(
value
=
"headimgurl"
,
defaultValue
=
""
)
String
headimgurl
){
@RequestParam
(
value
=
"headimgurl"
,
defaultValue
=
""
)
String
headimgurl
,
@RequestParam
(
value
=
"userid"
,
defaultValue
=
"0"
)
Integer
userid
){
if
(
StringUtils
.
isBlank
(
headimgurl
)){
headimgurl
=
SystemConfig
.
USER_HEADER_URL_DEFAULT
;
}
if
(
StringUtils
.
isBlank
(
nickname
)){
nickname
=
SystemConfig
.
USER_NIKENAME_DEFAULT
+(
int
)((
Math
.
random
()*
9
+
1
)*
100000
);
}
return
appPermissionService
.
appletRegistry
(
username
,
headimgurl
,
nickname
);
return
appPermissionService
.
appletRegistry
(
username
,
headimgurl
,
nickname
,
userid
);
}
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rpc/service/AppPermissionService.java
View file @
d570760c
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
rpc
.
service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.wxiaoqi.security.admin.biz.AppUserBiz
;
import
com.github.wxiaoqi.security.admin.biz.AppUserDetailBiz
;
import
com.github.wxiaoqi.security.admin.biz.AppUserLoginBiz
;
import
com.github.wxiaoqi.security.admin.biz.ElementBiz
;
import
com.github.wxiaoqi.security.admin.biz.*
;
import
com.github.wxiaoqi.security.admin.constant.RedisKey
;
import
com.github.wxiaoqi.security.admin.constant.enumerate.UserSourceEnum
;
import
com.github.wxiaoqi.security.admin.entity.*
;
...
...
@@ -62,6 +59,9 @@ public class AppPermissionService {
@Autowired
ActivityFeign
activityFeign
;
@Autowired
AppUserRelationBiz
relationBiz
;
@Resource
private
RegionFeign
regionFeign
;
...
...
@@ -701,7 +701,7 @@ public class AppPermissionService {
* @param nickname
*/
@Transactional
public
JSONObject
applyRegister
(
String
username
,
String
password
,
String
headimgurl
,
String
nickname
)
{
public
JSONObject
applyRegister
(
String
username
,
String
password
,
String
headimgurl
,
String
nickname
,
Integer
small_id
)
{
// 判断参数
if
(
StringUtils
.
isBlank
(
username
)
||
StringUtils
.
isBlank
(
password
))
{
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"参数为空"
);
...
...
@@ -740,6 +740,8 @@ public class AppPermissionService {
rsUserDetail
.
setChannel
(
UserSourceEnum
.
APPLET
.
getCode
());
appUserDetailBiz
.
insertSelective
(
rsUserDetail
);
log
.
error
(
"注册:新增用户详情: "
+
userid
);
//上线绑定
relationBiz
.
bindByUserId
(
userid
,
small_id
);
//自动登录获取优惠卷
authCoupn
(
userid
);
//发送短信通知用户
...
...
@@ -747,7 +749,7 @@ public class AppPermissionService {
// 登录结果要做做统一处理
JSONObject
data
=
autoLogin
(
userid
,
username
,
headimgurl
,
nickname
);
// 到im注册,获取返回结果
Map
<
String
,
Object
>
map
=
registerIm
(
username
,
appUserLogin
.
getPassword
(),
nickname
);
/*
Map<String,Object> map=registerIm(username,appUserLogin.getPassword(),nickname);
if(map!=null){
Integer imUserId=Integer.parseInt(map.get("userId").toString());
String access_token=map.get("access_token").toString();
...
...
@@ -763,7 +765,7 @@ public class AppPermissionService {
}
data.put("imToken",access_token);
data.put("imUserId",imUserId);
}
}
*/
if
(
data
!=
null
)
{
return
JsonResultUtil
.
createSuccessResultWithObj
(
data
);
...
...
@@ -783,7 +785,7 @@ public class AppPermissionService {
* @param username
* @return
*/
public
JSONObject
appletRegistry
(
String
username
,
String
headimgurl
,
String
nickname
){
public
JSONObject
appletRegistry
(
String
username
,
String
headimgurl
,
String
nickname
,
Integer
small_id
){
try
{
// 是否已存在
...
...
@@ -791,9 +793,13 @@ public class AppPermissionService {
JSONObject
data
=
new
JSONObject
();
if
(
null
==
user
)
{
String
password
=
"12345678"
;
data
=
applyRegister
(
username
,
password
,
headimgurl
,
nickname
);
data
=
applyRegister
(
username
,
password
,
headimgurl
,
nickname
,
small_id
);
}
else
{
data
=
appletLoginByUserId
(
user
.
getId
());
Integer
userid
=
user
.
getId
();
//上线绑定
relationBiz
.
bindByUserId
(
userid
,
small_id
);
//登录
data
=
appletLoginByUserId
(
userid
);
}
return
data
;
}
catch
(
Exception
e
)
{
...
...
ace-modules/ace-generator/src/main/resources/application.yml
View file @
d570760c
...
...
@@ -10,7 +10,7 @@ spring:
datasource
:
type
:
com.alibaba.druid.pool.DruidDataSource
driverClassName
:
com.mysql.jdbc.Driver
url
:
jdbc:mysql://10.5.52.3:3306/
xxfc_tour
?useUnicode=true&characterEncoding=UTF-8
url
:
jdbc:mysql://10.5.52.3:3306/
ag_admin_v1
?useUnicode=true&characterEncoding=UTF-8
username
:
root
password
:
sslcloud123*()
jackson
:
...
...
ace-modules/ace-generator/src/main/resources/generator.properties
View file @
d570760c
#\u4EE3\u7801\u751F\u6210\u5668\uFF0C\u914D\u7F6E\u4FE1\u606F
#\u5305\u540D
package
=
com.
xxfc.platform.tour
package
=
com.
github.wxiaoqi.security.admin
#\u4F5C\u8005
author
=
libin
#Email
...
...
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