Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
customer-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SuperHive
back-end
customer-service
Commits
32e4996e
Commit
32e4996e
authored
May 12, 2020
by
huangcb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
货主接口:解决发货地址、收货地址列表功能bug
parent
5c6de93b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
16 deletions
+14
-16
PageResultVO.java
...java/com/esv/freight/customer/common/vo/PageResultVO.java
+2
-2
ReceiveAddressController.java
...odule/goodsowner/controller/ReceiveAddressController.java
+2
-2
DeliveryAddressForm.java
.../customer/module/goodsowner/form/DeliveryAddressForm.java
+2
-3
ReceiveAddressForm.java
...t/customer/module/goodsowner/form/ReceiveAddressForm.java
+3
-4
DeliveryAddressDao.xml
src/main/resources/mapper/goodsowner/DeliveryAddressDao.xml
+2
-2
ReceiveAddressDao.xml
src/main/resources/mapper/goodsowner/ReceiveAddressDao.xml
+2
-2
DeliveryAddressControllerTest.java
.../goodsowner/controller/DeliveryAddressControllerTest.java
+1
-1
No files found.
src/main/java/com/esv/freight/customer/common/vo/PageResultVO.java
View file @
32e4996e
...
@@ -30,7 +30,7 @@ public class PageResultVO {
...
@@ -30,7 +30,7 @@ public class PageResultVO {
/**
/**
* 总记录条数
* 总记录条数
**/
**/
private
Long
total
;
private
Long
total
Size
;
/**
/**
* 当前页的记录条数
* 当前页的记录条数
...
@@ -45,7 +45,7 @@ public class PageResultVO {
...
@@ -45,7 +45,7 @@ public class PageResultVO {
public
PageResultVO
(
IPage
page
,
List
<?>
record
)
{
public
PageResultVO
(
IPage
page
,
List
<?>
record
)
{
this
.
pageSize
=
page
.
getSize
();
this
.
pageSize
=
page
.
getSize
();
this
.
pageNum
=
page
.
getCurrent
();
this
.
pageNum
=
page
.
getCurrent
();
this
.
total
=
page
.
getTotal
();
this
.
total
Size
=
page
.
getTotal
();
this
.
recordSize
=
Long
.
parseLong
(
String
.
valueOf
(
page
.
getRecords
().
size
()));
this
.
recordSize
=
Long
.
parseLong
(
String
.
valueOf
(
page
.
getRecords
().
size
()));
this
.
records
=
record
;
this
.
records
=
record
;
}
}
...
...
src/main/java/com/esv/freight/customer/module/goodsowner/controller/ReceiveAddressController.java
View file @
32e4996e
...
@@ -63,8 +63,8 @@ public class ReceiveAddressController {
...
@@ -63,8 +63,8 @@ public class ReceiveAddressController {
DeliveryAddressForm
deliveryAddressForm
=
new
DeliveryAddressForm
();
DeliveryAddressForm
deliveryAddressForm
=
new
DeliveryAddressForm
();
BeanUtils
.
copyProperties
(
form
,
deliveryAddressForm
);
BeanUtils
.
copyProperties
(
form
,
deliveryAddressForm
);
deliveryAddressForm
.
setDeliverer
(
form
.
getReceiver
());
deliveryAddressForm
.
setDeliverer
(
form
.
getReceiver
());
deliveryAddressForm
.
setDeliverer
(
form
.
getReceiverPhone
());
deliveryAddressForm
.
setDeliverer
Phone
(
form
.
getReceiverPhone
());
deliveryAddressForm
.
setDeliverer
(
form
.
getReceiverTelephone
());
deliveryAddressForm
.
setDeliverer
Telephone
(
form
.
getReceiverTelephone
());
try
{
try
{
deliveryAddressService
.
addAddress
(
deliveryAddressForm
);
deliveryAddressService
.
addAddress
(
deliveryAddressForm
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/esv/freight/customer/module/goodsowner/form/DeliveryAddressForm.java
View file @
32e4996e
...
@@ -13,7 +13,6 @@ import org.hibernate.validator.constraints.Range;
...
@@ -13,7 +13,6 @@ import org.hibernate.validator.constraints.Range;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Pattern
;
/**
/**
* @description:
* @description:
...
@@ -70,8 +69,8 @@ public class DeliveryAddressForm {
...
@@ -70,8 +69,8 @@ public class DeliveryAddressForm {
@Length
(
max
=
10
,
message
=
"参数lat长度不合法"
,
groups
=
{
ValidatorInsert
.
class
,
ValidatorUpdate
.
class
})
@Length
(
max
=
10
,
message
=
"参数lat长度不合法"
,
groups
=
{
ValidatorInsert
.
class
,
ValidatorUpdate
.
class
})
private
String
lat
;
private
String
lat
;
@
Pattern
(
regexp
=
"[01]"
,
message
=
"参数addressCopy不合法"
,
groups
=
{
ValidatorInsert
.
class
})
@
Range
(
min
=
0
,
max
=
1
,
message
=
"参数addressCopy不合法"
,
groups
=
{
ValidatorInsert
.
class
})
private
String
addressCopy
;
private
Integer
addressCopy
;
@Length
(
max
=
50
,
message
=
"参数keywords长度不合法"
,
groups
=
{
ValidatorList
.
class
})
@Length
(
max
=
50
,
message
=
"参数keywords长度不合法"
,
groups
=
{
ValidatorList
.
class
})
private
String
keywords
;
private
String
keywords
;
...
...
src/main/java/com/esv/freight/customer/module/goodsowner/form/ReceiveAddressForm.java
View file @
32e4996e
...
@@ -13,7 +13,6 @@ import org.hibernate.validator.constraints.Range;
...
@@ -13,7 +13,6 @@ import org.hibernate.validator.constraints.Range;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Pattern
;
/**
/**
* @description:
* @description:
...
@@ -70,8 +69,8 @@ public class ReceiveAddressForm {
...
@@ -70,8 +69,8 @@ public class ReceiveAddressForm {
@Length
(
max
=
10
,
message
=
"参数lat长度不合法"
,
groups
=
{
ValidatorInsert
.
class
,
ValidatorUpdate
.
class
})
@Length
(
max
=
10
,
message
=
"参数lat长度不合法"
,
groups
=
{
ValidatorInsert
.
class
,
ValidatorUpdate
.
class
})
private
String
lat
;
private
String
lat
;
@
Pattern
(
regexp
=
"[01]"
,
message
=
"参数addressCopy不合法"
,
groups
=
{
ValidatorInsert
.
class
})
@
Range
(
min
=
0
,
max
=
1
,
message
=
"参数addressCopy不合法"
,
groups
=
{
ValidatorInsert
.
class
})
private
String
addressCopy
;
private
Integer
addressCopy
;
@Length
(
max
=
50
,
message
=
"参数keywords长度不合法"
,
groups
=
{
ValidatorList
.
class
})
@Length
(
max
=
50
,
message
=
"参数keywords长度不合法"
,
groups
=
{
ValidatorList
.
class
})
private
String
keywords
;
private
String
keywords
;
...
@@ -85,7 +84,7 @@ public class ReceiveAddressForm {
...
@@ -85,7 +84,7 @@ public class ReceiveAddressForm {
/**
/**
* 每页记录条数
* 每页记录条数
**/
**/
@Range
(
min
=
1
,
max
=
100
,
message
=
"
pageSize
"
,
groups
=
{
ValidatorList
.
class
})
@Range
(
min
=
1
,
max
=
100
,
message
=
"
参数pageSize不合法
"
,
groups
=
{
ValidatorList
.
class
})
@NotNull
(
message
=
"参数pageSize不能为空"
,
groups
=
{
ValidatorList
.
class
})
@NotNull
(
message
=
"参数pageSize不能为空"
,
groups
=
{
ValidatorList
.
class
})
private
Integer
pageSize
;
private
Integer
pageSize
;
...
...
src/main/resources/mapper/goodsowner/DeliveryAddressDao.xml
View file @
32e4996e
...
@@ -35,10 +35,10 @@
...
@@ -35,10 +35,10 @@
from goods_owner_delivery_address a, goods_owner_info b
from goods_owner_delivery_address a, goods_owner_info b
where a.owner_id = b.account_id and a.deleted = false
where a.owner_id = b.account_id and a.deleted = false
<if
test=
"queryObj.provinceCode != null"
>
<if
test=
"queryObj.provinceCode != null"
>
and
b
.province_code = #{queryObj.provinceCode}
and
a
.province_code = #{queryObj.provinceCode}
</if>
</if>
<if
test=
"queryObj.cityCode != null"
>
<if
test=
"queryObj.cityCode != null"
>
and
b
.city_code = #{queryObj.cityCode}
and
a
.city_code = #{queryObj.cityCode}
</if>
</if>
<if
test=
"queryObj.keywords != null"
>
<if
test=
"queryObj.keywords != null"
>
and (a.address_name like CONCAT('%',#{queryObj.keywords},'%')
and (a.address_name like CONCAT('%',#{queryObj.keywords},'%')
...
...
src/main/resources/mapper/goodsowner/ReceiveAddressDao.xml
View file @
32e4996e
...
@@ -35,10 +35,10 @@
...
@@ -35,10 +35,10 @@
from goods_owner_receive_address a, goods_owner_info b
from goods_owner_receive_address a, goods_owner_info b
where a.owner_id = b.account_id and a.deleted = false
where a.owner_id = b.account_id and a.deleted = false
<if
test=
"queryObj.provinceCode != null"
>
<if
test=
"queryObj.provinceCode != null"
>
and
b
.province_code = #{queryObj.provinceCode}
and
a
.province_code = #{queryObj.provinceCode}
</if>
</if>
<if
test=
"queryObj.cityCode != null"
>
<if
test=
"queryObj.cityCode != null"
>
and
b
.city_code = #{queryObj.cityCode}
and
a
.city_code = #{queryObj.cityCode}
</if>
</if>
<if
test=
"queryObj.keywords != null"
>
<if
test=
"queryObj.keywords != null"
>
and (a.address_name like CONCAT('%',#{queryObj.keywords},'%')
and (a.address_name like CONCAT('%',#{queryObj.keywords},'%')
...
...
src/test/java/com/esv/freight/customer/module/goodsowner/controller/DeliveryAddressControllerTest.java
View file @
32e4996e
...
@@ -95,7 +95,7 @@ public class DeliveryAddressControllerTest extends BaseTestController {
...
@@ -95,7 +95,7 @@ public class DeliveryAddressControllerTest extends BaseTestController {
form
.
setDelivererTelephone
(
"(024)24850576"
);
form
.
setDelivererTelephone
(
"(024)24850576"
);
form
.
setLon
(
"123.464052"
);
form
.
setLon
(
"123.464052"
);
form
.
setLat
(
"41.800415"
);
form
.
setLat
(
"41.800415"
);
form
.
setAddressCopy
(
"1"
);
form
.
setAddressCopy
(
1
);
MvcResult
mvcResult
=
this
.
getMockMvc
().
perform
(
MockMvcRequestBuilders
.
post
(
url
)
MvcResult
mvcResult
=
this
.
getMockMvc
().
perform
(
MockMvcRequestBuilders
.
post
(
url
)
.
contentType
(
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
.
contentType
(
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
...
...
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