Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-backend
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AutogeneralShanghai
yd-backend
Commits
0b1e66d7
Commit
0b1e66d7
authored
May 10, 2021
by
yao.xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加-客户文章跟踪/文章阅读数量
parent
38175b57
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
239 additions
and
24 deletions
+239
-24
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsPractitionerServiceImpl.java
+1
-0
yd-api/src/main/java/com/yd/api/agms/vo/practitioner/PractitionerFileSharing.java
+23
-1
yd-api/src/main/java/com/yd/api/agms/vo/practitioner/PractitionerFileSharingListRequestVO.java
+11
-0
yd-api/src/main/java/com/yd/api/practitioner/PractitionerArticleController.java
+22
-3
yd-api/src/main/java/com/yd/api/practitioner/service/PractitionerArticleService.java
+3
-0
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerArticleServiceImpl.java
+16
-1
yd-api/src/main/java/com/yd/api/practitioner/vo/article/ArticleTrackQueryResponseVO.java
+29
-0
yd-api/src/main/java/com/yd/dal/entity/practitioner/article/ArticleTrackQueryInfo.java
+40
-0
yd-api/src/main/java/com/yd/dal/mapper/agms/AgmsPractitionerMapper.java
+5
-1
yd-api/src/main/java/com/yd/dal/mapper/practitioner/PractitionerArticleMapper.java
+10
-0
yd-api/src/main/java/com/yd/dal/service/agms/AgmsPractitionerDALService.java
+1
-1
yd-api/src/main/java/com/yd/dal/service/agms/impl/AgmsPractitionerDALServiceImpl.java
+3
-4
yd-api/src/main/java/com/yd/dal/service/practitioner/PractitionerArticleDALService.java
+9
-0
yd-api/src/main/java/com/yd/dal/service/practitioner/impl/PractitionerArticleDALServiceImpl.java
+22
-0
yd-api/src/main/resources/mapper/agms/AgmsPractitionerMapper.xml
+27
-13
yd-api/src/main/resources/mapper/practitioner/PractitionerArticleMapper.xml
+17
-0
No files found.
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsPractitionerServiceImpl.java
View file @
0b1e66d7
...
@@ -45,6 +45,7 @@ public class AgmsPractitionerServiceImpl implements AgmsPractitionerService {
...
@@ -45,6 +45,7 @@ public class AgmsPractitionerServiceImpl implements AgmsPractitionerService {
mdDropOptionIds
=(
Long
[])
ConvertUtils
.
convert
(
requestVO
.
getMdDropOptionId
().
split
(
","
),
Long
.
class
);
mdDropOptionIds
=(
Long
[])
ConvertUtils
.
convert
(
requestVO
.
getMdDropOptionId
().
split
(
","
),
Long
.
class
);
}
}
PageInfo
<
PractitionerFileSharing
>
practitionerFileShares
=
agmsPractitionerDALService
.
practitionerFileSharingList
(
requestVO
.
getId
(),
PageInfo
<
PractitionerFileSharing
>
practitionerFileShares
=
agmsPractitionerDALService
.
practitionerFileSharingList
(
requestVO
.
getId
(),
requestVO
.
getPractitionerId
(),
requestVO
.
getShareCode
(),
requestVO
.
getShareCode
(),
mdDropOptionIds
,
mdDropOptionIds
,
requestVO
.
getIsActive
(),
requestVO
.
getIsActive
(),
...
...
yd-api/src/main/java/com/yd/api/agms/vo/practitioner/PractitionerFileSharing.java
View file @
0b1e66d7
...
@@ -64,6 +64,10 @@ public class PractitionerFileSharing {
...
@@ -64,6 +64,10 @@ public class PractitionerFileSharing {
*/
*/
private
String
coverUrl
;
private
String
coverUrl
;
private
Long
totalNum
;
private
Long
num
;
/**
/**
* 获取 serial id
* 获取 serial id
...
@@ -317,11 +321,27 @@ public class PractitionerFileSharing {
...
@@ -317,11 +321,27 @@ public class PractitionerFileSharing {
this
.
coverUrl
=
coverUrl
;
this
.
coverUrl
=
coverUrl
;
}
}
public
Long
getTotalNum
()
{
return
totalNum
;
}
public
void
setTotalNum
(
Long
totalNum
)
{
this
.
totalNum
=
totalNum
;
}
public
Long
getNum
()
{
return
num
;
}
public
void
setNum
(
Long
num
)
{
this
.
num
=
num
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"PractitionerFileSharing{"
+
return
"PractitionerFileSharing{"
+
"id="
+
id
+
"id="
+
id
+
", mdDropOptionId=
"
+
mdDropOptionId
+
", mdDropOptionId=
'"
+
mdDropOptionId
+
'\''
+
", fileContent='"
+
fileContent
+
'\''
+
", fileContent='"
+
fileContent
+
'\''
+
", isActive="
+
isActive
+
", isActive="
+
isActive
+
", createdAt='"
+
createdAt
+
'\''
+
", createdAt='"
+
createdAt
+
'\''
+
...
@@ -334,6 +354,8 @@ public class PractitionerFileSharing {
...
@@ -334,6 +354,8 @@ public class PractitionerFileSharing {
", digest='"
+
digest
+
'\''
+
", digest='"
+
digest
+
'\''
+
", author='"
+
author
+
'\''
+
", author='"
+
author
+
'\''
+
", coverUrl='"
+
coverUrl
+
'\''
+
", coverUrl='"
+
coverUrl
+
'\''
+
", totalNum="
+
totalNum
+
", num="
+
num
+
'}'
;
'}'
;
}
}
}
}
yd-api/src/main/java/com/yd/api/agms/vo/practitioner/PractitionerFileSharingListRequestVO.java
View file @
0b1e66d7
...
@@ -15,6 +15,8 @@ public class PractitionerFileSharingListRequestVO {
...
@@ -15,6 +15,8 @@ public class PractitionerFileSharingListRequestVO {
private
Integer
isActive
;
private
Integer
isActive
;
private
Long
practitionerId
;
private
PageInfo
<
PractitionerFileSharing
>
practitionerFileShares
;
private
PageInfo
<
PractitionerFileSharing
>
practitionerFileShares
;
/**
/**
...
@@ -87,6 +89,14 @@ public class PractitionerFileSharingListRequestVO {
...
@@ -87,6 +89,14 @@ public class PractitionerFileSharingListRequestVO {
this
.
shareCode
=
shareCode
;
this
.
shareCode
=
shareCode
;
}
}
public
Long
getPractitionerId
()
{
return
practitionerId
;
}
public
void
setPractitionerId
(
Long
practitionerId
)
{
this
.
practitionerId
=
practitionerId
;
}
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"PractitionerFileSharingListRequestVO{"
+
return
"PractitionerFileSharingListRequestVO{"
+
...
@@ -94,6 +104,7 @@ public class PractitionerFileSharingListRequestVO {
...
@@ -94,6 +104,7 @@ public class PractitionerFileSharingListRequestVO {
", shareCode='"
+
shareCode
+
'\''
+
", shareCode='"
+
shareCode
+
'\''
+
", mdDropOptionId='"
+
mdDropOptionId
+
'\''
+
", mdDropOptionId='"
+
mdDropOptionId
+
'\''
+
", isActive="
+
isActive
+
", isActive="
+
isActive
+
", practitionerId="
+
practitionerId
+
", practitionerFileShares="
+
practitionerFileShares
+
", practitionerFileShares="
+
practitionerFileShares
+
'}'
;
'}'
;
}
}
...
...
yd-api/src/main/java/com/yd/api/practitioner/PractitionerArticleController.java
View file @
0b1e66d7
...
@@ -4,12 +4,12 @@ import com.yd.api.practitioner.service.PractitionerArticleService;
...
@@ -4,12 +4,12 @@ import com.yd.api.practitioner.service.PractitionerArticleService;
import
com.yd.api.practitioner.vo.ArticleTrackSaveResponseVO
;
import
com.yd.api.practitioner.vo.ArticleTrackSaveResponseVO
;
import
com.yd.api.practitioner.vo.article.ArticleShareCodeSaveRequestVO
;
import
com.yd.api.practitioner.vo.article.ArticleShareCodeSaveRequestVO
;
import
com.yd.api.practitioner.vo.article.ArticleShareCodeSaveResponseVO
;
import
com.yd.api.practitioner.vo.article.ArticleShareCodeSaveResponseVO
;
import
com.yd.api.practitioner.vo.article.ArticleTrackQueryResponseVO
;
import
com.yd.api.practitioner.vo.article.ArticleTrackSaveRequestVO
;
import
com.yd.api.practitioner.vo.article.ArticleTrackSaveRequestVO
;
import
com.yd.api.result.JsonResult
;
import
com.yd.api.result.JsonResult
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -19,6 +19,9 @@ public class PractitionerArticleController {
...
@@ -19,6 +19,9 @@ public class PractitionerArticleController {
@Autowired
@Autowired
private
PractitionerArticleService
practitionerArticleService
;
private
PractitionerArticleService
practitionerArticleService
;
/**
* 分享文章保存
*/
@RequestMapping
(
"/articleShareCodeSave"
)
@RequestMapping
(
"/articleShareCodeSave"
)
public
Object
articleShareCodeSave
(
@RequestBody
ArticleShareCodeSaveRequestVO
requestVO
){
public
Object
articleShareCodeSave
(
@RequestBody
ArticleShareCodeSaveRequestVO
requestVO
){
JsonResult
result
=
new
JsonResult
();
JsonResult
result
=
new
JsonResult
();
...
@@ -28,6 +31,9 @@ public class PractitionerArticleController {
...
@@ -28,6 +31,9 @@ public class PractitionerArticleController {
return
result
;
return
result
;
}
}
/**
* 客户文章跟踪信息保存
*/
@RequestMapping
(
"/articleTrackSave"
)
@RequestMapping
(
"/articleTrackSave"
)
public
Object
articleTrackSave
(
@RequestBody
ArticleTrackSaveRequestVO
requestVO
){
public
Object
articleTrackSave
(
@RequestBody
ArticleTrackSaveRequestVO
requestVO
){
JsonResult
result
=
new
JsonResult
();
JsonResult
result
=
new
JsonResult
();
...
@@ -36,4 +42,17 @@ public class PractitionerArticleController {
...
@@ -36,4 +42,17 @@ public class PractitionerArticleController {
result
.
setData
(
responseVO
);
result
.
setData
(
responseVO
);
return
result
;
return
result
;
}
}
/**
* 客户文章跟踪信息查询
*/
@RequestMapping
(
value
=
"/articleTrackQuery"
,
method
=
RequestMethod
.
GET
)
public
Object
articleTrackQuery
(
@RequestParam
(
"practitionerId"
)
Long
practitionerId
,
@RequestParam
(
"sharingId"
)
Long
sharingId
){
JsonResult
result
=
new
JsonResult
();
ArticleTrackQueryResponseVO
responseVO
=
practitionerArticleService
.
articleTrackQuery
(
practitionerId
,
sharingId
);
result
.
addResult
(
responseVO
);
result
.
setData
(
responseVO
);
return
result
;
}
}
}
yd-api/src/main/java/com/yd/api/practitioner/service/PractitionerArticleService.java
View file @
0b1e66d7
...
@@ -3,10 +3,13 @@ package com.yd.api.practitioner.service;
...
@@ -3,10 +3,13 @@ package com.yd.api.practitioner.service;
import
com.yd.api.practitioner.vo.ArticleTrackSaveResponseVO
;
import
com.yd.api.practitioner.vo.ArticleTrackSaveResponseVO
;
import
com.yd.api.practitioner.vo.article.ArticleShareCodeSaveRequestVO
;
import
com.yd.api.practitioner.vo.article.ArticleShareCodeSaveRequestVO
;
import
com.yd.api.practitioner.vo.article.ArticleShareCodeSaveResponseVO
;
import
com.yd.api.practitioner.vo.article.ArticleShareCodeSaveResponseVO
;
import
com.yd.api.practitioner.vo.article.ArticleTrackQueryResponseVO
;
import
com.yd.api.practitioner.vo.article.ArticleTrackSaveRequestVO
;
import
com.yd.api.practitioner.vo.article.ArticleTrackSaveRequestVO
;
public
interface
PractitionerArticleService
{
public
interface
PractitionerArticleService
{
ArticleShareCodeSaveResponseVO
articleShareCodeSave
(
ArticleShareCodeSaveRequestVO
requestVO
);
ArticleShareCodeSaveResponseVO
articleShareCodeSave
(
ArticleShareCodeSaveRequestVO
requestVO
);
ArticleTrackSaveResponseVO
articleTrackSave
(
ArticleTrackSaveRequestVO
requestVO
);
ArticleTrackSaveResponseVO
articleTrackSave
(
ArticleTrackSaveRequestVO
requestVO
);
ArticleTrackQueryResponseVO
articleTrackQuery
(
Long
practitionerId
,
Long
sharingId
);
}
}
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerArticleServiceImpl.java
View file @
0b1e66d7
...
@@ -4,12 +4,15 @@ import com.yd.api.practitioner.service.PractitionerArticleService;
...
@@ -4,12 +4,15 @@ import com.yd.api.practitioner.service.PractitionerArticleService;
import
com.yd.api.practitioner.vo.ArticleTrackSaveResponseVO
;
import
com.yd.api.practitioner.vo.ArticleTrackSaveResponseVO
;
import
com.yd.api.practitioner.vo.article.ArticleShareCodeSaveRequestVO
;
import
com.yd.api.practitioner.vo.article.ArticleShareCodeSaveRequestVO
;
import
com.yd.api.practitioner.vo.article.ArticleShareCodeSaveResponseVO
;
import
com.yd.api.practitioner.vo.article.ArticleShareCodeSaveResponseVO
;
import
com.yd.api.practitioner.vo.article.ArticleTrackQueryResponseVO
;
import
com.yd.api.practitioner.vo.article.ArticleTrackSaveRequestVO
;
import
com.yd.api.practitioner.vo.article.ArticleTrackSaveRequestVO
;
import
com.yd.api.result.CommonResult
;
import
com.yd.api.result.CommonResult
;
import
com.yd.dal.entity.customer.AclCustomerObjectShare
;
import
com.yd.dal.entity.customer.AclCustomerObjectShare
;
import
com.yd.dal.entity.customer.AclCustomerObjectShareTrack
;
import
com.yd.dal.entity.customer.AclCustomerObjectShareTrack
;
import
com.yd.dal.entity.practitioner.article.ArticleTrackQueryInfo
;
import
com.yd.dal.service.customer.AclCustomerObjectShareDALService
;
import
com.yd.dal.service.customer.AclCustomerObjectShareDALService
;
import
com.yd.dal.service.customer.AclCustomerObjectShareTrackDALService
;
import
com.yd.dal.service.customer.AclCustomerObjectShareTrackDALService
;
import
com.yd.dal.service.practitioner.PractitionerArticleDALService
;
import
com.yd.util.CommonUtil
;
import
com.yd.util.CommonUtil
;
import
com.yd.util.config.ZHBErrorConfig
;
import
com.yd.util.config.ZHBErrorConfig
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
...
@@ -17,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -17,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
@Service
(
"practitionerArticleService"
)
@Service
(
"practitionerArticleService"
)
public
class
PractitionerArticleServiceImpl
implements
PractitionerArticleService
{
public
class
PractitionerArticleServiceImpl
implements
PractitionerArticleService
{
...
@@ -24,7 +28,8 @@ public class PractitionerArticleServiceImpl implements PractitionerArticleServic
...
@@ -24,7 +28,8 @@ public class PractitionerArticleServiceImpl implements PractitionerArticleServic
private
AclCustomerObjectShareDALService
aclCustomerObjectShareDALService
;
private
AclCustomerObjectShareDALService
aclCustomerObjectShareDALService
;
@Autowired
@Autowired
private
AclCustomerObjectShareTrackDALService
aclCustomerObjectShareTrackDALService
;
private
AclCustomerObjectShareTrackDALService
aclCustomerObjectShareTrackDALService
;
@Autowired
private
PractitionerArticleDALService
practitionerArticleDALService
;
@Override
@Override
public
ArticleShareCodeSaveResponseVO
articleShareCodeSave
(
ArticleShareCodeSaveRequestVO
requestVO
)
{
public
ArticleShareCodeSaveResponseVO
articleShareCodeSave
(
ArticleShareCodeSaveRequestVO
requestVO
)
{
ArticleShareCodeSaveResponseVO
responseVO
=
new
ArticleShareCodeSaveResponseVO
();
ArticleShareCodeSaveResponseVO
responseVO
=
new
ArticleShareCodeSaveResponseVO
();
...
@@ -61,4 +66,14 @@ public class PractitionerArticleServiceImpl implements PractitionerArticleServic
...
@@ -61,4 +66,14 @@ public class PractitionerArticleServiceImpl implements PractitionerArticleServic
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
return
responseVO
;
return
responseVO
;
}
}
@Override
public
ArticleTrackQueryResponseVO
articleTrackQuery
(
Long
practitionerId
,
Long
sharingId
)
{
ArticleTrackQueryResponseVO
responseVO
=
new
ArticleTrackQueryResponseVO
();
//通过经纪人id和文章id查询 客户跟踪信息
List
<
ArticleTrackQueryInfo
>
articleTrackQueryInfos
=
practitionerArticleDALService
.
articleTrackQuery
(
practitionerId
,
sharingId
);
responseVO
.
setArticleTrackQueryInfos
(
articleTrackQueryInfos
);
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
return
responseVO
;
}
}
}
yd-api/src/main/java/com/yd/api/practitioner/vo/article/ArticleTrackQueryResponseVO.java
0 → 100644
View file @
0b1e66d7
package
com
.
yd
.
api
.
practitioner
.
vo
.
article
;
import
com.yd.api.result.CommonResult
;
import
com.yd.dal.entity.practitioner.article.ArticleTrackQueryInfo
;
import
java.util.List
;
public
class
ArticleTrackQueryResponseVO
{
private
List
<
ArticleTrackQueryInfo
>
articleTrackQueryInfos
;
private
CommonResult
commonResult
;
public
List
<
ArticleTrackQueryInfo
>
getArticleTrackQueryInfos
()
{
return
articleTrackQueryInfos
;
}
public
void
setArticleTrackQueryInfos
(
List
<
ArticleTrackQueryInfo
>
articleTrackQueryInfos
)
{
this
.
articleTrackQueryInfos
=
articleTrackQueryInfos
;
}
public
CommonResult
getCommonResult
()
{
return
commonResult
;
}
public
void
setCommonResult
(
CommonResult
commonResult
)
{
this
.
commonResult
=
commonResult
;
}
}
yd-api/src/main/java/com/yd/dal/entity/practitioner/article/ArticleTrackQueryInfo.java
0 → 100644
View file @
0b1e66d7
package
com
.
yd
.
dal
.
entity
.
practitioner
.
article
;
public
class
ArticleTrackQueryInfo
{
private
String
imagePath
;
private
String
nickName
;
private
String
trackInTime
;
private
Long
gender
;
public
String
getImagePath
()
{
return
imagePath
;
}
public
void
setImagePath
(
String
imagePath
)
{
this
.
imagePath
=
imagePath
;
}
public
String
getNickName
()
{
return
nickName
;
}
public
void
setNickName
(
String
nickName
)
{
this
.
nickName
=
nickName
;
}
public
String
getTrackInTime
()
{
return
trackInTime
;
}
public
void
setTrackInTime
(
String
trackInTime
)
{
this
.
trackInTime
=
trackInTime
;
}
public
Long
getGender
()
{
return
gender
;
}
public
void
setGender
(
Long
gender
)
{
this
.
gender
=
gender
;
}
}
yd-api/src/main/java/com/yd/dal/mapper/agms/AgmsPractitionerMapper.java
View file @
0b1e66d7
...
@@ -15,7 +15,11 @@ public interface AgmsPractitionerMapper {
...
@@ -15,7 +15,11 @@ public interface AgmsPractitionerMapper {
* @param isActive 是否启用
* @param isActive 是否启用
* @return
* @return
*/
*/
Page
<
PractitionerFileSharing
>
practitionerFileSharingList
(
@Param
(
"id"
)
Long
id
,
@Param
(
"shareCode"
)
String
shareCode
,
@Param
(
"mdDropOptionIds"
)
Long
[]
mdDropOptionIds
,
@Param
(
"isActive"
)
Integer
isActive
);
Page
<
PractitionerFileSharing
>
practitionerFileSharingList
(
@Param
(
"id"
)
Long
id
,
@Param
(
"practitionerId"
)
Long
practitionerId
,
@Param
(
"shareCode"
)
String
shareCode
,
@Param
(
"mdDropOptionIds"
)
Long
[]
mdDropOptionIds
,
@Param
(
"isActive"
)
Integer
isActive
);
SharePractitionerInfo
findSharePractitioner
(
String
shareCode
);
SharePractitionerInfo
findSharePractitioner
(
String
shareCode
);
}
}
yd-api/src/main/java/com/yd/dal/mapper/practitioner/PractitionerArticleMapper.java
0 → 100644
View file @
0b1e66d7
package
com
.
yd
.
dal
.
mapper
.
practitioner
;
import
com.yd.dal.entity.practitioner.article.ArticleTrackQueryInfo
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
PractitionerArticleMapper
{
List
<
ArticleTrackQueryInfo
>
articleTrackQuery
(
@Param
(
"practitionerId"
)
Long
practitionerId
,
@Param
(
"sharingId"
)
Long
sharingId
);
}
yd-api/src/main/java/com/yd/dal/service/agms/AgmsPractitionerDALService.java
View file @
0b1e66d7
...
@@ -16,7 +16,7 @@ public interface AgmsPractitionerDALService {
...
@@ -16,7 +16,7 @@ public interface AgmsPractitionerDALService {
* @param size 每页的数量
* @param size 每页的数量
* @return 查询结果
* @return 查询结果
*/
*/
PageInfo
<
PractitionerFileSharing
>
practitionerFileSharingList
(
Long
id
,
String
shareCode
,
Long
[]
mdDropOptionId
,
Integer
isActive
,
int
pageNum
,
int
size
);
PageInfo
<
PractitionerFileSharing
>
practitionerFileSharingList
(
Long
id
,
Long
practitionerId
,
String
shareCode
,
Long
[]
mdDropOptionId
,
Integer
isActive
,
int
pageNum
,
int
size
);
SharePractitionerInfo
findSharePractitioner
(
String
shareCode
);
SharePractitionerInfo
findSharePractitioner
(
String
shareCode
);
}
}
yd-api/src/main/java/com/yd/dal/service/agms/impl/AgmsPractitionerDALServiceImpl.java
View file @
0b1e66d7
...
@@ -20,11 +20,10 @@ public class AgmsPractitionerDALServiceImpl implements AgmsPractitionerDALServic
...
@@ -20,11 +20,10 @@ public class AgmsPractitionerDALServiceImpl implements AgmsPractitionerDALServic
@Autowired
@Autowired
private
AgmsPractitionerMapper
mapper
;
private
AgmsPractitionerMapper
mapper
;
@Override
@Override
public
PageInfo
<
PractitionerFileSharing
>
practitionerFileSharingList
(
Long
id
,
String
shareCode
,
Long
[]
mdDropOptionIds
,
Integer
isActive
,
int
pageNum
,
int
size
)
{
public
PageInfo
<
PractitionerFileSharing
>
practitionerFileSharingList
(
Long
id
,
Long
practitionerId
,
String
shareCode
,
Long
[]
mdDropOptionIds
,
Integer
isActive
,
int
pageNum
,
int
size
)
{
PageHelper
.
startPage
(
pageNum
,
size
);
PageHelper
.
startPage
(
pageNum
,
size
);
Page
<
PractitionerFileSharing
>
practitionerFileShares
=
mapper
.
practitionerFileSharingList
(
id
,
shareCode
,
mdDropOptionIds
,
isActive
);
Page
<
PractitionerFileSharing
>
practitionerFileShares
=
mapper
.
practitionerFileSharingList
(
id
,
practitionerId
,
shareCode
,
mdDropOptionIds
,
isActive
);
PageInfo
<
PractitionerFileSharing
>
pageInfo
=
new
PageInfo
<>(
practitionerFileShares
);
return
new
PageInfo
<>(
practitionerFileShares
);
return
pageInfo
;
}
}
@Override
@Override
...
...
yd-api/src/main/java/com/yd/dal/service/practitioner/PractitionerArticleDALService.java
0 → 100644
View file @
0b1e66d7
package
com
.
yd
.
dal
.
service
.
practitioner
;
import
com.yd.dal.entity.practitioner.article.ArticleTrackQueryInfo
;
import
java.util.List
;
public
interface
PractitionerArticleDALService
{
List
<
ArticleTrackQueryInfo
>
articleTrackQuery
(
Long
practitionerId
,
Long
sharingId
);
}
yd-api/src/main/java/com/yd/dal/service/practitioner/impl/PractitionerArticleDALServiceImpl.java
0 → 100644
View file @
0b1e66d7
package
com
.
yd
.
dal
.
service
.
practitioner
.
impl
;
import
com.yd.dal.entity.practitioner.article.ArticleTrackQueryInfo
;
import
com.yd.dal.mapper.practitioner.PractitionerArticleMapper
;
import
com.yd.dal.service.practitioner.PractitionerArticleDALService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Service
(
"practitionerArticleDALService"
)
public
class
PractitionerArticleDALServiceImpl
implements
PractitionerArticleDALService
{
@Resource
private
PractitionerArticleMapper
mapper
;
@Override
public
List
<
ArticleTrackQueryInfo
>
articleTrackQuery
(
Long
practitionerId
,
Long
sharingId
)
{
return
mapper
.
articleTrackQuery
(
practitionerId
,
sharingId
);
}
}
yd-api/src/main/resources/mapper/agms/AgmsPractitionerMapper.xml
View file @
0b1e66d7
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<mapper
namespace=
"com.yd.dal.mapper.agms.AgmsPractitionerMapper"
>
<mapper
namespace=
"com.yd.dal.mapper.agms.AgmsPractitionerMapper"
>
<select
id=
"practitionerFileSharingList"
resultType=
"com.yd.api.agms.vo.practitioner.PractitionerFileSharing"
>
<select
id=
"practitionerFileSharingList"
resultType=
"com.yd.api.agms.vo.practitioner.PractitionerFileSharing"
>
select
s.id id,
SELECT
s.id id,
s.md_drop_option_id mdDropOptionId,
s.md_drop_option_id mdDropOptionId,
s.file_content fileContent,
s.file_content fileContent,
s.is_active isActive,
s.is_active isActive,
...
@@ -16,12 +16,26 @@
...
@@ -16,12 +16,26 @@
s.title title,
s.title title,
s.digest digest,
s.digest digest,
s.author author,
s.author author,
s.cover_url coverUrl
s.cover_url coverUrl,
from ag_acl_practitioner_file_sharing s
count(ost.id) totalNum
left join ag_md_drop_options o on o.id = s.md_drop_option_id
<if
test=
"practitionerId != null"
>
left join ag_acl_user uc on uc.id = s.created_by
,(SELECT count(aost.id)
left join ag_acl_user uu on uu.id = s.created_by
FROM ag_acl_customer_object_share_track aost
LEFT JOIN ag_acl_customer_object_share os on os.item_id = s.id
WHERE aost.share_id IN (
SELECT aos.id
FROM ag_acl_customer_object_share aos
WHERE aos.item_id = s.id
AND aos.item_type = 1
AND aos.practitioner_id = #{practitionerId,jdbcType=BIGINT}
)) num
</if>
FROM ag_acl_practitioner_file_sharing s
LEFT JOIN ag_md_drop_options o on o.id = s.md_drop_option_id
LEFT JOIN ag_acl_user uc on uc.id = s.created_by
LEFT JOIN ag_acl_user uu on uu.id = s.created_by
LEFT JOIN ag_acl_customer_object_share os
LEFT JOIN ag_acl_customer_object_share_track ost ON ost.share_id = os.id
ON os.item_id = s.id
<where>
<where>
<if
test=
"mdDropOptionIds != null"
>
<if
test=
"mdDropOptionIds != null"
>
<foreach
collection=
"mdDropOptionIds"
item=
"mdDropOptionId"
index=
"index"
open=
"("
close=
")"
separator=
"or"
>
<foreach
collection=
"mdDropOptionIds"
item=
"mdDropOptionId"
index=
"index"
open=
"("
close=
")"
separator=
"or"
>
...
@@ -29,18 +43,18 @@
...
@@ -29,18 +43,18 @@
</foreach>
</foreach>
</if>
</if>
<if
test=
"id != null"
>
<if
test=
"id != null"
>
and
s.id = #{id,jdbcType=BIGINT}
AND
s.id = #{id,jdbcType=BIGINT}
</if>
</if>
<if
test=
"shareCode != null"
>
<if
test=
"shareCode != null"
>
and
os.item_type = 1
AND
os.item_type = 1
and
os.share_code = #{shareCode,jdbcType=VARCHAR}
AND
os.share_code = #{shareCode,jdbcType=VARCHAR}
</if>
</if>
<if
test=
"isActive != null"
>
<if
test=
"isActive != null"
>
and
s.is_active = #{isActive,jdbcType=INTEGER}
AND
s.is_active = #{isActive,jdbcType=INTEGER}
</if>
</if>
</where>
</where>
group by
s.id
GROUP BY
s.id
ORDER BY s.id
desc
ORDER BY s.id
DESC
</select>
</select>
<resultMap
id=
"BaseResultMap"
type=
"com.yd.api.agms.vo.practitioner.SharePractitionerInfo"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yd.api.agms.vo.practitioner.SharePractitionerInfo"
>
<result
column=
"customerId"
jdbcType=
"BIGINT"
property=
"customerId"
/>
<result
column=
"customerId"
jdbcType=
"BIGINT"
property=
"customerId"
/>
...
...
yd-api/src/main/resources/mapper/practitioner/PractitionerArticleMapper.xml
0 → 100644
View file @
0b1e66d7
<?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.yd.dal.mapper.practitioner.PractitionerArticleMapper"
>
<select
id=
"articleTrackQuery"
resultType=
"com.yd.dal.entity.practitioner.article.ArticleTrackQueryInfo"
>
SELECT ost.image_path imagePath,
ost.nickname nickName,
date_format(ost.track_in_time,'%Y-%m-%d %H:%i:%s') trackInTime,
ost.gender gender
FROM ag_acl_customer_object_share_track ost
WHERE share_id IN (SELECT os.id
FROM ag_acl_customer_object_share os
WHERE os.practitioner_id = #{practitionerId,jdbcType=BIGINT}
AND item_type = 1
AND item_id = #{sharingId,jdbcType=BIGINT})
</select>
</mapper>
\ 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