Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-api-boot-master
Commits
9c3b8c01
Commit
9c3b8c01
authored
Sep 19, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/release' into release
parents
bdce383c
d7578025
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
85 additions
and
12 deletions
+85
-12
20240913.sql
sql/v2.1/20240913.sql
+0
-0
ErrorCodeConstants.java
...cn/iocoder/yudao/module/ecw/enums/ErrorCodeConstants.java
+2
-0
RegionController.java
.../module/ecw/controller/admin/region/RegionController.java
+20
-0
AppRegionController.java
...module/ecw/controller/app/region/AppRegionController.java
+22
-0
RegionService.java
...ocoder/yudao/module/ecw/service/region/RegionService.java
+8
-0
RegionServiceImpl.java
...er/yudao/module/ecw/service/region/RegionServiceImpl.java
+17
-6
OfferMapper.java
...ocoder/yudao/module/sale/dal/mysql/offer/OfferMapper.java
+1
-3
messages.properties
yudao-server/src/main/resources/i18n/messages.properties
+5
-1
messages_en.properties
yudao-server/src/main/resources/i18n/messages_en.properties
+5
-1
messages_zh.properties
yudao-server/src/main/resources/i18n/messages_zh.properties
+5
-1
No files found.
sql/
update_V2.2.1
.sql
→
sql/
v2.1/20240913
.sql
View file @
9c3b8c01
File moved
yudao-module-ecw/yudao-module-ecw-api/src/main/java/cn/iocoder/yudao/module/ecw/enums/ErrorCodeConstants.java
View file @
9c3b8c01
...
...
@@ -188,6 +188,8 @@ public interface ErrorCodeConstants {
ErrorCode
CUSTOMER_APPROVAL_IN_PROCESSING
=
new
ErrorCode
(
1004006043
,
"customer.approval.in.processing"
);
ErrorCode
AREA_CODE_NOT_NULL
=
new
ErrorCode
(
1004006044
,
"area.code.not.null"
);
ErrorCode
CURRENCY_ID_NOT_NULL
=
new
ErrorCode
(
1004006045
,
"currency.id.not.null"
);
}
...
...
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/controller/admin/region/RegionController.java
View file @
9c3b8c01
...
...
@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.ecw.controller.admin.region;
import
cn.iocoder.yudao.framework.apollo.core.event.ChannelDataEvent
;
import
cn.iocoder.yudao.framework.apollo.core.event.QueryChannelInfoEvent
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
...
...
@@ -26,6 +27,7 @@ import cn.iocoder.yudao.framework.excel.util.ExcelUtils;
import
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
operatelog
.
core
.
enums
.
OperateTypeEnum
.*;
import
static
cn
.
iocoder
.
yudao
.
module
.
ecw
.
enums
.
ErrorCodeConstants
.*;
import
cn.iocoder.yudao.module.ecw.controller.admin.region.vo.*
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.region.RegionDO
;
...
...
@@ -217,4 +219,22 @@ public class RegionController {
List
<
RegionDO
>
cityList
=
regionService
.
getCityListByParentId
(
parentId
);
return
success
(
RegionConvert
.
INSTANCE
.
convertList
(
cityList
));
}
@GetMapping
(
"/check/dest-currency/area-code/"
)
@ApiOperation
(
"检查国家区域是否与手机号国家区号一致"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"currencyId"
,
value
=
"国家ID"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
),
@ApiImplicitParam
(
name
=
"areaCode"
,
value
=
"手机国家区号"
,
required
=
true
,
example
=
"86"
,
dataTypeClass
=
String
.
class
)
})
public
CommonResult
<
Boolean
>
checkDestCurrencyAndAreaCode
(
@RequestParam
(
"currencyId"
)
Long
currencyId
,
@RequestParam
(
"areaCode"
)
String
areaCode
)
{
if
(
currencyId
==
null
)
{
return
CommonResult
.
error
(
CURRENCY_ID_NOT_NULL
);
}
if
(
StringUtils
.
isBlank
(
areaCode
))
{
return
CommonResult
.
error
(
AREA_CODE_NOT_NULL
);
}
return
success
(
regionService
.
countByIdAndAreaCode
(
currencyId
,
areaCode
));
}
}
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/controller/app/region/AppRegionController.java
View file @
9c3b8c01
...
...
@@ -10,7 +10,9 @@ import cn.iocoder.yudao.module.ecw.dal.dataobject.region.RegionDO;
import
cn.iocoder.yudao.module.ecw.service.region.RegionService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.security.access.prepost.PreAuthorize
;
...
...
@@ -25,6 +27,8 @@ import java.util.stream.Collectors;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
exception
.
enums
.
GlobalErrorCodeConstants
.
INTERNAL_SERVER_ERROR
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
error
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
static
cn
.
iocoder
.
yudao
.
module
.
ecw
.
enums
.
ErrorCodeConstants
.
AREA_CODE_NOT_NULL
;
import
static
cn
.
iocoder
.
yudao
.
module
.
ecw
.
enums
.
ErrorCodeConstants
.
CURRENCY_ID_NOT_NULL
;
@Api
(
tags
=
"app-web - 国家城市管理"
)
@RestController
...
...
@@ -130,6 +134,24 @@ public class AppRegionController {
return
success
(
RegionConvert
.
INSTANCE
.
convertList
(
cityList
));
}
@GetMapping
(
"/check/dest-currency/area-code/"
)
@ApiOperation
(
"检查国家区域是否与手机号国家区号一致"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"currencyId"
,
value
=
"国家ID"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
),
@ApiImplicitParam
(
name
=
"areaCode"
,
value
=
"手机国家区号"
,
required
=
true
,
example
=
"86"
,
dataTypeClass
=
String
.
class
)
})
public
CommonResult
<
Boolean
>
checkDestCurrencyAndAreaCode
(
@RequestParam
(
"currencyId"
)
Long
currencyId
,
@RequestParam
(
"areaCode"
)
String
areaCode
)
{
if
(
currencyId
==
null
)
{
return
CommonResult
.
error
(
CURRENCY_ID_NOT_NULL
);
}
if
(
StringUtils
.
isBlank
(
areaCode
))
{
return
CommonResult
.
error
(
AREA_CODE_NOT_NULL
);
}
return
success
(
regionService
.
countByIdAndAreaCode
(
currencyId
,
areaCode
));
}
private
RegionRespVO
buildChildTree
(
RegionRespVO
pNode
,
List
<
RegionRespVO
>
allDatas
){
List
<
RegionRespVO
>
childs
=
new
ArrayList
<>();
for
(
RegionRespVO
itemNode
:
allDatas
)
{
...
...
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/service/region/RegionService.java
View file @
9c3b8c01
...
...
@@ -44,6 +44,14 @@ public interface RegionService {
*/
RegionDO
getRegion
(
Long
id
);
/**
* 根据国家id和手机国家区号统计数值,判断区号是否与国家一致
* @param id
* @param areaCode
* @return
*/
Boolean
countByIdAndAreaCode
(
Long
id
,
String
areaCode
);
/**
* 获得区域设置列表
*
...
...
yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/service/region/RegionServiceImpl.java
View file @
9c3b8c01
package
cn
.
iocoder
.
yudao
.
module
.
ecw
.
service
.
region
;
import
cn.hutool.core.util.StrUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
org.springframework.validation.annotation.Validated
;
import
java.util.*
;
import
cn.iocoder.yudao.module.ecw.controller.admin.region.vo.*
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.region.RegionDO
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
...
...
@@ -31,12 +35,12 @@ public class RegionServiceImpl implements RegionService {
@Override
public
Long
createRegion
(
RegionCreateReqVO
createReqVO
)
{
if
(
Objects
.
equals
(
createReqVO
.
getType
(),
"1"
)
||
Objects
.
equals
(
createReqVO
.
getType
(),
"3"
)){
if
(
StringUtils
.
isBlank
(
createReqVO
.
getLabelCode
())){
if
(
Objects
.
equals
(
createReqVO
.
getType
(),
"1"
)
||
Objects
.
equals
(
createReqVO
.
getType
(),
"3"
))
{
if
(
StringUtils
.
isBlank
(
createReqVO
.
getLabelCode
()))
{
throw
exception
(
REGION_LABEL_CODE_NOT_NULL
);
}
String
[]
codes
=
createReqVO
.
getLabelCode
().
split
(
StrUtil
.
DASHED
);
if
(
codes
.
length
<
2
){
if
(
codes
.
length
<
2
)
{
throw
exception
(
REGION_LABEL_CODE_COUNTRY_AND_CITY_AND_AIR_COUNTRY
);
}
}
...
...
@@ -49,12 +53,12 @@ public class RegionServiceImpl implements RegionService {
@Override
public
void
updateRegion
(
RegionUpdateReqVO
updateReqVO
)
{
if
(
Objects
.
equals
(
updateReqVO
.
getType
(),
"1"
)
||
Objects
.
equals
(
updateReqVO
.
getType
(),
"3"
)){
if
(
StringUtils
.
isBlank
(
updateReqVO
.
getLabelCode
())){
if
(
Objects
.
equals
(
updateReqVO
.
getType
(),
"1"
)
||
Objects
.
equals
(
updateReqVO
.
getType
(),
"3"
))
{
if
(
StringUtils
.
isBlank
(
updateReqVO
.
getLabelCode
()))
{
throw
exception
(
REGION_LABEL_CODE_NOT_NULL
);
}
String
[]
codes
=
updateReqVO
.
getLabelCode
().
split
(
StrUtil
.
DASHED
);
if
(
codes
.
length
<
2
){
if
(
codes
.
length
<
2
)
{
throw
exception
(
REGION_LABEL_CODE_COUNTRY_AND_CITY_AND_AIR_COUNTRY
);
}
}
...
...
@@ -94,6 +98,13 @@ public class RegionServiceImpl implements RegionService {
return
regionMapper
.
selectById
(
id
);
}
@Override
public
Boolean
countByIdAndAreaCode
(
Long
id
,
String
areaCode
)
{
Long
count
=
regionMapper
.
selectCount
(
new
LambdaQueryWrapper
<
RegionDO
>().
eq
(
RegionDO:
:
getId
,
id
).
eq
(
RegionDO:
:
getAreaCode
,
areaCode
));
return
Objects
.
nonNull
(
count
)
&&
count
>
0L
;
}
@Override
public
List
<
RegionDO
>
getRegionList
(
Collection
<
Long
>
ids
)
{
return
regionMapper
.
selectBatchIds
(
ids
);
...
...
yudao-module-sale/yudao-module-sale-core/src/main/java/cn/iocoder/yudao/module/sale/dal/mysql/offer/OfferMapper.java
View file @
9c3b8c01
...
...
@@ -121,9 +121,7 @@ public interface OfferMapper extends BaseMapperX<OfferDO> {
"from ecw_offer o "
,
"left join ecw_customer_contacts cc on (o.relation = 1 and cc.id = o.consignor_id) or (o.relation = 2 and cc.id = o.consignee_id) "
,
"<when test = 'pageVO.sourceIds != null and pageVO.sourceIds.size() > 0'>"
,
"left join ecw_customer user on user.id = o.relation_id "
,
"</when>"
,
"left join system_user u on u.id = o.follow_up_salesman_id "
,
"left join ecw_region s on o.objective_id = s.id "
,
"left join ecw_warehouse_line line on o.line_id = line.id "
,
...
...
yudao-server/src/main/resources/i18n/messages.properties
View file @
9c3b8c01
...
...
@@ -301,3 +301,7 @@ customer.approval.in.processing=
order.overseas.warehouse.update.is.or.no
=
order.is.overseas.warehouse.order
=
order.not.is.overseas.warehouse.order
=
area.code.not.null
=
currency.id.not.null
=
\ No newline at end of file
yudao-server/src/main/resources/i18n/messages_en.properties
View file @
9c3b8c01
...
...
@@ -1108,3 +1108,7 @@ customer.approval.in.processing=Non-main customer approval is in progress and ca
order.overseas.warehouse.update.is.or.no
=
Please select order overseas warehouse modification Yes or No
order.is.overseas.warehouse.order
=
This order is already an overseas warehouse order
order.not.is.overseas.warehouse.order
=
This order is already a non overseas warehouse order
area.code.not.null
=
The national mobile phone area code cannot be empty
currency.id.not.null
=
The country ID cannot be empty
\ No newline at end of file
yudao-server/src/main/resources/i18n/messages_zh.properties
View file @
9c3b8c01
...
...
@@ -1108,3 +1108,7 @@ customer.approval.in.processing=\u975E\u4E3B\u5BA2\u6237\u5BA1\u6279\u6B63\u5728
order.overseas.warehouse.update.is.or.no
=
\u
8bf7
\u9009\u
62e9
\u
8ba2
\u5355\u
6d77
\u5916\u
4ed3
\u
4fee
\u6539\u
662f
\u6216\u5426
order.is.overseas.warehouse.order
=
\u
8be5
\u
8ba2
\u5355\u
5df2
\u
7ecf
\u
662f
\u
6d77
\u5916\u
4ed3
\u
8ba2
\u5355
order.not.is.overseas.warehouse.order
=
\u
8be5
\u
8ba2
\u5355\u
5df2
\u
7ecf
\u
662f
\u
975e
\u
6d77
\u5916\u
4ed3
\u
8ba2
\u5355
area.code.not.null
=
\u
56fd
\u
5bb6
\u
624b
\u
673a
\u
533a
\u
53f7
\u
4e0d
\u
80fd
\u
4e3a
\u
7a7a
currency.id.not.null
=
\u
56fd
\u
5bb6id
\u
4e0d
\u
80fd
\u
4e3a
\u
7a7a
\ 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