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
7895b080
Commit
7895b080
authored
Jul 11, 2019
by
libin
Browse files
Options
Browse Files
Download
Plain Diff
团队
parents
6774618f
2520888a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
164 additions
and
31 deletions
+164
-31
UserIncomeBo.java
...va/com/github/wxiaoqi/security/admin/bo/UserIncomeBo.java
+10
-0
AppUserManageDTO.java
...m/github/wxiaoqi/security/admin/dto/AppUserManageDTO.java
+2
-2
OrderWaterDTO.java
.../com/github/wxiaoqi/security/admin/dto/OrderWaterDTO.java
+64
-0
AppUserSellingWater.java
...ub/wxiaoqi/security/admin/entity/AppUserSellingWater.java
+7
-0
AppUserSellingWaterBiz.java
...ub/wxiaoqi/security/admin/biz/AppUserSellingWaterBiz.java
+7
-0
UserBussinessController.java
.../wxiaoqi/security/admin/rest/UserBussinessController.java
+10
-0
AppUserSellingWaterMapper.xml
...n/src/main/resources/mapper/AppUserSellingWaterMapper.xml
+26
-0
CertificationController.java
...latform/universal/controller/CertificationController.java
+3
-1
CertificationService.java
...xxfc/platform/universal/service/CertificationService.java
+35
-28
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/bo/UserIncomeBo.java
0 → 100644
View file @
7895b080
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
bo
;
/**
* @author libin
* @version 1.0
* @description
* @data 2019/7/11 16:30
*/
public
class
UserIncomeBo
{
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/AppUserManageDTO.java
View file @
7895b080
...
...
@@ -53,9 +53,9 @@ public class AppUserManageDTO {
private
Integer
source
;
/**
*
*
接收前台时间范围
*/
private
String
registrationDate
;
private
String
[]
registrationDate
;
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/OrderWaterDTO.java
0 → 100644
View file @
7895b080
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
/**
* 拥金明细
*/
@Data
public
class
OrderWaterDTO
{
/**
* 用户id
*/
@ApiModelProperty
(
value
=
"用户id"
)
private
Integer
userId
;
/**
* 订单id
*/
@ApiModelProperty
(
value
=
"订单id"
)
private
Integer
orderId
;
/**
* 商品id
*/
@ApiModelProperty
(
value
=
"商品id"
)
private
Integer
goodId
;
/**
* 商品数量
*/
@ApiModelProperty
(
value
=
"商品数量"
)
private
Integer
goodNumber
;
@ApiModelProperty
(
value
=
"订单状态"
)
private
Integer
status
;
/**
* 商品标题
*/
@ApiModelProperty
(
value
=
"商品标题"
)
private
String
title
;
/**
* 图片
*/
@ApiModelProperty
(
value
=
"图片"
)
private
String
img
;
/**
* 售价
*/
@ApiModelProperty
(
value
=
"售价"
)
private
Long
price
;
}
\ No newline at end of file
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/AppUserSellingWater.java
View file @
7895b080
...
...
@@ -54,6 +54,13 @@ public class AppUserSellingWater implements Serializable {
@Column
(
name
=
"order_id"
)
@ApiModelProperty
(
value
=
"订单id"
)
private
Integer
orderId
;
/**
* 订单号
*/
@Column
(
name
=
"order_no"
)
@ApiModelProperty
(
value
=
"订单号"
)
private
String
orderNo
;
/**
* 商品id
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserSellingWaterBiz.java
View file @
7895b080
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
biz
;
import
com.github.wxiaoqi.security.admin.dto.OrderWaterDTO
;
import
org.springframework.stereotype.Service
;
import
com.github.wxiaoqi.security.admin.entity.AppUserSellingWater
;
...
...
@@ -18,6 +19,12 @@ import java.util.Map;
*/
@Service
public
class
AppUserSellingWaterBiz
extends
BaseBiz
<
AppUserSellingWaterMapper
,
AppUserSellingWater
>
{
//计算用户拥金
public
void
doWaterByUserId
(
OrderWaterDTO
orderWaterDTO
){
orderWaterDTO
.
getOrderId
();
}
public
Map
<
Integer
,
Double
>
findMemberIdAndIncome
(
List
<
Integer
>
memberIds
)
{
return
null
;
}
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/UserBussinessController.java
0 → 100644
View file @
7895b080
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
rest
;
/**
* @author libin
* @version 1.0
* @description
* @data 2019/7/11 17:48
*/
public
class
UserBussinessController
{
}
ace-modules/ace-admin/src/main/resources/mapper/AppUserSellingWaterMapper.xml
0 → 100644
View file @
7895b080
<?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.github.wxiaoqi.security.admin.mapper.AppUserMapper"
>
<insert
id=
"insertAppUserGroup"
>
insert into app_group_member(user_id, group_id)
VALUES
<trim
suffixOverrides=
","
>
<foreach
collection=
"groups"
item=
"groupId"
>
(#{appUserId}, #{groupId}),
</foreach>
</trim>
</insert>
<delete
id=
"deleteAppUserGroup"
>
delete from app_group_member
where user_id = #{appUserId}
</delete>
<select
id=
"selectGroupsByAppUserId"
resultType=
"com.github.wxiaoqi.security.admin.entity.Group"
>
select *
from base_group bg
right join app_group_member agm on bg.id = agm.group_id
where user_id = #{id}
</select>
</mapper>
\ No newline at end of file
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/controller/CertificationController.java
View file @
7895b080
...
...
@@ -18,7 +18,9 @@ import org.springframework.web.bind.annotation.RestController;
import
javax.servlet.http.HttpServletRequest
;
/**
* 实名认证
*/
@RestController
@RequestMapping
(
"certif"
)
@Slf4j
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/service/CertificationService.java
View file @
7895b080
...
...
@@ -18,15 +18,14 @@ import org.apache.commons.lang.StringUtils;
import
org.apache.http.HttpResponse
;
import
org.apache.http.StatusLine
;
import
org.apache.http.util.EntityUtils
;
import
org.apache.poi.ss.usermodel.DateUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.*
;
@Service
...
...
@@ -266,8 +265,8 @@ public class CertificationService {
//正面进行解析
String
front
=
imageParse
(
idInformation
.
getFrontUrl
(),
frontParameter
);
String
back
=
imageParse
(
idInformation
.
getBackUrl
(),
backParameter
);
log
.
info
(
"----解析front========="
+
front
);
log
.
info
(
"----解析back========="
+
back
);
log
.
info
(
"----解析front========="
+
front
);
log
.
info
(
"----解析back========="
+
back
);
if
(
StringUtils
.
isBlank
(
front
)
||
StringUtils
.
isBlank
(
back
))
{
return
ObjectRestResponse
.
createDefaultFail
();
}
...
...
@@ -282,7 +281,7 @@ public class CertificationService {
||
MapUtil
.
isEmpty
(
backMap
)
||
!(
backMap
.
get
(
imageRet
).
equals
(
imageResultCode
))
){
)
{
return
ObjectRestResponse
.
createDefaultFail
();
}
...
...
@@ -292,7 +291,7 @@ public class CertificationService {
Map
backData
=
(
Map
)
backMap
.
get
(
dataNam
);
if
(
MapUtil
.
isEmpty
(
backData
)
||
MapUtil
.
isEmpty
(
frontData
))
{
if
(
MapUtil
.
isEmpty
(
backData
)
||
MapUtil
.
isEmpty
(
frontData
))
{
return
ObjectRestResponse
.
createDefaultFail
();
}
...
...
@@ -312,7 +311,7 @@ public class CertificationService {
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"证件号不一致"
);
}
//map携带身份证和姓名进行认证
//map携带身份证和姓名进行认证
Map
<
String
,
String
>
authMap
=
new
HashMap
<>();
authMap
.
put
(
idCardName
,
(
String
)
frontData
.
get
(
numberName
));
...
...
@@ -320,13 +319,13 @@ public class CertificationService {
//3.调用接口进行认证
String
result
=
certificate
(
authMap
);
log
.
info
(
"----认证结果result========="
+
result
);
log
.
info
(
"----认证结果result========="
+
result
);
//认证返回的参数是否为空
if
(!
StringUtils
.
isBlank
(
result
))
{
Map
<
String
,
Object
>
map
=
(
Map
<
String
,
Object
>)
JSONObject
.
parse
(
result
);
log
.
info
(
"----certifRet========="
+
certifRet
);
log
.
info
(
"----certifRet========="
+
certifRet
);
if
(
MapUtil
.
isNotEmpty
(
map
)
||
certifResultCode
.
equals
(
map
.
get
(
certifRet
)))
{
//认证成功后存入保存到数据库
...
...
@@ -342,27 +341,35 @@ public class CertificationService {
//获得到期时间
String
endDate
=
(
String
)
backData
.
get
(
expirationDateName
);
log
.
info
(
"----获得到期时间endDate========="
+
endDate
);
log
.
info
(
"----获得到期时间endDate========="
+
endDate
);
if
(
StringUtils
.
isBlank
(
endDate
))
{
return
ObjectRestResponse
.
succ
();
}
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
formatter
.
setLenient
(
false
);
Date
expirationDate
=
null
;
try
{
expirationDate
=
formatter
.
parse
(
endDate
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
return
ObjectRestResponse
.
createDefaultFail
();
Date
expirationDate
=
new
Date
();
if
(!
Validation
.
isDate
(
endDate
))
{
Date
date
=
new
Date
();
Calendar
c
=
Calendar
.
getInstance
();
c
.
setTime
(
date
);
c
.
add
(
Calendar
.
YEAR
,
100
);
expirationDate
=
c
.
getTime
();
}
else
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
formatter
.
setLenient
(
false
);
try
{
expirationDate
=
formatter
.
parse
(
endDate
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
return
ObjectRestResponse
.
createDefaultFail
();
}
}
idInformation
.
setExpirationDate
(
expirationDate
);
Boolean
aBoolean
=
addIdInformation
(
idInformation
);
log
.
info
(
"----请求admin========="
+
aBoolean
);
log
.
info
(
"----请求admin========="
+
aBoolean
);
if
(
aBoolean
)
{
return
ObjectRestResponse
.
succ
();
}
...
...
@@ -389,7 +396,7 @@ public class CertificationService {
//
try
{
log
.
info
(
"----querys========="
+
querys
);
log
.
info
(
"----querys========="
+
querys
);
HttpResponse
response
=
CertifHttpUtils
.
doGet
(
cHost
,
cPath
,
cMethod
,
headers
,
querys
);
StatusLine
statusLine
=
response
.
getStatusLine
();
int
statusCode
=
statusLine
.
getStatusCode
();
...
...
@@ -439,7 +446,7 @@ public class CertificationService {
StatusLine
statusLine
=
response
.
getStatusLine
();
int
statusCode
=
statusLine
.
getStatusCode
();
log
.
info
(
"----statusCode========="
+
querys
);
log
.
info
(
"----statusCode========="
+
querys
);
/**
* 状态码: 200 正常;400 URL无效;401 appCode错误; 403 次数用完; 500 API网管错误
*/
...
...
@@ -462,7 +469,7 @@ public class CertificationService {
//认证通过保存到数据库当中
public
Boolean
addIdInformation
(
IdInformation
idInformation
)
{
log
.
info
(
"----idInformation========="
+
idInformation
);
log
.
info
(
"----idInformation========="
+
idInformation
);
//保存认证信息
try
{
...
...
@@ -474,7 +481,7 @@ public class CertificationService {
//认证成功后修改用户,用户认证状态
ObjectRestResponse
authentication
=
userFeign
.
authentication
(
idInformation
.
getUserLonginId
(),
idInformation
.
getName
(),
idInformation
.
getIdNumber
(),
1
);
ObjectRestResponse
authentication
=
userFeign
.
authentication
(
idInformation
.
getUserLonginId
(),
idInformation
.
getName
(),
idInformation
.
getIdNumber
(),
1
);
return
authentication
.
getRel
();
}
...
...
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