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
51d92659
Commit
51d92659
authored
May 20, 2020
by
yao.xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加-经纪人商机目标设置
parent
a69ffa0b
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
315 additions
and
19 deletions
+315
-19
yd-api/src/main/java/com/yd/api/practitioner/PractitionerController.java
+25
-2
yd-api/src/main/java/com/yd/api/practitioner/service/PractitionerService.java
+15
-2
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
+90
-6
yd-api/src/main/java/com/yd/api/practitioner/vo/salestarget/SalesTargetMonthSaveRequestVO.java
+11
-0
yd-api/src/main/java/com/yd/api/practitioner/vo/salestarget/SalesTargetMonthSaveResponseVO.java
+10
-0
yd-api/src/main/java/com/yd/api/practitioner/vo/salestarget/SalesTargetQueryRequestVO.java
+8
-0
yd-api/src/main/java/com/yd/api/practitioner/vo/salestarget/SalesTargetQueryResponseVO.java
+18
-0
yd-api/src/main/java/com/yd/dal/entity/marketing/MktLeadsGoals.java
+1
-1
yd-api/src/main/java/com/yd/dal/mapper/marketing/MktLeadsGoalsActionsMapper.java
+5
-0
yd-api/src/main/java/com/yd/dal/mapper/marketing/MktLeadsGoalsMapper.java
+7
-3
yd-api/src/main/java/com/yd/dal/service/marketing/Impl/MktLeadsGoalsActionsDALServiceImpl.java
+6
-0
yd-api/src/main/java/com/yd/dal/service/marketing/Impl/MktLeadsGoalsDALServiceImpl.java
+6
-0
yd-api/src/main/java/com/yd/dal/service/marketing/MktLeadsGoalsActionsDALService.java
+4
-0
yd-api/src/main/java/com/yd/dal/service/marketing/MktLeadsGoalsDALService.java
+4
-0
yd-api/src/main/resources/mapper/marketing/MktLeadsGoalsActionsMapper.xml
+47
-0
yd-api/src/main/resources/mapper/marketing/MktLeadsGoalsMapper.xml
+58
-5
No files found.
yd-api/src/main/java/com/yd/api/practitioner/PractitionerController.java
View file @
51d92659
...
...
@@ -9,8 +9,7 @@ import com.yd.api.practitioner.vo.opportunity.*;
import
com.yd.api.practitioner.vo.rank.PractitionerRankRequestVO
;
import
com.yd.api.practitioner.vo.rank.PractitionerRankResponseVO
;
import
com.yd.api.practitioner.vo.recruit.*
;
import
com.yd.api.practitioner.vo.salestarget.SalesTargetSaveRequestVO
;
import
com.yd.api.practitioner.vo.salestarget.SalesTargetSaveResponseVO
;
import
com.yd.api.practitioner.vo.salestarget.*
;
import
com.yd.api.practitioner.vo.setting.*
;
import
com.yd.api.result.JsonResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -233,4 +232,28 @@ public class PractitionerController {
result
.
setData
(
responseVO
);
return
result
;
}
/**
* 查询销售目标
*/
@RequestMapping
(
"/salesTargetQuery"
)
public
Object
salesTargetQuery
(
@RequestBody
SalesTargetQueryRequestVO
requestVO
){
JsonResult
result
=
new
JsonResult
();
SalesTargetQueryResponseVO
responseVO
=
practitionerService
.
salesTargetQuery
(
requestVO
);
result
.
addResult
(
responseVO
);
result
.
setData
(
responseVO
);
return
result
;
}
/**
* 保存月均目标
*/
@RequestMapping
(
"/salesTargetMonthSave"
)
public
Object
salesTargetMonthSave
(
@RequestBody
SalesTargetMonthSaveRequestVO
requestVO
){
JsonResult
result
=
new
JsonResult
();
SalesTargetMonthSaveResponseVO
responseVO
=
practitionerService
.
salesTargetMonthSave
(
requestVO
);
result
.
addResult
(
responseVO
);
result
.
setData
(
responseVO
);
return
result
;
}
}
yd-api/src/main/java/com/yd/api/practitioner/service/PractitionerService.java
View file @
51d92659
...
...
@@ -8,8 +8,7 @@ import com.yd.api.practitioner.vo.opportunity.*;
import
com.yd.api.practitioner.vo.rank.PractitionerRankRequestVO
;
import
com.yd.api.practitioner.vo.rank.PractitionerRankResponseVO
;
import
com.yd.api.practitioner.vo.recruit.*
;
import
com.yd.api.practitioner.vo.salestarget.SalesTargetSaveRequestVO
;
import
com.yd.api.practitioner.vo.salestarget.SalesTargetSaveResponseVO
;
import
com.yd.api.practitioner.vo.salestarget.*
;
import
com.yd.api.practitioner.vo.setting.*
;
import
org.springframework.stereotype.Service
;
...
...
@@ -125,4 +124,18 @@ public interface PractitionerService {
* @return
*/
SalesTargetSaveResponseVO
salesTargetSave
(
SalesTargetSaveRequestVO
requestVO
);
/**
* 查询销售目标
* @param requestVO
* @return
*/
SalesTargetQueryResponseVO
salesTargetQuery
(
SalesTargetQueryRequestVO
requestVO
);
/**
* 保存月均目标
* @param requestVO
* @return
*/
SalesTargetMonthSaveResponseVO
salesTargetMonthSave
(
SalesTargetMonthSaveRequestVO
requestVO
);
}
yd-api/src/main/java/com/yd/api/practitioner/service/impl/PractitionerServiceImpl.java
View file @
51d92659
...
...
@@ -15,10 +15,7 @@ import com.yd.api.practitioner.vo.rank.PractitionerRankRequestVO;
import
com.yd.api.practitioner.vo.rank.PractitionerRankResponseVO
;
import
com.yd.api.practitioner.vo.rank.PractitionerInfoForAchievement
;
import
com.yd.api.practitioner.vo.recruit.*
;
import
com.yd.api.practitioner.vo.salestarget.SalesTargetActions
;
import
com.yd.api.practitioner.vo.salestarget.SalesTargetMonth
;
import
com.yd.api.practitioner.vo.salestarget.SalesTargetSaveRequestVO
;
import
com.yd.api.practitioner.vo.salestarget.SalesTargetSaveResponseVO
;
import
com.yd.api.practitioner.vo.salestarget.*
;
import
com.yd.api.practitioner.vo.setting.*
;
import
com.yd.api.result.CommonResult
;
import
com.yd.dal.entity.customer.*
;
...
...
@@ -1383,6 +1380,93 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
return
responseVO
;
}
@Override
public
SalesTargetQueryResponseVO
salesTargetQuery
(
SalesTargetQueryRequestVO
requestVO
)
{
SalesTargetQueryResponseVO
responseVO
=
new
SalesTargetQueryResponseVO
();
//经纪人id
Long
practitionerId
=
requestVO
.
getPractitionerId
();
//当前年份
Calendar
cal
=
Calendar
.
getInstance
();
int
year
=
cal
.
get
(
Calendar
.
YEAR
);
//通过is_active = 1 经纪人id 和 目标所属年度 去查询ag_mkt_leads_goals/ag_mkt_leads_goals_actions
MktLeadsGoals
mktLeadsGoals
=
new
MktLeadsGoals
();
mktLeadsGoals
.
setIsActive
(
1
);
mktLeadsGoals
.
setPractitionerId
(
practitionerId
);
mktLeadsGoals
.
setCurrentYear
(
year
);
List
<
MktLeadsGoals
>
mktLeadsGoalsList
=
mktLeadsGoalsDALService
.
findByMktLeadsGoals
(
mktLeadsGoals
);
List
<
SalesTargetMonth
>
salesTargetMonthList
=
new
ArrayList
<>();
for
(
MktLeadsGoals
info
:
mktLeadsGoalsList
){
Integer
statisticTimeUnit
=
info
.
getStatisticTimeUnit
();
if
(
statisticTimeUnit
==
1
){
//年
responseVO
.
setPremium
(
info
.
getPremium
());
responseVO
.
setCommission
(
info
.
getCommission
());
responseVO
.
setPieces
(
info
.
getPieces
());
responseVO
.
setPieceAveragePremium
(
info
.
getPieceAveragePremium
());
}
else
if
(
statisticTimeUnit
==
3
){
//月
SalesTargetMonth
salesTargetMonth
=
new
SalesTargetMonth
();
salesTargetMonth
.
setCommission
(
info
.
getCommission
());
salesTargetMonth
.
setMonthNum
(
info
.
getSeqTime
());
salesTargetMonth
.
setPieceAveragePremium
(
info
.
getPieceAveragePremium
());
salesTargetMonth
.
setPieces
(
info
.
getPieces
());
salesTargetMonth
.
setPremium
(
info
.
getPremium
());
salesTargetMonthList
.
add
(
salesTargetMonth
);
}
}
MktLeadsGoalsActions
mktLeadsGoalsActions
=
new
MktLeadsGoalsActions
();
mktLeadsGoalsActions
.
setIsActive
(
1
);
mktLeadsGoalsActions
.
setPractitionerId
(
practitionerId
);
mktLeadsGoalsActions
.
setCurrentYear
(
year
);
List
<
MktLeadsGoalsActions
>
mktLeadsGoalsActionsList
=
mktLeadsGoalsActionsDALService
.
findByMktLeadsGoalsActions
(
mktLeadsGoalsActions
);
List
<
SalesTargetActions
>
salesTargetActions
=
new
ArrayList
<>();
for
(
MktLeadsGoalsActions
info
:
mktLeadsGoalsActionsList
){
SalesTargetActions
salesTargetAction
=
new
SalesTargetActions
();
salesTargetAction
.
setStatisticTimeUnit
(
3
);
salesTargetAction
.
setActionStandards
(
info
.
getActionStandards
());
salesTargetAction
.
setLeadsActionId
(
info
.
getLeadsActionId
());
salesTargetAction
.
setLeadsActionName
(
info
.
getLeadsActionName
());
salesTargetActions
.
add
(
salesTargetAction
);
}
responseVO
.
setPractitionerId
(
practitionerId
);
responseVO
.
setSalesTargetMonths
(
salesTargetMonthList
);
responseVO
.
setSalesTargetActions
(
salesTargetActions
);
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
return
responseVO
;
}
@Override
public
SalesTargetMonthSaveResponseVO
salesTargetMonthSave
(
SalesTargetMonthSaveRequestVO
requestVO
)
{
SalesTargetMonthSaveResponseVO
responseVO
=
new
SalesTargetMonthSaveResponseVO
();
//经纪人id
Long
practitionerId
=
requestVO
.
getPractitionerId
();
//当前年份
Calendar
cal
=
Calendar
.
getInstance
();
int
year
=
cal
.
get
(
Calendar
.
YEAR
);
mktLeadsGoalsActionsDALService
.
updateIsActiveIsNull
(
practitionerId
,
year
);
List
<
SalesTargetActions
>
salesTargetActionsList
=
requestVO
.
getSalesTargetActionsList
();
Date
date
=
new
Date
();
MktLeadsGoalsActions
mktLeadsGoalsActions
;
for
(
SalesTargetActions
info
:
salesTargetActionsList
){
mktLeadsGoalsActions
=
new
MktLeadsGoalsActions
();
mktLeadsGoalsActions
.
setPractitionerId
(
practitionerId
);
mktLeadsGoalsActions
.
setCurrentYear
(
year
);
mktLeadsGoalsActions
.
setStatisticTimeUnit
(
3
);
mktLeadsGoalsActions
.
setLeadsActionId
(
info
.
getLeadsActionId
());
mktLeadsGoalsActions
.
setLeadsActionName
(
info
.
getLeadsActionName
());
mktLeadsGoalsActions
.
setActionStandards
(
info
.
getActionStandards
());
mktLeadsGoalsActions
.
setCurrentVersion
(
date
);
mktLeadsGoalsActions
.
setIsActive
(
1
);
mktLeadsGoalsActions
.
setCreatedAt
(
new
Date
());
mktLeadsGoalsActions
.
setCreatedBy
(
practitionerId
);
mktLeadsGoalsActions
.
setUpdatedAt
(
new
Date
());
mktLeadsGoalsActions
.
setUpdatedBy
(
practitionerId
);
mktLeadsGoalsActionsDALService
.
save
(
mktLeadsGoalsActions
);
}
responseVO
.
setCommonResult
(
new
CommonResult
(
true
,
ZHBErrorConfig
.
getErrorInfo
(
"800000"
)));
return
responseVO
;
}
private
void
initializationAction
(
Long
practitionerId
,
int
year
)
{
//通过经纪人id 和 目标所属年度 去查询ag_mkt_leads_goals/ag_mkt_leads_goals_actions 并将is_active = 0
mktLeadsGoalsDALService
.
updateIsActiveIsNull
(
practitionerId
,
year
);
...
...
@@ -1434,7 +1518,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
*/
private
void
saveMonthGoal
(
SalesTargetMonth
info
,
Long
practitionerId
,
Date
date
,
int
year
)
{
MktLeadsGoals
mktLeadsGoals
=
new
MktLeadsGoals
();
mktLeadsGoals
.
setPractitionerId
(
practitionerId
.
toString
()
);
mktLeadsGoals
.
setPractitionerId
(
practitionerId
);
mktLeadsGoals
.
setPremium
(
info
.
getPremium
());
mktLeadsGoals
.
setCommission
(
info
.
getCommission
());
mktLeadsGoals
.
setPieces
(
info
.
getPieces
());
...
...
@@ -1464,7 +1548,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
Integer
pieces
=
requestVO
.
getPieces
();
Integer
pieceAveragePremium
=
requestVO
.
getPieceAveragePremium
();
MktLeadsGoals
mktLeadsGoals
=
new
MktLeadsGoals
();
mktLeadsGoals
.
setPractitionerId
(
practitionerId
.
toString
()
);
mktLeadsGoals
.
setPractitionerId
(
practitionerId
);
mktLeadsGoals
.
setPremium
(
premium
);
mktLeadsGoals
.
setCommission
(
commission
);
mktLeadsGoals
.
setPieces
(
pieces
);
...
...
yd-api/src/main/java/com/yd/api/practitioner/vo/salestarget/SalesTargetMonthSaveRequestVO.java
0 → 100644
View file @
51d92659
package
com
.
yd
.
api
.
practitioner
.
vo
.
salestarget
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
SalesTargetMonthSaveRequestVO
{
private
Long
practitionerId
;
private
List
<
SalesTargetActions
>
salesTargetActionsList
;
}
yd-api/src/main/java/com/yd/api/practitioner/vo/salestarget/SalesTargetMonthSaveResponseVO.java
0 → 100644
View file @
51d92659
package
com
.
yd
.
api
.
practitioner
.
vo
.
salestarget
;
import
com.yd.api.result.CommonResult
;
import
lombok.Data
;
@Data
public
class
SalesTargetMonthSaveResponseVO
{
private
Long
practitionerId
;
private
CommonResult
commonResult
;
}
yd-api/src/main/java/com/yd/api/practitioner/vo/salestarget/SalesTargetQueryRequestVO.java
0 → 100644
View file @
51d92659
package
com
.
yd
.
api
.
practitioner
.
vo
.
salestarget
;
import
lombok.Data
;
@Data
public
class
SalesTargetQueryRequestVO
{
private
Long
practitionerId
;
}
yd-api/src/main/java/com/yd/api/practitioner/vo/salestarget/SalesTargetQueryResponseVO.java
0 → 100644
View file @
51d92659
package
com
.
yd
.
api
.
practitioner
.
vo
.
salestarget
;
import
com.yd.api.result.CommonResult
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
SalesTargetQueryResponseVO
{
private
Long
practitionerId
;
private
Integer
premium
;
private
Integer
commission
;
private
Integer
pieces
;
private
Integer
pieceAveragePremium
;
private
List
<
SalesTargetMonth
>
salesTargetMonths
;
private
List
<
SalesTargetActions
>
salesTargetActions
;
private
CommonResult
commonResult
;
}
yd-api/src/main/java/com/yd/dal/entity/marketing/MktLeadsGoals.java
View file @
51d92659
...
...
@@ -16,7 +16,7 @@ public class MktLeadsGoals {
/**
* FK ag_acl_practitioner.id 经纪人
*/
private
Stri
ng
practitionerId
;
private
Lo
ng
practitionerId
;
/**
* 目标所属年度
...
...
yd-api/src/main/java/com/yd/dal/mapper/marketing/MktLeadsGoalsActionsMapper.java
View file @
51d92659
...
...
@@ -3,6 +3,8 @@ package com.yd.dal.mapper.marketing;
import
com.yd.dal.entity.marketing.MktLeadsGoalsActions
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
MktLeadsGoalsActionsMapper
{
int
deleteByPrimaryKey
(
Long
id
);
...
...
@@ -17,4 +19,6 @@ public interface MktLeadsGoalsActionsMapper {
int
updateByPrimaryKey
(
MktLeadsGoalsActions
record
);
void
updateIsActiveIsNull
(
@Param
(
"practitionerId"
)
Long
practitionerId
,
@Param
(
"year"
)
Integer
year
);
List
<
MktLeadsGoalsActions
>
findByMktLeadsGoalsActions
(
MktLeadsGoalsActions
mktLeadsGoalsActions
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/mapper/marketing/MktLeadsGoalsMapper.java
View file @
51d92659
package
com
.
yd
.
dal
.
mapper
.
marketing
;
import
com.yd.dal.entity.marketing.MktLeadsGoals
;
import
org.apache.ibatis.annotations.Param
;
import
com.yd.dal.entity.marketing.MktLeadsGoals
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
MktLeadsGoalsMapper
{
int
deleteByPrimaryKey
(
Long
id
);
...
...
@@ -16,5 +17,7 @@ public interface MktLeadsGoalsMapper {
int
updateByPrimaryKey
(
MktLeadsGoals
record
);
void
updateIsActiveIsNull
(
@Param
(
"practitionerId"
)
Long
practitionerId
,
@Param
(
"year"
)
Integer
year
);
void
updateIsActiveIsNull
(
@Param
(
"practitionerId"
)
Long
practitionerId
,
@Param
(
"year"
)
Integer
year
);
List
<
MktLeadsGoals
>
selectByMktLeadsGoals
(
MktLeadsGoals
mktLeadsGoals
);
}
\ No newline at end of file
yd-api/src/main/java/com/yd/dal/service/marketing/Impl/MktLeadsGoalsActionsDALServiceImpl.java
View file @
51d92659
...
...
@@ -6,6 +6,7 @@ import com.yd.dal.service.marketing.MktLeadsGoalsActionsDALService;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Service
(
"mktLeadsGoalsActionsService"
)
public
class
MktLeadsGoalsActionsDALServiceImpl
implements
MktLeadsGoalsActionsDALService
{
...
...
@@ -22,4 +23,9 @@ public class MktLeadsGoalsActionsDALServiceImpl implements MktLeadsGoalsActionsD
public
void
updateIsActiveIsNull
(
Long
practitionerId
,
int
year
)
{
mktLeadsGoalsActionsMapper
.
updateIsActiveIsNull
(
practitionerId
,
year
);
}
@Override
public
List
<
MktLeadsGoalsActions
>
findByMktLeadsGoalsActions
(
MktLeadsGoalsActions
mktLeadsGoalsActions
)
{
return
mktLeadsGoalsActionsMapper
.
findByMktLeadsGoalsActions
(
mktLeadsGoalsActions
);
}
}
yd-api/src/main/java/com/yd/dal/service/marketing/Impl/MktLeadsGoalsDALServiceImpl.java
View file @
51d92659
...
...
@@ -6,6 +6,7 @@ import com.yd.dal.service.marketing.MktLeadsGoalsDALService;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Service
(
"mktLeadsGoalsDALService"
)
public
class
MktLeadsGoalsDALServiceImpl
implements
MktLeadsGoalsDALService
{
...
...
@@ -22,4 +23,9 @@ public class MktLeadsGoalsDALServiceImpl implements MktLeadsGoalsDALService {
public
void
updateIsActiveIsNull
(
Long
practitionerId
,
Integer
year
)
{
mktLeadsGoalsMapper
.
updateIsActiveIsNull
(
practitionerId
,
year
)
;
}
@Override
public
List
<
MktLeadsGoals
>
findByMktLeadsGoals
(
MktLeadsGoals
mktLeadsGoals
)
{
return
mktLeadsGoalsMapper
.
selectByMktLeadsGoals
(
mktLeadsGoals
);
}
}
yd-api/src/main/java/com/yd/dal/service/marketing/MktLeadsGoalsActionsDALService.java
View file @
51d92659
...
...
@@ -2,8 +2,12 @@ package com.yd.dal.service.marketing;
import
com.yd.dal.entity.marketing.MktLeadsGoalsActions
;
import
java.util.List
;
public
interface
MktLeadsGoalsActionsDALService
{
void
save
(
MktLeadsGoalsActions
mktLeadsGoalsActions
);
void
updateIsActiveIsNull
(
Long
practitionerId
,
int
year
);
List
<
MktLeadsGoalsActions
>
findByMktLeadsGoalsActions
(
MktLeadsGoalsActions
mktLeadsGoalsActions
);
}
yd-api/src/main/java/com/yd/dal/service/marketing/MktLeadsGoalsDALService.java
View file @
51d92659
...
...
@@ -2,8 +2,12 @@ package com.yd.dal.service.marketing;
import
com.yd.dal.entity.marketing.MktLeadsGoals
;
import
java.util.List
;
public
interface
MktLeadsGoalsDALService
{
void
saveMktLeadsGoals
(
MktLeadsGoals
mktLeadsGoals
);
void
updateIsActiveIsNull
(
Long
practitionerId
,
Integer
year
);
List
<
MktLeadsGoals
>
findByMktLeadsGoals
(
MktLeadsGoals
mktLeadsGoals
);
}
yd-api/src/main/resources/mapper/marketing/MktLeadsGoalsActionsMapper.xml
View file @
51d92659
...
...
@@ -198,4 +198,50 @@
and current_year = #{year,jdbcType=INTEGER}
and is_active =1;
</update>
<select
id=
"findByMktLeadsGoalsActions"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_mkt_leads_goals_actions
<where>
<if
test=
"id != null"
>
id = #{id,jdbcType=BIGINT}
</if>
<if
test=
"practitionerId != null"
>
and practitioner_id = #{practitionerId,jdbcType=BIGINT}
</if>
<if
test=
"currentYear != null"
>
and current_year = #{currentYear,jdbcType=INTEGER}
</if>
<if
test=
"statisticTimeUnit != null"
>
and statistic_time_unit = #{statisticTimeUnit,jdbcType=INTEGER}
</if>
<if
test=
"leadsActionId != null"
>
and leads_action_id = #{leadsActionId,jdbcType=BIGINT}
</if>
<if
test=
"leadsActionName != null"
>
and leads_action_name = #{leadsActionName,jdbcType=VARCHAR}
</if>
<if
test=
"actionStandards != null"
>
and action_standards = #{actionStandards,jdbcType=INTEGER}
</if>
<if
test=
"currentVersion != null"
>
and current_version = #{currentVersion,jdbcType=TIMESTAMP}
</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>
<if
test=
"updatedAt != null"
>
and updated_at = #{updatedAt,jdbcType=TIMESTAMP}
</if>
<if
test=
"updatedBy != null"
>
and updated_by = #{updatedBy,jdbcType=BIGINT}
</if>
</where>
</select>
</mapper>
\ No newline at end of file
yd-api/src/main/resources/mapper/marketing/MktLeadsGoalsMapper.xml
View file @
51d92659
...
...
@@ -5,7 +5,7 @@
<!--@mbg.generated-->
<!--@Table ag_mkt_leads_goals-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"practitioner_id"
jdbcType=
"
VARCHAR
"
property=
"practitionerId"
/>
<result
column=
"practitioner_id"
jdbcType=
"
BIGINT
"
property=
"practitionerId"
/>
<result
column=
"current_year"
jdbcType=
"INTEGER"
property=
"currentYear"
/>
<result
column=
"statistic_time_unit"
jdbcType=
"INTEGER"
property=
"statisticTimeUnit"
/>
<result
column=
"seq_time"
jdbcType=
"INTEGER"
property=
"seqTime"
/>
...
...
@@ -45,7 +45,7 @@
pieces, piece_average_premium, current_version,
is_active, created_at, created_by,
updated_at, updated_by)
values (#{practitionerId,jdbcType=
VARCHAR
}, #{currentYear,jdbcType=INTEGER}, #{statisticTimeUnit,jdbcType=INTEGER},
values (#{practitionerId,jdbcType=
BIGINT
}, #{currentYear,jdbcType=INTEGER}, #{statisticTimeUnit,jdbcType=INTEGER},
#{seqTime,jdbcType=INTEGER}, #{premium,jdbcType=INTEGER}, #{commission,jdbcType=INTEGER},
#{pieces,jdbcType=INTEGER}, #{pieceAveragePremium,jdbcType=INTEGER}, #{currentVersion,jdbcType=TIMESTAMP},
#{isActive,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=BIGINT},
...
...
@@ -100,7 +100,7 @@
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"practitionerId != null"
>
#{practitionerId,jdbcType=
VARCHAR
},
#{practitionerId,jdbcType=
BIGINT
},
</if>
<if
test=
"currentYear != null"
>
#{currentYear,jdbcType=INTEGER},
...
...
@@ -148,7 +148,7 @@
update ag_mkt_leads_goals
<set>
<if
test=
"practitionerId != null"
>
practitioner_id = #{practitionerId,jdbcType=
VARCHAR
},
practitioner_id = #{practitionerId,jdbcType=
BIGINT
},
</if>
<if
test=
"currentYear != null"
>
current_year = #{currentYear,jdbcType=INTEGER},
...
...
@@ -195,7 +195,7 @@
<update
id=
"updateByPrimaryKey"
parameterType=
"com.yd.dal.entity.marketing.MktLeadsGoals"
>
<!--@mbg.generated-->
update ag_mkt_leads_goals
set practitioner_id = #{practitionerId,jdbcType=
VARCHAR
},
set practitioner_id = #{practitionerId,jdbcType=
BIGINT
},
current_year = #{currentYear,jdbcType=INTEGER},
statistic_time_unit = #{statisticTimeUnit,jdbcType=INTEGER},
seq_time = #{seqTime,jdbcType=INTEGER},
...
...
@@ -218,4 +218,56 @@
AND current_year = #{year,jdbcType=INTEGER}
AND is_active = 1;
</update>
<select
id=
"selectByMktLeadsGoals"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from ag_mkt_leads_goals
<where>
<if
test=
"id != null"
>
id = #{id,jdbcType=BIGINT}
</if>
<if
test=
"practitionerId != null"
>
and practitioner_id = #{practitionerId,jdbcType=BIGINT}
</if>
<if
test=
"currentYear != null"
>
and current_year = #{currentYear,jdbcType=INTEGER}
</if>
<if
test=
"statisticTimeUnit != null"
>
and statistic_time_unit = #{statisticTimeUnit,jdbcType=INTEGER}
</if>
<if
test=
"seqTime != null"
>
and seq_time = #{seqTime,jdbcType=INTEGER}
</if>
<if
test=
"premium != null"
>
and premium = #{premium,jdbcType=INTEGER}
</if>
<if
test=
"commission != null"
>
and commission = #{commission,jdbcType=INTEGER}
</if>
<if
test=
"pieces != null"
>
and pieces = #{pieces,jdbcType=INTEGER}
</if>
<if
test=
"pieceAveragePremium != null"
>
and piece_average_premium = #{pieceAveragePremium,jdbcType=INTEGER}
</if>
<if
test=
"currentVersion != null"
>
and current_version = #{currentVersion,jdbcType=TIMESTAMP}
</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>
<if
test=
"updatedAt != null"
>
and updated_at = #{updatedAt,jdbcType=TIMESTAMP}
</if>
<if
test=
"updatedBy != null"
>
and updated_by = #{updatedBy,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