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
6a28c7c6
Commit
6a28c7c6
authored
Jul 06, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-07-06提交
parent
d5bdd968
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
116 additions
and
221 deletions
+116
-221
CustomerDetailRespVO.java
.../module/customer/vo/customer/vo/CustomerDetailRespVO.java
+9
-2
CustomerController.java
...ustomer/controller/admin/customer/CustomerController.java
+70
-1
CustomerContactsController.java
...er/admin/customerContacts/CustomerContactsController.java
+30
-5
TargetLogMapper.java
...dao/module/order/dal/mysql/targetLog/TargetLogMapper.java
+1
-1
TargetLogServiceImpl.java
.../module/order/service/targetLog/TargetLogServiceImpl.java
+6
-212
No files found.
yudao-module-customer/yudao-module-customer-core/src/main/java/cn/iocoder/yudao/module/customer/vo/customer/vo/CustomerDetailRespVO.java
View file @
6a28c7c6
package
cn
.
iocoder
.
yudao
.
module
.
customer
.
vo
.
customer
.
vo
;
package
cn
.
iocoder
.
yudao
.
module
.
customer
.
vo
.
customer
.
vo
;
import
cn.iocoder.yudao.module.customer.vo.customerBank.CustomerBankBackVO
;
import
cn.iocoder.yudao.module.customer.vo.customerBank.CustomerBankBackVO
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -12,7 +13,7 @@ import java.math.BigDecimal;
...
@@ -12,7 +13,7 @@ import java.math.BigDecimal;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
*
;
@ApiModel
(
"管理后台 - 客户详情 Response VO"
)
@ApiModel
(
"管理后台 - 客户详情 Response VO"
)
@Data
@Data
...
@@ -93,7 +94,10 @@ public class CustomerDetailRespVO extends CustomerBaseVO {
...
@@ -93,7 +94,10 @@ public class CustomerDetailRespVO extends CustomerBaseVO {
@ApiModelProperty
(
value
=
"创建人id"
)
@ApiModelProperty
(
value
=
"创建人id"
)
private
Long
founder
;
private
Long
founder
;
@ApiModelProperty
(
value
=
"创建时间"
,
example
=
"1652017501000"
)
//客户创建日期格式化
//@JsonFormat(value = "创建时间", example = "1652017501000")
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY
,
timezone
=
TIME_ZONE_DEFAULT
)
private
Date
createTime
;
private
Date
createTime
;
...
@@ -203,4 +207,7 @@ public class CustomerDetailRespVO extends CustomerBaseVO {
...
@@ -203,4 +207,7 @@ public class CustomerDetailRespVO extends CustomerBaseVO {
@ApiModelProperty
(
value
=
"付款人姓名"
)
@ApiModelProperty
(
value
=
"付款人姓名"
)
private
String
payerName
;
private
String
payerName
;
//联系人信息
private
String
contactstr
;
}
}
yudao-module-customer/yudao-module-customer-rest/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/customer/CustomerController.java
View file @
6a28c7c6
...
@@ -18,6 +18,7 @@ import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
...
@@ -18,6 +18,7 @@ import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import
cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils
;
import
cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils
;
import
cn.iocoder.yudao.module.customer.convert.customer.CustomerConvert
;
import
cn.iocoder.yudao.module.customer.convert.customer.CustomerConvert
;
import
cn.iocoder.yudao.module.customer.convert.customerBank.CustomerBankConvert
;
import
cn.iocoder.yudao.module.customer.convert.customerBank.CustomerBankConvert
;
import
cn.iocoder.yudao.module.customer.convert.customerContacts.CustomerContactsConvert
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.commission.CustomerCommissionDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.commission.CustomerCommissionDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.complaint.CustomerComplaintDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.complaint.CustomerComplaintDO
;
...
@@ -42,6 +43,7 @@ import cn.iocoder.yudao.module.customer.service.customerLevelLog.CustomerLevelLo
...
@@ -42,6 +43,7 @@ import cn.iocoder.yudao.module.customer.service.customerLevelLog.CustomerLevelLo
import
cn.iocoder.yudao.module.customer.service.customerPublicCatchLog.CustomerPublicCatchLogService
;
import
cn.iocoder.yudao.module.customer.service.customerPublicCatchLog.CustomerPublicCatchLogService
;
import
cn.iocoder.yudao.module.customer.service.zhongPao.ZhongPaoService
;
import
cn.iocoder.yudao.module.customer.service.zhongPao.ZhongPaoService
;
import
cn.iocoder.yudao.module.customer.vo.customer.customerContacts.CustomerContactsCreateReqVO
;
import
cn.iocoder.yudao.module.customer.vo.customer.customerContacts.CustomerContactsCreateReqVO
;
import
cn.iocoder.yudao.module.customer.vo.customer.customerContacts.CustomerContactsRespVO
;
import
cn.iocoder.yudao.module.customer.vo.customer.customerContacts.CustomerContactsUpdateReqVO
;
import
cn.iocoder.yudao.module.customer.vo.customer.customerContacts.CustomerContactsUpdateReqVO
;
import
cn.iocoder.yudao.module.customer.vo.customer.vo.*
;
import
cn.iocoder.yudao.module.customer.vo.customer.vo.*
;
import
cn.iocoder.yudao.module.customer.vo.customerBank.CustomerBankBackVO
;
import
cn.iocoder.yudao.module.customer.vo.customerBank.CustomerBankBackVO
;
...
@@ -201,7 +203,8 @@ public class CustomerController {
...
@@ -201,7 +203,8 @@ public class CustomerController {
@NotNull
@NotNull
private
CommonResult
<
Long
>
createCustomerPrivate
(
CustomerCreateReqVO
createReqVO
)
{
private
CommonResult
<
Long
>
createCustomerPrivate
(
CustomerCreateReqVO
createReqVO
)
{
List
<
CustomerContactsCreateReqVO
>
customerContacts
=
createReqVO
.
getCustomerContacts
();
List
<
CustomerContactsCreateReqVO
>
customerContacts
=
createReqVO
.
getCustomerContacts
();
if
(!
CollectionUtils
.
isEmpty
(
customerContacts
))
{
if
(!
CollectionUtils
.
isEmpty
(
customerContacts
))
{
long
count
=
customerContacts
.
stream
().
filter
(
t
->
CustomerContactsDefaultEnum
.
IS_DEFAULT
.
getValue
().
equals
(
t
.
getIsDefault
())).
count
();
long
count
=
customerContacts
.
stream
().
filter
(
t
->
CustomerContactsDefaultEnum
.
IS_DEFAULT
.
getValue
().
equals
(
t
.
getIsDefault
())).
count
();
if
(
count
<=
0
)
{
if
(
count
<=
0
)
{
...
@@ -614,6 +617,72 @@ public class CustomerController {
...
@@ -614,6 +617,72 @@ public class CustomerController {
return
success
(
respVO
);
return
success
(
respVO
);
}
}
private
String
getContactStr
(
Long
customerId
)
{
List
<
CustomerContactsDO
>
list
=
customerContactsService
.
getCustomerContactsListByCustomerId
(
customerId
);
List
<
CustomerContactsRespVO
>
respVOList
=
CustomerContactsConvert
.
INSTANCE
.
convertList
(
list
);
String
sResult
=
""
;
if
(
CollectionUtil
.
isEmpty
(
respVOList
))
{
return
sResult
;
}
for
(
CustomerContactsRespVO
m
:
respVOList
)
{
sResult
+=
m
.
getName
()
+
","
+
m
.
getPhoneNew
()
+
"\r\n"
;
}
//sResult = sResult.substring(sResult.length() - 4);
return
sResult
;
}
@GetMapping
(
"/get2"
)
@ApiOperation
(
"获得客户详情"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"id"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
//@PreAuthorize("@ss.hasPermission('ecw:customer:query')")
public
CommonResult
<
CustomerDetailRespVO
>
getCustomer2
(
@RequestParam
(
"id"
)
Long
id
)
{
CustomerDetailRespVO
respVO
=
customerService
.
getCustomerDetailRespVO
(
id
);
if
(
Objects
.
isNull
(
respVO
))
{
throw
exception
(
CUSTOMER_NOT_EXISTS
);
}
Long
founder
=
respVO
.
getFounder
();
if
(
founder
!=
null
)
{
if
(
Boolean
.
TRUE
.
equals
(
respVO
.
getIsWebOrderConsigneeSync
()))
{
UserRespDTO
user
=
memberUserApi
.
getUser
(
founder
);
if
(
user
!=
null
)
{
respVO
.
setFounderName
(
user
.
getNickname
()
+
"(会员)"
);
}
}
else
{
AdminUserRespDTO
user
=
adminUserApi
.
getUser
(
founder
);
if
(
user
!=
null
)
{
respVO
.
setFounderName
(
user
.
getNickname
());
}
}
}
if
(
null
!=
respVO
.
getPromoter
())
{
CustomerDO
customer1
=
customerService
.
getCustomer
(
respVO
.
getPromoter
());
if
(
null
!=
customer1
)
{
respVO
.
setPromoterName
(
customer1
.
getName
());
}
}
//设置银行账号
CustomerBankQueryVO
customerBankQueryVO
=
new
CustomerBankQueryVO
();
customerBankQueryVO
.
setCustomerId
(
id
);
List
<
CustomerBankDO
>
bankList
=
customerBankService
.
getBankList
(
customerBankQueryVO
);
List
<
CustomerBankBackVO
>
customerBankBackVOS
=
CustomerBankConvert
.
INSTANCE
.
convertList
(
bankList
)
.
stream
().
sorted
(
Comparator
.
comparing
(
CustomerBankBackVO:
:
getId
)).
collect
(
Collectors
.
toList
());
respVO
.
setCustomerBankBackVOList
(
customerBankBackVOS
);
String
sR
=
getContactStr
(
id
);
respVO
.
setContactstr
(
sR
);
return
success
(
respVO
);
}
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
@ApiOperation
(
"根据客户id集合获得客户详情列表"
)
@ApiOperation
(
"根据客户id集合获得客户详情列表"
)
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"编号列表"
,
required
=
true
,
example
=
"1024,2048"
,
dataTypeClass
=
List
.
class
)
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"编号列表"
,
required
=
true
,
example
=
"1024,2048"
,
dataTypeClass
=
List
.
class
)
...
...
yudao-module-customer/yudao-module-customer-rest/src/main/java/cn/iocoder/yudao/module/customer/controller/admin/customerContacts/CustomerContactsController.java
View file @
6a28c7c6
...
@@ -98,9 +98,12 @@ public class CustomerContactsController {
...
@@ -98,9 +98,12 @@ public class CustomerContactsController {
@ApiOperation
(
"根据客户ID获得联系人列表"
)
@ApiOperation
(
"根据客户ID获得联系人列表"
)
@ApiImplicitParam
(
name
=
"customerId"
,
value
=
"客户主键ID"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
@ApiImplicitParam
(
name
=
"customerId"
,
value
=
"客户主键ID"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
// @PreAuthorize("@ss.hasPermission('ecw:customer-contacts:query')")
// @PreAuthorize("@ss.hasPermission('ecw:customer-contacts:query')")
public
CommonResult
<
List
<
CustomerContactsRespVO
>>
getCustomerContactsListByCustomerId
(
@RequestParam
(
"customerId"
)
Long
customerId
)
{
public
CommonResult
<
List
<
CustomerContactsRespVO
>>
List
<
CustomerContactsDO
>
list
=
customerContactsService
.
getCustomerContactsListByCustomerId
(
customerId
);
getCustomerContactsListByCustomerId
(
@RequestParam
(
"customerId"
)
Long
customerId
)
{
List
<
CustomerContactsRespVO
>
respVOList
=
CustomerContactsConvert
.
INSTANCE
.
convertList
(
list
);
List
<
CustomerContactsDO
>
list
=
customerContactsService
.
getCustomerContactsListByCustomerId
(
customerId
);
List
<
CustomerContactsRespVO
>
respVOList
=
CustomerContactsConvert
.
INSTANCE
.
convertList
(
list
);
if
(
CollectionUtil
.
isNotEmpty
(
respVOList
))
{
if
(
CollectionUtil
.
isNotEmpty
(
respVOList
))
{
CustomerDO
customer
=
customerService
.
getById
(
customerId
);
CustomerDO
customer
=
customerService
.
getById
(
customerId
);
if
(
customer
!=
null
)
{
if
(
customer
!=
null
)
{
...
@@ -112,6 +115,28 @@ public class CustomerContactsController {
...
@@ -112,6 +115,28 @@ public class CustomerContactsController {
return
success
(
respVOList
);
return
success
(
respVOList
);
}
}
//获取客户联系人信息
@GetMapping
(
"/getContactsString"
)
@ApiOperation
(
"根据客户ID获得联系人列表"
)
public
CommonResult
getCustomerContactsListByCustomerIdString
(
@RequestParam
(
"customerId"
)
Long
customerId
)
{
List
<
CustomerContactsDO
>
list
=
customerContactsService
.
getCustomerContactsListByCustomerId
(
customerId
);
List
<
CustomerContactsRespVO
>
respVOList
=
CustomerContactsConvert
.
INSTANCE
.
convertList
(
list
);
String
sResult
=
""
;
if
(
CollectionUtil
.
isEmpty
(
respVOList
))
{
return
success
(
sResult
);
}
for
(
CustomerContactsRespVO
m
:
respVOList
)
{
sResult
+=
m
.
getName
()
+
","
+
m
.
getPhoneNew
()+
"\r\n"
;
}
//sResult = sResult.substring(sResult.length() - 4);
return
success
(
sResult
);
}
@GetMapping
(
"/page"
)
@GetMapping
(
"/page"
)
@ApiOperation
(
"获得客户联系人分页"
)
@ApiOperation
(
"获得客户联系人分页"
)
// @PreAuthorize("@ss.hasPermission('ecw:customer-contacts:query')")
// @PreAuthorize("@ss.hasPermission('ecw:customer-contacts:query')")
...
@@ -179,7 +204,7 @@ public class CustomerContactsController {
...
@@ -179,7 +204,7 @@ public class CustomerContactsController {
//当前用户ID
//当前用户ID
Long
loginUserId
=
SecurityFrameworkUtils
.
getLoginUserId
();
Long
loginUserId
=
SecurityFrameworkUtils
.
getLoginUserId
();
return
success
(
customerContactsService
.
selectBySearchKey2
(
searchKey
,
return
success
(
customerContactsService
.
selectBySearchKey2
(
searchKey
,
type
,
ids
,
customerId
,
page
,
loginUserId
));
type
,
ids
,
customerId
,
page
,
loginUserId
));
}
}
}
}
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/dal/mysql/targetLog/TargetLogMapper.java
View file @
6a28c7c6
...
@@ -73,7 +73,7 @@ public interface TargetLogMapper extends AbstractMapper<TargetLogDO> {
...
@@ -73,7 +73,7 @@ public interface TargetLogMapper extends AbstractMapper<TargetLogDO> {
@Select
({
@Select
({
"<script>"
,
"<script>"
,
"select * from ecw_target_log where deleted=0 and
(DATE_FORMAT(create_time,'%Y-%m')=#{sDate} OR DATE_FORMAT(achievement_time,'%Y-%m')=#{sDate})
"
,
"select * from ecw_target_log where deleted=0 and
DATE_FORMAT(achievement_time,'%Y-%m')=#{sDate}
"
,
"</script>"
"</script>"
})
})
List
<
TargetLogDO
>
selectList2
(
String
sDate
);
List
<
TargetLogDO
>
selectList2
(
String
sDate
);
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/targetLog/TargetLogServiceImpl.java
View file @
6a28c7c6
This diff is collapsed.
Click to expand it.
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