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
a0e598a9
Commit
a0e598a9
authored
Apr 22, 2021
by
yao.xiao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into dev_20210413_xxy_article
parents
724f695e
d4203913
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
1289 additions
and
3 deletions
+1289
-3
yd-api/src/main/java/com/yd/api/agms/AgmsController.java
+54
-2
yd-api/src/main/java/com/yd/api/agms/service/AgmsPractitionerService.java
+25
-0
yd-api/src/main/java/com/yd/api/agms/service/AgmsSharingService.java
+17
-0
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsPractitionerServiceImpl.java
+55
-0
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsSharingServiceImpl.java
+131
-0
yd-api/src/main/java/com/yd/api/agms/vo/practitioner/PractitionerFileSharing.java
+339
-0
yd-api/src/main/java/com/yd/api/agms/vo/practitioner/PractitionerFileSharingListRequestVO.java
+78
-0
yd-api/src/main/java/com/yd/api/agms/vo/practitioner/PractitionerFileSharingListResponseVO.java
+61
-0
yd-api/src/main/java/com/yd/api/agms/vo/practitioner/PractitionerFileSharingSaveRequestVO.java
+229
-0
yd-api/src/main/java/com/yd/api/agms/vo/practitioner/PractitionerFileSharingSaveResponseVO.java
+55
-0
yd-api/src/main/java/com/yd/api/agms/vo/sharing/ControllerResponseVO.java
+0
-0
yd-api/src/main/java/com/yd/dal/entity/customer/AclPractitionerFileSharing.java
+65
-0
yd-api/src/main/java/com/yd/dal/mapper/agms/AgmsPractitionerMapper.java
+18
-0
yd-api/src/main/java/com/yd/dal/mapper/customer/AclPractitionerFileSharingMapper.java
+26
-0
yd-api/src/main/java/com/yd/dal/service/agms/AgmsPractitionerDALService.java
+19
-0
yd-api/src/main/java/com/yd/dal/service/agms/impl/AgmsPractitionerDALServiceImpl.java
+27
-0
yd-api/src/main/java/com/yd/dal/service/customer/AclPractitionerFileSharingDALService.java
+15
-0
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclPractitionerFileSharingDALServiceImpl.java
+36
-0
yd-api/src/main/java/com/yd/rmi/ali/ossinterf/service/impl/AliOssInterfServiceImpl.java
+2
-1
yd-api/src/main/resources/mapper/agms/AgmsPractitionerMapper.xml
+37
-0
yd-api/src/main/resources/mapper/customer/AclPractitionerFileSharingMapper.xml
+0
-0
No files found.
yd-api/src/main/java/com/yd/api/agms/AgmsController.java
View file @
a0e598a9
...
...
@@ -5,13 +5,26 @@ import com.yd.api.agms.vo.dashboard.*;
import
com.yd.api.agms.vo.fortune.*
;
import
com.yd.api.agms.vo.hiring.*
;
import
com.yd.api.agms.vo.insurer.SealUploadResponseVO
;
import
com.alibaba.fastjson.JSON
;
import
com.yd.api.agms.service.*
;
import
com.yd.api.agms.service.AgmsDashboardService
;
import
com.yd.api.agms.service.AgmsFortuneService
;
import
com.yd.api.agms.service.AgmsHiringService
;
import
com.yd.api.agms.service.AgmsPractitionerService
;
import
com.yd.api.agms.vo.dashboard.*
;
import
com.yd.api.agms.vo.fortune.*
;
import
com.yd.api.agms.vo.hiring.*
;
import
com.yd.api.agms.vo.sharing.ControllerResponseVO
;
import
com.yd.api.agms.vo.practitioner.PractitionerFileSharingListRequestVO
;
import
com.yd.api.agms.vo.practitioner.PractitionerFileSharingListResponseVO
;
import
com.yd.api.agms.vo.practitioner.PractitionerFileSharingSaveRequestVO
;
import
com.yd.api.agms.vo.practitioner.PractitionerFileSharingSaveResponseVO
;
import
com.yd.api.agms.vo.statistics.FinancialStatisticsRequestVO
;
import
com.yd.api.agms.vo.statistics.FinancialStatisticsResponseVO
;
import
com.yd.api.agms.vo.statistics.LeadsStatisticsRequestVO
;
import
com.yd.api.agms.vo.statistics.LeadsStatisticsResponseVO
;
import
com.yd.api.practitioner.vo.hiring.HiringApproveRequestVO
;
import
com.yd.api.practitioner.vo.hiring.HiringApproveResponseVO
;
import
com.yd.api.result.JsonResult
;
import
com.yd.util.CommonUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -33,6 +46,10 @@ public class AgmsController {
private
AgmsHiringService
agmsHiringService
;
@Autowired
private
AgmsInsurerService
agmsInsurerService
;
@Autowired
private
AgmsSharingService
agmsSharingService
;
@Autowired
private
AgmsPractitionerService
agmsPractitionerService
;
/**
* AGMS -- 财务管理报表
...
...
@@ -305,4 +322,39 @@ public class AgmsController {
result
.
addResult
(
responseVO
);
return
result
;
}
@RequestMapping
(
value
=
"/controller"
)
public
Object
controller
(
@RequestParam
String
action
,
@RequestParam
(
required
=
false
)
String
callback
,
@RequestParam
(
value
=
"upfile"
,
required
=
false
)
MultipartFile
upfile
)
{
ControllerResponseVO
responseVO
=
agmsSharingService
.
controller
(
action
,
upfile
);
if
(!
CommonUtil
.
isNullOrBlank
(
callback
))
{
return
callback
+
"("
+
JSON
.
toJSONString
(
responseVO
)
+
")"
;
}
return
responseVO
;
}
/**
* AGMS -- 经纪人保存文章
* @param requestVO 请求数据
* @return 响应数据
*/
@RequestMapping
(
value
=
"/practitionerFileSharingSave"
)
public
Object
practitionerFileSharingSave
(
@RequestBody
PractitionerFileSharingSaveRequestVO
requestVO
)
{
JsonResult
result
=
new
JsonResult
();
PractitionerFileSharingSaveResponseVO
responseVO
=
agmsPractitionerService
.
practitionerFileSharingSave
(
requestVO
);
result
.
setData
(
responseVO
);
result
.
addResult
(
responseVO
);
return
result
;
}
/**
* AGMS -- 经纪人查询文章
* @param requestVO 请求数据
* @return 响应数据
*/
@RequestMapping
(
value
=
"/practitionerFileSharingList"
)
public
Object
practitionerFileSharingList
(
@RequestBody
PractitionerFileSharingListRequestVO
requestVO
)
{
JsonResult
result
=
new
JsonResult
();
PractitionerFileSharingListResponseVO
responseVO
=
agmsPractitionerService
.
practitionerFileSharingList
(
requestVO
);
result
.
setData
(
responseVO
);
result
.
addResult
(
responseVO
);
return
result
;
}
}
yd-api/src/main/java/com/yd/api/agms/service/AgmsPractitionerService.java
0 → 100644
View file @
a0e598a9
package
com
.
yd
.
api
.
agms
.
service
;
import
com.yd.api.agms.vo.practitioner.PractitionerFileSharingListRequestVO
;
import
com.yd.api.agms.vo.practitioner.PractitionerFileSharingListResponseVO
;
import
com.yd.api.agms.vo.practitioner.PractitionerFileSharingSaveRequestVO
;
import
com.yd.api.agms.vo.practitioner.PractitionerFileSharingSaveResponseVO
;
/**
* @author xxy
*/
public
interface
AgmsPractitionerService
{
/**
* AGMS -- 经纪人保存文章
* @param requestVO 请求数据
* @return 响应数据
*/
PractitionerFileSharingSaveResponseVO
practitionerFileSharingSave
(
PractitionerFileSharingSaveRequestVO
requestVO
);
/**
* AGMS -- 经纪人查询文章
* @param requestVO 请求数据
* @return 响应数据
*/
PractitionerFileSharingListResponseVO
practitionerFileSharingList
(
PractitionerFileSharingListRequestVO
requestVO
);
}
yd-api/src/main/java/com/yd/api/agms/service/AgmsSharingService.java
0 → 100644
View file @
a0e598a9
package
com
.
yd
.
api
.
agms
.
service
;
import
com.yd.api.agms.vo.sharing.ControllerResponseVO
;
import
org.springframework.web.multipart.MultipartFile
;
/**
* @author xxy
*/
public
interface
AgmsSharingService
{
/**
*
* @param action
* @param upfile
* @return
*/
ControllerResponseVO
controller
(
String
action
,
MultipartFile
upfile
);
}
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsPractitionerServiceImpl.java
0 → 100644
View file @
a0e598a9
package
com
.
yd
.
api
.
agms
.
service
.
impl
;
import
com.github.pagehelper.PageInfo
;
import
com.yd.api.agms.service.AgmsPractitionerService
;
import
com.yd.api.agms.vo.practitioner.*
;
import
com.yd.api.result.CommonResult
;
import
com.yd.dal.entity.customer.AclPractitionerFileSharing
;
import
com.yd.dal.service.agms.AgmsPractitionerDALService
;
import
com.yd.dal.service.customer.AclPractitionerFileSharingDALService
;
import
com.yd.util.CommonUtil
;
import
com.yd.util.config.ZHBErrorConfig
;
import
org.apache.commons.beanutils.ConvertUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* @author xxy
*/
@Service
(
"agmsPractitionerService"
)
public
class
AgmsPractitionerServiceImpl
implements
AgmsPractitionerService
{
@Autowired
private
AclPractitionerFileSharingDALService
aclPractitionerFileSharingDalService
;
@Autowired
private
AgmsPractitionerDALService
agmsPractitionerDALService
;
@Override
public
PractitionerFileSharingSaveResponseVO
practitionerFileSharingSave
(
PractitionerFileSharingSaveRequestVO
requestVO
)
{
PractitionerFileSharingSaveResponseVO
responseVO
=
new
PractitionerFileSharingSaveResponseVO
();
AclPractitionerFileSharing
fileSharing
=
new
AclPractitionerFileSharing
();
BeanUtils
.
copyProperties
(
requestVO
,
fileSharing
);
fileSharing
.
setUpdatedBy
(
requestVO
.
getLoginId
());
Long
id
=
aclPractitionerFileSharingDalService
.
saveOrUpdate
(
fileSharing
);
responseVO
.
setId
(
id
);
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
return
responseVO
;
}
@Override
public
PractitionerFileSharingListResponseVO
practitionerFileSharingList
(
PractitionerFileSharingListRequestVO
requestVO
)
{
PractitionerFileSharingListResponseVO
responseVO
=
new
PractitionerFileSharingListResponseVO
();
Long
[]
mdDropOptionIds
=
null
;
if
(!
CommonUtil
.
isNullOrBlank
(
requestVO
.
getMdDropOptionId
())){
mdDropOptionIds
=(
Long
[])
ConvertUtils
.
convert
(
requestVO
.
getMdDropOptionId
().
split
(
","
),
Long
.
class
);
}
PageInfo
<
PractitionerFileSharing
>
practitionerFileShares
=
agmsPractitionerDALService
.
practitionerFileSharingList
(
mdDropOptionIds
,
requestVO
.
getIsActive
(),
requestVO
.
getPractitionerFileShares
().
getPageNum
(),
requestVO
.
getPractitionerFileShares
().
getPageSize
());
responseVO
.
setPractitionerFileShares
(
practitionerFileShares
);
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
return
responseVO
;
}
}
yd-api/src/main/java/com/yd/api/agms/service/impl/AgmsSharingServiceImpl.java
0 → 100644
View file @
a0e598a9
package
com
.
yd
.
api
.
agms
.
service
.
impl
;
import
com.google.common.collect.Lists
;
import
com.itextpdf.tool.xml.html.head.Title
;
import
com.yd.api.agms.service.AgmsSharingService
;
import
com.yd.api.agms.vo.sharing.ControllerResponseVO
;
import
com.yd.rmi.ali.oss.service.OssService
;
import
com.yd.rmi.ali.oss.vo.OssOperateTypeEnum
;
import
com.yd.rmi.ali.oss.vo.OssRequestVO
;
import
com.yd.rmi.ali.oss.vo.OssResponseVO
;
import
com.yd.rmi.ali.ossinterf.service.AliOssInterfService
;
import
com.yd.rmi.cache.SystemConfigService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.ByteArrayInputStream
;
import
java.io.InputStream
;
import
java.text.SimpleDateFormat
;
import
java.util.Arrays
;
import
java.util.Date
;
/**
* @author xxy
*/
@Service
(
"agmsSharingService"
)
public
class
AgmsSharingServiceImpl
implements
AgmsSharingService
{
@Autowired
private
SystemConfigService
systemConfigService
;
@Autowired
private
OssService
ossService
;
@Override
public
ControllerResponseVO
controller
(
String
action
,
MultipartFile
upfile
)
{
ControllerResponseVO
responseVO
=
new
ControllerResponseVO
();
String
[]
imageAllowFiles
=
new
String
[]{
".png"
,
".jpg"
,
".jpeg"
,
".gif"
,
".bmp"
};
String
[]
videoAllowFiles
=
new
String
[]{
".flv"
,
".swf"
,
".mkv"
,
".avi"
,
".rm"
,
".rmvb"
,
".mpeg"
,
".mpg"
,
".ogg"
,
".ogv"
,
".mov"
,
".wmv"
,
".mp4"
,
".webm"
,
".mp3"
,
".wav"
,
".mid"
};
String
[]
fileAllowFiles
=
new
String
[]{
".png"
,
".jpg"
,
".jpeg"
,
".gif"
,
".bmp"
,
".flv"
,
".swf"
,
".mkv"
,
".avi"
,
".rm"
,
".rmvb"
,
".mpeg"
,
".mpg"
,
".ogg"
,
".ogv"
,
".mov"
,
".wmv"
,
".mp4"
,
".webm"
,
".mp3"
,
".wav"
,
".mid"
,
".rar"
,
".zip"
,
".tar"
,
".gz"
,
".7z"
,
".bz2"
,
".cab"
,
".iso"
,
".doc"
,
".docx"
,
".xls"
,
".xlsx"
,
".ppt"
,
".pptx"
,
".pdf"
,
".txt"
,
".md"
,
".xml"
};
if
(
"config"
.
equals
(
action
))
{
String
aliOssBucketName
=
" "
;
responseVO
.
setImageActionName
(
"uploadimage"
);
responseVO
.
setImageFieldName
(
"upfile"
);
responseVO
.
setImageMaxSize
(
2048000
);
responseVO
.
setImageAllowFiles
(
Arrays
.
asList
(
imageAllowFiles
.
clone
()));
responseVO
.
setImageCompressEnable
(
true
);
responseVO
.
setImageCompressBorder
(
1600
);
responseVO
.
setImageInsertAlign
(
"none"
);
responseVO
.
setImageUrlPrefix
(
aliOssBucketName
);
responseVO
.
setImagePathFormat
(
"/image/{time}{rand:6}"
);
responseVO
.
setScrawlActionName
(
"uploadscrawl"
);
responseVO
.
setScrawlFieldName
(
"upfile"
);
responseVO
.
setScrawlPathFormat
(
"/image/{time}{rand:6}"
);
responseVO
.
setScrawlMaxSize
(
2048000
);
responseVO
.
setScrawlUrlPrefix
(
aliOssBucketName
);
responseVO
.
setScrawlInsertAlign
(
"none"
);
responseVO
.
setSnapscreenActionName
(
"uploadimage"
);
responseVO
.
setSnapscreenPathFormat
(
"/image/{time}{rand:6}"
);
responseVO
.
setSnapscreenUrlPrefix
(
aliOssBucketName
);
responseVO
.
setSnapscreenInsertAlign
(
"none"
);
String
[]
catcherLocalDomain
=
new
String
[]{
"127.0.0.1"
,
"localhost"
,
"img.baidu.com"
};
responseVO
.
setCatcherLocalDomain
(
Arrays
.
asList
(
catcherLocalDomain
));
responseVO
.
setCatcherActionName
(
"catchimage"
);
responseVO
.
setCatcherFieldName
(
"source"
);
responseVO
.
setCatcherPathFormat
(
"/image/{time}{rand:6}"
);
responseVO
.
setCatcherUrlPrefix
(
aliOssBucketName
);
responseVO
.
setCatcherMaxSize
(
2048000
);
responseVO
.
setCatcherAllowFiles
(
Arrays
.
asList
(
imageAllowFiles
));
responseVO
.
setVideoActionName
(
"uploadvideo"
);
responseVO
.
setVideoFieldName
(
"upfile"
);
responseVO
.
setVideoPathFormat
(
"/video/{time}{rand:6}"
);
responseVO
.
setVideoUrlPrefix
(
aliOssBucketName
);
responseVO
.
setVideoMaxSize
(
102400000
);
responseVO
.
setVideoAllowFiles
(
Arrays
.
asList
(
videoAllowFiles
));
responseVO
.
setFileActionName
(
"uploadfile"
);
responseVO
.
setFileFieldName
(
"upfile"
);
responseVO
.
setFilePathFormat
(
"/file/{time}{rand:6}"
);
responseVO
.
setFileUrlPrefix
(
aliOssBucketName
);
responseVO
.
setFileMaxSize
(
51200000
);
responseVO
.
setFileAllowFiles
(
Arrays
.
asList
(
fileAllowFiles
));
responseVO
.
setImageManagerActionName
(
"listimage"
);
responseVO
.
setImageManagerListPath
(
"/image/"
);
responseVO
.
setImageManagerListSize
(
20
);
responseVO
.
setImageManagerUrlPrefix
(
aliOssBucketName
);
responseVO
.
setImageManagerInsertAlign
(
"none"
);
String
[]
imageManagerAllowFiles
=
new
String
[]{
".png"
,
".jpg"
,
".jpeg"
,
".gif"
,
".bmp"
};
responseVO
.
setImageManagerAllowFiles
(
Arrays
.
asList
(
imageManagerAllowFiles
));
responseVO
.
setFileManagerActionName
(
"listfile"
);
responseVO
.
setFileManagerListPath
(
"/file/"
);
responseVO
.
setFileManagerUrlPrefix
(
aliOssBucketName
);
responseVO
.
setFileManagerListSize
(
20
);
responseVO
.
setFileManagerAllowFiles
(
Arrays
.
asList
(
fileAllowFiles
));
}
else
if
(
"uploadimage"
.
equals
(
action
)){
try
{
String
type
=
upfile
.
getOriginalFilename
().
substring
(
upfile
.
getOriginalFilename
().
indexOf
(
"."
)
);
byte
[]
bytes
=
upfile
.
getBytes
();
InputStream
in
=
new
ByteArrayInputStream
(
bytes
);
StringBuilder
key
=
new
StringBuilder
(
"sharing/"
);
String
title
;
Date
date
=
new
Date
();
SimpleDateFormat
sd
=
new
SimpleDateFormat
(
"yyyyMMddHHmmssSSS"
);
String
nowTime
=
sd
.
format
(
date
);
if
(
Arrays
.
asList
(
imageAllowFiles
).
contains
(
type
)){
title
=
nowTime
+
(
int
)(
Math
.
random
()*
1000000
);
key
.
append
(
"image/"
).
append
(
title
);
}
else
if
(
Arrays
.
asList
(
videoAllowFiles
).
contains
(
type
)){
title
=
nowTime
+
(
int
)(
Math
.
random
()*
1000000
);
key
.
append
(
"video/"
).
append
(
title
);
}
else
{
title
=
nowTime
+
(
int
)(
Math
.
random
()*
1000000
);
key
.
append
(
"file/"
).
append
(
title
);
}
String
putFileToOss
=
ossService
.
putFileToOss
(
null
,
key
.
toString
()
+
type
,
in
);
responseVO
.
setState
(
"SUCCESS"
);
responseVO
.
setUrl
(
putFileToOss
);
responseVO
.
setTitle
(
title
);
responseVO
.
setOriginal
(
upfile
.
getOriginalFilename
());
responseVO
.
setType
(
type
);
responseVO
.
setSize
(
upfile
.
getSize
());
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
}
return
responseVO
;
}
}
yd-api/src/main/java/com/yd/api/agms/vo/practitioner/PractitionerFileSharing.java
0 → 100644
View file @
a0e598a9
package
com
.
yd
.
api
.
agms
.
vo
.
practitioner
;
import
java.util.Date
;
/**
* @author xxy
*/
public
class
PractitionerFileSharing
{
/**
* serial id
*/
private
Long
id
;
/**
* FK ag_md_drop_options_id文章分类
*/
private
String
mdDropOptionId
;
/**
* 文章内容html
*/
private
String
fileContent
;
/**
* 0=No, 1=Yes
*/
private
Integer
isActive
;
/**
* 建置时间
*/
private
String
createdAt
;
private
Long
createdBy
;
private
String
createdName
;
/**
* 更改时间
*/
private
String
updatedAt
;
private
Long
updatedBy
;
private
String
updatedName
;
/**
* 标题
*/
private
String
title
;
/**
* 摘要
*/
private
String
digest
;
/**
* 作者
*/
private
String
author
;
/**
* 封面地址
*/
private
String
coverUrl
;
/**
* 获取 serial id
*
* @return the id serial id
*/
public
Long
getId
()
{
return
this
.
id
;
}
/**
* 设置 serial id
*
* @param id the serial id to set
*/
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
/**
* 获取 FK ag_md_drop_options_id文章分类
*
* @return the mdDropOptionId FK ag_md_drop_options_id文章分类
*/
public
String
getMdDropOptionId
()
{
return
this
.
mdDropOptionId
;
}
/**
* 设置 FK ag_md_drop_options_id文章分类
*
* @param mdDropOptionId the FK ag_md_drop_options_id文章分类 to set
*/
public
void
setMdDropOptionId
(
String
mdDropOptionId
)
{
this
.
mdDropOptionId
=
mdDropOptionId
;
}
/**
* 获取 文章内容html
*
* @return the fileContent 文章内容html
*/
public
String
getFileContent
()
{
return
this
.
fileContent
;
}
/**
* 设置 文章内容html
*
* @param fileContent the 文章内容html to set
*/
public
void
setFileContent
(
String
fileContent
)
{
this
.
fileContent
=
fileContent
;
}
/**
* 获取 0=No 1=Yes
*
* @return the isActive 0=No 1=Yes
*/
public
Integer
getIsActive
()
{
return
this
.
isActive
;
}
/**
* 设置 0=No 1=Yes
*
* @param isActive the 0=No 1=Yes to set
*/
public
void
setIsActive
(
Integer
isActive
)
{
this
.
isActive
=
isActive
;
}
/**
* 获取 建置时间
*
* @return the createdAt 建置时间
*/
public
String
getCreatedAt
()
{
return
this
.
createdAt
;
}
/**
* 设置 建置时间
*
* @param createdAt the 建置时间 to set
*/
public
void
setCreatedAt
(
String
createdAt
)
{
this
.
createdAt
=
createdAt
;
}
/**
* 获取
*
* @return the createdBy
*/
public
Long
getCreatedBy
()
{
return
this
.
createdBy
;
}
/**
* 设置
*
* @param createdBy the to set
*/
public
void
setCreatedBy
(
Long
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
/**
* 获取
*
* @return the createdName
*/
public
String
getCreatedName
()
{
return
this
.
createdName
;
}
/**
* 设置
*
* @param createdName the to set
*/
public
void
setCreatedName
(
String
createdName
)
{
this
.
createdName
=
createdName
;
}
/**
* 获取 更改时间
*
* @return the updatedAt 更改时间
*/
public
String
getUpdatedAt
()
{
return
this
.
updatedAt
;
}
/**
* 设置 更改时间
*
* @param updatedAt the 更改时间 to set
*/
public
void
setUpdatedAt
(
String
updatedAt
)
{
this
.
updatedAt
=
updatedAt
;
}
/**
* 获取
*
* @return the updatedBy
*/
public
Long
getUpdatedBy
()
{
return
this
.
updatedBy
;
}
/**
* 设置
*
* @param updatedBy the to set
*/
public
void
setUpdatedBy
(
Long
updatedBy
)
{
this
.
updatedBy
=
updatedBy
;
}
/**
* 获取
*
* @return the updatedName
*/
public
String
getUpdatedName
()
{
return
this
.
updatedName
;
}
/**
* 设置
*
* @param updatedName the to set
*/
public
void
setUpdatedName
(
String
updatedName
)
{
this
.
updatedName
=
updatedName
;
}
/**
* 获取 标题
*
* @return the title 标题
*/
public
String
getTitle
()
{
return
this
.
title
;
}
/**
* 设置 标题
*
* @param title the 标题 to set
*/
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
/**
* 获取 摘要
*
* @return the digest 摘要
*/
public
String
getDigest
()
{
return
this
.
digest
;
}
/**
* 设置 摘要
*
* @param digest the 摘要 to set
*/
public
void
setDigest
(
String
digest
)
{
this
.
digest
=
digest
;
}
/**
* 获取 作者
*
* @return the author 作者
*/
public
String
getAuthor
()
{
return
this
.
author
;
}
/**
* 设置 作者
*
* @param author the 作者 to set
*/
public
void
setAuthor
(
String
author
)
{
this
.
author
=
author
;
}
/**
* 获取 封面地址
*
* @return the coverUrl 封面地址
*/
public
String
getCoverUrl
()
{
return
this
.
coverUrl
;
}
/**
* 设置 封面地址
*
* @param coverUrl the 封面地址 to set
*/
public
void
setCoverUrl
(
String
coverUrl
)
{
this
.
coverUrl
=
coverUrl
;
}
@Override
public
String
toString
()
{
return
"PractitionerFileSharing{"
+
"id="
+
id
+
", mdDropOptionId="
+
mdDropOptionId
+
", fileContent='"
+
fileContent
+
'\''
+
", isActive="
+
isActive
+
", createdAt='"
+
createdAt
+
'\''
+
", createdBy="
+
createdBy
+
", createdName='"
+
createdName
+
'\''
+
", updatedAt='"
+
updatedAt
+
'\''
+
", updatedBy="
+
updatedBy
+
", updatedName='"
+
updatedName
+
'\''
+
", title='"
+
title
+
'\''
+
", digest='"
+
digest
+
'\''
+
", author='"
+
author
+
'\''
+
", coverUrl='"
+
coverUrl
+
'\''
+
'}'
;
}
}
yd-api/src/main/java/com/yd/api/agms/vo/practitioner/PractitionerFileSharingListRequestVO.java
0 → 100644
View file @
a0e598a9
package
com
.
yd
.
api
.
agms
.
vo
.
practitioner
;
import
com.github.pagehelper.PageInfo
;
/**
* @author xxy
*/
public
class
PractitionerFileSharingListRequestVO
{
private
String
mdDropOptionId
;
private
Integer
isActive
;
private
PageInfo
<
PractitionerFileSharing
>
practitionerFileShares
;
/**
* 获取
*
* @return the mdDropOptionId
*/
public
String
getMdDropOptionId
()
{
return
this
.
mdDropOptionId
;
}
/**
* 设置
*
* @param mdDropOptionId the to set
*/
public
void
setMdDropOptionId
(
String
mdDropOptionId
)
{
this
.
mdDropOptionId
=
mdDropOptionId
;
}
/**
* 获取
*
* @return the isActive
*/
public
Integer
getIsActive
()
{
return
this
.
isActive
;
}
/**
* 设置
*
* @param isActive the to set
*/
public
void
setIsActive
(
Integer
isActive
)
{
this
.
isActive
=
isActive
;
}
/**
* 获取
*
* @return the practitionerFileShares
*/
public
PageInfo
<
PractitionerFileSharing
>
getPractitionerFileShares
()
{
return
this
.
practitionerFileShares
;
}
/**
* 设置
*
* @param practitionerFileShares the to set
*/
public
void
setPractitionerFileShares
(
PageInfo
<
PractitionerFileSharing
>
practitionerFileShares
)
{
this
.
practitionerFileShares
=
practitionerFileShares
;
}
@Override
public
String
toString
()
{
return
"PractitionerFileSharingListRequestVO{"
+
"mdDropOptionId="
+
mdDropOptionId
+
", isActive="
+
isActive
+
", practitionerFileShares="
+
practitionerFileShares
+
'}'
;
}
}
yd-api/src/main/java/com/yd/api/agms/vo/practitioner/PractitionerFileSharingListResponseVO.java
0 → 100644
View file @
a0e598a9
package
com
.
yd
.
api
.
agms
.
vo
.
practitioner
;
import
com.github.pagehelper.PageInfo
;
import
com.yd.api.result.CommonResult
;
import
java.util.List
;
/**
* @author xxy
*/
public
class
PractitionerFileSharingListResponseVO
{
private
PageInfo
<
PractitionerFileSharing
>
practitionerFileShares
;
private
CommonResult
commonResult
;
/**
* 获取
*
* @return the practitionerFileSharings
*/
public
PageInfo
<
PractitionerFileSharing
>
getPractitionerFileShares
()
{
return
this
.
practitionerFileShares
;
}
/**
* 设置
*
* @param practitionerFileShares the to set
*/
public
void
setPractitionerFileShares
(
PageInfo
<
PractitionerFileSharing
>
practitionerFileShares
)
{
this
.
practitionerFileShares
=
practitionerFileShares
;
}
/**
* 获取
*
* @return the commonResult
*/
public
CommonResult
getCommonResult
()
{
return
this
.
commonResult
;
}
/**
* 设置
*
* @param commonResult the to set
*/
public
void
setCommonResult
(
CommonResult
commonResult
)
{
this
.
commonResult
=
commonResult
;
}
@Override
public
String
toString
()
{
return
"PractitionerFileSharingListResponseVO{"
+
"practitionerFileShares="
+
practitionerFileShares
+
", commonResult="
+
commonResult
+
'}'
;
}
}
yd-api/src/main/java/com/yd/api/agms/vo/practitioner/PractitionerFileSharingSaveRequestVO.java
0 → 100644
View file @
a0e598a9
package
com
.
yd
.
api
.
agms
.
vo
.
practitioner
;
import
java.util.Date
;
/**
* @author xxy
*/
public
class
PractitionerFileSharingSaveRequestVO
{
/**
* serial id
*/
private
Long
id
;
/**
* FK ag_md_drop_options_id文章分类
*/
private
String
mdDropOptionId
;
/**
* 文章内容html
*/
private
String
fileContent
;
/**
* 0=No, 1=Yes
*/
private
Integer
isActive
;
private
Long
loginId
;
/**
* 标题
*/
private
String
title
;
/**
* 摘要
*/
private
String
digest
;
/**
* 作者
*/
private
String
author
;
/**
* 封面地址
*/
private
String
coverUrl
;
/**
* 获取 serial id
*
* @return the id serial id
*/
public
Long
getId
()
{
return
this
.
id
;
}
/**
* 设置 serial id
*
* @param id the serial id to set
*/
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
/**
* 获取 FK ag_md_drop_options_id文章分类
*
* @return the mdDropOptionId FK ag_md_drop_options_id文章分类
*/
public
String
getMdDropOptionId
()
{
return
this
.
mdDropOptionId
;
}
/**
* 设置 FK ag_md_drop_options_id文章分类
*
* @param mdDropOptionId the FK ag_md_drop_options_id文章分类 to set
*/
public
void
setMdDropOptionId
(
String
mdDropOptionId
)
{
this
.
mdDropOptionId
=
mdDropOptionId
;
}
/**
* 获取 文章内容html
*
* @return the fileContent 文章内容html
*/
public
String
getFileContent
()
{
return
this
.
fileContent
;
}
/**
* 设置 文章内容html
*
* @param fileContent the 文章内容html to set
*/
public
void
setFileContent
(
String
fileContent
)
{
this
.
fileContent
=
fileContent
;
}
/**
* 获取 0=No 1=Yes
*
* @return the isActive 0=No 1=Yes
*/
public
Integer
getIsActive
()
{
return
this
.
isActive
;
}
/**
* 设置 0=No 1=Yes
*
* @param isActive the 0=No 1=Yes to set
*/
public
void
setIsActive
(
Integer
isActive
)
{
this
.
isActive
=
isActive
;
}
/**
* 获取
*
* @return the loginId
*/
public
Long
getLoginId
()
{
return
this
.
loginId
;
}
/**
* 设置
*
* @param loginId the to set
*/
public
void
setLoginId
(
Long
loginId
)
{
this
.
loginId
=
loginId
;
}
/**
* 获取 标题
*
* @return the title 标题
*/
public
String
getTitle
()
{
return
this
.
title
;
}
/**
* 设置 标题
*
* @param title the 标题 to set
*/
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
/**
* 获取 摘要
*
* @return the digest 摘要
*/
public
String
getDigest
()
{
return
this
.
digest
;
}
/**
* 设置 摘要
*
* @param digest the 摘要 to set
*/
public
void
setDigest
(
String
digest
)
{
this
.
digest
=
digest
;
}
/**
* 获取 作者
*
* @return the author 作者
*/
public
String
getAuthor
()
{
return
this
.
author
;
}
/**
* 设置 作者
*
* @param author the 作者 to set
*/
public
void
setAuthor
(
String
author
)
{
this
.
author
=
author
;
}
/**
* 获取 封面地址
*
* @return the coverUrl 封面地址
*/
public
String
getCoverUrl
()
{
return
this
.
coverUrl
;
}
/**
* 设置 封面地址
*
* @param coverUrl the 封面地址 to set
*/
public
void
setCoverUrl
(
String
coverUrl
)
{
this
.
coverUrl
=
coverUrl
;
}
@Override
public
String
toString
()
{
return
"PractitionerFileSharingSaveRequestVO{"
+
"id="
+
id
+
", mdDropOptionId="
+
mdDropOptionId
+
", fileContent='"
+
fileContent
+
'\''
+
", isActive="
+
isActive
+
", loginId="
+
loginId
+
", title='"
+
title
+
'\''
+
", digest='"
+
digest
+
'\''
+
", author='"
+
author
+
'\''
+
", coverUrl='"
+
coverUrl
+
'\''
+
'}'
;
}
}
yd-api/src/main/java/com/yd/api/agms/vo/practitioner/PractitionerFileSharingSaveResponseVO.java
0 → 100644
View file @
a0e598a9
package
com
.
yd
.
api
.
agms
.
vo
.
practitioner
;
import
com.yd.api.result.CommonResult
;
/**
* @author xxy
*/
public
class
PractitionerFileSharingSaveResponseVO
{
private
Long
id
;
private
CommonResult
commonResult
;
/**
* 获取
*
* @return the id
*/
public
Long
getId
()
{
return
this
.
id
;
}
/**
* 设置
*
* @param id the to set
*/
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
/**
* 获取
*
* @return the commonResult
*/
public
CommonResult
getCommonResult
()
{
return
this
.
commonResult
;
}
/**
* 设置
*
* @param commonResult the to set
*/
public
void
setCommonResult
(
CommonResult
commonResult
)
{
this
.
commonResult
=
commonResult
;
}
@Override
public
String
toString
()
{
return
"PractitionerFileSharingSaveResponseVO{"
+
"id="
+
id
+
", commonResult="
+
commonResult
+
'}'
;
}
}
yd-api/src/main/java/com/yd/api/agms/vo/sharing/ControllerResponseVO.java
0 → 100644
View file @
a0e598a9
This diff is collapsed.
Click to expand it.
yd-api/src/main/java/com/yd/dal/entity/customer/AclPractitionerFileSharing.java
0 → 100644
View file @
a0e598a9
package
com
.
yd
.
dal
.
entity
.
customer
;
import
java.util.Date
;
import
lombok.Data
;
/**
* 经纪人分享文章表
*/
@Data
public
class
AclPractitionerFileSharing
{
/**
* serial id
*/
private
Long
id
;
/**
* FK ag_md_drop_options_id文章分类
*/
private
String
mdDropOptionId
;
/**
* 文章内容html
*/
private
String
fileContent
;
/**
* 0=No, 1=Yes
*/
private
Integer
isActive
;
/**
* 建置时间
*/
private
Date
createdAt
;
private
Long
createdBy
;
/**
* 更改时间
*/
private
Date
updatedAt
;
private
Long
updatedBy
;
/**
* 标题
*/
private
String
title
;
/**
* 摘要
*/
private
String
digest
;
/**
* 作者
*/
private
String
author
;
/**
* 封面地址
*/
private
String
coverUrl
;
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/agms/AgmsPractitionerMapper.java
0 → 100644
View file @
a0e598a9
package
com
.
yd
.
dal
.
mapper
.
agms
;
import
com.github.pagehelper.Page
;
import
com.yd.api.agms.vo.practitioner.PractitionerFileSharing
;
import
org.apache.ibatis.annotations.Param
;
/**
* @author xxy
*/
public
interface
AgmsPractitionerMapper
{
/**
*
* @param mdDropOptionIds 文章类型
* @param isActive 是否启用
* @return
*/
Page
<
PractitionerFileSharing
>
practitionerFileSharingList
(
@Param
(
"mdDropOptionIds"
)
Long
[]
mdDropOptionIds
,
@Param
(
"isActive"
)
Integer
isActive
);
}
yd-api/src/main/java/com/yd/dal/mapper/customer/AclPractitionerFileSharingMapper.java
0 → 100644
View file @
a0e598a9
package
com
.
yd
.
dal
.
mapper
.
customer
;
import
com.yd.dal.entity.customer.AclPractitionerFileSharing
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
AclPractitionerFileSharingMapper
{
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
AclPractitionerFileSharing
record
);
int
insertSelective
(
AclPractitionerFileSharing
record
);
AclPractitionerFileSharing
selectByPrimaryKey
(
Long
id
);
int
updateByPrimaryKeySelective
(
AclPractitionerFileSharing
record
);
int
updateByPrimaryKey
(
AclPractitionerFileSharing
record
);
int
updateBatch
(
List
<
AclPractitionerFileSharing
>
list
);
int
updateBatchSelective
(
List
<
AclPractitionerFileSharing
>
list
);
int
batchInsert
(
@Param
(
"list"
)
List
<
AclPractitionerFileSharing
>
list
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/service/agms/AgmsPractitionerDALService.java
0 → 100644
View file @
a0e598a9
package
com
.
yd
.
dal
.
service
.
agms
;
import
com.github.pagehelper.PageInfo
;
import
com.yd.api.agms.vo.practitioner.PractitionerFileSharing
;
/**
* @author xxy
*/
public
interface
AgmsPractitionerDALService
{
/**
*
* @param mdDropOptionId 文章类型id
* @param pageNum 当前页
* @param size 每页的数量
* @return 查询结果
*/
PageInfo
<
PractitionerFileSharing
>
practitionerFileSharingList
(
Long
[]
mdDropOptionId
,
Integer
isActive
,
int
pageNum
,
int
size
);
}
yd-api/src/main/java/com/yd/dal/service/agms/impl/AgmsPractitionerDALServiceImpl.java
0 → 100644
View file @
a0e598a9
package
com
.
yd
.
dal
.
service
.
agms
.
impl
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.yd.api.agms.vo.practitioner.PractitionerFileSharing
;
import
com.yd.dal.mapper.agms.AgmsPractitionerMapper
;
import
com.yd.dal.service.agms.AgmsPractitionerDALService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* @author xxy
*/
@Service
(
"agmsPractitionerDALService"
)
public
class
AgmsPractitionerDALServiceImpl
implements
AgmsPractitionerDALService
{
@Autowired
private
AgmsPractitionerMapper
mapper
;
@Override
public
PageInfo
<
PractitionerFileSharing
>
practitionerFileSharingList
(
Long
[]
mdDropOptionIds
,
Integer
isActive
,
int
pageNum
,
int
size
)
{
PageHelper
.
startPage
(
pageNum
,
size
);
Page
<
PractitionerFileSharing
>
practitionerFileShares
=
mapper
.
practitionerFileSharingList
(
mdDropOptionIds
,
isActive
);
PageInfo
<
PractitionerFileSharing
>
pageInfo
=
new
PageInfo
<>(
practitionerFileShares
);
return
pageInfo
;
}
}
yd-api/src/main/java/com/yd/dal/service/customer/AclPractitionerFileSharingDALService.java
0 → 100644
View file @
a0e598a9
package
com
.
yd
.
dal
.
service
.
customer
;
import
com.yd.dal.entity.customer.AclPractitionerFileSharing
;
/**
* @author xxy
*/
public
interface
AclPractitionerFileSharingDALService
{
/**
* 修改或保存
* @param fileSharing 修改保存的数据
* @return id
*/
Long
saveOrUpdate
(
AclPractitionerFileSharing
fileSharing
);
}
yd-api/src/main/java/com/yd/dal/service/customer/impl/AclPractitionerFileSharingDALServiceImpl.java
0 → 100644
View file @
a0e598a9
package
com
.
yd
.
dal
.
service
.
customer
.
impl
;
import
com.yd.dal.entity.customer.AclPractitionerFileSharing
;
import
com.yd.dal.mapper.customer.AclPractitionerFileSharingMapper
;
import
com.yd.dal.service.customer.AclPractitionerFileSharingDALService
;
import
com.yd.util.CommonUtil
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.Date
;
/**
* @author xxy
*/
@Service
(
"aclPractitionerFileSharingDALService"
)
public
class
AclPractitionerFileSharingDALServiceImpl
implements
AclPractitionerFileSharingDALService
{
@Resource
private
AclPractitionerFileSharingMapper
mapper
;
@Override
public
Long
saveOrUpdate
(
AclPractitionerFileSharing
fileSharing
)
{
if
(
CommonUtil
.
isNullOrZero
(
fileSharing
.
getId
())){
//没有id做保存
fileSharing
.
setCreatedAt
(
new
Date
());
fileSharing
.
setUpdatedAt
(
new
Date
());
fileSharing
.
setCreatedBy
(
fileSharing
.
getUpdatedBy
());
mapper
.
insert
(
fileSharing
);
}
else
{
//有id,做更新
fileSharing
.
setUpdatedAt
(
new
Date
());
mapper
.
updateByPrimaryKeySelective
(
fileSharing
);
}
return
fileSharing
.
getId
();
}
}
yd-api/src/main/java/com/yd/rmi/ali/ossinterf/service/impl/AliOssInterfServiceImpl.java
View file @
a0e598a9
...
...
@@ -273,7 +273,8 @@ public class AliOssInterfServiceImpl implements AliOssInterfService {
* @param key 对象名
* @return
*/
public
String
generateUrl
(
String
bucketName
,
String
key
){
@Override
public
String
generateUrl
(
String
bucketName
,
String
key
){
OSSClient
ossClient
=
new
OSSClient
(
endpoint
,
accessKeyId
,
accessKeySecret
);
String
url
=
null
;
try
{
...
...
yd-api/src/main/resources/mapper/agms/AgmsPractitionerMapper.xml
0 → 100644
View file @
a0e598a9
<?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.agms.AgmsPractitionerMapper"
>
<select
id=
"practitionerFileSharingList"
resultType=
"com.yd.api.agms.vo.practitioner.PractitionerFileSharing"
>
select s.id id,
s.md_drop_option_id mdDropOptionId,
s.file_content fileContent,
s.is_active isActive,
s.created_at createdAt,
s.created_by createdBy,
uc.name createdName,
s.updated_at updatedAt,
s.updated_by updatedBy,
uu.name updatedName,
s.title title,
s.digest digest,
s.author author,
s.cover_url coverUrl
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
<where>
<if
test=
"mdDropOptionIds != null"
>
<foreach
collection=
"mdDropOptionIds"
item=
"mdDropOptionId"
index=
"index"
separator=
"or"
>
find_in_set (#{mdDropOptionId,jdbcType=BIGINT},s.md_drop_option_id)
</foreach>
</if>
<if
test=
"isActive != null"
>
and s.is_active = #{isActive,jdbcType=INTEGER}
</if>
</where>
ORDER BY s.id desc
</select>
</mapper>
\ No newline at end of file
yd-api/src/main/resources/mapper/customer/AclPractitionerFileSharingMapper.xml
0 → 100644
View file @
a0e598a9
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