提交 cacfcdad 编写于 作者: ibizdev's avatar ibizdev

xignzi006 发布系统代码

上级 b6c93d1b
/**
* 市场活动-市场活动
*
* @export
* @interface CampaignCampaign
*/
export interface CampaignCampaign {
/**
* 市场活动-市场活动名称
*
* @returns {*}
* @memberof CampaignCampaign
*/
campaigncampaignname?: any;
/**
* 市场活动-市场活动标识
*
* @returns {*}
* @memberof CampaignCampaign
*/
campaigncampaignid?: any;
/**
* 建立人
*
* @returns {*}
* @memberof CampaignCampaign
*/
createman?: any;
/**
* 建立时间
*
* @returns {*}
* @memberof CampaignCampaign
*/
createdate?: any;
/**
* 更新时间
*
* @returns {*}
* @memberof CampaignCampaign
*/
updatedate?: any;
/**
* 更新人
*
* @returns {*}
* @memberof CampaignCampaign
*/
updateman?: any;
/**
* 关系类型
*
* @returns {*}
* @memberof CampaignCampaign
*/
relationshipstype?: any;
/**
* 市场活动
*
* @returns {*}
* @memberof CampaignCampaign
*/
campaignid?: any;
/**
* 活动名称
*
* @returns {*}
* @memberof CampaignCampaign
*/
campaignname?: any;
/**
* 市场活动
*
* @returns {*}
* @memberof CampaignCampaign
*/
campaign2id?: any;
/**
* 活动2名称
*
* @returns {*}
* @memberof CampaignCampaign
*/
campaign2name?: any;
}
\ No newline at end of file
/**
* 市场活动-营销列表
*
* @export
* @interface CampaignList
*/
export interface CampaignList {
/**
* 建立时间
*
* @returns {*}
* @memberof CampaignList
*/
createdate?: any;
/**
* 建立人
*
* @returns {*}
* @memberof CampaignList
*/
createman?: any;
/**
* 关系标识
*
* @returns {*}
* @memberof CampaignList
*/
campaignlistid?: any;
/**
* 关系名称
*
* @returns {*}
* @memberof CampaignList
*/
campaignlistname?: any;
/**
* 关系类型
*
* @returns {*}
* @memberof CampaignList
*/
relationshipstype?: any;
/**
* 更新时间
*
* @returns {*}
* @memberof CampaignList
*/
updatedate?: any;
/**
* 更新人
*
* @returns {*}
* @memberof CampaignList
*/
updateman?: any;
/**
* 市场活动
*
* @returns {*}
* @memberof CampaignList
*/
campaignid?: any;
/**
* 活动名称
*
* @returns {*}
* @memberof CampaignList
*/
campaignname?: any;
/**
* 列表
*
* @returns {*}
* @memberof CampaignList
*/
listid?: any;
/**
* 名称
*
* @returns {*}
* @memberof CampaignList
*/
listname?: any;
}
\ No newline at end of file
import campaignlist_en_US from '@locale/lanres/entities/campaign-list/campaign-list_en_US';
import task_en_US from '@locale/lanres/entities/task/task_en_US'; import task_en_US from '@locale/lanres/entities/task/task_en_US';
import letter_en_US from '@locale/lanres/entities/letter/letter_en_US'; import letter_en_US from '@locale/lanres/entities/letter/letter_en_US';
import pricelevel_en_US from '@locale/lanres/entities/price-level/price-level_en_US'; import pricelevel_en_US from '@locale/lanres/entities/price-level/price-level_en_US';
...@@ -14,6 +15,7 @@ import ibizlist_en_US from '@locale/lanres/entities/ibiz-list/ibiz-list_en_US'; ...@@ -14,6 +15,7 @@ import ibizlist_en_US from '@locale/lanres/entities/ibiz-list/ibiz-list_en_US';
import campaignresponse_en_US from '@locale/lanres/entities/campaign-response/campaign-response_en_US'; import campaignresponse_en_US from '@locale/lanres/entities/campaign-response/campaign-response_en_US';
import phonecall_en_US from '@locale/lanres/entities/phone-call/phone-call_en_US'; import phonecall_en_US from '@locale/lanres/entities/phone-call/phone-call_en_US';
import appointment_en_US from '@locale/lanres/entities/appointment/appointment_en_US'; import appointment_en_US from '@locale/lanres/entities/appointment/appointment_en_US';
import campaigncampaign_en_US from '@locale/lanres/entities/campaign-campaign/campaign-campaign_en_US';
import salesliterature_en_US from '@locale/lanres/entities/sales-literature/sales-literature_en_US'; import salesliterature_en_US from '@locale/lanres/entities/sales-literature/sales-literature_en_US';
import activitypointer_en_US from '@locale/lanres/entities/activity-pointer/activity-pointer_en_US'; import activitypointer_en_US from '@locale/lanres/entities/activity-pointer/activity-pointer_en_US';
import fax_en_US from '@locale/lanres/entities/fax/fax_en_US'; import fax_en_US from '@locale/lanres/entities/fax/fax_en_US';
...@@ -129,6 +131,7 @@ export default { ...@@ -129,6 +131,7 @@ export default {
}, },
}, },
entities: { entities: {
campaignlist: campaignlist_en_US,
task: task_en_US, task: task_en_US,
letter: letter_en_US, letter: letter_en_US,
pricelevel: pricelevel_en_US, pricelevel: pricelevel_en_US,
...@@ -145,6 +148,7 @@ export default { ...@@ -145,6 +148,7 @@ export default {
campaignresponse: campaignresponse_en_US, campaignresponse: campaignresponse_en_US,
phonecall: phonecall_en_US, phonecall: phonecall_en_US,
appointment: appointment_en_US, appointment: appointment_en_US,
campaigncampaign: campaigncampaign_en_US,
salesliterature: salesliterature_en_US, salesliterature: salesliterature_en_US,
activitypointer: activitypointer_en_US, activitypointer: activitypointer_en_US,
fax: fax_en_US, fax: fax_en_US,
......
import campaignlist_zh_CN from '@locale/lanres/entities/campaign-list/campaign-list_zh_CN';
import task_zh_CN from '@locale/lanres/entities/task/task_zh_CN'; import task_zh_CN from '@locale/lanres/entities/task/task_zh_CN';
import letter_zh_CN from '@locale/lanres/entities/letter/letter_zh_CN'; import letter_zh_CN from '@locale/lanres/entities/letter/letter_zh_CN';
import pricelevel_zh_CN from '@locale/lanres/entities/price-level/price-level_zh_CN'; import pricelevel_zh_CN from '@locale/lanres/entities/price-level/price-level_zh_CN';
...@@ -14,6 +15,7 @@ import ibizlist_zh_CN from '@locale/lanres/entities/ibiz-list/ibiz-list_zh_CN'; ...@@ -14,6 +15,7 @@ import ibizlist_zh_CN from '@locale/lanres/entities/ibiz-list/ibiz-list_zh_CN';
import campaignresponse_zh_CN from '@locale/lanres/entities/campaign-response/campaign-response_zh_CN'; import campaignresponse_zh_CN from '@locale/lanres/entities/campaign-response/campaign-response_zh_CN';
import phonecall_zh_CN from '@locale/lanres/entities/phone-call/phone-call_zh_CN'; import phonecall_zh_CN from '@locale/lanres/entities/phone-call/phone-call_zh_CN';
import appointment_zh_CN from '@locale/lanres/entities/appointment/appointment_zh_CN'; import appointment_zh_CN from '@locale/lanres/entities/appointment/appointment_zh_CN';
import campaigncampaign_zh_CN from '@locale/lanres/entities/campaign-campaign/campaign-campaign_zh_CN';
import salesliterature_zh_CN from '@locale/lanres/entities/sales-literature/sales-literature_zh_CN'; import salesliterature_zh_CN from '@locale/lanres/entities/sales-literature/sales-literature_zh_CN';
import activitypointer_zh_CN from '@locale/lanres/entities/activity-pointer/activity-pointer_zh_CN'; import activitypointer_zh_CN from '@locale/lanres/entities/activity-pointer/activity-pointer_zh_CN';
import fax_zh_CN from '@locale/lanres/entities/fax/fax_zh_CN'; import fax_zh_CN from '@locale/lanres/entities/fax/fax_zh_CN';
...@@ -129,6 +131,7 @@ export default { ...@@ -129,6 +131,7 @@ export default {
}, },
}, },
entities: { entities: {
campaignlist: campaignlist_zh_CN,
task: task_zh_CN, task: task_zh_CN,
letter: letter_zh_CN, letter: letter_zh_CN,
pricelevel: pricelevel_zh_CN, pricelevel: pricelevel_zh_CN,
...@@ -145,6 +148,7 @@ export default { ...@@ -145,6 +148,7 @@ export default {
campaignresponse: campaignresponse_zh_CN, campaignresponse: campaignresponse_zh_CN,
phonecall: phonecall_zh_CN, phonecall: phonecall_zh_CN,
appointment: appointment_zh_CN, appointment: appointment_zh_CN,
campaigncampaign: campaigncampaign_zh_CN,
salesliterature: salesliterature_zh_CN, salesliterature: salesliterature_zh_CN,
activitypointer: activitypointer_zh_CN, activitypointer: activitypointer_zh_CN,
fax: fax_zh_CN, fax: fax_zh_CN,
......
export default {
fields: {
campaigncampaignname: '市场活动-市场活动名称',
campaigncampaignid: '市场活动-市场活动标识',
createman: '建立人',
createdate: '建立时间',
updatedate: '更新时间',
updateman: '更新人',
relationshipstype: '关系类型',
campaignid: '市场活动',
campaignname: '活动名称',
campaign2id: '市场活动',
campaign2name: '活动2名称',
},
};
\ No newline at end of file
export default {
fields: {
campaigncampaignname: '市场活动-市场活动名称',
campaigncampaignid: '市场活动-市场活动标识',
createman: '建立人',
createdate: '建立时间',
updatedate: '更新时间',
updateman: '更新人',
relationshipstype: '关系类型',
campaignid: '市场活动',
campaignname: '活动名称',
campaign2id: '市场活动',
campaign2name: '活动2名称',
},
};
\ No newline at end of file
export default {
fields: {
createdate: '建立时间',
createman: '建立人',
campaignlistid: '关系标识',
campaignlistname: '关系名称',
relationshipstype: '关系类型',
updatedate: '更新时间',
updateman: '更新人',
campaignid: '市场活动',
campaignname: '活动名称',
listid: '列表',
listname: '名称',
},
};
\ No newline at end of file
export default {
fields: {
createdate: '建立时间',
createman: '建立人',
campaignlistid: '关系标识',
campaignlistname: '关系名称',
relationshipstype: '关系类型',
updatedate: '更新时间',
updateman: '更新人',
campaignid: '市场活动',
campaignname: '活动名称',
listid: '列表',
listname: '名称',
},
};
\ No newline at end of file
...@@ -7,6 +7,7 @@ import './login/login'; ...@@ -7,6 +7,7 @@ import './login/login';
import './upload/upload'; import './upload/upload';
// 实体级接口对象 // 实体级接口对象
import './entity/campaign-lists/campaign-lists';
import './entity/tasks/tasks'; import './entity/tasks/tasks';
import './entity/letters/letters'; import './entity/letters/letters';
import './entity/price-levels/price-levels'; import './entity/price-levels/price-levels';
...@@ -23,6 +24,7 @@ import './entity/ibiz-lists/ibiz-lists'; ...@@ -23,6 +24,7 @@ import './entity/ibiz-lists/ibiz-lists';
import './entity/campaign-responses/campaign-responses'; import './entity/campaign-responses/campaign-responses';
import './entity/phone-calls/phone-calls'; import './entity/phone-calls/phone-calls';
import './entity/appointments/appointments'; import './entity/appointments/appointments';
import './entity/campaign-campaigns/campaign-campaigns';
import './entity/sales-literatures/sales-literatures'; import './entity/sales-literatures/sales-literatures';
import './entity/activity-pointers/activity-pointers'; import './entity/activity-pointers/activity-pointers';
import './entity/faxs/faxs'; import './entity/faxs/faxs';
......
import { Http,Util } from '@/utils';
import EntityService from '../entity-service';
/**
* 市场活动-市场活动服务对象基类
*
* @export
* @class CampaignCampaignServiceBase
* @extends {EntityServie}
*/
export default class CampaignCampaignServiceBase extends EntityService {
/**
* Creates an instance of CampaignCampaignServiceBase.
*
* @param {*} [opts={}]
* @memberof CampaignCampaignServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 初始化基础数据
*
* @memberof CampaignCampaignServiceBase
*/
public initBasicData(){
this.APPLYDEKEY ='campaigncampaign';
this.APPDEKEY = 'campaigncampaignid';
this.APPDENAME = 'campaigncampaigns';
this.APPDETEXT = 'campaigncampaignname';
this.APPNAME = 'businesscentral';
this.SYSTEMNAME = 'ibizbusinesscentral';
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CampaignCampaignServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.campaign && context.campaigncampaign){
return Http.getInstance().get(`/campaigns/${context.campaign}/campaigncampaigns/${context.campaigncampaign}/select`,isloading);
}
return Http.getInstance().get(`/campaigncampaigns/${context.campaigncampaign}/select`,isloading);
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CampaignCampaignServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.campaign && true){
return Http.getInstance().get(`/campaigns/${context.campaign}/campaigncampaigns/getdraft`,isloading);
}
let res:any = await Http.getInstance().get(`/campaigncampaigns/getdraft`,isloading);
res.data.campaigncampaign = data.campaigncampaign;
return res;
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CampaignCampaignServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.campaign && context.campaigncampaign){
return Http.getInstance().get(`/campaigns/${context.campaign}/campaigncampaigns/${context.campaigncampaign}`,isloading);
}
let res:any = await Http.getInstance().get(`/campaigncampaigns/${context.campaigncampaign}`,isloading);
return res;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CampaignCampaignServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.campaign && context.campaigncampaign){
return Http.getInstance().put(`/campaigns/${context.campaign}/campaigncampaigns/${context.campaigncampaign}`,data,isloading);
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/campaigncampaigns/${context.campaigncampaign}`,data,isloading);
return res;
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CampaignCampaignServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.campaign && context.campaigncampaign){
return Http.getInstance().post(`/campaigns/${context.campaign}/campaigncampaigns/${context.campaigncampaign}/save`,data,isloading);
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/campaigncampaigns/${context.campaigncampaign}/save`,data,isloading);
return res;
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CampaignCampaignServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.campaign && true){
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
return Http.getInstance().post(`/campaigns/${context.campaign}/campaigncampaigns`,data,isloading);
}
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/campaigncampaigns`,data,isloading);
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CampaignCampaignServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.campaign && context.campaigncampaign){
return Http.getInstance().post(`/campaigns/${context.campaign}/campaigncampaigns/${context.campaigncampaign}/checkkey`,data,isloading);
}
return Http.getInstance().post(`/campaigncampaigns/${context.campaigncampaign}/checkkey`,data,isloading);
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CampaignCampaignServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.campaign && context.campaigncampaign){
return Http.getInstance().delete(`/campaigns/${context.campaign}/campaigncampaigns/${context.campaigncampaign}`,isloading);
}
return Http.getInstance().delete(`/campaigncampaigns/${context.campaigncampaign}`,isloading);
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CampaignCampaignServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.campaign && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/campaigns/${context.campaign}/campaigncampaigns/fetchdefault`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/campaigncampaigns/fetchdefault`,tempData,isloading);
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import CampaignCampaignServiceBase from './campaign-campaign-service-base';
/**
* 市场活动-市场活动服务对象
*
* @export
* @class CampaignCampaignService
* @extends {CampaignCampaignServiceBase}
*/
export default class CampaignCampaignService extends CampaignCampaignServiceBase {
/**
* Creates an instance of CampaignCampaignService.
*
* @param {*} [opts={}]
* @memberof CampaignCampaignService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import EntityService from '../entity-service';
/**
* 市场活动-营销列表服务对象基类
*
* @export
* @class CampaignListServiceBase
* @extends {EntityServie}
*/
export default class CampaignListServiceBase extends EntityService {
/**
* Creates an instance of CampaignListServiceBase.
*
* @param {*} [opts={}]
* @memberof CampaignListServiceBase
*/
constructor(opts: any = {}) {
super(opts);
}
/**
* 初始化基础数据
*
* @memberof CampaignListServiceBase
*/
public initBasicData(){
this.APPLYDEKEY ='campaignlist';
this.APPDEKEY = 'campaignlistid';
this.APPDENAME = 'campaignlists';
this.APPDETEXT = 'campaignlistname';
this.APPNAME = 'businesscentral';
this.SYSTEMNAME = 'ibizbusinesscentral';
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CampaignListServiceBase
*/
public async Select(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.ibizlist && context.campaignlist){
return Http.getInstance().get(`/ibizlists/${context.ibizlist}/campaignlists/${context.campaignlist}/select`,isloading);
}
if(context.campaign && context.campaignlist){
return Http.getInstance().get(`/campaigns/${context.campaign}/campaignlists/${context.campaignlist}/select`,isloading);
}
return Http.getInstance().get(`/campaignlists/${context.campaignlist}/select`,isloading);
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CampaignListServiceBase
*/
public async Remove(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.ibizlist && context.campaignlist){
return Http.getInstance().delete(`/ibizlists/${context.ibizlist}/campaignlists/${context.campaignlist}`,isloading);
}
if(context.campaign && context.campaignlist){
return Http.getInstance().delete(`/campaigns/${context.campaign}/campaignlists/${context.campaignlist}`,isloading);
}
return Http.getInstance().delete(`/campaignlists/${context.campaignlist}`,isloading);
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CampaignListServiceBase
*/
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.ibizlist && true){
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
return Http.getInstance().post(`/ibizlists/${context.ibizlist}/campaignlists`,data,isloading);
}
if(context.campaign && true){
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
return Http.getInstance().post(`/campaigns/${context.campaign}/campaignlists`,data,isloading);
}
let masterData:any = {};
Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null;
}
if(data.srffrontuf){
delete data.srffrontuf;
}
let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/campaignlists`,data,isloading);
return res;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CampaignListServiceBase
*/
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.ibizlist && true){
return Http.getInstance().get(`/ibizlists/${context.ibizlist}/campaignlists/getdraft`,isloading);
}
if(context.campaign && true){
return Http.getInstance().get(`/campaigns/${context.campaign}/campaignlists/getdraft`,isloading);
}
let res:any = await Http.getInstance().get(`/campaignlists/getdraft`,isloading);
res.data.campaignlist = data.campaignlist;
return res;
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CampaignListServiceBase
*/
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.ibizlist && context.campaignlist){
return Http.getInstance().post(`/ibizlists/${context.ibizlist}/campaignlists/${context.campaignlist}/save`,data,isloading);
}
if(context.campaign && context.campaignlist){
return Http.getInstance().post(`/campaigns/${context.campaign}/campaignlists/${context.campaignlist}/save`,data,isloading);
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/campaignlists/${context.campaignlist}/save`,data,isloading);
return res;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CampaignListServiceBase
*/
public async CheckKey(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.ibizlist && context.campaignlist){
return Http.getInstance().post(`/ibizlists/${context.ibizlist}/campaignlists/${context.campaignlist}/checkkey`,data,isloading);
}
if(context.campaign && context.campaignlist){
return Http.getInstance().post(`/campaigns/${context.campaign}/campaignlists/${context.campaignlist}/checkkey`,data,isloading);
}
return Http.getInstance().post(`/campaignlists/${context.campaignlist}/checkkey`,data,isloading);
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CampaignListServiceBase
*/
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.ibizlist && context.campaignlist){
return Http.getInstance().put(`/ibizlists/${context.ibizlist}/campaignlists/${context.campaignlist}`,data,isloading);
}
if(context.campaign && context.campaignlist){
return Http.getInstance().put(`/campaigns/${context.campaign}/campaignlists/${context.campaignlist}`,data,isloading);
}
let masterData:any = {};
Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/campaignlists/${context.campaignlist}`,data,isloading);
return res;
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CampaignListServiceBase
*/
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.ibizlist && context.campaignlist){
return Http.getInstance().get(`/ibizlists/${context.ibizlist}/campaignlists/${context.campaignlist}`,isloading);
}
if(context.campaign && context.campaignlist){
return Http.getInstance().get(`/campaigns/${context.campaign}/campaignlists/${context.campaignlist}`,isloading);
}
let res:any = await Http.getInstance().get(`/campaignlists/${context.campaignlist}`,isloading);
return res;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof CampaignListServiceBase
*/
public async FetchDefault(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.ibizlist && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/ibizlists/${context.ibizlist}/campaignlists/fetchdefault`,tempData,isloading);
}
if(context.campaign && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/campaigns/${context.campaign}/campaignlists/fetchdefault`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().get(`/campaignlists/fetchdefault`,tempData,isloading);
}
}
\ No newline at end of file
import { Http,Util } from '@/utils';
import CampaignListServiceBase from './campaign-list-service-base';
/**
* 市场活动-营销列表服务对象
*
* @export
* @class CampaignListService
* @extends {CampaignListServiceBase}
*/
export default class CampaignListService extends CampaignListServiceBase {
/**
* Creates an instance of CampaignListService.
*
* @param {*} [opts={}]
* @memberof CampaignListService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
...@@ -77,6 +77,36 @@ export default class CampaignServiceBase extends EntityService { ...@@ -77,6 +77,36 @@ export default class CampaignServiceBase extends EntityService {
} }
} }
masterData.leads = leadsData; masterData.leads = leadsData;
let campaigncampaignsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns'),'undefined')){
campaigncampaignsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns') as any);
if(campaigncampaignsData && campaigncampaignsData.length && campaigncampaignsData.length > 0){
campaigncampaignsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.campaigncampaignid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.campaigncampaigns = campaigncampaignsData;
let campaignlistsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists'),'undefined')){
campaignlistsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists') as any);
if(campaignlistsData && campaignlistsData.length && campaignlistsData.length > 0){
campaignlistsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.campaignlistid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.campaignlists = campaignlistsData;
Object.assign(data,masterData); Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){ if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null; data[this.APPDEKEY] = null;
...@@ -87,6 +117,8 @@ export default class CampaignServiceBase extends EntityService { ...@@ -87,6 +117,8 @@ export default class CampaignServiceBase extends EntityService {
let tempContext:any = JSON.parse(JSON.stringify(context)); let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/campaigns`,data,isloading); let res:any = await Http.getInstance().post(`/campaigns`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(tempContext.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(tempContext.srfsessionkey+'_campaigncampaigns',JSON.stringify(res.data.campaigncampaigns));
this.tempStorage.setItem(tempContext.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
return res; return res;
} }
...@@ -116,9 +148,41 @@ export default class CampaignServiceBase extends EntityService { ...@@ -116,9 +148,41 @@ export default class CampaignServiceBase extends EntityService {
} }
} }
masterData.leads = leadsData; masterData.leads = leadsData;
let campaigncampaignsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns'),'undefined')){
campaigncampaignsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns') as any);
if(campaigncampaignsData && campaigncampaignsData.length && campaigncampaignsData.length > 0){
campaigncampaignsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.campaigncampaignid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.campaigncampaigns = campaigncampaignsData;
let campaignlistsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists'),'undefined')){
campaignlistsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists') as any);
if(campaignlistsData && campaignlistsData.length && campaignlistsData.length > 0){
campaignlistsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.campaignlistid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.campaignlists = campaignlistsData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/campaigns/${context.campaign}/save`,data,isloading); let res:any = await Http.getInstance().post(`/campaigns/${context.campaign}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_campaigncampaigns',JSON.stringify(res.data.campaigncampaigns));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
return res; return res;
} }
...@@ -135,6 +199,8 @@ export default class CampaignServiceBase extends EntityService { ...@@ -135,6 +199,8 @@ export default class CampaignServiceBase extends EntityService {
let res:any = await Http.getInstance().get(`/campaigns/getdraft`,isloading); let res:any = await Http.getInstance().get(`/campaigns/getdraft`,isloading);
res.data.campaign = data.campaign; res.data.campaign = data.campaign;
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_campaigncampaigns',JSON.stringify(res.data.campaigncampaigns));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
return res; return res;
} }
...@@ -164,9 +230,41 @@ export default class CampaignServiceBase extends EntityService { ...@@ -164,9 +230,41 @@ export default class CampaignServiceBase extends EntityService {
} }
} }
masterData.leads = leadsData; masterData.leads = leadsData;
let campaigncampaignsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns'),'undefined')){
campaigncampaignsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaigncampaigns') as any);
if(campaigncampaignsData && campaigncampaignsData.length && campaigncampaignsData.length > 0){
campaigncampaignsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.campaigncampaignid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.campaigncampaigns = campaigncampaignsData;
let campaignlistsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists'),'undefined')){
campaignlistsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists') as any);
if(campaignlistsData && campaignlistsData.length && campaignlistsData.length > 0){
campaignlistsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.campaignlistid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.campaignlists = campaignlistsData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/campaigns/${context.campaign}`,data,isloading); let res:any = await Http.getInstance().put(`/campaigns/${context.campaign}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_campaigncampaigns',JSON.stringify(res.data.campaigncampaigns));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
return res; return res;
} }
...@@ -182,6 +280,8 @@ export default class CampaignServiceBase extends EntityService { ...@@ -182,6 +280,8 @@ export default class CampaignServiceBase extends EntityService {
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/campaigns/${context.campaign}`,isloading); let res:any = await Http.getInstance().get(`/campaigns/${context.campaign}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads)); this.tempStorage.setItem(context.srfsessionkey+'_leads',JSON.stringify(res.data.leads));
this.tempStorage.setItem(context.srfsessionkey+'_campaigncampaigns',JSON.stringify(res.data.campaigncampaigns));
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
return res; return res;
} }
......
...@@ -39,6 +39,7 @@ export class EntityServiceRegister { ...@@ -39,6 +39,7 @@ export class EntityServiceRegister {
* @memberof EntityServiceRegister * @memberof EntityServiceRegister
*/ */
protected init(): void { protected init(): void {
this.allEntityService.set('campaignlist', () => import('@/service/campaign-list/campaign-list-service'));
this.allEntityService.set('task', () => import('@/service/task/task-service')); this.allEntityService.set('task', () => import('@/service/task/task-service'));
this.allEntityService.set('letter', () => import('@/service/letter/letter-service')); this.allEntityService.set('letter', () => import('@/service/letter/letter-service'));
this.allEntityService.set('pricelevel', () => import('@/service/price-level/price-level-service')); this.allEntityService.set('pricelevel', () => import('@/service/price-level/price-level-service'));
...@@ -55,6 +56,7 @@ export class EntityServiceRegister { ...@@ -55,6 +56,7 @@ export class EntityServiceRegister {
this.allEntityService.set('campaignresponse', () => import('@/service/campaign-response/campaign-response-service')); this.allEntityService.set('campaignresponse', () => import('@/service/campaign-response/campaign-response-service'));
this.allEntityService.set('phonecall', () => import('@/service/phone-call/phone-call-service')); this.allEntityService.set('phonecall', () => import('@/service/phone-call/phone-call-service'));
this.allEntityService.set('appointment', () => import('@/service/appointment/appointment-service')); this.allEntityService.set('appointment', () => import('@/service/appointment/appointment-service'));
this.allEntityService.set('campaigncampaign', () => import('@/service/campaign-campaign/campaign-campaign-service'));
this.allEntityService.set('salesliterature', () => import('@/service/sales-literature/sales-literature-service')); this.allEntityService.set('salesliterature', () => import('@/service/sales-literature/sales-literature-service'));
this.allEntityService.set('activitypointer', () => import('@/service/activity-pointer/activity-pointer-service')); this.allEntityService.set('activitypointer', () => import('@/service/activity-pointer/activity-pointer-service'));
this.allEntityService.set('fax', () => import('@/service/fax/fax-service')); this.allEntityService.set('fax', () => import('@/service/fax/fax-service'));
......
...@@ -62,8 +62,24 @@ export default class IBizListServiceBase extends EntityService { ...@@ -62,8 +62,24 @@ export default class IBizListServiceBase extends EntityService {
*/ */
public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Save(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let campaignlistsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists'),'undefined')){
campaignlistsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists') as any);
if(campaignlistsData && campaignlistsData.length && campaignlistsData.length > 0){
campaignlistsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.campaignlistid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.campaignlists = campaignlistsData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().post(`/ibizlists/${context.ibizlist}/save`,data,isloading); let res:any = await Http.getInstance().post(`/ibizlists/${context.ibizlist}/save`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
return res; return res;
} }
...@@ -105,8 +121,24 @@ export default class IBizListServiceBase extends EntityService { ...@@ -105,8 +121,24 @@ export default class IBizListServiceBase extends EntityService {
*/ */
public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Update(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let campaignlistsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists'),'undefined')){
campaignlistsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists') as any);
if(campaignlistsData && campaignlistsData.length && campaignlistsData.length > 0){
campaignlistsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.campaignlistid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.campaignlists = campaignlistsData;
Object.assign(data,masterData); Object.assign(data,masterData);
let res:any = await Http.getInstance().put(`/ibizlists/${context.ibizlist}`,data,isloading); let res:any = await Http.getInstance().put(`/ibizlists/${context.ibizlist}`,data,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
return res; return res;
} }
...@@ -121,6 +153,21 @@ export default class IBizListServiceBase extends EntityService { ...@@ -121,6 +153,21 @@ export default class IBizListServiceBase extends EntityService {
*/ */
public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Create(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let masterData:any = {}; let masterData:any = {};
let campaignlistsData:any = [];
if(!Object.is(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists'),'undefined')){
campaignlistsData = JSON.parse(this.tempStorage.getItem(context.srfsessionkey+'_campaignlists') as any);
if(campaignlistsData && campaignlistsData.length && campaignlistsData.length > 0){
campaignlistsData.forEach((item:any) => {
if(item.srffrontuf){
if(Object.is(item.srffrontuf,"0")){
item.campaignlistid = null;
}
delete item.srffrontuf;
}
});
}
}
masterData.campaignlists = campaignlistsData;
Object.assign(data,masterData); Object.assign(data,masterData);
if(!data.srffrontuf || data.srffrontuf !== "1"){ if(!data.srffrontuf || data.srffrontuf !== "1"){
data[this.APPDEKEY] = null; data[this.APPDEKEY] = null;
...@@ -130,6 +177,7 @@ export default class IBizListServiceBase extends EntityService { ...@@ -130,6 +177,7 @@ export default class IBizListServiceBase extends EntityService {
} }
let tempContext:any = JSON.parse(JSON.stringify(context)); let tempContext:any = JSON.parse(JSON.stringify(context));
let res:any = await Http.getInstance().post(`/ibizlists`,data,isloading); let res:any = await Http.getInstance().post(`/ibizlists`,data,isloading);
this.tempStorage.setItem(tempContext.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
return res; return res;
} }
...@@ -144,6 +192,7 @@ export default class IBizListServiceBase extends EntityService { ...@@ -144,6 +192,7 @@ export default class IBizListServiceBase extends EntityService {
*/ */
public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async Get(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/ibizlists/${context.ibizlist}`,isloading); let res:any = await Http.getInstance().get(`/ibizlists/${context.ibizlist}`,isloading);
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
return res; return res;
} }
...@@ -160,6 +209,7 @@ export default class IBizListServiceBase extends EntityService { ...@@ -160,6 +209,7 @@ export default class IBizListServiceBase extends EntityService {
public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> { public async GetDraft(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = await Http.getInstance().get(`/ibizlists/getdraft`,isloading); let res:any = await Http.getInstance().get(`/ibizlists/getdraft`,isloading);
res.data.ibizlist = data.ibizlist; res.data.ibizlist = data.ibizlist;
this.tempStorage.setItem(context.srfsessionkey+'_campaignlists',JSON.stringify(res.data.campaignlists));
return res; return res;
} }
......
import { Environment } from '@/environments/environment';
import { UIActionTool,Util } from '@/utils';
import UIService from '../ui-service';
import { Subject } from 'rxjs';
import CampaignCampaignService from '@/service/campaign-campaign/campaign-campaign-service';
/**
* 市场活动-市场活动UI服务对象基类
*
* @export
* @class CampaignCampaignUIServiceBase
*/
export default class CampaignCampaignUIServiceBase extends UIService {
/**
* 是否支持工作流
*
* @memberof CampaignCampaignUIServiceBase
*/
public isEnableWorkflow:boolean = false;
/**
* 当前UI服务对应的数据服务对象
*
* @memberof CampaignCampaignUIServiceBase
*/
public dataService:CampaignCampaignService = new CampaignCampaignService();
/**
* 所有关联视图
*
* @memberof CampaignCampaignUIServiceBase
*/
public allViewMap: Map<string, Object> = new Map();
/**
* 状态值
*
* @memberof CampaignCampaignUIServiceBase
*/
public stateValue: number = 0;
/**
* 状态属性
*
* @memberof CampaignCampaignUIServiceBase
*/
public stateField: string = "";
/**
* 主状态属性集合
*
* @memberof CampaignCampaignUIServiceBase
*/
public mainStateFields:Array<any> = [];
/**
* 主状态集合Map
*
* @memberof CampaignCampaignUIServiceBase
*/
public allDeMainStateMap:Map<string,string> = new Map();
/**
* Creates an instance of CampaignCampaignUIServiceBase.
*
* @param {*} [opts={}]
* @memberof CampaignCampaignUIServiceBase
*/
constructor(opts: any = {}) {
super(opts);
this.initViewMap();
this.initDeMainStateMap();
}
/**
* 初始化视图Map
*
* @memberof CampaignCampaignUIServiceBase
*/
public initViewMap(){
}
/**
* 初始化主状态集合
*
* @memberof CampaignCampaignUIServiceBase
*/
public initDeMainStateMap(){
}
/**
* 获取指定数据的重定向页面
*
* @param srfkey 数据主键
* @param isEnableWorkflow 重定向视图是否需要处理流程中的数据
* @memberof CampaignCampaignUIServiceBase
*/
public async getRDAppView(srfkey:string,isEnableWorkflow:boolean){
this.isEnableWorkflow = isEnableWorkflow;
// 进行数据查询
let result:any = await this.dataService.Get({campaigncampaign:srfkey});
const curData:any = result.data;
//判断当前数据模式,默认为true,todo
const iRealDEModel:boolean = true;
let bDataInWF:boolean = false;
let bWFMode:any = false;
// 计算数据模式
if (this.isEnableWorkflow) {
bDataInWF = await this.dataService.testDataInWF({stateValue:this.stateValue,stateField:this.stateField},curData);
if (bDataInWF) {
bDataInWF = true;
bWFMode = await this.dataService.testUserExistWorklist(null,curData);
}
}
let strPDTViewParam:string = await this.getDESDDEViewPDTParam(curData, bDataInWF, bWFMode);
//若不是当前数据模式,处理strPDTViewParam,todo
//查找视图
//返回视图
return this.allViewMap.get(strPDTViewParam);
}
/**
* 获取实际的数据类型
*
* @memberof CampaignCampaignUIServiceBase
*/
public getRealDEType(entity:any){
}
/**
* 获取实体单数据实体视图预定义参数
*
* @param curData 当前数据
* @param bDataInWF 是否有数据在工作流中
* @param bWFMode 是否工作流模式
* @memberof CampaignCampaignUIServiceBase
*/
public async getDESDDEViewPDTParam(curData:any, bDataInWF:boolean, bWFMode:boolean){
let strPDTParam:string = '';
if (bDataInWF) {
// 判断数据是否在流程中
}
//多表单,todo
const isEnableMultiForm:boolean = false;
const multiFormDEField:string|null =null;
if (isEnableMultiForm && multiFormDEField) {
const objFormValue:string = curData[multiFormDEField];
if(!Environment.isAppMode){
return 'MOBEDITVIEW'+objFormValue;
}
return 'EDITVIEW'+objFormValue;
}
if(!Environment.isAppMode){
if(this.getDEMainStateTag(curData)){
return `MOBEDITVIEW:MSTAG:${ await this.getDEMainStateTag(curData)}`;
}
return 'MOBEDITVIEW:';
}
if(this.getDEMainStateTag(curData)){
return `EDITVIEW:MSTAG:${ await this.getDEMainStateTag(curData)}`;
}
return 'EDITVIEW:';
}
/**
* 获取数据对象的主状态标识
*
* @param curData 当前数据
* @memberof CampaignCampaignUIServiceBase
*/
public async getDEMainStateTag(curData:any){
if(this.mainStateFields.length === 0) return null;
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
}
})
let strTag:String = "";
for (let i = 0; i <= 1; i++) {
let strTag:string = (curData[this.mainStateFields[0]])?(i == 0) ? curData[this.mainStateFields[0]] : "":"";
if (this.mainStateFields.length >= 2) {
for (let j = 0; j <= 1; j++) {
let strTag2:string = (curData[this.mainStateFields[1]])?`${strTag}__${(j == 0) ? curData[this.mainStateFields[1]] : ""}`:strTag;
if (this.mainStateFields.length >= 3) {
for (let k = 0; k <= 1; k++) {
let strTag3:string = (curData[this.mainStateFields[2]])?`${strTag2}__${(k == 0) ? curData[this.mainStateFields[2]] : ""}`:strTag2;
// 判断是否存在
return this.allDeMainStateMap.get(strTag3);
}
}else{
return this.allDeMainStateMap.get(strTag2);
}
}
}else{
return this.allDeMainStateMap.get(strTag);
}
}
return null;
}
}
\ No newline at end of file
import CampaignCampaignUIServiceBase from './campaign-campaign-ui-service-base';
/**
* 市场活动-市场活动UI服务对象
*
* @export
* @class CampaignCampaignUIService
*/
export default class CampaignCampaignUIService extends CampaignCampaignUIServiceBase {
/**
* Creates an instance of CampaignCampaignUIService.
*
* @param {*} [opts={}]
* @memberof CampaignCampaignUIService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
import { Environment } from '@/environments/environment';
import { UIActionTool,Util } from '@/utils';
import UIService from '../ui-service';
import { Subject } from 'rxjs';
import CampaignListService from '@/service/campaign-list/campaign-list-service';
/**
* 市场活动-营销列表UI服务对象基类
*
* @export
* @class CampaignListUIServiceBase
*/
export default class CampaignListUIServiceBase extends UIService {
/**
* 是否支持工作流
*
* @memberof CampaignListUIServiceBase
*/
public isEnableWorkflow:boolean = false;
/**
* 当前UI服务对应的数据服务对象
*
* @memberof CampaignListUIServiceBase
*/
public dataService:CampaignListService = new CampaignListService();
/**
* 所有关联视图
*
* @memberof CampaignListUIServiceBase
*/
public allViewMap: Map<string, Object> = new Map();
/**
* 状态值
*
* @memberof CampaignListUIServiceBase
*/
public stateValue: number = 0;
/**
* 状态属性
*
* @memberof CampaignListUIServiceBase
*/
public stateField: string = "";
/**
* 主状态属性集合
*
* @memberof CampaignListUIServiceBase
*/
public mainStateFields:Array<any> = [];
/**
* 主状态集合Map
*
* @memberof CampaignListUIServiceBase
*/
public allDeMainStateMap:Map<string,string> = new Map();
/**
* Creates an instance of CampaignListUIServiceBase.
*
* @param {*} [opts={}]
* @memberof CampaignListUIServiceBase
*/
constructor(opts: any = {}) {
super(opts);
this.initViewMap();
this.initDeMainStateMap();
}
/**
* 初始化视图Map
*
* @memberof CampaignListUIServiceBase
*/
public initViewMap(){
}
/**
* 初始化主状态集合
*
* @memberof CampaignListUIServiceBase
*/
public initDeMainStateMap(){
}
/**
* 获取指定数据的重定向页面
*
* @param srfkey 数据主键
* @param isEnableWorkflow 重定向视图是否需要处理流程中的数据
* @memberof CampaignListUIServiceBase
*/
public async getRDAppView(srfkey:string,isEnableWorkflow:boolean){
this.isEnableWorkflow = isEnableWorkflow;
// 进行数据查询
let result:any = await this.dataService.Get({campaignlist:srfkey});
const curData:any = result.data;
//判断当前数据模式,默认为true,todo
const iRealDEModel:boolean = true;
let bDataInWF:boolean = false;
let bWFMode:any = false;
// 计算数据模式
if (this.isEnableWorkflow) {
bDataInWF = await this.dataService.testDataInWF({stateValue:this.stateValue,stateField:this.stateField},curData);
if (bDataInWF) {
bDataInWF = true;
bWFMode = await this.dataService.testUserExistWorklist(null,curData);
}
}
let strPDTViewParam:string = await this.getDESDDEViewPDTParam(curData, bDataInWF, bWFMode);
//若不是当前数据模式,处理strPDTViewParam,todo
//查找视图
//返回视图
return this.allViewMap.get(strPDTViewParam);
}
/**
* 获取实际的数据类型
*
* @memberof CampaignListUIServiceBase
*/
public getRealDEType(entity:any){
}
/**
* 获取实体单数据实体视图预定义参数
*
* @param curData 当前数据
* @param bDataInWF 是否有数据在工作流中
* @param bWFMode 是否工作流模式
* @memberof CampaignListUIServiceBase
*/
public async getDESDDEViewPDTParam(curData:any, bDataInWF:boolean, bWFMode:boolean){
let strPDTParam:string = '';
if (bDataInWF) {
// 判断数据是否在流程中
}
//多表单,todo
const isEnableMultiForm:boolean = false;
const multiFormDEField:string|null =null;
if (isEnableMultiForm && multiFormDEField) {
const objFormValue:string = curData[multiFormDEField];
if(!Environment.isAppMode){
return 'MOBEDITVIEW'+objFormValue;
}
return 'EDITVIEW'+objFormValue;
}
if(!Environment.isAppMode){
if(this.getDEMainStateTag(curData)){
return `MOBEDITVIEW:MSTAG:${ await this.getDEMainStateTag(curData)}`;
}
return 'MOBEDITVIEW:';
}
if(this.getDEMainStateTag(curData)){
return `EDITVIEW:MSTAG:${ await this.getDEMainStateTag(curData)}`;
}
return 'EDITVIEW:';
}
/**
* 获取数据对象的主状态标识
*
* @param curData 当前数据
* @memberof CampaignListUIServiceBase
*/
public async getDEMainStateTag(curData:any){
if(this.mainStateFields.length === 0) return null;
this.mainStateFields.forEach((singleMainField:any) =>{
if(!(singleMainField in curData)){
console.error(`当前数据对象不包含属性singleMainField,可能会发生错误`);
}
})
let strTag:String = "";
for (let i = 0; i <= 1; i++) {
let strTag:string = (curData[this.mainStateFields[0]])?(i == 0) ? curData[this.mainStateFields[0]] : "":"";
if (this.mainStateFields.length >= 2) {
for (let j = 0; j <= 1; j++) {
let strTag2:string = (curData[this.mainStateFields[1]])?`${strTag}__${(j == 0) ? curData[this.mainStateFields[1]] : ""}`:strTag;
if (this.mainStateFields.length >= 3) {
for (let k = 0; k <= 1; k++) {
let strTag3:string = (curData[this.mainStateFields[2]])?`${strTag2}__${(k == 0) ? curData[this.mainStateFields[2]] : ""}`:strTag2;
// 判断是否存在
return this.allDeMainStateMap.get(strTag3);
}
}else{
return this.allDeMainStateMap.get(strTag2);
}
}
}else{
return this.allDeMainStateMap.get(strTag);
}
}
return null;
}
}
\ No newline at end of file
import CampaignListUIServiceBase from './campaign-list-ui-service-base';
/**
* 市场活动-营销列表UI服务对象
*
* @export
* @class CampaignListUIService
*/
export default class CampaignListUIService extends CampaignListUIServiceBase {
/**
* Creates an instance of CampaignListUIService.
*
* @param {*} [opts={}]
* @memberof CampaignListUIService
*/
constructor(opts: any = {}) {
super(opts);
}
}
\ No newline at end of file
...@@ -39,6 +39,7 @@ export class UIServiceRegister { ...@@ -39,6 +39,7 @@ export class UIServiceRegister {
* @memberof UIServiceRegister * @memberof UIServiceRegister
*/ */
protected init(): void { protected init(): void {
this.allUIService.set('campaignlist', () => import('@/uiservice/campaign-list/campaign-list-ui-service'));
this.allUIService.set('task', () => import('@/uiservice/task/task-ui-service')); this.allUIService.set('task', () => import('@/uiservice/task/task-ui-service'));
this.allUIService.set('letter', () => import('@/uiservice/letter/letter-ui-service')); this.allUIService.set('letter', () => import('@/uiservice/letter/letter-ui-service'));
this.allUIService.set('pricelevel', () => import('@/uiservice/price-level/price-level-ui-service')); this.allUIService.set('pricelevel', () => import('@/uiservice/price-level/price-level-ui-service'));
...@@ -55,6 +56,7 @@ export class UIServiceRegister { ...@@ -55,6 +56,7 @@ export class UIServiceRegister {
this.allUIService.set('campaignresponse', () => import('@/uiservice/campaign-response/campaign-response-ui-service')); this.allUIService.set('campaignresponse', () => import('@/uiservice/campaign-response/campaign-response-ui-service'));
this.allUIService.set('phonecall', () => import('@/uiservice/phone-call/phone-call-ui-service')); this.allUIService.set('phonecall', () => import('@/uiservice/phone-call/phone-call-ui-service'));
this.allUIService.set('appointment', () => import('@/uiservice/appointment/appointment-ui-service')); this.allUIService.set('appointment', () => import('@/uiservice/appointment/appointment-ui-service'));
this.allUIService.set('campaigncampaign', () => import('@/uiservice/campaign-campaign/campaign-campaign-ui-service'));
this.allUIService.set('salesliterature', () => import('@/uiservice/sales-literature/sales-literature-ui-service')); this.allUIService.set('salesliterature', () => import('@/uiservice/sales-literature/sales-literature-ui-service'));
this.allUIService.set('activitypointer', () => import('@/uiservice/activity-pointer/activity-pointer-ui-service')); this.allUIService.set('activitypointer', () => import('@/uiservice/activity-pointer/activity-pointer-ui-service'));
this.allUIService.set('fax', () => import('@/uiservice/fax/fax-ui-service')); this.allUIService.set('fax', () => import('@/uiservice/fax/fax-ui-service'));
......
...@@ -3,6 +3,10 @@ server: ...@@ -3,6 +3,10 @@ server:
#zuul网关路由设置 #zuul网关路由设置
zuul: zuul:
routes: routes:
campaignlist:
path: /campaignlists/**
serviceId: ibizbusinesscentral-centralapi
stripPrefix: false
task: task:
path: /tasks/** path: /tasks/**
serviceId: ibizbusinesscentral-centralapi serviceId: ibizbusinesscentral-centralapi
...@@ -67,6 +71,10 @@ zuul: ...@@ -67,6 +71,10 @@ zuul:
path: /appointments/** path: /appointments/**
serviceId: ibizbusinesscentral-centralapi serviceId: ibizbusinesscentral-centralapi
stripPrefix: false stripPrefix: false
campaigncampaign:
path: /campaigncampaigns/**
serviceId: ibizbusinesscentral-centralapi
stripPrefix: false
salesliterature: salesliterature:
path: /salesliteratures/** path: /salesliteratures/**
serviceId: ibizbusinesscentral-centralapi serviceId: ibizbusinesscentral-centralapi
......
package cn.ibizlab.businesscentral.core.base.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.businesscentral.util.domain.EntityBase;
import cn.ibizlab.businesscentral.util.annotation.DEField;
import cn.ibizlab.businesscentral.util.enums.DEPredefinedFieldType;
import cn.ibizlab.businesscentral.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.businesscentral.util.domain.EntityMP;
/**
* 实体[关系数据对象]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "RELATIONSHIPS",resultMap = "RelationshipsResultMap")
public class Relationships extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 关系名称
*/
@TableField(value = "relationshipsname")
@JSONField(name = "relationshipsname")
@JsonProperty("relationshipsname")
private String relationshipsname;
/**
* 关系类型
*/
@TableField(value = "relationshipstype")
@JSONField(name = "relationshipstype")
@JsonProperty("relationshipstype")
private String relationshipstype;
/**
* 关系标识
*/
@DEField(isKeyField=true)
@TableId(value= "relationshipsid",type=IdType.UUID)
@JSONField(name = "relationshipsid")
@JsonProperty("relationshipsid")
private String relationshipsid;
/**
* 存储对象标识
*/
@TableField(value = "entityid")
@JSONField(name = "entityid")
@JsonProperty("entityid")
private String entityid;
/**
* 存储对象名称
*/
@TableField(value = "entityname")
@JSONField(name = "entityname")
@JsonProperty("entityname")
private String entityname;
/**
* 存储对象2标识
*/
@TableField(value = "entity2id")
@JSONField(name = "entity2id")
@JsonProperty("entity2id")
private String entity2id;
/**
* 存储对象2名称
*/
@TableField(value = "entity2name")
@JSONField(name = "entity2name")
@JsonProperty("entity2name")
private String entity2name;
/**
* 设置 [关系名称]
*/
public void setRelationshipsname(String relationshipsname){
this.relationshipsname = relationshipsname ;
this.modify("relationshipsname",relationshipsname);
}
/**
* 设置 [关系类型]
*/
public void setRelationshipstype(String relationshipstype){
this.relationshipstype = relationshipstype ;
this.modify("relationshipstype",relationshipstype);
}
/**
* 设置 [存储对象标识]
*/
public void setEntityid(String entityid){
this.entityid = entityid ;
this.modify("entityid",entityid);
}
/**
* 设置 [存储对象名称]
*/
public void setEntityname(String entityname){
this.entityname = entityname ;
this.modify("entityname",entityname);
}
/**
* 设置 [存储对象2标识]
*/
public void setEntity2id(String entity2id){
this.entity2id = entity2id ;
this.modify("entity2id",entity2id);
}
/**
* 设置 [存储对象2名称]
*/
public void setEntity2name(String entity2name){
this.entity2name = entity2name ;
this.modify("entity2name",entity2name);
}
}
package cn.ibizlab.businesscentral.core.base.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.businesscentral.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.businesscentral.core.base.domain.Relationships;
/**
* 关系型数据实体[Relationships] 查询条件对象
*/
@Slf4j
@Data
public class RelationshipsSearchContext extends QueryWrapperContext<Relationships> {
private String n_relationshipsname_like;//[关系名称]
public void setN_relationshipsname_like(String n_relationshipsname_like) {
this.n_relationshipsname_like = n_relationshipsname_like;
if(!ObjectUtils.isEmpty(this.n_relationshipsname_like)){
this.getSearchCond().like("relationshipsname", n_relationshipsname_like);
}
}
private String n_relationshipstype_eq;//[关系类型]
public void setN_relationshipstype_eq(String n_relationshipstype_eq) {
this.n_relationshipstype_eq = n_relationshipstype_eq;
if(!ObjectUtils.isEmpty(this.n_relationshipstype_eq)){
this.getSearchCond().eq("relationshipstype", n_relationshipstype_eq);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("relationshipsname", query)
);
}
}
}
package cn.ibizlab.businesscentral.core.base.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.businesscentral.core.base.domain.Relationships;
import cn.ibizlab.businesscentral.core.base.filter.RelationshipsSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface RelationshipsMapper extends BaseMapper<Relationships>{
Page<Relationships> searchDefault(IPage page, @Param("srf") RelationshipsSearchContext context, @Param("ew") Wrapper<Relationships> wrapper) ;
@Override
Relationships selectById(Serializable id);
@Override
int insert(Relationships entity);
@Override
int updateById(@Param(Constants.ENTITY) Relationships entity);
@Override
int update(@Param(Constants.ENTITY) Relationships entity, @Param("ew") Wrapper<Relationships> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
}
package cn.ibizlab.businesscentral.core.base.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.businesscentral.core.base.domain.Relationships;
import cn.ibizlab.businesscentral.core.base.filter.RelationshipsSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[Relationships] 服务对象接口
*/
public interface IRelationshipsService extends IService<Relationships>{
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
Relationships get(String key) ;
boolean checkKey(Relationships et) ;
boolean save(Relationships et) ;
void saveBatch(List<Relationships> list) ;
boolean update(Relationships et) ;
void updateBatch(List<Relationships> list) ;
Relationships getDraft(Relationships et) ;
boolean create(Relationships et) ;
void createBatch(List<Relationships> list) ;
Page<Relationships> searchDefault(RelationshipsSearchContext context) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
List<Relationships> getRelationshipsByIds(List<String> ids) ;
List<Relationships> getRelationshipsByEntities(List<Relationships> entities) ;
}
package cn.ibizlab.businesscentral.core.base.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.businesscentral.core.base.domain.Relationships;
import cn.ibizlab.businesscentral.core.base.filter.RelationshipsSearchContext;
import cn.ibizlab.businesscentral.core.base.service.IRelationshipsService;
import cn.ibizlab.businesscentral.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.businesscentral.core.base.mapper.RelationshipsMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[关系数据对象] 服务对象接口实现
*/
@Slf4j
@Service("RelationshipsServiceImpl")
public class RelationshipsServiceImpl extends ServiceImpl<RelationshipsMapper, Relationships> implements IRelationshipsService {
private int batchSize = 500;
@Override
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
return result ;
}
@Override
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
@Override
@Transactional
public Relationships get(String key) {
Relationships et = getById(key);
if(et==null){
et=new Relationships();
et.setRelationshipsid(key);
}
else{
}
return et;
}
@Override
public boolean checkKey(Relationships et) {
return (!ObjectUtils.isEmpty(et.getRelationshipsid()))&&(!Objects.isNull(this.getById(et.getRelationshipsid())));
}
@Override
@Transactional
public boolean save(Relationships et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(Relationships et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<Relationships> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<Relationships> list) {
saveOrUpdateBatch(list,batchSize);
}
@Override
@Transactional
public boolean update(Relationships et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("relationshipsid",et.getRelationshipsid())))
return false;
CachedBeanCopier.copy(get(et.getRelationshipsid()),et);
return true;
}
@Override
public void updateBatch(List<Relationships> list) {
updateBatchById(list,batchSize);
}
@Override
public Relationships getDraft(Relationships et) {
return et;
}
@Override
@Transactional
public boolean create(Relationships et) {
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getRelationshipsid()),et);
return true;
}
@Override
public void createBatch(List<Relationships> list) {
this.saveBatch(list,batchSize);
}
/**
* 查询集合 DEFAULT
*/
@Override
public Page<Relationships> searchDefault(RelationshipsSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Relationships> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<Relationships>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
@Override
public List<Relationships> getRelationshipsByIds(List<String> ids) {
return this.listByIds(ids);
}
@Override
public List<Relationships> getRelationshipsByEntities(List<Relationships> entities) {
List ids =new ArrayList();
for(Relationships entity : entities){
Serializable id=entity.getRelationshipsid();
if(!ObjectUtils.isEmpty(id)){
ids.add(id);
}
}
if(ids.size()>0)
return this.listByIds(ids);
else
return entities;
}
}
package cn.ibizlab.businesscentral.core.marketing.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.businesscentral.util.domain.EntityBase;
import cn.ibizlab.businesscentral.util.annotation.DEField;
import cn.ibizlab.businesscentral.util.enums.DEPredefinedFieldType;
import cn.ibizlab.businesscentral.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.businesscentral.util.domain.EntityMP;
/**
* 实体[市场活动-市场活动]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "RELATIONSHIPS",resultMap = "CampaignCampaignResultMap")
public class CampaignCampaign extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 市场活动-市场活动名称
*/
@TableField(value = "campaigncampaignname")
@JSONField(name = "campaigncampaignname")
@JsonProperty("campaigncampaignname")
private String campaigncampaignname;
/**
* 市场活动-市场活动标识
*/
@DEField(isKeyField=true)
@TableId(value= "campaigncampaignid",type=IdType.UUID)
@JSONField(name = "campaigncampaignid")
@JsonProperty("campaigncampaignid")
private String campaigncampaignid;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 关系类型
*/
@DEField(defaultValue = "CAMPAIGNCAMPAIGN")
@TableField(value = "relationshipstype")
@JSONField(name = "relationshipstype")
@JsonProperty("relationshipstype")
private String relationshipstype;
/**
* 市场活动
*/
@TableField(value = "campaignid")
@JSONField(name = "campaignid")
@JsonProperty("campaignid")
private String campaignid;
/**
* 活动名称
*/
@TableField(value = "campaignname")
@JSONField(name = "campaignname")
@JsonProperty("campaignname")
private String campaignname;
/**
* 市场活动
*/
@TableField(value = "campaign2id")
@JSONField(name = "campaign2id")
@JsonProperty("campaign2id")
private String campaign2id;
/**
* 活动2名称
*/
@TableField(value = "campaign2name")
@JSONField(name = "campaign2name")
@JsonProperty("campaign2name")
private String campaign2name;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.businesscentral.core.marketing.domain.Campaign campaign2;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.businesscentral.core.marketing.domain.Campaign campaign;
/**
* 设置 [市场活动-市场活动名称]
*/
public void setCampaigncampaignname(String campaigncampaignname){
this.campaigncampaignname = campaigncampaignname ;
this.modify("campaigncampaignname",campaigncampaignname);
}
/**
* 设置 [关系类型]
*/
public void setRelationshipstype(String relationshipstype){
this.relationshipstype = relationshipstype ;
this.modify("relationshipstype",relationshipstype);
}
/**
* 设置 [市场活动]
*/
public void setCampaignid(String campaignid){
this.campaignid = campaignid ;
this.modify("campaignid",campaignid);
}
/**
* 设置 [活动名称]
*/
public void setCampaignname(String campaignname){
this.campaignname = campaignname ;
this.modify("campaignname",campaignname);
}
/**
* 设置 [市场活动]
*/
public void setCampaign2id(String campaign2id){
this.campaign2id = campaign2id ;
this.modify("campaign2id",campaign2id);
}
/**
* 设置 [活动2名称]
*/
public void setCampaign2name(String campaign2name){
this.campaign2name = campaign2name ;
this.modify("campaign2name",campaign2name);
}
}
package cn.ibizlab.businesscentral.core.marketing.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.businesscentral.util.domain.EntityBase;
import cn.ibizlab.businesscentral.util.annotation.DEField;
import cn.ibizlab.businesscentral.util.enums.DEPredefinedFieldType;
import cn.ibizlab.businesscentral.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.businesscentral.util.domain.EntityMP;
/**
* 实体[市场活动-营销列表]
*/
@Getter
@Setter
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@TableName(value = "RELATIONSHIPS",resultMap = "CampaignListResultMap")
public class CampaignList extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 建立时间
*/
@DEField(preType = DEPredefinedFieldType.CREATEDATE)
@TableField(value = "createdate" , fill = FieldFill.INSERT)
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "createdate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("createdate")
private Timestamp createdate;
/**
* 建立人
*/
@DEField(preType = DEPredefinedFieldType.CREATEMAN)
@TableField(value = "createman" , fill = FieldFill.INSERT)
@JSONField(name = "createman")
@JsonProperty("createman")
private String createman;
/**
* 关系标识
*/
@DEField(isKeyField=true)
@TableId(value= "campaignlistid",type=IdType.UUID)
@JSONField(name = "campaignlistid")
@JsonProperty("campaignlistid")
private String campaignlistid;
/**
* 关系名称
*/
@TableField(value = "campaignlistname")
@JSONField(name = "campaignlistname")
@JsonProperty("campaignlistname")
private String campaignlistname;
/**
* 关系类型
*/
@DEField(defaultValue = "CAMPAIGNLIST")
@TableField(value = "relationshipstype")
@JSONField(name = "relationshipstype")
@JsonProperty("relationshipstype")
private String relationshipstype;
/**
* 更新时间
*/
@DEField(preType = DEPredefinedFieldType.UPDATEDATE)
@TableField(value = "updatedate")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "updatedate" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("updatedate")
private Timestamp updatedate;
/**
* 更新人
*/
@DEField(preType = DEPredefinedFieldType.UPDATEMAN)
@TableField(value = "updateman")
@JSONField(name = "updateman")
@JsonProperty("updateman")
private String updateman;
/**
* 市场活动
*/
@TableField(value = "campaignid")
@JSONField(name = "campaignid")
@JsonProperty("campaignid")
private String campaignid;
/**
* 活动名称
*/
@TableField(value = "campaignname")
@JSONField(name = "campaignname")
@JsonProperty("campaignname")
private String campaignname;
/**
* 列表
*/
@TableField(value = "listid")
@JSONField(name = "listid")
@JsonProperty("listid")
private String listid;
/**
* 名称
*/
@TableField(value = "listname")
@JSONField(name = "listname")
@JsonProperty("listname")
private String listname;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.businesscentral.core.marketing.domain.Campaign campaign;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.businesscentral.core.marketing.domain.IBizList list;
/**
* 设置 [关系名称]
*/
public void setCampaignlistname(String campaignlistname){
this.campaignlistname = campaignlistname ;
this.modify("campaignlistname",campaignlistname);
}
/**
* 设置 [关系类型]
*/
public void setRelationshipstype(String relationshipstype){
this.relationshipstype = relationshipstype ;
this.modify("relationshipstype",relationshipstype);
}
/**
* 设置 [市场活动]
*/
public void setCampaignid(String campaignid){
this.campaignid = campaignid ;
this.modify("campaignid",campaignid);
}
/**
* 设置 [活动名称]
*/
public void setCampaignname(String campaignname){
this.campaignname = campaignname ;
this.modify("campaignname",campaignname);
}
/**
* 设置 [列表]
*/
public void setListid(String listid){
this.listid = listid ;
this.modify("listid",listid);
}
/**
* 设置 [名称]
*/
public void setListname(String listname){
this.listname = listname ;
this.modify("listname",listname);
}
}
package cn.ibizlab.businesscentral.core.marketing.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.businesscentral.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.businesscentral.core.marketing.domain.CampaignCampaign;
/**
* 关系型数据实体[CampaignCampaign] 查询条件对象
*/
@Slf4j
@Data
public class CampaignCampaignSearchContext extends QueryWrapperContext<CampaignCampaign> {
private String n_campaigncampaignname_like;//[市场活动-市场活动名称]
public void setN_campaigncampaignname_like(String n_campaigncampaignname_like) {
this.n_campaigncampaignname_like = n_campaigncampaignname_like;
if(!ObjectUtils.isEmpty(this.n_campaigncampaignname_like)){
this.getSearchCond().like("campaigncampaignname", n_campaigncampaignname_like);
}
}
private String n_relationshipstype_eq;//[关系类型]
public void setN_relationshipstype_eq(String n_relationshipstype_eq) {
this.n_relationshipstype_eq = n_relationshipstype_eq;
if(!ObjectUtils.isEmpty(this.n_relationshipstype_eq)){
this.getSearchCond().eq("relationshipstype", n_relationshipstype_eq);
}
}
private String n_campaignid_eq;//[市场活动]
public void setN_campaignid_eq(String n_campaignid_eq) {
this.n_campaignid_eq = n_campaignid_eq;
if(!ObjectUtils.isEmpty(this.n_campaignid_eq)){
this.getSearchCond().eq("campaignid", n_campaignid_eq);
}
}
private String n_campaignname_eq;//[活动名称]
public void setN_campaignname_eq(String n_campaignname_eq) {
this.n_campaignname_eq = n_campaignname_eq;
if(!ObjectUtils.isEmpty(this.n_campaignname_eq)){
this.getSearchCond().eq("campaignname", n_campaignname_eq);
}
}
private String n_campaignname_like;//[活动名称]
public void setN_campaignname_like(String n_campaignname_like) {
this.n_campaignname_like = n_campaignname_like;
if(!ObjectUtils.isEmpty(this.n_campaignname_like)){
this.getSearchCond().like("campaignname", n_campaignname_like);
}
}
private String n_campaign2id_eq;//[市场活动]
public void setN_campaign2id_eq(String n_campaign2id_eq) {
this.n_campaign2id_eq = n_campaign2id_eq;
if(!ObjectUtils.isEmpty(this.n_campaign2id_eq)){
this.getSearchCond().eq("campaign2id", n_campaign2id_eq);
}
}
private String n_campaign2name_eq;//[活动2名称]
public void setN_campaign2name_eq(String n_campaign2name_eq) {
this.n_campaign2name_eq = n_campaign2name_eq;
if(!ObjectUtils.isEmpty(this.n_campaign2name_eq)){
this.getSearchCond().eq("campaign2name", n_campaign2name_eq);
}
}
private String n_campaign2name_like;//[活动2名称]
public void setN_campaign2name_like(String n_campaign2name_like) {
this.n_campaign2name_like = n_campaign2name_like;
if(!ObjectUtils.isEmpty(this.n_campaign2name_like)){
this.getSearchCond().like("campaign2name", n_campaign2name_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("campaigncampaignname", query)
);
}
}
}
package cn.ibizlab.businesscentral.core.marketing.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.businesscentral.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.businesscentral.core.marketing.domain.CampaignList;
/**
* 关系型数据实体[CampaignList] 查询条件对象
*/
@Slf4j
@Data
public class CampaignListSearchContext extends QueryWrapperContext<CampaignList> {
private String n_campaignlistname_like;//[关系名称]
public void setN_campaignlistname_like(String n_campaignlistname_like) {
this.n_campaignlistname_like = n_campaignlistname_like;
if(!ObjectUtils.isEmpty(this.n_campaignlistname_like)){
this.getSearchCond().like("campaignlistname", n_campaignlistname_like);
}
}
private String n_relationshipstype_eq;//[关系类型]
public void setN_relationshipstype_eq(String n_relationshipstype_eq) {
this.n_relationshipstype_eq = n_relationshipstype_eq;
if(!ObjectUtils.isEmpty(this.n_relationshipstype_eq)){
this.getSearchCond().eq("relationshipstype", n_relationshipstype_eq);
}
}
private String n_campaignid_eq;//[市场活动]
public void setN_campaignid_eq(String n_campaignid_eq) {
this.n_campaignid_eq = n_campaignid_eq;
if(!ObjectUtils.isEmpty(this.n_campaignid_eq)){
this.getSearchCond().eq("campaignid", n_campaignid_eq);
}
}
private String n_campaignname_eq;//[活动名称]
public void setN_campaignname_eq(String n_campaignname_eq) {
this.n_campaignname_eq = n_campaignname_eq;
if(!ObjectUtils.isEmpty(this.n_campaignname_eq)){
this.getSearchCond().eq("campaignname", n_campaignname_eq);
}
}
private String n_campaignname_like;//[活动名称]
public void setN_campaignname_like(String n_campaignname_like) {
this.n_campaignname_like = n_campaignname_like;
if(!ObjectUtils.isEmpty(this.n_campaignname_like)){
this.getSearchCond().like("campaignname", n_campaignname_like);
}
}
private String n_listid_eq;//[列表]
public void setN_listid_eq(String n_listid_eq) {
this.n_listid_eq = n_listid_eq;
if(!ObjectUtils.isEmpty(this.n_listid_eq)){
this.getSearchCond().eq("listid", n_listid_eq);
}
}
private String n_listname_eq;//[名称]
public void setN_listname_eq(String n_listname_eq) {
this.n_listname_eq = n_listname_eq;
if(!ObjectUtils.isEmpty(this.n_listname_eq)){
this.getSearchCond().eq("listname", n_listname_eq);
}
}
private String n_listname_like;//[名称]
public void setN_listname_like(String n_listname_like) {
this.n_listname_like = n_listname_like;
if(!ObjectUtils.isEmpty(this.n_listname_like)){
this.getSearchCond().like("listname", n_listname_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSearchCond().and( wrapper ->
wrapper.like("campaignlistname", query)
);
}
}
}
package cn.ibizlab.businesscentral.core.marketing.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.businesscentral.core.marketing.domain.CampaignCampaign;
import cn.ibizlab.businesscentral.core.marketing.filter.CampaignCampaignSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface CampaignCampaignMapper extends BaseMapper<CampaignCampaign>{
Page<CampaignCampaign> searchDefault(IPage page, @Param("srf") CampaignCampaignSearchContext context, @Param("ew") Wrapper<CampaignCampaign> wrapper) ;
@Override
CampaignCampaign selectById(Serializable id);
@Override
int insert(CampaignCampaign entity);
@Override
int updateById(@Param(Constants.ENTITY) CampaignCampaign entity);
@Override
int update(@Param(Constants.ENTITY) CampaignCampaign entity, @Param("ew") Wrapper<CampaignCampaign> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<CampaignCampaign> selectByCampaign2id(@Param("campaignid") Serializable campaignid) ;
List<CampaignCampaign> selectByCampaignid(@Param("campaignid") Serializable campaignid) ;
}
package cn.ibizlab.businesscentral.core.marketing.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.businesscentral.core.marketing.domain.CampaignList;
import cn.ibizlab.businesscentral.core.marketing.filter.CampaignListSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface CampaignListMapper extends BaseMapper<CampaignList>{
Page<CampaignList> searchDefault(IPage page, @Param("srf") CampaignListSearchContext context, @Param("ew") Wrapper<CampaignList> wrapper) ;
@Override
CampaignList selectById(Serializable id);
@Override
int insert(CampaignList entity);
@Override
int updateById(@Param(Constants.ENTITY) CampaignList entity);
@Override
int update(@Param(Constants.ENTITY) CampaignList entity, @Param("ew") Wrapper<CampaignList> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<CampaignList> selectByCampaignid(@Param("campaignid") Serializable campaignid) ;
List<CampaignList> selectByListid(@Param("listid") Serializable listid) ;
}
package cn.ibizlab.businesscentral.core.marketing.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.businesscentral.core.marketing.domain.CampaignCampaign;
import cn.ibizlab.businesscentral.core.marketing.filter.CampaignCampaignSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[CampaignCampaign] 服务对象接口
*/
public interface ICampaignCampaignService extends IService<CampaignCampaign>{
CampaignCampaign getDraft(CampaignCampaign et) ;
CampaignCampaign get(String key) ;
boolean update(CampaignCampaign et) ;
void updateBatch(List<CampaignCampaign> list) ;
boolean save(CampaignCampaign et) ;
void saveBatch(List<CampaignCampaign> list) ;
boolean create(CampaignCampaign et) ;
void createBatch(List<CampaignCampaign> list) ;
boolean checkKey(CampaignCampaign et) ;
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
Page<CampaignCampaign> searchDefault(CampaignCampaignSearchContext context) ;
List<CampaignCampaign> selectByCampaign2id(String campaignid) ;
void removeByCampaign2id(String campaignid) ;
List<CampaignCampaign> selectByCampaignid(String campaignid) ;
void removeByCampaignid(String campaignid) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
List<CampaignCampaign> getCampaigncampaignByIds(List<String> ids) ;
List<CampaignCampaign> getCampaigncampaignByEntities(List<CampaignCampaign> entities) ;
}
package cn.ibizlab.businesscentral.core.marketing.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.businesscentral.core.marketing.domain.CampaignList;
import cn.ibizlab.businesscentral.core.marketing.filter.CampaignListSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[CampaignList] 服务对象接口
*/
public interface ICampaignListService extends IService<CampaignList>{
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
boolean create(CampaignList et) ;
void createBatch(List<CampaignList> list) ;
CampaignList getDraft(CampaignList et) ;
boolean save(CampaignList et) ;
void saveBatch(List<CampaignList> list) ;
boolean checkKey(CampaignList et) ;
boolean update(CampaignList et) ;
void updateBatch(List<CampaignList> list) ;
CampaignList get(String key) ;
Page<CampaignList> searchDefault(CampaignListSearchContext context) ;
List<CampaignList> selectByCampaignid(String campaignid) ;
void removeByCampaignid(String campaignid) ;
List<CampaignList> selectByListid(String listid) ;
void removeByListid(String listid) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
List<CampaignList> getCampaignlistByIds(List<String> ids) ;
List<CampaignList> getCampaignlistByEntities(List<CampaignList> entities) ;
}
package cn.ibizlab.businesscentral.core.marketing.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.businesscentral.core.marketing.domain.CampaignCampaign;
import cn.ibizlab.businesscentral.core.marketing.filter.CampaignCampaignSearchContext;
import cn.ibizlab.businesscentral.core.marketing.service.ICampaignCampaignService;
import cn.ibizlab.businesscentral.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.businesscentral.core.marketing.mapper.CampaignCampaignMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[市场活动-市场活动] 服务对象接口实现
*/
@Slf4j
@Service("CampaignCampaignServiceImpl")
public class CampaignCampaignServiceImpl extends ServiceImpl<CampaignCampaignMapper, CampaignCampaign> implements ICampaignCampaignService {
@Autowired
@Lazy
private cn.ibizlab.businesscentral.core.marketing.service.ICampaignService campaignService;
private int batchSize = 500;
@Override
public CampaignCampaign getDraft(CampaignCampaign et) {
fillParentData(et);
return et;
}
@Override
@Transactional
public CampaignCampaign get(String key) {
CampaignCampaign et = getById(key);
if(et==null){
et=new CampaignCampaign();
et.setCampaigncampaignid(key);
}
else{
}
return et;
}
@Override
@Transactional
public boolean update(CampaignCampaign et) {
fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("campaigncampaignid",et.getCampaigncampaignid())))
return false;
CachedBeanCopier.copy(get(et.getCampaigncampaignid()),et);
return true;
}
@Override
public void updateBatch(List<CampaignCampaign> list) {
list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize);
}
@Override
@Transactional
public boolean save(CampaignCampaign et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(CampaignCampaign et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<CampaignCampaign> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<CampaignCampaign> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
@Override
@Transactional
public boolean create(CampaignCampaign et) {
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getCampaigncampaignid()),et);
return true;
}
@Override
public void createBatch(List<CampaignCampaign> list) {
list.forEach(item->fillParentData(item));
this.saveBatch(list,batchSize);
}
@Override
public boolean checkKey(CampaignCampaign et) {
return (!ObjectUtils.isEmpty(et.getCampaigncampaignid()))&&(!Objects.isNull(this.getById(et.getCampaigncampaignid())));
}
@Override
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
return result ;
}
@Override
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
@Override
public List<CampaignCampaign> selectByCampaign2id(String campaignid) {
return baseMapper.selectByCampaign2id(campaignid);
}
@Override
public void removeByCampaign2id(String campaignid) {
this.remove(new QueryWrapper<CampaignCampaign>().eq("campaign2id",campaignid));
}
@Override
public List<CampaignCampaign> selectByCampaignid(String campaignid) {
return baseMapper.selectByCampaignid(campaignid);
}
@Override
public void removeByCampaignid(String campaignid) {
this.remove(new QueryWrapper<CampaignCampaign>().eq("campaignid",campaignid));
}
/**
* 查询集合 DEFAULT
*/
@Override
public Page<CampaignCampaign> searchDefault(CampaignCampaignSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<CampaignCampaign> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<CampaignCampaign>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 为当前实体填充父数据(外键值文本、外键值附加数据)
* @param et
*/
private void fillParentData(CampaignCampaign et){
//实体关系[DER1N_CAMPAIGNCAMPAIGN_CAMPAIGN_CAMPAIGN2ID]
if(!ObjectUtils.isEmpty(et.getCampaign2id())){
cn.ibizlab.businesscentral.core.marketing.domain.Campaign campaign2=et.getCampaign2();
if(ObjectUtils.isEmpty(campaign2)){
cn.ibizlab.businesscentral.core.marketing.domain.Campaign majorEntity=campaignService.get(et.getCampaign2id());
et.setCampaign2(majorEntity);
campaign2=majorEntity;
}
et.setCampaign2name(campaign2.getCampaignname());
}
//实体关系[DER1N_CAMPAIGNCAMPAIGN_CAMPAIGN_CAMPAIGNID]
if(!ObjectUtils.isEmpty(et.getCampaignid())){
cn.ibizlab.businesscentral.core.marketing.domain.Campaign campaign=et.getCampaign();
if(ObjectUtils.isEmpty(campaign)){
cn.ibizlab.businesscentral.core.marketing.domain.Campaign majorEntity=campaignService.get(et.getCampaignid());
et.setCampaign(majorEntity);
campaign=majorEntity;
}
et.setCampaignname(campaign.getCampaignname());
}
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
@Override
public List<CampaignCampaign> getCampaigncampaignByIds(List<String> ids) {
return this.listByIds(ids);
}
@Override
public List<CampaignCampaign> getCampaigncampaignByEntities(List<CampaignCampaign> entities) {
List ids =new ArrayList();
for(CampaignCampaign entity : entities){
Serializable id=entity.getCampaigncampaignid();
if(!ObjectUtils.isEmpty(id)){
ids.add(id);
}
}
if(ids.size()>0)
return this.listByIds(ids);
else
return entities;
}
}
...@@ -44,6 +44,12 @@ import org.springframework.util.StringUtils; ...@@ -44,6 +44,12 @@ import org.springframework.util.StringUtils;
@Service("CampaignServiceImpl") @Service("CampaignServiceImpl")
public class CampaignServiceImpl extends ServiceImpl<CampaignMapper, Campaign> implements ICampaignService { public class CampaignServiceImpl extends ServiceImpl<CampaignMapper, Campaign> implements ICampaignService {
@Autowired
@Lazy
private cn.ibizlab.businesscentral.core.marketing.service.ICampaignCampaignService campaigncampaignService;
@Autowired
@Lazy
private cn.ibizlab.businesscentral.core.marketing.service.ICampaignListService campaignlistService;
@Autowired @Autowired
@Lazy @Lazy
private cn.ibizlab.businesscentral.core.sales.service.ILeadService leadService; private cn.ibizlab.businesscentral.core.sales.service.ILeadService leadService;
......
...@@ -44,6 +44,9 @@ import org.springframework.util.StringUtils; ...@@ -44,6 +44,9 @@ import org.springframework.util.StringUtils;
@Service("IBizListServiceImpl") @Service("IBizListServiceImpl")
public class IBizListServiceImpl extends ServiceImpl<IBizListMapper, IBizList> implements IIBizListService { public class IBizListServiceImpl extends ServiceImpl<IBizListMapper, IBizList> implements IIBizListService {
@Autowired
@Lazy
private cn.ibizlab.businesscentral.core.marketing.service.ICampaignListService campaignlistService;
@Autowired @Autowired
@Lazy @Lazy
private cn.ibizlab.businesscentral.core.base.service.ITransactionCurrencyService transactioncurrencyService; private cn.ibizlab.businesscentral.core.base.service.ITransactionCurrencyService transactioncurrencyService;
......
<?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="cn.ibizlab.businesscentral.core.base.mapper.RelationshipsMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="RelationshipsResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTITY2ID`, t1.`ENTITY2NAME`, t1.`ENTITYID`, t1.`ENTITYNAME`, t1.`RELATIONSHIPSID`, t1.`RELATIONSHIPSNAME`, t1.`RELATIONSHIPSTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1 ) t1 where relationshipsid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="RelationshipsResultMap" type="cn.ibizlab.businesscentral.core.base.domain.Relationships" autoMapping="true">
<id property="relationshipsid" column="relationshipsid" /><!--主键字段映射-->
</resultMap>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.base.filter.RelationshipsSearchContext" resultMap="RelationshipsResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTITY2ID`, t1.`ENTITY2NAME`, t1.`ENTITYID`, t1.`ENTITYNAME`, t1.`RELATIONSHIPSID`, t1.`RELATIONSHIPSNAME`, t1.`RELATIONSHIPSTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENTITY2ID`, t1.`ENTITY2NAME`, t1.`ENTITYID`, t1.`ENTITYNAME`, t1.`RELATIONSHIPSID`, t1.`RELATIONSHIPSNAME`, t1.`RELATIONSHIPSTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1
]]>
</sql>
</mapper>
<?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="cn.ibizlab.businesscentral.core.marketing.mapper.CampaignCampaignMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="CampaignCampaignResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`ENTITY2ID` AS `CAMPAIGN2ID`, t1.`ENTITY2NAME` AS `CAMPAIGN2NAME`, t1.`RELATIONSHIPSID` AS `CAMPAIGNCAMPAIGNID`, t1.`RELATIONSHIPSNAME` AS `CAMPAIGNCAMPAIGNNAME`, t1.`ENTITYID` AS `CAMPAIGNID`, t1.`ENTITYNAME` AS `CAMPAIGNNAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`RELATIONSHIPSTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1 ) t1 where campaigncampaignid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="CampaignCampaignResultMap" type="cn.ibizlab.businesscentral.core.marketing.domain.CampaignCampaign" autoMapping="true">
<id property="campaigncampaignid" column="campaigncampaignid" /><!--主键字段映射-->
<result property="campaignid" column="campaignid" />
<result property="campaign2id" column="campaign2id" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="campaign2" javaType="cn.ibizlab.businesscentral.core.marketing.domain.Campaign" column="campaign2id" select="cn.ibizlab.businesscentral.core.marketing.mapper.CampaignMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="campaign" javaType="cn.ibizlab.businesscentral.core.marketing.domain.Campaign" column="campaignid" select="cn.ibizlab.businesscentral.core.marketing.mapper.CampaignMapper.selectById" fetchType="lazy"></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_CAMPAIGNCAMPAIGN_CAMPAIGN_CAMPAIGN2ID] -->
<select id="selectByCampaign2id" resultMap="CampaignCampaignResultMap">
select t1.* from (
<include refid="Default" />
) t1
where campaign2id=#{campaignid}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_CAMPAIGNCAMPAIGN_CAMPAIGN_CAMPAIGNID] -->
<select id="selectByCampaignid" resultMap="CampaignCampaignResultMap">
select t1.* from (
<include refid="Default" />
) t1
where campaignid=#{campaignid}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.marketing.filter.CampaignCampaignSearchContext" resultMap="CampaignCampaignResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`ENTITY2ID` AS `CAMPAIGN2ID`, t1.`ENTITY2NAME` AS `CAMPAIGN2NAME`, t1.`RELATIONSHIPSID` AS `CAMPAIGNCAMPAIGNID`, t1.`RELATIONSHIPSNAME` AS `CAMPAIGNCAMPAIGNNAME`, t1.`ENTITYID` AS `CAMPAIGNID`, t1.`ENTITYNAME` AS `CAMPAIGNNAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`RELATIONSHIPSTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1
WHERE ( t1.`RELATIONSHIPSTYPE` = 'CAMPAIGNCAMPAIGN' )
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`ENTITY2ID` AS `CAMPAIGN2ID`, t1.`ENTITY2NAME` AS `CAMPAIGN2NAME`, t1.`RELATIONSHIPSID` AS `CAMPAIGNCAMPAIGNID`, t1.`RELATIONSHIPSNAME` AS `CAMPAIGNCAMPAIGNNAME`, t1.`ENTITYID` AS `CAMPAIGNID`, t1.`ENTITYNAME` AS `CAMPAIGNNAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`RELATIONSHIPSTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1
WHERE ( t1.`RELATIONSHIPSTYPE` = 'CAMPAIGNCAMPAIGN' )
]]>
</sql>
</mapper>
package cn.ibizlab.businesscentral.centralapi.mapping;
import org.mapstruct.*;
import cn.ibizlab.businesscentral.core.marketing.domain.CampaignCampaign;
import cn.ibizlab.businesscentral.centralapi.dto.CampaignCampaignDTO;
import cn.ibizlab.businesscentral.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface CampaignCampaignMapping extends MappingBase<CampaignCampaignDTO, CampaignCampaign> {
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册