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
3e5b865b
Commit
3e5b865b
authored
May 09, 2020
by
yao.xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码迁移-经纪人公告/海报
parent
3eddba81
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
893 additions
and
1 deletions
+893
-1
yd-api/src/main/java/com/yd/api/market/MarketController.java
+47
-0
yd-api/src/main/java/com/yd/api/market/service/MarketService.java
+23
-0
yd-api/src/main/java/com/yd/api/market/service/impl/MarketServiceImpl.java
+78
-0
yd-api/src/main/java/com/yd/api/market/vo/announcement/AnnouncementInfo.java
+19
-0
yd-api/src/main/java/com/yd/api/market/vo/announcement/AnnouncementQueryRequestVO.java
+9
-0
yd-api/src/main/java/com/yd/api/market/vo/announcement/AnnouncementQueryResponseVO.java
+11
-0
yd-api/src/main/java/com/yd/api/market/vo/poster/PosterQueryRequestVO.java
+11
-0
yd-api/src/main/java/com/yd/api/market/vo/poster/PosterQueryResponseVO.java
+16
-0
yd-api/src/main/java/com/yd/dal/entity/marketing/MktAnnouncement.java
+60
-0
yd-api/src/main/java/com/yd/dal/entity/marketing/PosterInfo.java
+15
-0
yd-api/src/main/java/com/yd/dal/entity/meta/MdDropOptions.java
+55
-0
yd-api/src/main/java/com/yd/dal/entity/practitioner/opportunity/OwnOpportunityInfo.java
+2
-1
yd-api/src/main/java/com/yd/dal/mapper/marketing/MktAnnouncementMapper.java
+27
-0
yd-api/src/main/java/com/yd/dal/mapper/meta/MdDropOptionsMapper.java
+22
-0
yd-api/src/main/java/com/yd/dal/service/marketing/Impl/MktAnnouncementDALServiceImpl.java
+39
-0
yd-api/src/main/java/com/yd/dal/service/marketing/MktAnnouncementDALService.java
+14
-0
yd-api/src/main/java/com/yd/dal/service/meta/MdDropOptionsDALService.java
+9
-0
yd-api/src/main/java/com/yd/dal/service/meta/impl/MdDropOptionsDALServiceImpl.java
+23
-0
yd-api/src/main/resources/mapper/marketing/MktAnnouncementMapper.xml
+219
-0
yd-api/src/main/resources/mapper/meta/MdDropOptionsMapper.xml
+194
-0
No files found.
yd-api/src/main/java/com/yd/api/market/MarketController.java
0 → 100644
View file @
3e5b865b
package
com
.
yd
.
api
.
market
;
import
com.yd.api.market.service.MarketService
;
import
com.yd.api.market.vo.announcement.AnnouncementQueryRequestVO
;
import
com.yd.api.market.vo.announcement.AnnouncementQueryResponseVO
;
import
com.yd.api.market.vo.poster.PosterQueryRequestVO
;
import
com.yd.api.market.vo.poster.PosterQueryResponseVO
;
import
com.yd.api.result.JsonResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
public
class
MarketController
{
@Autowired
private
MarketService
marketService
;
/**
* 市场公告查询接口
* @param requestVO
* @return AnnouncementQueryResponseVO
*/
@RequestMapping
(
"/announcementQuery"
)
public
Object
announcementQuery
(
@RequestBody
AnnouncementQueryRequestVO
requestVO
){
JsonResult
result
=
new
JsonResult
();
AnnouncementQueryResponseVO
responseVO
=
marketService
.
announcementQuery
(
requestVO
);
result
.
setData
(
responseVO
);
result
.
addResult
(
responseVO
);
return
result
;
}
/**
* 海报查询接口
* @param requestVO
* @return AnnouncementQueryResponseVO
*/
@RequestMapping
(
"/posterQuery"
)
public
Object
posterQuery
(
@RequestBody
PosterQueryRequestVO
requestVO
){
JsonResult
result
=
new
JsonResult
();
PosterQueryResponseVO
responseVO
=
marketService
.
posterQuery
(
requestVO
);
result
.
setData
(
responseVO
);
result
.
addResult
(
responseVO
);
return
result
;
}
}
yd-api/src/main/java/com/yd/api/market/service/MarketService.java
0 → 100644
View file @
3e5b865b
package
com
.
yd
.
api
.
market
.
service
;
import
com.yd.api.market.vo.announcement.AnnouncementQueryRequestVO
;
import
com.yd.api.market.vo.announcement.AnnouncementQueryResponseVO
;
import
com.yd.api.market.vo.poster.PosterQueryRequestVO
;
import
com.yd.api.market.vo.poster.PosterQueryResponseVO
;
public
interface
MarketService
{
/**
* 市场公告查询接口
* @param requestVO
* @return AnnouncementQueryResponseVO
*/
AnnouncementQueryResponseVO
announcementQuery
(
AnnouncementQueryRequestVO
requestVO
);
/**
* 海报查询接口
* @param requestVO
* @return AnnouncementQueryResponseVO
*/
PosterQueryResponseVO
posterQuery
(
PosterQueryRequestVO
requestVO
);
}
yd-api/src/main/java/com/yd/api/market/service/impl/MarketServiceImpl.java
0 → 100644
View file @
3e5b865b
package
com
.
yd
.
api
.
market
.
service
.
impl
;
import
com.yd.api.market.service.MarketService
;
import
com.yd.api.market.vo.announcement.AnnouncementInfo
;
import
com.yd.api.market.vo.announcement.AnnouncementQueryRequestVO
;
import
com.yd.api.market.vo.announcement.AnnouncementQueryResponseVO
;
import
com.yd.api.market.vo.poster.PosterQueryRequestVO
;
import
com.yd.api.market.vo.poster.PosterQueryResponseVO
;
import
com.yd.api.result.CommonResult
;
import
com.yd.dal.entity.marketing.MktAnnouncement
;
import
com.yd.dal.entity.meta.MdDropOptions
;
import
com.yd.dal.service.marketing.MktAnnouncementDALService
;
import
com.yd.dal.service.meta.MdDropOptionsDALService
;
import
com.yd.util.CommonUtil
;
import
com.yd.util.config.ZHBErrorConfig
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.*
;
@Service
(
"marketService"
)
public
class
MarketServiceImpl
implements
MarketService
{
@Autowired
private
MktAnnouncementDALService
mktAnnouncementDALService
;
@Autowired
private
MdDropOptionsDALService
mdDropOptionsDALService
;
@Override
public
AnnouncementQueryResponseVO
announcementQuery
(
AnnouncementQueryRequestVO
requestVO
)
{
AnnouncementQueryResponseVO
responseVO
=
new
AnnouncementQueryResponseVO
();
Long
id
=
requestVO
.
getId
(),
announcementType
=
requestVO
.
getAnnouncementTypeId
();
List
<
MktAnnouncement
>
announcementList
=
new
ArrayList
<>();
//根据条件查询出相关的数据
if
(
id
!=
null
){
MktAnnouncement
announcement
=
mktAnnouncementDALService
.
findById
(
id
);
announcementList
.
add
(
announcement
);
}
else
if
(
announcementType
!=
null
){
announcementList
=
mktAnnouncementDALService
.
findByType
(
announcementType
);
}
else
{
announcementList
=
mktAnnouncementDALService
.
findByIsActiveAndAnnouncementAtBefore
(
1
,
new
Date
());
}
if
(!
announcementList
.
isEmpty
()){
List
<
MdDropOptions
>
options
=
mdDropOptionsDALService
.
findByDropMasterId
(
6L
);
Map
<
Long
,
MdDropOptions
>
optionsMap
=
new
HashMap
<>();
options
.
forEach
(
i
->
optionsMap
.
put
(
i
.
getId
(),
i
));
List
<
AnnouncementInfo
>
announcementInfoList
=
new
ArrayList
<>();
MdDropOptions
dropOptions
;
AnnouncementInfo
announcementInfo
;
for
(
MktAnnouncement
item
:
announcementList
){
announcementInfo
=
new
AnnouncementInfo
();
BeanUtils
.
copyProperties
(
item
,
announcementInfo
);
announcementType
=
item
.
getAnnouncementType
();
if
(
announcementType
!=
null
){
dropOptions
=
optionsMap
.
get
(
announcementType
);
if
(
dropOptions
!=
null
){
announcementInfo
.
setAnnouncementTypeName
(
dropOptions
.
getDropOptionName
());
}
}
announcementInfo
.
setAnnouncementAt
(
CommonUtil
.
dateParseString
(
item
.
getAnnouncementAt
(),
"yyyy-MM-dd"
));
announcementInfo
.
setCreatedAt
(
CommonUtil
.
dateParseString
(
item
.
getCreatedAt
(),
"yyyy-MM-dd HH:mm:ss"
));
announcementInfoList
.
add
(
announcementInfo
);
}
responseVO
.
setAnnouncementInfoList
(
announcementInfoList
);
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
}
else
{
responseVO
.
setCommonResult
(
new
CommonResult
(
false
,
ZHBErrorConfig
.
getErrorInfo
(
"810039"
)));
}
return
responseVO
;
}
@Override
public
PosterQueryResponseVO
posterQuery
(
PosterQueryRequestVO
requestVO
)
{
return
null
;
}
}
yd-api/src/main/java/com/yd/api/market/vo/announcement/AnnouncementInfo.java
0 → 100644
View file @
3e5b865b
package
com
.
yd
.
api
.
market
.
vo
.
announcement
;
import
lombok.Data
;
@Data
public
class
AnnouncementInfo
{
private
Long
id
;
private
Long
insurerId
;
private
Long
insurerBranchId
;
private
String
title
;
private
String
content
;
private
Long
announcementType
;
private
String
announcementTypeName
;
private
String
announcementAt
;
private
Integer
seq
;
private
Integer
isActive
;
private
String
createdAt
;
private
Long
createdBy
;
}
yd-api/src/main/java/com/yd/api/market/vo/announcement/AnnouncementQueryRequestVO.java
0 → 100644
View file @
3e5b865b
package
com
.
yd
.
api
.
market
.
vo
.
announcement
;
import
lombok.Data
;
@Data
public
class
AnnouncementQueryRequestVO
{
private
Long
id
;
private
Long
announcementTypeId
;
//37(1=运营公告),38( 2=市场喜讯),39( 3=重要通知),40(4=新品上架),41(5=竞赛奖励)
}
yd-api/src/main/java/com/yd/api/market/vo/announcement/AnnouncementQueryResponseVO.java
0 → 100644
View file @
3e5b865b
package
com
.
yd
.
api
.
market
.
vo
.
announcement
;
import
com.yd.api.result.CommonResult
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
AnnouncementQueryResponseVO
{
private
List
<
AnnouncementInfo
>
announcementInfoList
;
private
CommonResult
commonResult
;
}
yd-api/src/main/java/com/yd/api/market/vo/poster/PosterQueryRequestVO.java
0 → 100644
View file @
3e5b865b
package
com
.
yd
.
api
.
market
.
vo
.
poster
;
import
com.yd.util.page.PaginationInfo
;
import
lombok.Data
;
@Data
public
class
PosterQueryRequestVO
{
private
Long
practitionerId
;
private
Long
mdDropOptionId
;
private
PaginationInfo
paginationInfo
;
}
yd-api/src/main/java/com/yd/api/market/vo/poster/PosterQueryResponseVO.java
0 → 100644
View file @
3e5b865b
package
com
.
yd
.
api
.
market
.
vo
.
poster
;
import
com.yd.api.result.CommonResult
;
import
com.yd.dal.entity.marketing.PosterInfo
;
import
com.yd.util.page.PaginationInfo
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
PosterQueryResponseVO
{
private
Integer
isNameShow
;
//姓名是否显示 0=No=不显示 1=Yes=显示
private
Integer
isMobileShow
;
//电话是否显示 0=No=不显示 1=Yes=显示
private
List
<
PosterInfo
>
posterInfos
;
private
PaginationInfo
paginationInfo
;
private
CommonResult
commonResult
;
}
yd-api/src/main/java/com/yd/dal/entity/marketing/MktAnnouncement.java
0 → 100644
View file @
3e5b865b
package
com
.
yd
.
dal
.
entity
.
marketing
;
import
java.util.Date
;
import
lombok.Data
;
/**
* 银盾公告
*/
@Data
public
class
MktAnnouncement
{
/**
* serial id
*/
private
Long
id
;
/**
* 保险公司ID, FK ag_acl_insurer.id
*/
private
Long
insurerId
;
/**
* 保险分支机构ID, FK ag_acl_insurer_branch.id
*/
private
Long
insurerBranchId
;
/**
* 公告标题
*/
private
String
title
;
/**
* 公告内容
*/
private
String
content
;
/**
* FK ag_md_drop_options.id 1=运营公告 2=市场喜讯 3重要通知,4新品上架,5竞赛奖励
*/
private
Long
announcementType
;
/**
* 发布时间
*/
private
Date
announcementAt
;
/**
* listed sequence
*/
private
Integer
seq
;
/**
* 0=No, 1=Yes
*/
private
Integer
isActive
;
private
Date
createdAt
;
private
Long
createdBy
;
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/entity/marketing/PosterInfo.java
0 → 100644
View file @
3e5b865b
package
com
.
yd
.
dal
.
entity
.
marketing
;
import
lombok.Data
;
@Data
public
class
PosterInfo
{
private
Long
id
;
private
Long
itemType
;
private
Long
itemId
;
private
String
title
;
private
Long
productCategoryId
;
private
String
thumbnailPath
;
private
String
productPosterPath
;
private
String
isPlan
;
}
yd-api/src/main/java/com/yd/dal/entity/meta/MdDropOptions.java
0 → 100644
View file @
3e5b865b
package
com
.
yd
.
dal
.
entity
.
meta
;
import
java.util.Date
;
import
lombok.Data
;
/**
* 下拉选框选项资料
*/
@Data
public
class
MdDropOptions
{
/**
* 选项编号
*/
private
Long
id
;
/**
* 选单编号
*/
private
Long
dropMasterId
;
/**
* 选项名称
*/
private
String
dropOptionName
;
/**
* 选项数值
*/
private
String
dropOptionCode
;
/**
* 选项顺序
*/
private
Integer
dropOptionOrder
;
/**
* 选项分值
*/
private
Integer
dropOptionScore
;
/**
* 选项备注
*/
private
String
dropOptionRemark
;
/**
* 0=No, 1=Yes
*/
private
Integer
isActive
;
private
Date
createdAt
;
private
Long
createdBy
;
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/entity/practitioner/opportunity/OwnOpportunityInfo.java
View file @
3e5b865b
...
...
@@ -10,6 +10,6 @@ public class OwnOpportunityInfo {
private
String
mobileNo
;
private
String
opportunityFrom
;
//商机来源
private
String
opportunityDate
;
//商机时间
private
Lo
ng
mdDropOptionName
;
private
Stri
ng
mdDropOptionName
;
private
Long
leadsAssignedId
;
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/marketing/MktAnnouncementMapper.java
0 → 100644
View file @
3e5b865b
package
com
.
yd
.
dal
.
mapper
.
marketing
;
import
com.github.pagehelper.PageInfo
;
import
com.yd.dal.entity.marketing.MktAnnouncement
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Date
;
import
java.util.List
;
public
interface
MktAnnouncementMapper
{
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
MktAnnouncement
record
);
int
insertSelective
(
MktAnnouncement
record
);
MktAnnouncement
selectByPrimaryKey
(
Long
id
);
int
updateByPrimaryKeySelective
(
MktAnnouncement
record
);
int
updateByPrimaryKey
(
MktAnnouncement
record
);
PageInfo
<
MktAnnouncement
>
selectByObj
(
MktAnnouncement
info
);
List
<
MktAnnouncement
>
findByIsActiveAndAnnouncementAtBefore
(
@Param
(
"isActive"
)
int
isActive
,
@Param
(
"date"
)
Date
date
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/meta/MdDropOptionsMapper.java
0 → 100644
View file @
3e5b865b
package
com
.
yd
.
dal
.
mapper
.
meta
;
import
com.yd.dal.entity.meta.MdDropOptions
;
import
java.util.List
;
public
interface
MdDropOptionsMapper
{
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
MdDropOptions
record
);
int
insertSelective
(
MdDropOptions
record
);
MdDropOptions
selectByPrimaryKey
(
Long
id
);
int
updateByPrimaryKeySelective
(
MdDropOptions
record
);
int
updateByPrimaryKey
(
MdDropOptions
record
);
List
<
MdDropOptions
>
selectByObj
(
MdDropOptions
info
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/service/marketing/Impl/MktAnnouncementDALServiceImpl.java
0 → 100644
View file @
3e5b865b
package
com
.
yd
.
dal
.
service
.
marketing
.
Impl
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.yd.dal.entity.marketing.MktAnnouncement
;
import
com.yd.dal.mapper.marketing.MktAnnouncementMapper
;
import
com.yd.dal.service.marketing.MktAnnouncementDALService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.Date
;
import
java.util.List
;
@Service
(
"mktAnnouncementDALService"
)
public
class
MktAnnouncementDALServiceImpl
implements
MktAnnouncementDALService
{
@Resource
private
MktAnnouncementMapper
mktAnnouncementMapper
;
@Override
public
MktAnnouncement
findById
(
Long
id
)
{
return
mktAnnouncementMapper
.
selectByPrimaryKey
(
id
);
}
@Override
public
List
<
MktAnnouncement
>
findByType
(
Long
announcementType
)
{
MktAnnouncement
info
=
new
MktAnnouncement
();
info
.
setAnnouncementType
(
announcementType
);
info
.
setIsActive
(
1
);
PageHelper
.
orderBy
(
"seq asc , created_at desc"
);
PageInfo
<
MktAnnouncement
>
mktAnnouncementPageInfo
=
mktAnnouncementMapper
.
selectByObj
(
info
);
List
<
MktAnnouncement
>
list
=
mktAnnouncementPageInfo
.
getList
();
return
list
;
}
@Override
public
List
<
MktAnnouncement
>
findByIsActiveAndAnnouncementAtBefore
(
int
isActive
,
Date
date
)
{
return
mktAnnouncementMapper
.
findByIsActiveAndAnnouncementAtBefore
(
isActive
,
date
);
}
}
yd-api/src/main/java/com/yd/dal/service/marketing/MktAnnouncementDALService.java
0 → 100644
View file @
3e5b865b
package
com
.
yd
.
dal
.
service
.
marketing
;
import
com.yd.dal.entity.marketing.MktAnnouncement
;
import
java.util.Date
;
import
java.util.List
;
public
interface
MktAnnouncementDALService
{
MktAnnouncement
findById
(
Long
id
);
List
<
MktAnnouncement
>
findByType
(
Long
announcementType
);
List
<
MktAnnouncement
>
findByIsActiveAndAnnouncementAtBefore
(
int
isActive
,
Date
date
);
}
yd-api/src/main/java/com/yd/dal/service/meta/MdDropOptionsDALService.java
0 → 100644
View file @
3e5b865b
package
com
.
yd
.
dal
.
service
.
meta
;
import
com.yd.dal.entity.meta.MdDropOptions
;
import
java.util.List
;
public
interface
MdDropOptionsDALService
{
List
<
MdDropOptions
>
findByDropMasterId
(
long
dropMasterId
);
}
yd-api/src/main/java/com/yd/dal/service/meta/impl/MdDropOptionsDALServiceImpl.java
0 → 100644
View file @
3e5b865b
package
com
.
yd
.
dal
.
service
.
meta
.
impl
;
import
com.yd.dal.entity.meta.MdDropOptions
;
import
com.yd.dal.mapper.meta.MdDropOptionsMapper
;
import
com.yd.dal.service.meta.MdDropOptionsDALService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Service
(
"mdDropOptionsDALService"
)
public
class
MdDropOptionsDALServiceImpl
implements
MdDropOptionsDALService
{
@Resource
private
MdDropOptionsMapper
mdDropOptionsMapper
;
@Override
public
List
<
MdDropOptions
>
findByDropMasterId
(
long
dropMasterId
)
{
MdDropOptions
info
=
new
MdDropOptions
();
info
.
setDropMasterId
(
dropMasterId
);
return
mdDropOptionsMapper
.
selectByObj
(
info
);
}
}
yd-api/src/main/resources/mapper/marketing/MktAnnouncementMapper.xml
0 → 100644
View file @
3e5b865b
<?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.marketing.MktAnnouncementMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yd.dal.entity.marketing.MktAnnouncement"
>
<!--@mbg.generated-->
<!--@Table yd_mkt_announcement-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"insurer_id"
jdbcType=
"BIGINT"
property=
"insurerId"
/>
<result
column=
"insurer_branch_id"
jdbcType=
"BIGINT"
property=
"insurerBranchId"
/>
<result
column=
"title"
jdbcType=
"LONGVARCHAR"
property=
"title"
/>
<result
column=
"content"
jdbcType=
"LONGVARCHAR"
property=
"content"
/>
<result
column=
"announcement_type"
jdbcType=
"BIGINT"
property=
"announcementType"
/>
<result
column=
"announcement_at"
jdbcType=
"DATE"
property=
"announcementAt"
/>
<result
column=
"seq"
jdbcType=
"INTEGER"
property=
"seq"
/>
<result
column=
"is_active"
jdbcType=
"INTEGER"
property=
"isActive"
/>
<result
column=
"created_at"
jdbcType=
"TIMESTAMP"
property=
"createdAt"
/>
<result
column=
"created_by"
jdbcType=
"BIGINT"
property=
"createdBy"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
id, insurer_id, insurer_branch_id, title, content, announcement_type, announcement_at,
seq, is_active, created_at, created_by
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--@mbg.generated-->
select
<include
refid=
"Base_Column_List"
/>
from yd_mkt_announcement
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--@mbg.generated-->
delete from yd_mkt_announcement
where id = #{id,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.marketing.MktAnnouncement"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into yd_mkt_announcement (insurer_id, insurer_branch_id, title,
content, announcement_type, announcement_at,
seq, is_active, created_at,
created_by)
values (#{insurerId,jdbcType=BIGINT}, #{insurerBranchId,jdbcType=BIGINT}, #{title,jdbcType=LONGVARCHAR},
#{content,jdbcType=LONGVARCHAR}, #{announcementType,jdbcType=BIGINT}, #{announcementAt,jdbcType=DATE},
#{seq,jdbcType=INTEGER}, #{isActive,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP},
#{createdBy,jdbcType=BIGINT})
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.marketing.MktAnnouncement"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into yd_mkt_announcement
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"insurerId != null"
>
insurer_id,
</if>
<if
test=
"insurerBranchId != null"
>
insurer_branch_id,
</if>
<if
test=
"title != null"
>
title,
</if>
<if
test=
"content != null"
>
content,
</if>
<if
test=
"announcementType != null"
>
announcement_type,
</if>
<if
test=
"announcementAt != null"
>
announcement_at,
</if>
<if
test=
"seq != null"
>
seq,
</if>
<if
test=
"isActive != null"
>
is_active,
</if>
<if
test=
"createdAt != null"
>
created_at,
</if>
<if
test=
"createdBy != null"
>
created_by,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"insurerId != null"
>
#{insurerId,jdbcType=BIGINT},
</if>
<if
test=
"insurerBranchId != null"
>
#{insurerBranchId,jdbcType=BIGINT},
</if>
<if
test=
"title != null"
>
#{title,jdbcType=LONGVARCHAR},
</if>
<if
test=
"content != null"
>
#{content,jdbcType=LONGVARCHAR},
</if>
<if
test=
"announcementType != null"
>
#{announcementType,jdbcType=BIGINT},
</if>
<if
test=
"announcementAt != null"
>
#{announcementAt,jdbcType=DATE},
</if>
<if
test=
"seq != null"
>
#{seq,jdbcType=INTEGER},
</if>
<if
test=
"isActive != null"
>
#{isActive,jdbcType=INTEGER},
</if>
<if
test=
"createdAt != null"
>
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"createdBy != null"
>
#{createdBy,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.yd.dal.entity.marketing.MktAnnouncement"
>
<!--@mbg.generated-->
update yd_mkt_announcement
<set>
<if
test=
"insurerId != null"
>
insurer_id = #{insurerId,jdbcType=BIGINT},
</if>
<if
test=
"insurerBranchId != null"
>
insurer_branch_id = #{insurerBranchId,jdbcType=BIGINT},
</if>
<if
test=
"title != null"
>
title = #{title,jdbcType=LONGVARCHAR},
</if>
<if
test=
"content != null"
>
content = #{content,jdbcType=LONGVARCHAR},
</if>
<if
test=
"announcementType != null"
>
announcement_type = #{announcementType,jdbcType=BIGINT},
</if>
<if
test=
"announcementAt != null"
>
announcement_at = #{announcementAt,jdbcType=DATE},
</if>
<if
test=
"seq != null"
>
seq = #{seq,jdbcType=INTEGER},
</if>
<if
test=
"isActive != null"
>
is_active = #{isActive,jdbcType=INTEGER},
</if>
<if
test=
"createdAt != null"
>
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"createdBy != null"
>
created_by = #{createdBy,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.yd.dal.entity.marketing.MktAnnouncement"
>
<!--@mbg.generated-->
update yd_mkt_announcement
set insurer_id = #{insurerId,jdbcType=BIGINT},
insurer_branch_id = #{insurerBranchId,jdbcType=BIGINT},
title = #{title,jdbcType=LONGVARCHAR},
content = #{content,jdbcType=LONGVARCHAR},
announcement_type = #{announcementType,jdbcType=BIGINT},
announcement_at = #{announcementAt,jdbcType=DATE},
seq = #{seq,jdbcType=INTEGER},
is_active = #{isActive,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
<select
id=
"selectByObj"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from yd_mkt_announcement
<where>
<if
test=
"id != null"
>
id = #{id,jdbcType=BIGINT}
</if>
<if
test=
"insurerId != null"
>
and insurer_id = #{insurerId,jdbcType=BIGINT}
</if>
<if
test=
"insurerBranchId != null"
>
and insurer_branch_id = #{insurerBranchId,jdbcType=BIGINT}
</if>
<if
test=
"title != null"
>
and title = #{title,jdbcType=LONGVARCHAR}
</if>
<if
test=
"content != null"
>
and content = #{content,jdbcType=LONGVARCHAR}
</if>
<if
test=
"announcementType != null"
>
and announcement_type = #{announcementType,jdbcType=BIGINT}
</if>
<if
test=
"announcementAt != null"
>
and announcement_at = #{announcementAt,jdbcType=DATE}
</if>
<if
test=
"seq != null"
>
and seq = #{seq,jdbcType=INTEGER}
</if>
<if
test=
"isActive != null"
>
and is_active = #{isActive,jdbcType=INTEGER}
</if>
<if
test=
"createdAt != null"
>
and created_at = #{createdAt,jdbcType=TIMESTAMP}
</if>
<if
test=
"createdBy != null"
>
and created_by = #{createdBy,jdbcType=BIGINT}
</if>
</where>
</select>
<select
id=
"findByIsActiveAndAnnouncementAtBefore"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from yd_mkt_announcement
WHERE
t.is_active = #{isActive}
and
t.announcement_at
<
= #{date}
order by t.seq asc , t.announcement_at desc
</select>
</mapper>
\ No newline at end of file
yd-api/src/main/resources/mapper/meta/MdDropOptionsMapper.xml
0 → 100644
View file @
3e5b865b
<?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.meta.MdDropOptionsMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.yd.dal.entity.meta.MdDropOptions"
>
<!--@mbg.generated-->
<!--@Table ag_md_drop_options-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"drop_master_id"
jdbcType=
"BIGINT"
property=
"dropMasterId"
/>
<result
column=
"drop_option_name"
jdbcType=
"VARCHAR"
property=
"dropOptionName"
/>
<result
column=
"drop_option_code"
jdbcType=
"VARCHAR"
property=
"dropOptionCode"
/>
<result
column=
"drop_option_order"
jdbcType=
"INTEGER"
property=
"dropOptionOrder"
/>
<result
column=
"drop_option_score"
jdbcType=
"INTEGER"
property=
"dropOptionScore"
/>
<result
column=
"drop_option_remark"
jdbcType=
"VARCHAR"
property=
"dropOptionRemark"
/>
<result
column=
"is_active"
jdbcType=
"INTEGER"
property=
"isActive"
/>
<result
column=
"created_at"
jdbcType=
"TIMESTAMP"
property=
"createdAt"
/>
<result
column=
"created_by"
jdbcType=
"BIGINT"
property=
"createdBy"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
id, drop_master_id, drop_option_name, drop_option_code, drop_option_order, drop_option_score,
drop_option_remark, is_active, created_at, created_by
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--@mbg.generated-->
select
<include
refid=
"Base_Column_List"
/>
from ag_md_drop_options
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--@mbg.generated-->
delete from ag_md_drop_options
where id = #{id,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.meta.MdDropOptions"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_md_drop_options (drop_master_id, drop_option_name, drop_option_code,
drop_option_order, drop_option_score, drop_option_remark,
is_active, created_at, created_by
)
values (#{dropMasterId,jdbcType=BIGINT}, #{dropOptionName,jdbcType=VARCHAR}, #{dropOptionCode,jdbcType=VARCHAR},
#{dropOptionOrder,jdbcType=INTEGER}, #{dropOptionScore,jdbcType=INTEGER}, #{dropOptionRemark,jdbcType=VARCHAR},
#{isActive,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT}
)
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.yd.dal.entity.meta.MdDropOptions"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ag_md_drop_options
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"dropMasterId != null"
>
drop_master_id,
</if>
<if
test=
"dropOptionName != null"
>
drop_option_name,
</if>
<if
test=
"dropOptionCode != null"
>
drop_option_code,
</if>
<if
test=
"dropOptionOrder != null"
>
drop_option_order,
</if>
<if
test=
"dropOptionScore != null"
>
drop_option_score,
</if>
<if
test=
"dropOptionRemark != null"
>
drop_option_remark,
</if>
<if
test=
"isActive != null"
>
is_active,
</if>
<if
test=
"createdAt != null"
>
created_at,
</if>
<if
test=
"createdBy != null"
>
created_by,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"dropMasterId != null"
>
#{dropMasterId,jdbcType=BIGINT},
</if>
<if
test=
"dropOptionName != null"
>
#{dropOptionName,jdbcType=VARCHAR},
</if>
<if
test=
"dropOptionCode != null"
>
#{dropOptionCode,jdbcType=VARCHAR},
</if>
<if
test=
"dropOptionOrder != null"
>
#{dropOptionOrder,jdbcType=INTEGER},
</if>
<if
test=
"dropOptionScore != null"
>
#{dropOptionScore,jdbcType=INTEGER},
</if>
<if
test=
"dropOptionRemark != null"
>
#{dropOptionRemark,jdbcType=VARCHAR},
</if>
<if
test=
"isActive != null"
>
#{isActive,jdbcType=INTEGER},
</if>
<if
test=
"createdAt != null"
>
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"createdBy != null"
>
#{createdBy,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.yd.dal.entity.meta.MdDropOptions"
>
<!--@mbg.generated-->
update ag_md_drop_options
<set>
<if
test=
"dropMasterId != null"
>
drop_master_id = #{dropMasterId,jdbcType=BIGINT},
</if>
<if
test=
"dropOptionName != null"
>
drop_option_name = #{dropOptionName,jdbcType=VARCHAR},
</if>
<if
test=
"dropOptionCode != null"
>
drop_option_code = #{dropOptionCode,jdbcType=VARCHAR},
</if>
<if
test=
"dropOptionOrder != null"
>
drop_option_order = #{dropOptionOrder,jdbcType=INTEGER},
</if>
<if
test=
"dropOptionScore != null"
>
drop_option_score = #{dropOptionScore,jdbcType=INTEGER},
</if>
<if
test=
"dropOptionRemark != null"
>
drop_option_remark = #{dropOptionRemark,jdbcType=VARCHAR},
</if>
<if
test=
"isActive != null"
>
is_active = #{isActive,jdbcType=INTEGER},
</if>
<if
test=
"createdAt != null"
>
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if
test=
"createdBy != null"
>
created_by = #{createdBy,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.yd.dal.entity.meta.MdDropOptions"
>
<!--@mbg.generated-->
update ag_md_drop_options
set drop_master_id = #{dropMasterId,jdbcType=BIGINT},
drop_option_name = #{dropOptionName,jdbcType=VARCHAR},
drop_option_code = #{dropOptionCode,jdbcType=VARCHAR},
drop_option_order = #{dropOptionOrder,jdbcType=INTEGER},
drop_option_score = #{dropOptionScore,jdbcType=INTEGER},
drop_option_remark = #{dropOptionRemark,jdbcType=VARCHAR},
is_active = #{isActive,jdbcType=INTEGER},
created_at = #{createdAt,jdbcType=TIMESTAMP},
created_by = #{createdBy,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
<select
id=
"selectByObj"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_md_drop_options
<where>
<if
test=
"id != null"
>
id = #{id,jdbcType=BIGINT}
</if>
<if
test=
"dropMasterId != null"
>
and drop_master_id = #{dropMasterId,jdbcType=BIGINT}
</if>
<if
test=
"dropOptionName != null"
>
and drop_option_name = #{dropOptionName,jdbcType=VARCHAR}
</if>
<if
test=
"dropOptionCode != null"
>
and drop_option_code = #{dropOptionCode,jdbcType=VARCHAR}
</if>
<if
test=
"dropOptionOrder != null"
>
and drop_option_order = #{dropOptionOrder,jdbcType=INTEGER}
</if>
<if
test=
"dropOptionScore != null"
>
and drop_option_score = #{dropOptionScore,jdbcType=INTEGER}
</if>
<if
test=
"dropOptionRemark != null"
>
and drop_option_remark = #{dropOptionRemark,jdbcType=VARCHAR}
</if>
<if
test=
"isActive != null"
>
and is_active = #{isActive,jdbcType=INTEGER}
</if>
<if
test=
"createdAt != null"
>
and created_at = #{createdAt,jdbcType=TIMESTAMP}
</if>
<if
test=
"createdBy != null"
>
and created_by = #{createdBy,jdbcType=BIGINT}
</if>
</where>
</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