Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
V
volunteer_service
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
licc
volunteer_service
Commits
2b10a205
Commit
2b10a205
authored
May 14, 2021
by
cy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
充值卡重复提示
parent
07129a4a
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
41 additions
and
33 deletions
+41
-33
CardMapper.java
...-mapper/src/main/java/cn/wisenergy/mapper/CardMapper.java
+1
-5
RefillCardMapper.java
...r/src/main/java/cn/wisenergy/mapper/RefillCardMapper.java
+8
-0
CardMapper.xml
wisenergy-mapper/src/main/resources/mapper/CardMapper.xml
+1
-9
RefillCardMapper.xml
...rgy-mapper/src/main/resources/mapper/RefillCardMapper.xml
+8
-0
RefillCardServiceImpl.java
.../cn/wisenergy/service/app/impl/RefillCardServiceImpl.java
+8
-9
Common.java
...ice/src/main/java/cn/wisenergy/service/common/Common.java
+6
-6
WxCommon.java
...ce/src/main/java/cn/wisenergy/service/wxpay/WxCommon.java
+2
-2
UserController.java
...cn/wisenergy/web/admin/controller/app/UserController.java
+5
-0
application-dev.yml
wisenergy-web-admin/src/main/resources/application-dev.yml
+2
-2
No files found.
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/CardMapper.java
View file @
2b10a205
...
...
@@ -48,11 +48,7 @@ public interface CardMapper extends BaseMapper<CardInfo> {
*/
List
<
CardInfo
>
getListByCardNo
(
@Param
(
"cardNo"
)
String
cardNo
);
/**
* 获取所以卡片信息
* @return CardInfo
*/
List
<
String
>
getAllCarInfo
();
...
...
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/RefillCardMapper.java
View file @
2b10a205
...
...
@@ -56,4 +56,12 @@ public interface RefillCardMapper extends BaseMapper<RefillCardMapper> {
* @return 充值卡信息
*/
List
<
RefillCard
>
getByCardNo
(
@Param
(
"cardNo"
)
String
cardNo
);
/**
* 通过初始号号模糊查询充值卡信息
* @return 充值卡信息
*/
List
<
RefillCard
>
infoByCardNo
(
@Param
(
"cardNo"
)
String
cardNo
);
}
wisenergy-mapper/src/main/resources/mapper/CardMapper.xml
View file @
2b10a205
...
...
@@ -116,14 +116,6 @@
</where>
</select>
<select
id=
"getAllCarInfo"
resultType=
"java.lang.String"
>
select
card_number
from
<include
refid=
"table"
/>
<where>
is_delete=0
</where>
</select>
</mapper>
wisenergy-mapper/src/main/resources/mapper/RefillCardMapper.xml
View file @
2b10a205
...
...
@@ -126,6 +126,14 @@
where batch_number=#{batchNumber}
</select>
<select
id=
"infoByCardNo"
resultMap=
"refillCardMap"
parameterType=
"string"
>
select
<include
refid=
"cols_all"
/>
from
<include
refid=
"table"
/>
where card_no like #{cardNo}
</select>
<select
id=
"getByCardNo"
resultMap=
"refillCardMap"
parameterType=
"string"
>
select
<include
refid=
"cols_all"
/>
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/RefillCardServiceImpl.java
View file @
2b10a205
...
...
@@ -53,15 +53,14 @@ public class RefillCardServiceImpl implements RefillCardService {
if
(
byCardNo
.
size
()
>
0
)
{
return
R
.
error
(
"该初始卡号已经存在,请重新添加"
);
}
List
<
String
>
allCarInfo
=
cardMapper
.
getAllCarInfo
();
BigInteger
finalCardNumber
=
refillCard
.
getCardNo
();
BigInteger
num
=
new
BigInteger
(
"1"
);
for
(
int
i
=
0
;
i
<
refillCard
.
getCardNumber
()
-
1
;
i
++)
{
finalCardNumber
=
finalCardNumber
.
add
(
num
);
BigInteger
finalCardNumber1
=
finalCardNumber
;
boolean
present
=
allCarInfo
.
stream
().
filter
(
m
->
m
.
equals
(
finalCardNumber1
.
toString
())).
findAny
().
isPresent
();
if
(
present
)
{
return
R
.
error
(
"该数量区间内存在相同卡号,请重新添加"
);
String
cardNumber
=
refillCard
.
getCardNo
().
toString
().
substring
(
0
,
6
)
+
"%"
;
List
<
RefillCard
>
refillCards
=
refillCardMapper
.
infoByCardNo
(
cardNumber
);
if
(
refillCards
.
size
()>
0
){
RefillCard
card
=
refillCards
.
stream
().
max
(
Comparator
.
comparing
(
RefillCard:
:
getCardNo
)).
get
();
BigInteger
maxNo
=
refillCard
.
getCardNo
().
add
(
new
BigInteger
(
card
.
getCardNumber
().
toString
()));
if
(
maxNo
.
compareTo
(
refillCard
.
getCardNo
())
>
0
)
{
return
R
.
error
(
"该初始卡区间有可能存在相同的卡号,请重新添加"
);
}
}
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/common/Common.java
View file @
2b10a205
...
...
@@ -39,24 +39,24 @@ public class Common {
* 支付宝--回调地址
*/
//测试
public
static
final
String
NOTIFY_URL
=
"http://111.203.232.171:8997/pay/aliPayCallBack.do"
;
//
public static final String NOTIFY_URL = "http://111.203.232.171:8997/pay/aliPayCallBack.do";
//线上
//
public static final String NOTIFY_URL = "https://jygkzy.com/api/pay/aliPayCallBack.do";
public
static
final
String
NOTIFY_URL
=
"https://jygkzy.com/api/pay/aliPayCallBack.do"
;
/***
* 支付宝--pc端支付成功跳转地址
*/
//测试
public
static
final
String
RETURN_URL_PC
=
"http://111.203.232.171:8999/#/wallet"
;
//
public static final String RETURN_URL_PC = "http://111.203.232.171:8999/#/wallet";
//线上
//
public static final String RETURN_URL_PC = "https://jygkzy.com/#/wallet";
public
static
final
String
RETURN_URL_PC
=
"https://jygkzy.com/#/wallet"
;
/***
* 支付宝--手机网页支付成功跳转地址
*/
//测试
public
static
final
String
RETURN_URL_WAP
=
"http://111.203.232.171:8999/#/history"
;
//
public static final String RETURN_URL_WAP = "http://111.203.232.171:8999/#/history";
//线上
//
public static final String RETURN_URL_WAP = "https://jygkzy.com/#/history";
public
static
final
String
RETURN_URL_WAP
=
"https://jygkzy.com/#/history"
;
/**
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/wxpay/WxCommon.java
View file @
2b10a205
...
...
@@ -9,9 +9,9 @@ package cn.wisenergy.service.wxpay;
public
class
WxCommon
{
//测试
public
static
final
String
NOTIFY_URL
=
"http://111.203.232.171:8997/pay/wxPayCallBack.do"
;
//
public static final String NOTIFY_URL = "http://111.203.232.171:8997/pay/wxPayCallBack.do";
//线上
//
public static final String NOTIFY_URL = "https://jygkzy.com/api/pay/wxPayCallBack.do";
public
static
final
String
NOTIFY_URL
=
"https://jygkzy.com/api/pay/wxPayCallBack.do"
;
...
...
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/UserController.java
View file @
2b10a205
...
...
@@ -207,4 +207,9 @@ public class UserController {
return
userService
.
getUserKnown
();
}
@ApiOperation
(
value
=
"jenkins测试"
,
notes
=
"jenkins测试"
,
httpMethod
=
"POST"
)
@PostMapping
(
"/jenkins"
)
public
boolean
jenkins
(){
return
true
;
}
}
wisenergy-web-admin/src/main/resources/application-dev.yml
View file @
2b10a205
...
...
@@ -3,8 +3,8 @@ spring:
type
:
com.alibaba.druid.pool.DruidDataSource
druid
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
#url: jdbc:mysql://192.168.110.165:3306/volunteer?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
url
:
jdbc:mysql://localhost:3306/volunteer?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
#url: jdbc:mysql://192.168.110.165:3306/volunteer?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
&useSSL=false&serverTimezone=UTC
url
:
jdbc:mysql://localhost:3306/volunteer?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8
&useSSL=false&serverTimezone=UTC
#url: jdbc:mysql://rm-bp1i44rtb091fk06coo.mysql.rds.aliyuncs.com:3306/volunteer?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false
username
:
root
password
:
adm4HYservice$
...
...
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