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
d8a9e9d7
Commit
d8a9e9d7
authored
Jan 17, 2020
by
hanfeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
684e6e30
c1e8f187
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
986 additions
and
174 deletions
+986
-174
AuthController.java
...thub/wxiaoqi/security/auth/controller/AuthController.java
+6
-4
IUserService.java
.../com/github/wxiaoqi/security/auth/feign/IUserService.java
+4
-2
AuthService.java
...com/github/wxiaoqi/security/auth/service/AuthService.java
+2
-2
AppAuthServiceImpl.java
...xiaoqi/security/auth/service/impl/AppAuthServiceImpl.java
+4
-4
AuthServiceImpl.java
...b/wxiaoqi/security/auth/service/impl/AuthServiceImpl.java
+4
-4
AppUserManageDTO.java
...m/github/wxiaoqi/security/admin/dto/AppUserManageDTO.java
+9
-0
AppUserDetail.java
...m/github/wxiaoqi/security/admin/entity/AppUserDetail.java
+13
-3
AppUserManageVo.java
...com/github/wxiaoqi/security/admin/vo/AppUserManageVo.java
+12
-0
AppUserVo.java
.../java/com/github/wxiaoqi/security/admin/vo/AppUserVo.java
+87
-82
AppUsersManageController.java
...wxiaoqi/security/admin/rest/AppUsersManageController.java
+31
-1
AppUserRest.java
...va/com/github/wxiaoqi/security/admin/rpc/AppUserRest.java
+6
-4
AppPermissionService.java
...aoqi/security/admin/rpc/service/AppPermissionService.java
+152
-3
AppUserDetailMapper.xml
...e-admin/src/main/resources/mapper/AppUserDetailMapper.xml
+26
-12
AppVersionMark.java
...ain/java/com/xxfc/platform/app/entity/AppVersionMark.java
+82
-0
AppVersionMarkDTO.java
...a/com/xxfc/platform/app/entity/dto/AppVersionMarkDTO.java
+46
-0
AppVersionMarkQuery.java
...in/java/com/xxfc/platform/app/vo/AppVersionMarkQuery.java
+24
-0
AppVersionMarkBiz.java
...ain/java/com/xxfc/platform/app/biz/AppVersionMarkBiz.java
+189
-0
AppVersionMarkMapper.java
...va/com/xxfc/platform/app/mapper/AppVersionMarkMapper.java
+33
-0
AppVersionMarkController.java
.../com/xxfc/platform/app/rest/AppVersionMarkController.java
+147
-0
AppVersionMarkMapper.xml
...server/src/main/resources/mapper/AppVersionMarkMapper.xml
+70
-0
QueryOrderDTO.java
...ava/com/xxfc/platform/order/pojo/order/QueryOrderDTO.java
+2
-0
OrderAccountBiz.java
...ain/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
+8
-23
OrderInvoiceBiz.java
...ain/java/com/xxfc/platform/order/biz/OrderInvoiceBiz.java
+10
-3
OrderVehicleCrosstownBiz.java
...com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
+1
-1
BaseOrderController.java
...ava/com/xxfc/platform/order/rest/BaseOrderController.java
+11
-3
BaseOrderMapper.xml
...rder-server/src/main/resources/mapper/BaseOrderMapper.xml
+6
-22
OrderInvoiceMapper.xml
...r-server/src/main/resources/mapper/OrderInvoiceMapper.xml
+1
-1
No files found.
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/controller/AuthController.java
View file @
d8a9e9d7
...
@@ -84,9 +84,10 @@ public class AuthController {
...
@@ -84,9 +84,10 @@ public class AuthController {
@RequestParam
(
value
=
"mobilecode"
,
defaultValue
=
""
)
String
mobilecode
,
@RequestParam
(
value
=
"mobilecode"
,
defaultValue
=
""
)
String
mobilecode
,
@RequestParam
(
value
=
"password"
,
defaultValue
=
""
)
String
password
,
@RequestParam
(
value
=
"password"
,
defaultValue
=
""
)
String
password
,
@RequestParam
(
value
=
"code"
,
defaultValue
=
""
)
String
code
,
@RequestParam
(
value
=
"code"
,
defaultValue
=
""
)
String
code
,
@RequestParam
(
value
=
"channel"
,
defaultValue
=
"1"
)
Integer
channel
)
throws
Exception
{
@RequestParam
(
value
=
"channel"
,
defaultValue
=
"1"
)
Integer
channel
,
@RequestParam
(
value
=
"registerSource"
,
defaultValue
=
""
)
String
registerSource
)
throws
Exception
{
log
.
info
(
username
+
"----require register..."
);
log
.
info
(
username
+
"----require register..."
);
JSONObject
data
=
appAuthService
.
register
(
username
,
mobilecode
,
password
,
code
,
channel
);
JSONObject
data
=
appAuthService
.
register
(
username
,
mobilecode
,
password
,
code
,
channel
,
registerSource
);
if
(
data
!=
null
&&
data
.
getInteger
(
"status"
)==
ResultCode
.
SUCCESS_CODE
){
if
(
data
!=
null
&&
data
.
getInteger
(
"status"
)==
ResultCode
.
SUCCESS_CODE
){
JwtAuthenticationRequest
authenticationRequest
=
new
JwtAuthenticationRequest
();
JwtAuthenticationRequest
authenticationRequest
=
new
JwtAuthenticationRequest
();
authenticationRequest
.
setUsername
(
username
);
authenticationRequest
.
setUsername
(
username
);
...
@@ -108,11 +109,12 @@ public class AuthController {
...
@@ -108,11 +109,12 @@ public class AuthController {
@RequestParam
(
value
=
"type"
,
defaultValue
=
"0"
)
Integer
type
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"0"
)
Integer
type
,
@RequestParam
(
value
=
"isQQ"
,
defaultValue
=
"0"
)
Integer
isQQ
,
@RequestParam
(
value
=
"isQQ"
,
defaultValue
=
"0"
)
Integer
isQQ
,
@RequestParam
(
value
=
"code"
,
defaultValue
=
""
)
String
code
,
@RequestParam
(
value
=
"code"
,
defaultValue
=
""
)
String
code
,
@RequestParam
(
value
=
"channel"
,
defaultValue
=
"1"
)
Integer
channel
@RequestParam
(
value
=
"channel"
,
defaultValue
=
"1"
)
Integer
channel
,
@RequestParam
(
value
=
"registerSource"
,
defaultValue
=
""
)
String
registerSource
)
throws
Exception
{
)
throws
Exception
{
log
.
info
(
username
+
"----require wxregister..."
);
log
.
info
(
username
+
"----require wxregister..."
);
JSONObject
data
=
appAuthService
.
wxregister
(
username
,
mobilecode
,
password
,
nickname
,
JSONObject
data
=
appAuthService
.
wxregister
(
username
,
mobilecode
,
password
,
nickname
,
headimgurl
,
openid
,
unionid
,
type
,
isQQ
,
code
,
channel
);
headimgurl
,
openid
,
unionid
,
type
,
isQQ
,
code
,
channel
,
registerSource
);
if
(
data
!=
null
&&
data
.
getInteger
(
"status"
)==
ResultCode
.
SUCCESS_CODE
){
if
(
data
!=
null
&&
data
.
getInteger
(
"status"
)==
ResultCode
.
SUCCESS_CODE
){
JSONObject
result
=
data
.
getJSONObject
(
"data"
);
JSONObject
result
=
data
.
getJSONObject
(
"data"
);
if
(
result
==
null
){
if
(
result
==
null
){
...
...
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/feign/IUserService.java
View file @
d8a9e9d7
...
@@ -35,7 +35,8 @@ public interface IUserService {
...
@@ -35,7 +35,8 @@ public interface IUserService {
@RequestParam
(
value
=
"mobilecode"
,
defaultValue
=
""
)
String
mobilecode
,
@RequestParam
(
value
=
"mobilecode"
,
defaultValue
=
""
)
String
mobilecode
,
@RequestParam
(
value
=
"password"
,
defaultValue
=
""
)
String
password
,
@RequestParam
(
value
=
"password"
,
defaultValue
=
""
)
String
password
,
@RequestParam
(
value
=
"code"
)
String
code
,
@RequestParam
(
value
=
"code"
)
String
code
,
@RequestParam
(
value
=
"channel"
,
defaultValue
=
"1"
)
Integer
channel
);
@RequestParam
(
value
=
"channel"
,
defaultValue
=
"1"
)
Integer
channel
,
@RequestParam
(
value
=
"registerSource"
,
defaultValue
=
""
)
String
registerSource
);
@RequestMapping
(
value
=
"/api/app/user/wxregister"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/api/app/user/wxregister"
,
method
=
RequestMethod
.
POST
)
public
JSONObject
wxregister
(
public
JSONObject
wxregister
(
@RequestParam
(
value
=
"username"
)
String
username
,
@RequestParam
(
value
=
"mobilecode"
)
String
mobilecode
,
@RequestParam
(
value
=
"username"
)
String
username
,
@RequestParam
(
value
=
"mobilecode"
)
String
mobilecode
,
...
@@ -43,7 +44,8 @@ public interface IUserService {
...
@@ -43,7 +44,8 @@ public interface IUserService {
@RequestParam
(
value
=
"headimgurl"
)
String
headimgurl
,
@RequestParam
(
value
=
"openid"
)
String
openid
,
@RequestParam
(
value
=
"headimgurl"
)
String
headimgurl
,
@RequestParam
(
value
=
"openid"
)
String
openid
,
@RequestParam
(
value
=
"unionid"
)
String
unionid
,
@RequestParam
(
value
=
"type"
)
Integer
type
,
@RequestParam
(
value
=
"unionid"
)
String
unionid
,
@RequestParam
(
value
=
"type"
)
Integer
type
,
@RequestParam
(
value
=
"isQQ"
)
Integer
isQQ
,
@RequestParam
(
value
=
"code"
)
String
code
,
@RequestParam
(
value
=
"isQQ"
)
Integer
isQQ
,
@RequestParam
(
value
=
"code"
)
String
code
,
@RequestParam
(
value
=
"channel"
,
defaultValue
=
"1"
)
Integer
channel
);
@RequestParam
(
value
=
"channel"
,
defaultValue
=
"1"
)
Integer
channel
,
@RequestParam
(
value
=
"registerSource"
,
defaultValue
=
""
)
String
registerSource
);
@RequestMapping
(
value
=
"/api/app/user/checkBindWechat"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/api/app/user/checkBindWechat"
,
method
=
RequestMethod
.
POST
)
public
JSONObject
checkBindWechat
(
@RequestParam
(
value
=
"username"
)
String
username
);
public
JSONObject
checkBindWechat
(
@RequestParam
(
value
=
"username"
)
String
username
);
@RequestMapping
(
value
=
"/api/app/user/wxlogin"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/api/app/user/wxlogin"
,
method
=
RequestMethod
.
POST
)
...
...
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/service/AuthService.java
View file @
d8a9e9d7
...
@@ -11,8 +11,8 @@ public interface AuthService {
...
@@ -11,8 +11,8 @@ public interface AuthService {
String
refresh
(
String
oldToken
)
throws
Exception
;
String
refresh
(
String
oldToken
)
throws
Exception
;
void
validate
(
String
token
)
throws
Exception
;
void
validate
(
String
token
)
throws
Exception
;
JSONObject
sendsms
(
String
username
,
Integer
type
,
String
pointList
)
throws
Exception
;
JSONObject
sendsms
(
String
username
,
Integer
type
,
String
pointList
)
throws
Exception
;
JSONObject
register
(
String
username
,
String
mobilecode
,
String
password
,
String
code
,
Integer
channel
)
throws
Exception
;
JSONObject
register
(
String
username
,
String
mobilecode
,
String
password
,
String
code
,
Integer
channel
,
String
registerSource
)
throws
Exception
;
JSONObject
wxregister
(
String
username
,
String
mobilecode
,
String
password
,
String
nickname
,
String
headimgurl
,
String
openid
,
String
unionid
,
Integer
type
,
Integer
isQQ
,
String
code
,
Integer
channel
)
throws
Exception
;
JSONObject
wxregister
(
String
username
,
String
mobilecode
,
String
password
,
String
nickname
,
String
headimgurl
,
String
openid
,
String
unionid
,
Integer
type
,
Integer
isQQ
,
String
code
,
Integer
channel
,
String
registerSource
)
throws
Exception
;
JSONObject
checkBindWechat
(
String
username
)
throws
Exception
;
JSONObject
checkBindWechat
(
String
username
)
throws
Exception
;
JSONObject
wxlogin
(
String
openid
,
Integer
isQQ
,
String
code
)
throws
Exception
;
JSONObject
wxlogin
(
String
openid
,
Integer
isQQ
,
String
code
)
throws
Exception
;
JSONObject
tlogin
(
String
username
,
String
password
,
String
mobilecode
,
Integer
type
,
String
code
)
throws
Exception
;
JSONObject
tlogin
(
String
username
,
String
password
,
String
mobilecode
,
Integer
type
,
String
code
)
throws
Exception
;
...
...
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/service/impl/AppAuthServiceImpl.java
View file @
d8a9e9d7
...
@@ -72,13 +72,13 @@ public class AppAuthServiceImpl implements AuthService {
...
@@ -72,13 +72,13 @@ public class AppAuthServiceImpl implements AuthService {
}
}
@Override
@Override
public
JSONObject
register
(
String
username
,
String
mobilecode
,
String
password
,
String
code
,
Integer
channel
)
throws
Exception
{
public
JSONObject
register
(
String
username
,
String
mobilecode
,
String
password
,
String
code
,
Integer
channel
,
String
registerSource
)
throws
Exception
{
return
userService
.
register
(
username
,
mobilecode
,
password
,
code
,
channel
);
return
userService
.
register
(
username
,
mobilecode
,
password
,
code
,
channel
,
registerSource
);
}
}
@Override
@Override
public
JSONObject
wxregister
(
String
username
,
String
mobilecode
,
String
password
,
String
nickname
,
String
headimgurl
,
String
openid
,
String
unionid
,
Integer
type
,
Integer
isQQ
,
String
code
,
Integer
channel
)
throws
Exception
{
public
JSONObject
wxregister
(
String
username
,
String
mobilecode
,
String
password
,
String
nickname
,
String
headimgurl
,
String
openid
,
String
unionid
,
Integer
type
,
Integer
isQQ
,
String
code
,
Integer
channel
,
String
registerSource
)
throws
Exception
{
return
userService
.
wxregister
(
username
,
mobilecode
,
password
,
nickname
,
headimgurl
,
openid
,
unionid
,
type
,
isQQ
,
code
,
channel
);
return
userService
.
wxregister
(
username
,
mobilecode
,
password
,
nickname
,
headimgurl
,
openid
,
unionid
,
type
,
isQQ
,
code
,
channel
,
registerSource
);
}
}
@Override
@Override
...
...
ace-auth/ace-auth-server/src/main/java/com/github/wxiaoqi/security/auth/service/impl/AuthServiceImpl.java
View file @
d8a9e9d7
...
@@ -69,13 +69,13 @@ public class AuthServiceImpl implements AuthService {
...
@@ -69,13 +69,13 @@ public class AuthServiceImpl implements AuthService {
return
userService
.
sendsms
(
username
,
type
,
pointList
);
return
userService
.
sendsms
(
username
,
type
,
pointList
);
}
}
@Override
@Override
public
JSONObject
register
(
String
username
,
String
mobilecode
,
String
password
,
String
code
,
Integer
channel
)
throws
Exception
{
public
JSONObject
register
(
String
username
,
String
mobilecode
,
String
password
,
String
code
,
Integer
channel
,
String
registerSource
)
throws
Exception
{
return
userService
.
register
(
username
,
mobilecode
,
password
,
code
,
channel
);
return
userService
.
register
(
username
,
mobilecode
,
password
,
code
,
channel
,
registerSource
);
}
}
@Override
@Override
public
JSONObject
wxregister
(
String
username
,
String
mobilecode
,
String
password
,
String
nickname
,
String
headimgurl
,
String
openid
,
String
unionid
,
Integer
type
,
Integer
isQQ
,
String
code
,
Integer
channel
)
throws
Exception
{
public
JSONObject
wxregister
(
String
username
,
String
mobilecode
,
String
password
,
String
nickname
,
String
headimgurl
,
String
openid
,
String
unionid
,
Integer
type
,
Integer
isQQ
,
String
code
,
Integer
channel
,
String
registerSource
)
throws
Exception
{
return
userService
.
wxregister
(
username
,
mobilecode
,
password
,
nickname
,
headimgurl
,
openid
,
unionid
,
type
,
isQQ
,
code
,
channel
);
return
userService
.
wxregister
(
username
,
mobilecode
,
password
,
nickname
,
headimgurl
,
openid
,
unionid
,
type
,
isQQ
,
code
,
channel
,
registerSource
);
}
}
@Override
@Override
...
...
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/AppUserManageDTO.java
View file @
d8a9e9d7
...
@@ -75,6 +75,15 @@ public class AppUserManageDTO {
...
@@ -75,6 +75,15 @@ public class AppUserManageDTO {
private
String
realName
;
private
String
realName
;
/**
* 注册来源
*/
private
String
registerSource
;
/**
* 注册来源名称
*/
private
String
markName
;
// /**
// /**
// * 接收前台时间范围
// * 接收前台时间范围
// */
// */
...
...
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/AppUserDetail.java
View file @
d8a9e9d7
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
entity
;
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GeneratedValue
;
...
@@ -12,6 +14,8 @@ import javax.persistence.Table;
...
@@ -12,6 +14,8 @@ import javax.persistence.Table;
* 用户详情信息表
* 用户详情信息表
*/
*/
@Table
(
name
=
"app_user_detail"
)
@Table
(
name
=
"app_user_detail"
)
@AllArgsConstructor
@NoArgsConstructor
@Data
@Data
public
class
AppUserDetail
{
public
class
AppUserDetail
{
@Id
@Id
...
@@ -79,7 +83,13 @@ public class AppUserDetail {
...
@@ -79,7 +83,13 @@ public class AppUserDetail {
@Column
(
name
=
"inviter_account"
)
@Column
(
name
=
"inviter_account"
)
private
Integer
inviterAccount
;
private
Integer
inviterAccount
;
@ApiModelProperty
(
value
=
"1-新人用户;2-未激活;3-激活"
)
@ApiModelProperty
(
value
=
"1-新人用户;2-未激活;3-激活"
)
@Column
(
name
=
"state"
)
@Column
(
name
=
"state"
)
private
Integer
state
;
private
Integer
state
;
@ApiModelProperty
(
value
=
"注册来源"
)
@Column
(
name
=
"register_source"
)
private
String
registerSource
;
}
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/vo/AppUserManageVo.java
View file @
d8a9e9d7
...
@@ -21,6 +21,12 @@ public class AppUserManageVo {
...
@@ -21,6 +21,12 @@ public class AppUserManageVo {
@Column
(
name
=
"channel"
)
@Column
(
name
=
"channel"
)
private
String
channel
;
private
String
channel
;
/**
* 注册来源
*/
@Column
(
name
=
"register_source"
)
private
String
registerSource
;
/**
/**
* 是否是会员:0-不是;1-会员
* 是否是会员:0-不是;1-会员
*/
*/
...
@@ -186,4 +192,10 @@ public class AppUserManageVo {
...
@@ -186,4 +192,10 @@ public class AppUserManageVo {
* 上级手机号
* 上级手机号
*/
*/
private
String
superiorMobileNumber
;
private
String
superiorMobileNumber
;
/**
* 注册来源名称
*/
@Column
(
name
=
"mark_name"
)
private
String
markName
;
}
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/vo/AppUserVo.java
View file @
d8a9e9d7
...
@@ -14,90 +14,95 @@ import lombok.NoArgsConstructor;
...
@@ -14,90 +14,95 @@ import lombok.NoArgsConstructor;
public
class
AppUserVo
{
public
class
AppUserVo
{
private
Integer
id
;
private
Integer
id
;
//用户id
//用户id
private
Integer
userid
;
private
Integer
userid
;
//imid
//imid
private
Integer
imUserid
;
private
Integer
imUserid
;
///账号(手机号)
///账号(手机号)
private
String
username
;
private
String
username
;
//微信openid
//微信openid
private
String
wxOpenid
;
private
String
wxOpenid
;
//微信unionid
//微信unionid
private
String
unionid
;
private
String
unionid
;
//qq
//qq
private
String
openid
;
private
String
openid
;
//状态:0-启用,1-禁用
//状态:0-启用,1-禁用
private
Integer
status
;
private
Integer
status
;
//身份证号
//身份证号
private
String
idNumber
;
private
String
idNumber
;
//实名认证状态:0-未认证,1-已认证
//实名认证状态:0-未认证,1-已认证
private
Integer
certificationStatus
;
private
Integer
certificationStatus
;
//会员
//会员
private
Integer
isMember
;
private
Integer
isMember
;
//昵称
//昵称
private
String
nickname
;
private
String
nickname
;
private
String
wxNickname
;
private
String
wxNickname
;
private
String
aliPayNickName
;
private
String
aliPayNickName
;
private
String
qqNickname
;
private
String
qqNickname
;
//真实姓名
//真实姓名
private
String
realname
;
private
String
realname
;
//头像
//头像
private
String
headimgurl
;
private
String
headimgurl
;
//邮箱
//邮箱
private
String
email
;
private
String
email
;
//性别 0-女,1-男
//性别 0-女,1-男
private
Integer
sex
;
private
Integer
sex
;
//生日
//生日
private
String
birthday
;
private
String
birthday
;
//个性签名
//个性签名
private
String
personSign
;
private
String
personSign
;
//备注
//备注
private
String
remark
;
private
String
remark
;
//渠道来源;1-app;2-小程序
//渠道来源;1-app;2-小程序
private
Integer
channel
;
private
Integer
channel
;
/**
//注册来源
* 省份编号
private
String
registerSource
;
*/
//注册来源名称
private
Integer
provinceCode
;
private
String
markName
;
/**
/**
* 省份编号
* 市编号
*/
*/
private
Integer
provinceCode
;
private
Integer
cityCode
;
/**
/**
* 市编号
* 创建ip
*/
*/
private
Integer
cityCode
;
private
String
crtHost
;
/**
/**
* 更新ip
* 创建ip
*/
*/
private
String
updHost
;
private
String
crtHost
;
/**
* 更新ip
@ApiModelProperty
(
value
=
"用户职位"
)
*/
private
Integer
positionId
;
private
String
updHost
;
@ApiModelProperty
(
value
=
"用户来源:0-自来,1-用户邀请"
)
private
Integer
source
;
@ApiModelProperty
(
value
=
"用户职位"
)
private
Integer
positionId
;
@ApiModelProperty
(
value
=
"邀请码"
)
@ApiModelProperty
(
value
=
"用户来源:0-自来,1-用户邀请"
)
private
String
code
;
private
Integer
source
;
@ApiModelProperty
(
value
=
"邀请人id:"
)
private
Integer
inviterAccount
;
@ApiModelProperty
(
value
=
"邀请码"
)
private
String
code
;
@ApiModelProperty
(
value
=
"1-未激活;2-激活:"
)
private
Integer
state
;
@ApiModelProperty
(
value
=
"邀请人id:"
)
private
Integer
inviterAccount
;
@ApiModelProperty
(
value
=
"1-未激活;2-激活:"
)
private
Integer
state
;
@ApiModelProperty
(
value
=
"支付宝授权返回的code"
)
@ApiModelProperty
(
value
=
"支付宝授权返回的code"
)
private
String
aliCode
;
private
String
aliCode
;
@ApiModelProperty
(
value
=
"用户职位名称"
)
@ApiModelProperty
(
value
=
"用户职位名称"
)
private
String
jobTitle
;
private
String
jobTitle
;
@ApiModelProperty
(
value
=
"用户会员名称"
)
private
String
memberName
;
@ApiModelProperty
(
value
=
"用户会员名称"
)
private
String
memberName
;
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/AppUsersManageController.java
View file @
d8a9e9d7
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
rest
;
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
rest
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.admin.biz.AppUserDetailBiz
;
import
com.github.wxiaoqi.security.admin.biz.AppUserDetailBiz
;
import
com.github.wxiaoqi.security.admin.biz.AppUserLoginBiz
;
import
com.github.wxiaoqi.security.admin.biz.AppUserLoginBiz
;
...
@@ -9,14 +10,17 @@ import com.github.wxiaoqi.security.admin.dto.AppUserManageDTO;
...
@@ -9,14 +10,17 @@ import com.github.wxiaoqi.security.admin.dto.AppUserManageDTO;
import
com.github.wxiaoqi.security.admin.entity.AppUserLogin
;
import
com.github.wxiaoqi.security.admin.entity.AppUserLogin
;
import
com.github.wxiaoqi.security.admin.entity.AppUserManage
;
import
com.github.wxiaoqi.security.admin.entity.AppUserManage
;
import
com.github.wxiaoqi.security.admin.entity.User
;
import
com.github.wxiaoqi.security.admin.entity.User
;
import
com.github.wxiaoqi.security.admin.rpc.service.AppPermissionService
;
import
com.github.wxiaoqi.security.admin.vo.AppUserManageVo
;
import
com.github.wxiaoqi.security.admin.vo.AppUserManageVo
;
import
com.github.wxiaoqi.security.admin.vo.AppUserVo
;
import
com.github.wxiaoqi.security.admin.vo.AppUserVo
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.auth.client.config.UserAuthConfig
;
import
com.github.wxiaoqi.security.auth.client.config.UserAuthConfig
;
import
com.github.wxiaoqi.security.auth.client.jwt.UserAuthUtil
;
import
com.github.wxiaoqi.security.auth.client.jwt.UserAuthUtil
;
import
com.github.wxiaoqi.security.auth.common.util.jwt.IJWTInfo
;
import
com.github.wxiaoqi.security.auth.common.util.jwt.IJWTInfo
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.util.process.SystemConfig
;
import
com.xxfc.platform.vehicle.feign.VehicleFeign
;
import
com.xxfc.platform.vehicle.feign.VehicleFeign
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -37,6 +41,9 @@ public class AppUsersManageController extends BaseController<AppUserManageBiz,Ap
...
@@ -37,6 +41,9 @@ public class AppUsersManageController extends BaseController<AppUserManageBiz,Ap
@Autowired
@Autowired
private
AppUserLoginBiz
appUserLoginBiz
;
private
AppUserLoginBiz
appUserLoginBiz
;
@Autowired
private
AppPermissionService
appPermissionService
;
@Autowired
@Autowired
private
AppUserDetailBiz
appUserDetailBiz
;
private
AppUserDetailBiz
appUserDetailBiz
;
...
@@ -65,7 +72,7 @@ public class AppUsersManageController extends BaseController<AppUserManageBiz,Ap
...
@@ -65,7 +72,7 @@ public class AppUsersManageController extends BaseController<AppUserManageBiz,Ap
User
user
=
(
User
)
objectRestResponse
.
getData
();
User
user
=
(
User
)
objectRestResponse
.
getData
();
if
(
user
==
null
){
if
(
user
==
null
){
throw
new
BaseException
(
"User error!"
);
throw
new
BaseException
(
"User error!"
);
}
}
if
(
ALL_PERMISSIONS
.
equals
(
user
.
getDataAll
()))
{
if
(
ALL_PERMISSIONS
.
equals
(
user
.
getDataAll
()))
{
return
ObjectRestResponse
.
succ
(
baseBiz
.
findAllByQuery
(
appUserManageDTO
));
return
ObjectRestResponse
.
succ
(
baseBiz
.
findAllByQuery
(
appUserManageDTO
));
}
}
...
@@ -158,5 +165,28 @@ public class AppUsersManageController extends BaseController<AppUserManageBiz,Ap
...
@@ -158,5 +165,28 @@ public class AppUsersManageController extends BaseController<AppUserManageBiz,Ap
}
}
}
}
/**
* 注册
* @param username
* @return
*/
@RequestMapping
(
value
=
"app/unauth/register"
,
method
=
RequestMethod
.
POST
)
@IgnoreUserToken
public
@ResponseBody
JSONObject
register
(
@RequestParam
(
value
=
"username"
,
defaultValue
=
""
)
String
username
){
//默认昵称
String
nickname
=
SystemConfig
.
USER_NIKENAME_DEFAULT
+(
int
)((
Math
.
random
()*
9
+
1
)*
100000
);
String
headimgurl
=
SystemConfig
.
USER_HEADER_URL_DEFAULT
;
try
{
return
appPermissionService
.
adminRegister
(
username
,
username
,
headimgurl
,
nickname
,
null
,-
1
);
}
catch
(
Exception
e
)
{
log
.
error
(
"修改失败【{}】"
,
e
);
throw
new
BaseException
(
"修改失败"
);
}
}
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rpc/AppUserRest.java
View file @
d8a9e9d7
...
@@ -89,12 +89,13 @@ public class AppUserRest {
...
@@ -89,12 +89,13 @@ public class AppUserRest {
@RequestParam
(
value
=
"mobilecode"
,
defaultValue
=
""
)
String
mobilecode
,
@RequestParam
(
value
=
"mobilecode"
,
defaultValue
=
""
)
String
mobilecode
,
@RequestParam
(
value
=
"password"
,
defaultValue
=
""
)
String
password
,
@RequestParam
(
value
=
"password"
,
defaultValue
=
""
)
String
password
,
@RequestParam
(
value
=
"code"
,
defaultValue
=
""
)
String
code
,
@RequestParam
(
value
=
"code"
,
defaultValue
=
""
)
String
code
,
@RequestParam
(
value
=
"channel"
,
defaultValue
=
"1"
)
Integer
channel
@RequestParam
(
value
=
"channel"
,
defaultValue
=
"1"
)
Integer
channel
,
@RequestParam
(
value
=
"registerSource"
,
defaultValue
=
""
)
String
registerSource
){
){
//默认昵称
//默认昵称
String
nickname
=
SystemConfig
.
USER_NIKENAME_DEFAULT
+(
int
)((
Math
.
random
()*
9
+
1
)*
100000
);
String
nickname
=
SystemConfig
.
USER_NIKENAME_DEFAULT
+(
int
)((
Math
.
random
()*
9
+
1
)*
100000
);
return
appPermissionService
.
register
(
username
,
password
,
SystemConfig
.
USER_HEADER_URL_DEFAULT
,
nickname
,
return
appPermissionService
.
register
(
username
,
password
,
SystemConfig
.
USER_HEADER_URL_DEFAULT
,
nickname
,
mobilecode
,
null
,
null
,
0
,
code
,
channel
);
mobilecode
,
null
,
null
,
0
,
code
,
channel
,
registerSource
);
}
}
...
@@ -123,7 +124,8 @@ public class AppUserRest {
...
@@ -123,7 +124,8 @@ public class AppUserRest {
@RequestParam
(
value
=
"type"
,
defaultValue
=
"0"
)
Integer
type
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"0"
)
Integer
type
,
@RequestParam
(
value
=
"isQQ"
,
defaultValue
=
"0"
)
Integer
isQQ
,
@RequestParam
(
value
=
"isQQ"
,
defaultValue
=
"0"
)
Integer
isQQ
,
@RequestParam
(
value
=
"code"
,
defaultValue
=
""
)
String
code
,
@RequestParam
(
value
=
"code"
,
defaultValue
=
""
)
String
code
,
@RequestParam
(
value
=
"channel"
,
defaultValue
=
"1"
)
Integer
channel
@RequestParam
(
value
=
"channel"
,
defaultValue
=
"1"
)
Integer
channel
,
@RequestParam
(
value
=
"registerSource"
,
defaultValue
=
""
)
String
registerSource
){
){
if
(
StringUtils
.
isBlank
(
headimgurl
)){
if
(
StringUtils
.
isBlank
(
headimgurl
)){
headimgurl
=
SystemConfig
.
USER_HEADER_URL_DEFAULT
;
headimgurl
=
SystemConfig
.
USER_HEADER_URL_DEFAULT
;
...
@@ -131,7 +133,7 @@ public class AppUserRest {
...
@@ -131,7 +133,7 @@ public class AppUserRest {
if
(
StringUtils
.
isBlank
(
nickname
)){
if
(
StringUtils
.
isBlank
(
nickname
)){
nickname
=
SystemConfig
.
USER_NIKENAME_DEFAULT
+(
int
)((
Math
.
random
()*
9
+
1
)*
100000
);
nickname
=
SystemConfig
.
USER_NIKENAME_DEFAULT
+(
int
)((
Math
.
random
()*
9
+
1
)*
100000
);
}
}
return
appPermissionService
.
weCahtRegister
(
username
,
password
,
openid
,
unionid
,
nickname
,
headimgurl
,
type
,
mobilecode
,
isQQ
,
code
,
channel
);
return
appPermissionService
.
weCahtRegister
(
username
,
password
,
openid
,
unionid
,
nickname
,
headimgurl
,
type
,
mobilecode
,
isQQ
,
code
,
channel
,
registerSource
);
}
}
/**
/**
* 手机号码检测是否已绑定
* 手机号码检测是否已绑定
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rpc/service/AppPermissionService.java
View file @
d8a9e9d7
...
@@ -251,7 +251,7 @@ public class AppPermissionService {
...
@@ -251,7 +251,7 @@ public class AppPermissionService {
*/
*/
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
REQUIRED
)
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
REQUIRED
)
public
JSONObject
register
(
String
username
,
String
password
,
String
headimgurl
,
public
JSONObject
register
(
String
username
,
String
password
,
String
headimgurl
,
String
nickname
,
String
mobilecode
,
String
openId
,
String
unionid
,
Integer
type
,
String
code
,
Integer
channel
)
{
String
nickname
,
String
mobilecode
,
String
openId
,
String
unionid
,
Integer
type
,
String
code
,
Integer
channel
,
String
registerSource
)
{
log
.
info
(
"register------code====="
+
code
+
"----开始进入方法---time===="
+
System
.
currentTimeMillis
()/
1000L
);
log
.
info
(
"register------code====="
+
code
+
"----开始进入方法---time===="
+
System
.
currentTimeMillis
()/
1000L
);
String
activityCode
=
null
;
String
activityCode
=
null
;
// 判断参数和验证码
// 判断参数和验证码
...
@@ -346,6 +346,7 @@ public class AppPermissionService {
...
@@ -346,6 +346,7 @@ public class AppPermissionService {
//生成邀请码 长度改为8 不然重复率太高
//生成邀请码 长度改为8 不然重复率太高
rsUserDetail
.
setCode
(
ReferralCodeUtil
.
encode
(
userid
));
rsUserDetail
.
setCode
(
ReferralCodeUtil
.
encode
(
userid
));
rsUserDetail
.
setChannel
(
channel
);
rsUserDetail
.
setChannel
(
channel
);
rsUserDetail
.
setRegisterSource
(
registerSource
);
appUserDetailBiz
.
insertSelective
(
rsUserDetail
);
appUserDetailBiz
.
insertSelective
(
rsUserDetail
);
log
.
info
(
"注册:新增用户详情: "
+
userid
+
"---time===="
+
System
.
currentTimeMillis
()/
1000L
);
log
.
info
(
"注册:新增用户详情: "
+
userid
+
"---time===="
+
System
.
currentTimeMillis
()/
1000L
);
/* //绑定上下线关系
/* //绑定上下线关系
...
@@ -569,7 +570,7 @@ public class AppPermissionService {
...
@@ -569,7 +570,7 @@ public class AppPermissionService {
*/
*/
@Transactional
@Transactional
public
JSONObject
weCahtRegister
(
String
username
,
String
password
,
String
openId
,
public
JSONObject
weCahtRegister
(
String
username
,
String
password
,
String
openId
,
String
unionid
,
String
nickname
,
String
headimgurl
,
int
type
,
String
mobilecode
,
Integer
isQQ
,
String
code
,
Integer
channel
)
{
String
unionid
,
String
nickname
,
String
headimgurl
,
int
type
,
String
mobilecode
,
Integer
isQQ
,
String
code
,
Integer
channel
,
String
registerSource
)
{
// 校验参数和验证码
// 校验参数和验证码
if
(
StringUtils
.
isBlank
(
username
)
||
StringUtils
.
isBlank
(
mobilecode
))
{
if
(
StringUtils
.
isBlank
(
username
)
||
StringUtils
.
isBlank
(
mobilecode
))
{
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"参数为空"
);
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
NULL_CODE
,
"参数为空"
);
...
@@ -629,6 +630,7 @@ public class AppPermissionService {
...
@@ -629,6 +630,7 @@ public class AppPermissionService {
userDetail
.
setIsdel
(
0
);
userDetail
.
setIsdel
(
0
);
userDetail
.
setCrtHost
(
getIp
());
userDetail
.
setCrtHost
(
getIp
());
userDetail
.
setChannel
(
channel
);
userDetail
.
setChannel
(
channel
);
userDetail
.
setRegisterSource
(
registerSource
);
//setCreateIPInfo(userDetail);
//setCreateIPInfo(userDetail);
appUserDetailBiz
.
insertSelective
(
userDetail
);
appUserDetailBiz
.
insertSelective
(
userDetail
);
...
@@ -662,7 +664,7 @@ public class AppPermissionService {
...
@@ -662,7 +664,7 @@ public class AppPermissionService {
}
}
}
else
if
(
type
==
2
)
{
// 新增
}
else
if
(
type
==
2
)
{
// 新增
JSONObject
register
=
register
(
username
,
password
,
headimgurl
,
nickname
,
mobilecode
,
JSONObject
register
=
register
(
username
,
password
,
headimgurl
,
nickname
,
mobilecode
,
openId
,
unionid
,
isQQ
,
code
,
channel
);
openId
,
unionid
,
isQQ
,
code
,
channel
,
registerSource
);
if
(
register
.
getInteger
(
"status"
)
!=
ResultCode
.
SUCCESS_CODE
)
{
if
(
register
.
getInteger
(
"status"
)
!=
ResultCode
.
SUCCESS_CODE
)
{
if
(
register
.
getInteger
(
"status"
)
==
ResultCode
.
EXIST_CODE
)
{
if
(
register
.
getInteger
(
"status"
)
==
ResultCode
.
EXIST_CODE
)
{
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
EXIST_CODE
,
"用户已存在"
);
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
EXIST_CODE
,
"用户已存在"
);
...
@@ -1197,6 +1199,15 @@ public class AppPermissionService {
...
@@ -1197,6 +1199,15 @@ public class AppPermissionService {
}
}
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
REQUIRED
)
public
BaseUserMemberExportDTO
findUserMemberByUserIdAndPhone
(
String
phone
)
throws
Exception
{
List
<
BaseUserMemberExportDTO
>
memberExportDTOS
=
baseUserMemberExportBiz
.
findUserMemberExportDataByPhoneAndHashEffective
(
phone
);
if
(
CollectionUtils
.
isNotEmpty
(
memberExportDTOS
))
{
return
memberExportDTOS
.
get
(
0
);
}
return
null
;
}
private
void
insertUserMemberByExistUserMemberExportData
(
Integer
userId
,
List
<
BaseUserMemberExportDTO
>
userMemberExportDTOS
)
throws
Exception
{
private
void
insertUserMemberByExistUserMemberExportData
(
Integer
userId
,
List
<
BaseUserMemberExportDTO
>
userMemberExportDTOS
)
throws
Exception
{
UserMemberDTO
userMemberDTO
;
UserMemberDTO
userMemberDTO
;
...
@@ -1244,4 +1255,142 @@ public class AppPermissionService {
...
@@ -1244,4 +1255,142 @@ public class AppPermissionService {
}
}
/**
* 注册用户
*
* @param username
* @param password
* @param headimgurl
*/
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
REQUIRED
)
public
JSONObject
adminRegister
(
String
username
,
String
password
,
String
headimgurl
,
String
nickname
,
String
code
,
Integer
channel
)
throws
Exception
{
log
.
info
(
"register------code====="
+
code
+
"----开始进入方法---time===="
+
System
.
currentTimeMillis
()/
1000L
);
String
activityCode
=
null
;
if
(
StringUtils
.
isNotBlank
(
code
)){
//判断处理活动关键字
String
[]
codes
=
code
.
split
(
"_"
);
if
(
codes
.
length
>
0
)
{
String
userCode
=
codes
[
0
];
if
(
appUserDetailBiz
.
getUserByCode
(
userCode
)==
0
)
{
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
"邀请人不存在"
);
}
}
}
// 是否已存在
AppUserLogin
user
=
appUserLoginBiz
.
checkeUserLogin
(
username
);
if
(
null
!=
user
)
{
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
EXIST_CODE
,
"用户已存在"
);
}
BaseUserMemberExportDTO
exportDTO
=
findUserMemberByUserIdAndPhone
(
username
);
if
(
exportDTO
==
null
){
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
EXIST_CODE
,
"不是临时会员"
);
}
// 新增用户登录信息
try
{
Long
now
=
exportDTO
.
getCrtTime
()/
1000L
;
AppUserLogin
appUserLogin
=
new
AppUserLogin
();
appUserLogin
.
setUsername
(
username
);
appUserLogin
.
setPassword
(
password
);
appUserLogin
.
setIsdel
(
0
);
appUserLogin
.
setStatus
(
0
);
appUserLogin
.
setCreatetime
(
now
);
appUserLogin
.
setUpdatetime
(
now
);
appUserLoginBiz
.
insertSelective
(
appUserLogin
);
Integer
userid
=
appUserLogin
.
getId
();
log
.
info
(
"注册:新增登陆用户信息: "
+
userid
+
"---time===="
+
System
.
currentTimeMillis
()/
1000L
);
// 新增用户详情
AppUserDetail
rsUserDetail
=
new
AppUserDetail
();
rsUserDetail
.
setUserid
(
userid
);
rsUserDetail
.
setNickname
(
nickname
);
rsUserDetail
.
setHeadimgurl
(
headimgurl
);
// 默认路径,待写
rsUserDetail
.
setCreatetime
(
now
);
rsUserDetail
.
setUpdatetime
(
now
);
rsUserDetail
.
setIsdel
(
0
);
rsUserDetail
.
setCrtHost
(
getIp
());
//setCreateIPInfo(rsUserDetail);
log
.
info
(
"注册:解析地址后: "
+
userid
+
"---time===="
+
System
.
currentTimeMillis
()/
1000L
);
//邀请人id关系绑定
Integer
parentId
=
0
;
if
(
StringUtils
.
isNotBlank
(
code
)){
//判断处理活动关键字
String
[]
codes
=
code
.
split
(
"_"
);
if
(
codes
.
length
>
1
)
{
code
=
codes
[
0
];
activityCode
=
codes
[
1
];
}
parentId
=
appUserDetailBiz
.
getUserByCode
(
code
);
}
if
(
parentId
!=
null
&&
parentId
>
0
){
rsUserDetail
.
setSource
(
1
);
relationBiz
.
bindRelation
(
userid
,
parentId
,
1
);
if
(
StringUtils
.
isNotBlank
(
activityCode
)){
rsUserDetail
.
setInviterAccount
(
parentId
);
}
}
//生成邀请码 长度改为8 不然重复率太高
rsUserDetail
.
setCode
(
ReferralCodeUtil
.
encode
(
userid
));
rsUserDetail
.
setChannel
(
channel
);
appUserDetailBiz
.
insertSelective
(
rsUserDetail
);
log
.
info
(
"注册:新增用户详情: "
+
userid
+
"---time===="
+
System
.
currentTimeMillis
()/
1000L
);
/* //绑定上下线关系
if(parentId!=null&&parentId>0){
relationBiz.bindRelation(userid,parentId,1);
}*/
//临时会员绑定
insertUserMemberByUserIdAndPhone
(
userid
,
username
);
log
.
info
(
"注册:临时会员绑定: "
+
userid
+
"---time===="
+
System
.
currentTimeMillis
()/
1000L
);
//参加新人活动
jionActivity
(
userid
);
log
.
info
(
"注册:参加新人活动: "
+
userid
+
"---time===="
+
System
.
currentTimeMillis
()/
1000L
);
//创建钱包
walletBiz
.
createWalletByUserId
(
appUserLogin
.
getId
());
log
.
info
(
"注册:创建钱包: "
+
userid
+
"---time===="
+
System
.
currentTimeMillis
()/
1000L
);
//临时身份绑定
positionTempBiz
.
setPostionIdByPhone
(
username
);
// 登录结果要做做统一处理
JSONObject
data
=
autoLogin
(
userid
,
username
,
headimgurl
,
nickname
,
code
,
activityCode
,
1
);
log
.
info
(
"注册:登录结果要做做统一处理: "
+
userid
+
"---time===="
+
System
.
currentTimeMillis
()/
1000L
);
// 到im注册,获取返回结果
Map
<
String
,
Object
>
map
=
registerIm
(
username
,
appUserLogin
.
getPassword
(),
nickname
);
log
.
info
(
"注册:到im注册: "
+
userid
+
"---time===="
+
System
.
currentTimeMillis
()/
1000L
);
if
(
map
!=
null
)
{
Integer
imUserId
=
Integer
.
parseInt
(
map
.
get
(
"userId"
).
toString
());
//String access_token=map.get("access_token").toString();
String
imPassword
=
map
.
get
(
"password"
).
toString
();
if
(
imUserId
!=
null
&&
imUserId
>
0
&&
StringUtils
.
isNotBlank
(
imPassword
))
{
AppUserLogin
userLogin
=
new
AppUserLogin
();
userLogin
.
setId
(
userid
);
userLogin
.
setImPassword
(
imPassword
);
userLogin
.
setImUserid
(
imUserId
);
userLogin
.
setUsername
(
username
);
appUserLoginBiz
.
updateSelectiveById
(
userLogin
);
log
.
info
(
username
+
"----userLogin updateSelectiveById---username====="
+
username
+
"----imPassword===="
+
imPassword
);
}
//data.put("imToken",access_token);
data
.
put
(
"imUserId"
,
imUserId
);
}
log
.
info
(
"注册:处理im账号: "
+
userid
+
"---time===="
+
System
.
currentTimeMillis
()/
1000L
);
if
(
data
!=
null
)
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"userId"
,
userid
);
jsonObject
.
put
(
"integralRuleCode"
,
"REGISTER"
);
log
.
info
(
"注册成功获取积分:发送消息 exchange = {}, routingKey = {}, json = {}"
,
RabbitConstant
.
INTEGRAL_TOPIC
,
RabbitConstant
.
INTEGRAL_ROUTING_KEY
,
jsonObject
.
toJSONString
());
mqSenderFeign
.
sendMessage
(
RabbitConstant
.
INTEGRAL_TOPIC
,
RabbitConstant
.
INTEGRAL_ROUTING_KEY
,
jsonObject
.
toJSONString
());
sendQueue
(
username
,
password
,
headimgurl
,
nickname
,
null
,
null
,
null
,
0
,
code
,
activityCode
,
userid
,
RegisterQueueDTO
.
SIGN_NEW
);
log
.
info
(
"注册:发消息队列: "
+
userid
+
"---time===="
+
System
.
currentTimeMillis
()/
1000L
);
return
JsonResultUtil
.
createSuccessResultWithObj
(
data
);
}
else
{
return
JsonResultUtil
.
createDefaultFail
();
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
JsonResultUtil
.
createFailedResult
(
ResultCode
.
EXCEPTION_CODE
,
"出现异常"
);
}
}
}
}
ace-modules/ace-admin/src/main/resources/mapper/AppUserDetailMapper.xml
View file @
d8a9e9d7
...
@@ -24,6 +24,8 @@
...
@@ -24,6 +24,8 @@
<result
column=
"person_sign"
property=
"personSign"
/>
<result
column=
"person_sign"
property=
"personSign"
/>
<result
column=
"remark"
property=
"remark"
/>
<result
column=
"remark"
property=
"remark"
/>
<result
column=
"channel"
property=
"channel"
/>
<result
column=
"channel"
property=
"channel"
/>
<result
column=
"register_source"
property=
"registerSource"
/>
<result
column=
"mark_name"
property=
"markName"
/>
<result
column=
"province_code"
property=
"provinceCode"
/>
<result
column=
"province_code"
property=
"provinceCode"
/>
<result
column=
"city_code"
property=
"cityCode"
/>
<result
column=
"city_code"
property=
"cityCode"
/>
<result
column=
"crt_host"
property=
"crtHost"
/>
<result
column=
"crt_host"
property=
"crtHost"
/>
...
@@ -37,7 +39,6 @@
...
@@ -37,7 +39,6 @@
<result
column=
"memberName"
property=
"memberName"
/>
<result
column=
"memberName"
property=
"memberName"
/>
</resultMap>
</resultMap>
<!-- 获取用户信息 -->
<!-- 获取用户信息 -->
<select
id=
"getUserInfo"
resultMap=
"AppUserVoMap"
>
<select
id=
"getUserInfo"
resultMap=
"AppUserVoMap"
>
select l.im_userid,l.username,l.wx_openid,l.unionid,l.openid,l.status,l.id_number,l.certification_status,d.* from app_user_login l
select l.im_userid,l.username,l.wx_openid,l.unionid,l.openid,l.status,l.id_number,l.certification_status,d.* from app_user_login l
...
@@ -87,7 +88,9 @@
...
@@ -87,7 +88,9 @@
l.createtime,
l.createtime,
l.last_time AS lastTime,
l.last_time AS lastTime,
l. STATUS,
l. STATUS,
z.mark_name AS markName,
d.channel,
d.channel,
d.register_source,
d.is_member,
d.is_member,
d.realname,
d.realname,
d.nickname,
d.nickname,
...
@@ -113,6 +116,7 @@
...
@@ -113,6 +116,7 @@
LEFT JOIN app_user_detail d ON d.userid = l.id
LEFT JOIN app_user_detail d ON d.userid = l.id
LEFT JOIN app_user_login ul ON ul.id = d.inviter_account
LEFT JOIN app_user_login ul ON ul.id = d.inviter_account
LEFT JOIN base_user_member m ON d.userid = m.user_id
LEFT JOIN base_user_member m ON d.userid = m.user_id
LEFT JOIN xxfc_app.app_version_mark z ON z.mark = d.register_source
LEFT JOIN
LEFT JOIN
(
(
SELECT
SELECT
...
@@ -154,8 +158,10 @@
...
@@ -154,8 +158,10 @@
l.id AS userid,
l.id AS userid,
l.username,
l.username,
d.channel,
d.channel,
d.register_source,
d.source,
d.source,
d.realname,
d.realname,
z.mark_name AS markName,
ml. NAME AS memberName,
ml. NAME AS memberName,
aup. NAME AS positionName,
aup. NAME AS positionName,
m.crt_time AS timeOfMembership,
m.crt_time AS timeOfMembership,
...
@@ -187,7 +193,8 @@
...
@@ -187,7 +193,8 @@
is_del = 0
is_del = 0
) r ON l.id = r.user_id
) r ON l.id = r.user_id
LEFT JOIN app_user_login pl ON r.parent_id = pl.id
LEFT JOIN app_user_login pl ON r.parent_id = pl.id
LEFT JOIN app_user_detail pd ON pl.id = pd.userid
LEFT JOIN app_user_detail pd ON pl.id = pd.userid
LEFT JOIN xxfc_app.app_version_mark z ON z.mark = d.register_source
WHERE
WHERE
l.isdel = 0
l.isdel = 0
and
and
...
@@ -198,6 +205,9 @@
...
@@ -198,6 +205,9 @@
<if
test=
"channel !=null "
>
<if
test=
"channel !=null "
>
and d.channel=#{channel}
and d.channel=#{channel}
</if>
</if>
<if
test=
"registerSource !=null "
>
and binary d.register_source=#{registerSource}
</if>
<if
test=
"memberLevel !=null and memberLevel != -1"
>
<if
test=
"memberLevel !=null and memberLevel != -1"
>
and m.member_level = #{memberLevel}
and m.member_level = #{memberLevel}
</if>
</if>
...
@@ -267,23 +277,27 @@ from `app_user_detail` as `aud` left join `app_user_login` as `aul` on aul.id=
...
@@ -267,23 +277,27 @@ from `app_user_detail` as `aud` left join `app_user_login` as `aul` on aul.id=
<select
id=
"findAllStaffsByCompanyIdAndPostionId"
<select
id=
"findAllStaffsByCompanyIdAndPostionId"
resultType=
"com.github.wxiaoqi.security.admin.bo.UserStaffBo"
>
resultType=
"com.github.wxiaoqi.security.admin.bo.UserStaffBo"
>
select * from (select aud.userid as `userId`,aud.realname as `realName`,aud.nickname as `nickName`,aul.username as `phone`,aud.position_id
select * from (select aud.userid as `userId`,aud.realname as `realName`,aud.nickname as `nickName`,aul.username
as `postionId`,aup.name as `postionName`,aupt.company_id as `companyId`,aupt.company_name as `companyName` from `app_user_detail` as `aud`
as `phone`,aud.position_id
as `postionId`,aup.name as `postionName`,aupt.company_id as `companyId`,aupt.company_name as `companyName` from
`app_user_detail` as `aud`
left join `app_user_login` as `aul` on aul.id=aud.userid
left join `app_user_login` as `aul` on aul.id=aud.userid
left join (select * from `app_user_position_temp` where is_del=0) as `aupt` on aupt.user_id=aul.id
left join (select * from `app_user_position_temp` where is_del=0) as `aupt` on aupt.user_id=aul.id
left join `app_user_position` as `aup` on aup.id=aud.position_id where
<![CDATA[aud.position_id<>6]]>
and aud.isdel=0
left join `app_user_position` as `aup` on aup.id=aud.position_id where
<![CDATA[aud.position_id<>6]]>
and
<if
test=
"userPostionId!=null"
>
aud.isdel=0
and aud.`position_id`=#{userPostionId}
<if
test=
"userPostionId!=null"
>
</if>
and aud.`position_id`=#{userPostionId}
</if>
<if
test=
"companyId!=null"
>
<if
test=
"companyId!=null"
>
and
aupt.`company_id`=#{companyId}
and aupt.`company_id`=#{companyId}
</if>
</if>
<if
test=
"userIds!=null and userIds.size>0"
>
<if
test=
"userIds!=null and userIds.size>0"
>
and aud.userid in
and aud.userid in
<foreach
collection=
"userIds"
item=
"userId"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"userIds"
item=
"userId"
open=
"("
close=
")"
separator=
","
>
#{userId}
#{userId}
</foreach>
</foreach>
</if>
) as `saff`
</if>
) as `saff`
left join (
left join (
select auswp.user_id, IFNULL(auswp.upIncome, 0) - IFNULL(auswd.dowIncome, 0) as `sellAmount`
select auswp.user_id, IFNULL(auswp.upIncome, 0) - IFNULL(auswd.dowIncome, 0) as `sellAmount`
from (select `user_id`, sum(commission / (extract/100.0)) as `upIncome`
from (select `user_id`, sum(commission / (extract/100.0)) as `upIncome`
...
@@ -291,7 +305,7 @@ from `app_user_detail` as `aud` left join `app_user_login` as `aul` on aul.id=
...
@@ -291,7 +305,7 @@ from `app_user_detail` as `aud` left join `app_user_login` as `aul` on aul.id=
where
<![CDATA[position_id<>6]]>
where
<![CDATA[position_id<>6]]>
and status = 0
and status = 0
<if
test=
"startDate!=null and endDate!=null"
>
<if
test=
"startDate!=null and endDate!=null"
>
and `crt_time` between #{startTime} and #{endTime}
and `crt_time` between #{startTime} and #{endTime}
</if>
</if>
<if
test=
"startDate!=null and endDate==null"
>
<if
test=
"startDate!=null and endDate==null"
>
and
<![CDATA[
and
<![CDATA[
...
...
xx-app/xx-app-api/src/main/java/com/xxfc/platform/app/entity/AppVersionMark.java
0 → 100644
View file @
d8a9e9d7
package
com
.
xxfc
.
platform
.
app
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* Demo class
*
* @author zuoyh
* @date 2020/1/10
*/
@Data
@Table
(
name
=
"app_version_mark"
)
public
class
AppVersionMark
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* app版本标识信息表ID
*/
@Id
@GeneratedValue
(
generator
=
"JDBC"
)
@ApiModelProperty
(
"app版本信息表"
)
private
Integer
id
;
/**
* 标识
*/
@Column
(
name
=
"mark"
)
@ApiModelProperty
(
value
=
"标识"
)
private
String
mark
;
/**
* 标识名称
*/
@Column
(
name
=
"mark_name"
)
@ApiModelProperty
(
value
=
"标识名称"
)
private
String
markName
;
/**
* 标识描述
*/
@Column
(
name
=
"mark_remark"
)
@ApiModelProperty
(
value
=
"标识描述"
)
private
String
markRemark
;
/**
* 是否删除;0-正常;1-删除
*/
@Column
(
name
=
"is_del"
)
@ApiModelProperty
(
value
=
"是否删除;0-正常;1-删除"
)
private
Integer
isDel
;
/**
* 版本标识上传时间
*/
@Column
(
name
=
"crt_time"
)
@ApiModelProperty
(
value
=
"版本上传时间"
,
hidden
=
true
)
private
Date
crtTime
;
/**
* 版本标识更新时间
*/
@Column
(
name
=
"upd_time"
)
@ApiModelProperty
(
value
=
"版本标识更新时间"
,
hidden
=
true
)
private
Long
updTime
;
/**
* 版本标识来源类型
*/
@Column
(
name
=
"source_type"
)
@ApiModelProperty
(
value
=
"版本标识更新时间"
,
hidden
=
true
)
private
String
sourceType
;
}
xx-app/xx-app-api/src/main/java/com/xxfc/platform/app/entity/dto/AppVersionMarkDTO.java
0 → 100644
View file @
d8a9e9d7
package
com
.
xxfc
.
platform
.
app
.
entity
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
import
java.sql.Timestamp
;
@Data
public
class
AppVersionMarkDTO
{
@ApiModelProperty
(
"app版本信息表"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"标识"
)
private
String
mark
;
@ApiModelProperty
(
value
=
"标识名称"
)
private
String
markName
;
@ApiModelProperty
(
value
=
"标识描述"
)
private
String
markRemark
;
@ApiModelProperty
(
value
=
"是否删除;0-正常;1-删除"
)
private
Integer
isDel
;
@ApiModelProperty
(
value
=
"版本上传时间"
,
hidden
=
true
)
private
Date
crtTime
;
@ApiModelProperty
(
value
=
"版本修改时间"
,
hidden
=
true
)
private
Long
updTime
;
@ApiModelProperty
(
value
=
"操作标识 1:新增 2:修改 3:删除"
)
private
int
changeMark
;
@ApiModelProperty
(
value
=
"版本标识更新时间"
)
private
String
sourceType
;
}
xx-app/xx-app-api/src/main/java/com/xxfc/platform/app/vo/AppVersionMarkQuery.java
0 → 100644
View file @
d8a9e9d7
package
com
.
xxfc
.
platform
.
app
.
vo
;
import
lombok.Data
;
@Data
public
class
AppVersionMarkQuery
{
private
Integer
page
;
private
Integer
limit
;
/**
* 标识名称
*/
private
String
markName
;
/**
* 标识
*/
private
String
mark
;
/**
* 标识内容
*/
private
String
markRemark
;
}
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/biz/AppVersionMarkBiz.java
0 → 100644
View file @
d8a9e9d7
package
com
.
xxfc
.
platform
.
app
.
biz
;
import
com.ace.cache.annotation.CacheClear
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.xxfc.platform.app.entity.AppVersionMark
;
import
com.xxfc.platform.app.entity.dto.AppVersionMarkDTO
;
import
com.xxfc.platform.app.mapper.AppVersionMarkMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.map.HashedMap
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Service
@Slf4j
/**
* @Author: zyh
* @Date: 2020/1/10
*/
public
class
AppVersionMarkBiz
extends
BaseBiz
<
AppVersionMarkMapper
,
AppVersionMark
>
{
private
static
final
int
RANDOM_TWO_LENGTH
=
2
;
private
static
final
int
CHANGE_UPD_APP_MARK
=
1
;
private
static
final
int
APP_MARK_IS_DEL
=
1
;
private
static
final
int
CHANGE_DELETE_APP_MARK
=
2
;
private
static
final
int
NO_RANDOM_REAPPEAR
=
50
;
public
static
final
int
IS_DEL_IOS_OR_ANDROID
=
1
;
public
static
final
int
SUCCESSFUL_OPERATION_CODE
=
1
;
public
static
final
int
FAIL_OPERATION_CODE
=
2
;
public
static
final
String
SUCCESSFUL_OPERATION
=
"操作成功"
;
public
static
final
String
FAIL_OPERATION
=
"安卓/苹果不可删除"
;
/**
* @Description: 新增APP版本标识
* @Param: AppVersionMarkDTO appVersionMarkDTO
* @return:
* @Author: zyh
* @Date: 2020/1/10
*/
@CacheClear
public
Map
<
Integer
,
String
>
addAppVersionMark
(
AppVersionMarkDTO
appVersionMarkDTO
)
{
Map
<
Integer
,
String
>
statusMap
=
new
HashedMap
<>();
if
(
StringUtils
.
isBlank
(
appVersionMarkDTO
.
getMarkName
())
||
StringUtils
.
isBlank
(
appVersionMarkDTO
.
getMarkRemark
())
||
StringUtils
.
isBlank
(
appVersionMarkDTO
.
getSourceType
())
||
StringUtils
.
isBlank
(
appVersionMarkDTO
.
getMark
()))
{
statusMap
.
put
(
FAIL_OPERATION_CODE
,
"参数不能为空"
);
return
statusMap
;
}
AppVersionMark
appVersionMark
=
new
AppVersionMark
();
String
markNoBlank
=
appVersionMarkDTO
.
getMark
().
replaceAll
(
" "
,
""
);
int
count
=
mapper
.
queryIsMark
(
markNoBlank
);
if
(
count
>
0
)
{
statusMap
.
put
(
FAIL_OPERATION_CODE
,
"标识已存在,请重新输入"
);
return
statusMap
;
}
try
{
Date
date
=
new
Date
();
//设置日期格式
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
nowTime
=
simpleDateFormat
.
format
(
date
);
Date
crtTime
=
simpleDateFormat
.
parse
(
nowTime
);
appVersionMark
.
setCrtTime
(
crtTime
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
appVersionMark
.
setMark
(
markNoBlank
);
appVersionMark
.
setSourceType
(
appVersionMarkDTO
.
getSourceType
());
appVersionMark
.
setMarkName
(
appVersionMarkDTO
.
getMarkName
());
appVersionMark
.
setMarkRemark
(
appVersionMarkDTO
.
getMarkRemark
());
appVersionMark
.
setIsDel
(
0
);
// insertSelective(appVersionMark);
mapper
.
insert
(
appVersionMark
);
statusMap
.
put
(
SUCCESSFUL_OPERATION_CODE
,
SUCCESSFUL_OPERATION
);
return
statusMap
;
}
/**
* @Description: 随机产生,判断数据库是否已经存在
* @return: 标识
* @Author: zyh
* @Date: 2020/1/10
*/
public
String
getMark
()
{
String
mark
=
""
;
for
(
int
i
=
0
;
i
<
NO_RANDOM_REAPPEAR
;
i
++)
{
mark
=
getCharAndNumr
(
RANDOM_TWO_LENGTH
);
int
count
=
mapper
.
queryIsMark
(
mark
);
if
(
count
==
0
)
{
break
;
}
}
return
mark
;
}
/**
* 生成随机数字和字母组合
*
* @param length
* @return
*/
public
static
String
getCharAndNumr
(
int
length
)
{
StringBuffer
valSb
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
// 输出字母还是数字
String
charOrNum
=
Math
.
round
(
Math
.
random
())
%
2
==
0
?
"char"
:
"num"
;
if
(
"char"
.
equalsIgnoreCase
(
charOrNum
))
{
// 字符串 取得大写字母还是小写字母
int
choice
=
Math
.
round
(
Math
.
random
())
%
2
==
0
?
65
:
97
;
valSb
.
append
((
char
)
(
choice
+
Math
.
round
(
Math
.
random
()
*
25
)));
}
else
if
(
"num"
.
equalsIgnoreCase
(
charOrNum
))
{
// 数字
valSb
.
append
(
String
.
valueOf
(
Math
.
round
(
Math
.
random
()
*
9
)));
}
}
return
valSb
.
toString
();
}
/**
* @Description: app版本标识 更新以及删除
* @Param: No such property: code for class: Script1
* @return:
* @Author: zyh
* @Date: 2020/1/10
*/
@CacheClear
public
Map
<
Integer
,
String
>
updAppVersionMark
(
AppVersionMarkDTO
appVersionMarkDTO
)
{
Map
<
Integer
,
String
>
statusMap
=
new
HashedMap
<>();
AppVersionMark
appVersionMark
=
new
AppVersionMark
();
BeanUtils
.
copyProperties
(
appVersionMarkDTO
,
appVersionMark
);
if
(
appVersionMarkDTO
.
getChangeMark
()
==
CHANGE_UPD_APP_MARK
)
{
if
(
StringUtils
.
isNotEmpty
(
appVersionMarkDTO
.
getMark
()))
{
String
markNoBlank
=
appVersionMarkDTO
.
getMark
().
replaceAll
(
" "
,
""
);
int
count
=
mapper
.
queryIsMark
(
markNoBlank
);
if
(
count
>
0
)
{
statusMap
.
put
(
FAIL_OPERATION_CODE
,
"标识已存在,请重新更改标识"
);
return
statusMap
;
}
appVersionMark
.
setMark
(
markNoBlank
);
}
updateSelectiveById
(
appVersionMark
);
}
else
if
(
appVersionMarkDTO
.
getChangeMark
()
==
CHANGE_DELETE_APP_MARK
)
{
Integer
count
=
mapper
.
findIosOrAndroidVersionAppMark
(
appVersionMarkDTO
.
getId
());
if
(
count
.
equals
(
IS_DEL_IOS_OR_ANDROID
))
{
statusMap
.
put
(
FAIL_OPERATION_CODE
,
FAIL_OPERATION
);
return
statusMap
;
}
appVersionMark
.
setIsDel
(
APP_MARK_IS_DEL
);
updateSelectiveById
(
appVersionMark
);
}
statusMap
.
put
(
SUCCESSFUL_OPERATION_CODE
,
SUCCESSFUL_OPERATION
);
return
statusMap
;
}
/**
* @Description: 查询页面展示
* @Param:
* @return: AppVersionMarkDTO appVersionMarkDTO
* @Author: zyh
* @Date: 2020/1/10
*/
public
List
<
AppVersionMarkDTO
>
findVersionAppMark
(
String
mark
)
{
List
list
=
mapper
.
findVersionAppMark
(
mark
);
return
list
;
}
/**
* @Description: 会员页面查询注册来源 下拉框接口
* @Param:
* @return: list(mark名称)
* @Author: zyh
* @Date: 2020/1/13
*/
public
List
<
AppVersionMarkDTO
>
findListVersionAppMark
()
{
List
list
=
mapper
.
findListVersionAppMark
();
return
list
;
}
}
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/mapper/AppVersionMarkMapper.java
0 → 100644
View file @
d8a9e9d7
package
com
.
xxfc
.
platform
.
app
.
mapper
;
import
com.xxfc.platform.app.entity.AppVersionMark
;
import
org.apache.ibatis.annotations.Param
;
import
tk.mybatis.mapper.common.Mapper
;
import
java.sql.Timestamp
;
import
java.util.List
;
/**
* AppVersionMark Mapper
*
* @author zyh
* @date 2020/1/10
*/
public
interface
AppVersionMarkMapper
extends
Mapper
<
AppVersionMark
>
{
int
queryIsMark
(
@Param
(
"mark"
)
String
mark
);
int
queryIsMarkNew
(
@Param
(
"mark"
)
String
mark
);
void
updAppVersionMark
(
@Param
(
"markName"
)
String
markName
,
@Param
(
"markRemark"
)
String
markRemark
,
@Param
(
"isDel"
)
Integer
isDel
,
@Param
(
"id"
)
Integer
id
,
@Param
(
"updTime"
)
Timestamp
updTime
);
List
<
AppVersionMark
>
findVersionAppMark
(
@Param
(
"mark"
)
String
mark
);
int
findIosOrAndroidVersionAppMark
(
@Param
(
"id"
)
Integer
id
);
List
<
AppVersionMark
>
findListVersionAppMark
();
List
<
AppVersionMark
>
queryListForUserMember
();
}
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/rest/AppVersionMarkController.java
0 → 100644
View file @
d8a9e9d7
package
com
.
xxfc
.
platform
.
app
.
rest
;
import
com.ace.cache.annotation.CacheClear
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.xxfc.platform.app.biz.AppVersionMarkBiz
;
import
com.xxfc.platform.app.entity.AppVersionMark
;
import
com.xxfc.platform.app.entity.dto.AppVersionMarkDTO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
tk.mybatis.mapper.entity.Example
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
import
static
com
.
xxfc
.
platform
.
app
.
biz
.
AppVersionMarkBiz
.
FAIL_OPERATION_CODE
;
import
static
com
.
xxfc
.
platform
.
app
.
biz
.
AppVersionMarkBiz
.
SUCCESSFUL_OPERATION_CODE
;
/**
* @program: ace-security
* @author: zyh
* @create: 2020-01-10 11:24
**/
@IgnoreUserToken
@RestController
@Slf4j
@RequestMapping
(
"version/mark"
)
public
class
AppVersionMarkController
extends
BaseController
<
AppVersionMarkBiz
,
AppVersionMark
>
{
@Autowired
private
AppVersionMarkBiz
appVersionMarkBiz
;
/**
* @Description: 新增APP版本标识
* @Param: AppVersionMarkDTO appVersionMarkDTO
* @return:
* @Author: zyh
* @Date: 2020/1/10
*/
@PostMapping
(
"/appMarkVersionAdd"
)
@CacheClear
public
ObjectRestResponse
addAppVersionMark
(
@RequestBody
AppVersionMarkDTO
appVersionMarkDTO
)
{
try
{
Integer
status
=
SUCCESSFUL_OPERATION_CODE
;
String
message
=
""
;
Map
<
Integer
,
String
>
mapStatus
=
appVersionMarkBiz
.
addAppVersionMark
(
appVersionMarkDTO
);
Iterator
<
Integer
>
iter
=
mapStatus
.
keySet
().
iterator
();
while
(
iter
.
hasNext
())
{
status
=
iter
.
next
();
message
=
mapStatus
.
get
(
status
);
}
if
(
status
.
equals
(
FAIL_OPERATION_CODE
))
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
message
);
}
return
ObjectRestResponse
.
succ
();
}
catch
(
Exception
e
)
{
log
.
error
(
"新增失败[{}]"
,
e
);
throw
new
BaseException
(
"新增失败"
);
}
}
/**
* @Description: app版本标识 更新以及删除
* @Author: zyh
* @Date: 2020/1/10
*/
@PostMapping
(
"updAppMark"
)
@CacheClear
public
ObjectRestResponse
updAppVersionMark
(
@RequestBody
AppVersionMarkDTO
appVersionMarkDTO
)
{
try
{
Map
<
Integer
,
String
>
map
=
appVersionMarkBiz
.
updAppVersionMark
(
appVersionMarkDTO
);
Iterator
<
Integer
>
iter
=
map
.
keySet
().
iterator
();
Integer
status
=
1
;
String
message
=
""
;
while
(
iter
.
hasNext
())
{
status
=
iter
.
next
();
message
=
map
.
get
(
status
);
}
if
(
status
.
equals
(
1
))
{
return
ObjectRestResponse
.
succ
();
}
else
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
message
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"更新失败[{}]"
,
e
);
throw
new
BaseException
(
"更新失败"
);
}
}
/**
* @Description: 页面展示
* @Param: AppVersionMarkQuery query 业务需求:暂时没有查询框
* @return: listJson
* @Author: zyh
* @Date: 2020/1/10
*/
@GetMapping
(
"/findAllByQuery"
)
public
ObjectRestResponse
findAllByQuery
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
value
=
"limit"
,
defaultValue
=
"10"
)
Integer
limit
,
@RequestParam
(
value
=
"mark"
,
defaultValue
=
""
)
String
mark
)
{
Example
example
=
new
Example
(
AppVersionMark
.
class
);
if
(
StringUtils
.
isNotBlank
(
mark
))
{
example
.
createCriteria
().
andLike
(
"mark"
,
"%"
+
mark
+
"%"
);
}
example
.
createCriteria
().
andEqualTo
(
"isDel"
,
0
);
example
.
setOrderByClause
(
"`crt_time` desc"
);
PageHelper
.
startPage
(
page
,
limit
);
List
<
AppVersionMark
>
listPage
=
appVersionMarkBiz
.
selectByExample
(
example
);
return
ObjectRestResponse
.
succ
(
PageInfo
.
of
(
listPage
));
}
/**
* @Description: 單獨查詢,根据标识
* @Param: MARK標識
* @return: list
* @Author: zyh
* @Date: 2020/1/10
*/
@GetMapping
(
"/findVersionAppMark"
)
public
ObjectRestResponse
findAllByQuery
(
@RequestParam
(
"mark"
)
String
mark
)
{
return
ObjectRestResponse
.
succ
(
appVersionMarkBiz
.
findVersionAppMark
(
mark
));
}
/**
* @Description: 会员页面查询注册来源 下拉框接口
* @Param:
* @return: list(mark名称)
* @Author: zyh
* @Date: 2020/1/13
*/
@GetMapping
(
"/find/listMark"
)
public
ObjectRestResponse
findListVersionAppMark
()
{
return
ObjectRestResponse
.
succ
(
appVersionMarkBiz
.
findListVersionAppMark
());
}
}
xx-app/xx-app-server/src/main/resources/mapper/AppVersionMarkMapper.xml
0 → 100644
View file @
d8a9e9d7
<?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.xxfc.platform.app.mapper.AppVersionMarkMapper"
>
<select
id=
"queryIsMark"
parameterType=
"java.lang.String"
resultType=
"java.lang.Integer"
>
SELECT
count(*)
FROM
`app_version_mark`
where
is_del=0
<if
test=
"mark!=null and mark!=''"
>
and binary mark like concat('%',#{mark},'%')
</if>
</select>
<select
id=
"queryIsMarkNew"
parameterType=
"java.lang.String"
resultType=
"java.lang.Integer"
>
SELECT
count(*)
FROM
`app_version_mark`
where
is_del=0
<if
test=
"mark!=null and mark!=''"
>
and binary mark=#{mark}
</if>
</select>
<select
id=
"findVersionAppMark"
resultType=
"com.xxfc.platform.app.entity.AppVersionMark"
>
select * from
`app_version_mark` a
where
is_del = 0
<if
test=
"mark!=null and mark!=''"
>
and binary mark like concat('%',#{mark},'%')
</if>
</select>
<select
id=
"findIosOrAndroidVersionAppMark"
resultType=
"java.lang.Integer"
>
select count(*) from
`app_version_mark` a
where
is_del = 0
<if
test=
"id!=null and id!=''"
>
and id= #{id}
</if>
and ( mark_name like concat('%','ios','%')
or mark_name like concat('%','安卓','%'))
</select>
<select
id=
"findListVersionAppMark"
resultType=
"com.xxfc.platform.app.entity.AppVersionMark"
>
select `mark_name`,`mark`
from
`app_version_mark` a
where
is_del = 0
</select>
<select
id=
"queryListForUserMember"
resultType=
"com.xxfc.platform.app.entity.AppVersionMark"
>
select `mark_name` as registerSource
from
`app_version_mark` a
where
is_del = 0
</select>
</mapper>
\ No newline at end of file
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/order/QueryOrderDTO.java
View file @
d8a9e9d7
...
@@ -46,4 +46,6 @@ public class QueryOrderDTO extends PageParam {
...
@@ -46,4 +46,6 @@ public class QueryOrderDTO extends PageParam {
private
String
orderIds
;
private
String
orderIds
;
private
Integer
refundStatus
;
}
}
\ No newline at end of file
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderAccountBiz.java
View file @
d8a9e9d7
...
@@ -4,8 +4,6 @@ import cn.hutool.core.bean.BeanUtil;
...
@@ -4,8 +4,6 @@ import cn.hutool.core.bean.BeanUtil;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.json.JSONUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
...
@@ -38,7 +36,6 @@ import com.xxfc.platform.universal.vo.OrderRefundVo;
...
@@ -38,7 +36,6 @@ import com.xxfc.platform.universal.vo.OrderRefundVo;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.jexl2.MapContext
;
import
org.apache.commons.jexl2.MapContext
;
import
org.apache.commons.lang3.StringUtils
;
import
org.mockito.internal.util.collections.Sets
;
import
org.mockito.internal.util.collections.Sets
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -800,29 +797,17 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
...
@@ -800,29 +797,17 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
return
mapper
.
selectByExample
(
example
);
return
mapper
.
selectByExample
(
example
);
}
}
public
BigDecimal
getAllOrderCost
(
Integer
orderId
)
{
public
double
getAllOrderCost
(
Integer
orderId
)
{
List
<
OrderAccount
>
list
=
getByOrderId
(
orderId
);
List
<
OrderAccount
>
list
=
getByOrderId
(
orderId
);
BigDecimal
bigDecimal
=
new
BigDecimal
(
"0"
)
;
double
amount
=
0
;
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
list
.
parallelStream
().
forEach
(
result
->
{
for
(
OrderAccount
orderAccount
:
list
)
{
if
(
StringUtils
.
isNotBlank
(
result
.
getAccountDetail
()))
{
if
(
orderAccount
.
getAccountAmount
()
!=
null
&&
orderAccount
.
getAccountStatus
()
==
1
)
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
result
.
getAccountDetail
());
amount
+=
orderAccount
.
getAccountAmount
().
doubleValue
();
log
.
info
(
"获取订单的费用金额:"
,
jsonObject
.
toJSONString
());
if
(
jsonObject
!=
null
)
{
JSONArray
jsonArray
=
jsonObject
.
getJSONArray
(
"deductions"
);
if
(
jsonArray
!=
null
&&
jsonArray
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
JSONObject
jsonObject1
=
jsonArray
.
getJSONObject
(
i
);
if
(
jsonObject1
!=
null
)
{
bigDecimal
.
add
(
new
BigDecimal
(
jsonObject1
.
getString
(
"amount"
)));
}
}
log
.
info
(
"获取订单的费用金额: {}"
,
bigDecimal
);
}
}
}
}
});
}
log
.
info
(
"amount: {}"
,
amount
);
}
}
return
bigDecimal
;
return
amount
;
}
}
}
}
\ No newline at end of file
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderInvoiceBiz.java
View file @
d8a9e9d7
...
@@ -91,10 +91,11 @@ public class OrderInvoiceBiz extends BaseBiz<OrderInvoiceMapper, OrderInvoice> {
...
@@ -91,10 +91,11 @@ public class OrderInvoiceBiz extends BaseBiz<OrderInvoiceMapper, OrderInvoice> {
if
(
baseOrder
.
getType
()
==
OrderTypeEnum
.
MEMBER
.
getCode
())
{
if
(
baseOrder
.
getType
()
==
OrderTypeEnum
.
MEMBER
.
getCode
())
{
orderData
.
setOrderName
(
OrderTypeEnum
.
MEMBER
.
getDesc
());
orderData
.
setOrderName
(
OrderTypeEnum
.
MEMBER
.
getDesc
());
}
}
BigDecimal
cost
=
orderAccountBiz
.
getAllOrderCost
(
baseOrder
.
getId
());
double
cost
=
orderAccountBiz
.
getAllOrderCost
(
baseOrder
.
getId
());
log
.
info
(
"{}退款费用总计:{}"
,
baseOrder
.
getNo
(),
cost
);
log
.
info
(
"{}退款费用总计:{}"
,
baseOrder
.
getNo
(),
cost
);
log
.
info
(
"{}订单实际金额:{}"
,
baseOrder
.
getNo
(),
baseOrder
.
getRealAmount
());
log
.
info
(
"{}订单实际金额:{}"
,
baseOrder
.
getNo
(),
baseOrder
.
getRealAmount
());
orderData
.
setPrice
(
baseOrder
.
getRealAmount
().
subtract
(
cost
));
BigDecimal
bigDecimal
=
new
BigDecimal
(
baseOrder
.
getRealAmount
().
doubleValue
()
-
cost
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
orderData
.
setPrice
(
bigDecimal
);
log
.
info
(
"{}用户实际支付金额: {}"
,
baseOrder
.
getNo
(),
orderData
.
getPrice
());
log
.
info
(
"{}用户实际支付金额: {}"
,
baseOrder
.
getNo
(),
orderData
.
getPrice
());
list
.
add
(
orderData
);
list
.
add
(
orderData
);
continue
;
continue
;
...
@@ -116,7 +117,7 @@ public class OrderInvoiceBiz extends BaseBiz<OrderInvoiceMapper, OrderInvoice> {
...
@@ -116,7 +117,7 @@ public class OrderInvoiceBiz extends BaseBiz<OrderInvoiceMapper, OrderInvoice> {
invoiceVo
.
setPurchaserAccountBank
(
newValue
.
getContentAccount
());
invoiceVo
.
setPurchaserAccountBank
(
newValue
.
getContentAccount
());
invoiceVo
.
setPurchaserAddressPhone
(
newValue
.
getContentContact
());
invoiceVo
.
setPurchaserAddressPhone
(
newValue
.
getContentContact
());
invoiceVo
.
setPurchaserEmail
(
newValue
.
getReceiveContent
());
invoiceVo
.
setPurchaserEmail
(
newValue
.
getReceiveContent
());
invoiceVo
.
setPurchaserName
(
newValue
.
get
TitleNam
e
());
invoiceVo
.
setPurchaserName
(
newValue
.
get
ContentTitl
e
());
invoiceVo
.
setPurchaserTaxCode
(
newValue
.
getTaxCode
());
invoiceVo
.
setPurchaserTaxCode
(
newValue
.
getTaxCode
());
invoiceVo
.
setRemark
(
newValue
.
getContentRemark
());
invoiceVo
.
setRemark
(
newValue
.
getContentRemark
());
invoiceVo
.
setOrderInvoiceId
(
newValue
.
getId
());
invoiceVo
.
setOrderInvoiceId
(
newValue
.
getId
());
...
@@ -208,6 +209,12 @@ public class OrderInvoiceBiz extends BaseBiz<OrderInvoiceMapper, OrderInvoice> {
...
@@ -208,6 +209,12 @@ public class OrderInvoiceBiz extends BaseBiz<OrderInvoiceMapper, OrderInvoice> {
}
}
public
ObjectRestResponse
<
PageDataVO
<
OrderInvoice
>>
getByParam
(
OrderInvoiceDto
orderInvoiceDto
)
{
public
ObjectRestResponse
<
PageDataVO
<
OrderInvoice
>>
getByParam
(
OrderInvoiceDto
orderInvoiceDto
)
{
//orderInvoiceDto.setUserId(Integer.valueOf(BaseContextHandler.getUserID()));
AppUserDTO
appUserDTO
=
userFeign
.
userDetailByToken
(
request
.
getHeader
(
"Authorization"
)).
getData
();
if
(
appUserDTO
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
RSTOKEN_EXPIRED_CODE
,
ResultCode
.
getMsg
(
ResultCode
.
RSTOKEN_EXPIRED_CODE
));
}
orderInvoiceDto
.
setUserId
(
appUserDTO
.
getUserid
());
Query
query
=
new
Query
(
orderInvoiceDto
);
Query
query
=
new
Query
(
orderInvoiceDto
);
PageDataVO
<
OrderInvoice
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
getByParam
(
query
.
getSuper
()));
PageDataVO
<
OrderInvoice
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
getByParam
(
query
.
getSuper
()));
return
ObjectRestResponse
.
succ
(
pageDataVO
);
return
ObjectRestResponse
.
succ
(
pageDataVO
);
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderVehicleCrosstownBiz.java
View file @
d8a9e9d7
...
@@ -127,7 +127,7 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
...
@@ -127,7 +127,7 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
if
(
value
.
getType
()!=
1
){
if
(
value
.
getType
()!=
1
){
Example
example
=
new
Example
(
OrderAccount
.
class
);
Example
example
=
new
Example
(
OrderAccount
.
class
);
//获取退还部分押金和剩余押金的记录
//获取退还部分押金和剩余押金的记录
example
.
createCriteria
().
andEqualTo
(
"orderId"
,
value
.
getOrderId
()).
andIn
(
"accountType"
,
Lists
.
newArrayList
(
AccountTypeEnum
.
OUT_PART_DEPOSIT
.
getCode
(),
AccountTypeEnum
.
OUT_RESIDUE_DEPOSIT
.
getCode
()));
example
.
createCriteria
().
andEqualTo
(
"orderId"
,
value
.
getOrderId
()).
andIn
(
"accountType"
,
Lists
.
newArrayList
(
AccountTypeEnum
.
OUT_PART_DEPOSIT
.
getCode
(),
AccountTypeEnum
.
OUT_RESIDUE_DEPOSIT
.
getCode
()))
.
andEqualTo
(
"accountStatus"
,
1
)
;
List
<
OrderAccount
>
orderAccounts
=
orderAccountBiz
.
selectByExample
(
example
);
List
<
OrderAccount
>
orderAccounts
=
orderAccountBiz
.
selectByExample
(
example
);
if
(
CollectionUtil
.
isEmpty
(
orderAccounts
))
{
if
(
CollectionUtil
.
isEmpty
(
orderAccounts
))
{
value
.
setActualDeposit
(
"定损中"
);
value
.
setActualDeposit
(
"定损中"
);
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/BaseOrderController.java
View file @
d8a9e9d7
...
@@ -190,11 +190,21 @@ public class BaseOrderController extends CommonBaseController implements UserRes
...
@@ -190,11 +190,21 @@ public class BaseOrderController extends CommonBaseController implements UserRes
}
}
//dto.setCrtUser(Integer.valueOf(BaseContextHandler.getUserID()));
//dto.setCrtUser(Integer.valueOf(BaseContextHandler.getUserID()));
dto
.
setUserId
(
Integer
.
valueOf
(
BaseContextHandler
.
getUserID
()));
dto
.
setUserId
(
Integer
.
valueOf
(
BaseContextHandler
.
getUserID
()));
if
(
dto
.
getType
()
==
OrderTypeEnum
.
RENT_VEHICLE
.
getCode
())
{
dto
.
setRefundStatus
(
3
);
}
if
(
StringUtils
.
isBlank
(
dto
.
getOrderIds
()))
{
dto
.
setInvoiceStatus
(
0
);
}
else
{
dto
.
setInvoiceStatus
(
1
);
}
Query
query
=
new
Query
(
dto
);
Query
query
=
new
Query
(
dto
);
PageDataVO
<
OrderPageVO
>
pages
=
PageDataVO
.
pageInfo
(
query
,
()
->
baseOrderBiz
.
pageByParm
(
query
.
getSuper
()));
PageDataVO
<
OrderPageVO
>
pages
=
PageDataVO
.
pageInfo
(
query
,
()
->
baseOrderBiz
.
pageByParm
(
query
.
getSuper
()));
pages
.
getData
().
parallelStream
().
forEach
(
data
->
{
pages
.
getData
().
parallelStream
().
forEach
(
data
->
{
data
.
setQrcodeStr
(
qrcodePrefix
);
data
.
setQrcodeStr
(
qrcodePrefix
);
data
.
setOrderRealAmount
(
data
.
getRealAmount
().
subtract
(
orderAccountBiz
.
getAllOrderCost
(
data
.
getId
())));
BigDecimal
bigDecimal
=
new
BigDecimal
(
data
.
getRealAmount
().
doubleValue
()-
orderAccountBiz
.
getAllOrderCost
(
data
.
getId
())).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
data
.
setOrderRealAmount
(
bigDecimal
);
log
.
info
(
"订单实际支付金额,扣除押金违章之后: {}"
,
data
.
getOrderRealAmount
());
log
.
info
(
"订单实际支付金额,扣除押金违章之后: {}"
,
data
.
getOrderRealAmount
());
});
});
return
new
ObjectRestResponse
<>().
data
(
pages
);
return
new
ObjectRestResponse
<>().
data
(
pages
);
...
@@ -511,6 +521,4 @@ public class BaseOrderController extends CommonBaseController implements UserRes
...
@@ -511,6 +521,4 @@ public class BaseOrderController extends CommonBaseController implements UserRes
return
baseOrderBiz
.
updateBaseOrder
(
baseOrder
);
return
baseOrderBiz
.
updateBaseOrder
(
baseOrder
);
}
}
}
}
xx-order/xx-order-server/src/main/resources/mapper/BaseOrderMapper.xml
View file @
d8a9e9d7
...
@@ -3,28 +3,6 @@
...
@@ -3,28 +3,6 @@
<mapper
namespace=
"com.xxfc.platform.order.mapper.BaseOrderMapper"
>
<mapper
namespace=
"com.xxfc.platform.order.mapper.BaseOrderMapper"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"com.xxfc.platform.order.entity.BaseOrder"
id=
"baseOrderMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"no"
column=
"no"
/>
<result
property=
"type"
column=
"type"
/>
<result
property=
"detailId"
column=
"detail_id"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"productAmount"
column=
"product_amount"
/>
<result
property=
"orderAmount"
column=
"order_amount"
/>
<result
property=
"detailJson"
column=
"detail_json"
/>
<result
property=
"thirdType"
column=
"third_type"
/>
<result
property=
"outTradeNo"
column=
"out_trade_no"
/>
<result
property=
"crtTime"
column=
"crt_time"
/>
<result
property=
"crtUser"
column=
"crt_user"
/>
<result
property=
"crtName"
column=
"crt_name"
/>
<result
property=
"crtHost"
column=
"crt_host"
/>
<result
property=
"updTime"
column=
"upd_time"
/>
<result
property=
"updUser"
column=
"upd_user"
/>
<result
property=
"updName"
column=
"upd_name"
/>
<result
property=
"updHost"
column=
"upd_host"
/>
</resultMap>
<resultMap
type=
"com.xxfc.platform.order.pojo.order.OrderPageVO"
id=
"orderPageMap"
>
<resultMap
type=
"com.xxfc.platform.order.pojo.order.OrderPageVO"
id=
"orderPageMap"
>
<result
javaType=
"Integer"
column=
"type"
property=
"type"
></result>
<result
javaType=
"Integer"
column=
"type"
property=
"type"
></result>
<discriminator
javaType=
"Integer"
column=
"type"
>
<discriminator
javaType=
"Integer"
column=
"type"
>
...
@@ -90,6 +68,12 @@
...
@@ -90,6 +68,12 @@
<if
test=
"type != null"
>
<if
test=
"type != null"
>
and type = #{type}
and type = #{type}
</if>
</if>
<if
test=
"invoiceStatus != null"
>
and invoice_status = #{invoiceStatus}
</if>
<if
test=
"refundStatus != null"
>
and refund_status = #{refundStatus}
</if>
<if
test=
"hasMemberRight != null"
>
<if
test=
"hasMemberRight != null"
>
and has_member_right = #{hasMemberRight}
and has_member_right = #{hasMemberRight}
</if>
</if>
...
...
xx-order/xx-order-server/src/main/resources/mapper/OrderInvoiceMapper.xml
View file @
d8a9e9d7
...
@@ -18,6 +18,6 @@
...
@@ -18,6 +18,6 @@
and order_ids like concat("%", #{orderIds}, "%")
and order_ids like concat("%", #{orderIds}, "%")
</if>
</if>
</where>
</where>
order by crt_time
order by crt_time
DESC
</select>
</select>
</mapper>
</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