Mapper详细代码:

DicValueMapper:
package com.bjpowernode.crm.settings.mapper;import com.bjpowernode.crm.settings.domain.DicValue;import java.util.List;public interface DicValueMapper {/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_dic_value** @mbggenerated Tue Nov 03 17:09:33 CST 2020*/int deleteByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_dic_value** @mbggenerated Tue Nov 03 17:09:33 CST 2020*/int insert(DicValue record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_dic_value** @mbggenerated Tue Nov 03 17:09:33 CST 2020*/int insertSelective(DicValue record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_dic_value** @mbggenerated Tue Nov 03 17:09:33 CST 2020*/DicValue selectByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_dic_value** @mbggenerated Tue Nov 03 17:09:33 CST 2020*/int updateByPrimaryKeySelective(DicValue record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_dic_value** @mbggenerated Tue Nov 03 17:09:33 CST 2020*/int updateByPrimaryKey(DicValue record);/*** 根据typeCode查询数据字典值* @param typeCode* @return*/List selectDicValueByTypeCode(String typeCode);/*** 通过id查询对应的字典表数据* @param id 字典数据id* @return 字典表数据*/DicValue selectDicValueById(String id);
}
DicValueMapper.xml:
id, value, text, order_no, type_code delete from tbl_dic_valuewhere id = #{id,jdbcType=CHAR} insert into tbl_dic_value (id, value, text, order_no, type_code)values (#{id,jdbcType=CHAR}, #{value,jdbcType=VARCHAR}, #{text,jdbcType=VARCHAR}, #{orderNo,jdbcType=VARCHAR}, #{typeCode,jdbcType=VARCHAR}) insert into tbl_dic_valueid, value, text, order_no, type_code, #{id,jdbcType=CHAR}, #{value,jdbcType=VARCHAR}, #{text,jdbcType=VARCHAR}, #{orderNo,jdbcType=VARCHAR}, #{typeCode,jdbcType=VARCHAR}, update tbl_dic_valuevalue = #{value,jdbcType=VARCHAR}, text = #{text,jdbcType=VARCHAR}, order_no = #{orderNo,jdbcType=VARCHAR}, type_code = #{typeCode,jdbcType=VARCHAR}, where id = #{id,jdbcType=CHAR} update tbl_dic_valueset value = #{value,jdbcType=VARCHAR},text = #{text,jdbcType=VARCHAR},order_no = #{orderNo,jdbcType=VARCHAR},type_code = #{typeCode,jdbcType=VARCHAR}where id = #{id,jdbcType=CHAR}
UserMapper:
package com.bjpowernode.crm.settings.mapper;import com.bjpowernode.crm.settings.domain.User;import java.util.List;
import java.util.Map;public interface UserMapper {/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_user** @mbggenerated Wed Sep 21 15:29:08 CST 2022*/int deleteByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_user** @mbggenerated Wed Sep 21 15:29:08 CST 2022*/int insert(User record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_user** @mbggenerated Wed Sep 21 15:29:08 CST 2022*/int insertSelective(User record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_user** @mbggenerated Wed Sep 21 15:29:08 CST 2022*/User selectByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_user** @mbggenerated Wed Sep 21 15:29:08 CST 2022*/int updateByPrimaryKeySelective(User record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_user** @mbggenerated Wed Sep 21 15:29:08 CST 2022*/int updateByPrimaryKey(User record);//登录查询:根据账号和密码查询用户User selectUserByLoginActAndPwd(Map map);/*** 查询所有的用户* @return*/List selectAllUsers();
}
UserMapper.xml:
id, login_act, name, login_pwd, email, expire_time, lock_state, deptno, allow_ips, createTime, create_by, edit_time, edit_by delete from tbl_userwhere id = #{id,jdbcType=CHAR} insert into tbl_user (id, login_act, name, login_pwd, email, expire_time, lock_state, deptno, allow_ips, createTime, create_by, edit_time, edit_by)values (#{id,jdbcType=CHAR}, #{loginAct,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{loginPwd,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{expireTime,jdbcType=CHAR}, #{lockState,jdbcType=CHAR}, #{deptno,jdbcType=CHAR}, #{allowIps,jdbcType=VARCHAR}, #{createtime,jdbcType=CHAR}, #{createBy,jdbcType=VARCHAR}, #{editTime,jdbcType=CHAR}, #{editBy,jdbcType=VARCHAR}) insert into tbl_userid, login_act, name, login_pwd, email, expire_time, lock_state, deptno, allow_ips, createTime, create_by, edit_time, edit_by, #{id,jdbcType=CHAR}, #{loginAct,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{loginPwd,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{expireTime,jdbcType=CHAR}, #{lockState,jdbcType=CHAR}, #{deptno,jdbcType=CHAR}, #{allowIps,jdbcType=VARCHAR}, #{createtime,jdbcType=CHAR}, #{createBy,jdbcType=VARCHAR}, #{editTime,jdbcType=CHAR}, #{editBy,jdbcType=VARCHAR}, update tbl_userlogin_act = #{loginAct,jdbcType=VARCHAR}, name = #{name,jdbcType=VARCHAR}, login_pwd = #{loginPwd,jdbcType=VARCHAR}, email = #{email,jdbcType=VARCHAR}, expire_time = #{expireTime,jdbcType=CHAR}, lock_state = #{lockState,jdbcType=CHAR}, deptno = #{deptno,jdbcType=CHAR}, allow_ips = #{allowIps,jdbcType=VARCHAR}, createTime = #{createtime,jdbcType=CHAR}, create_by = #{createBy,jdbcType=VARCHAR}, edit_time = #{editTime,jdbcType=CHAR}, edit_by = #{editBy,jdbcType=VARCHAR}, where id = #{id,jdbcType=CHAR} update tbl_userset login_act = #{loginAct,jdbcType=VARCHAR},name = #{name,jdbcType=VARCHAR},login_pwd = #{loginPwd,jdbcType=VARCHAR},email = #{email,jdbcType=VARCHAR},expire_time = #{expireTime,jdbcType=CHAR},lock_state = #{lockState,jdbcType=CHAR},deptno = #{deptno,jdbcType=CHAR},allow_ips = #{allowIps,jdbcType=VARCHAR},createTime = #{createtime,jdbcType=CHAR},create_by = #{createBy,jdbcType=VARCHAR},edit_time = #{editTime,jdbcType=CHAR},edit_by = #{editBy,jdbcType=VARCHAR}where id = #{id,jdbcType=CHAR}

ActivityMapper:
package com.bjpowernode.crm.workbench.mapper;import com.bjpowernode.crm.workbench.domain.Activity;
import com.bjpowernode.crm.workbench.domain.FunnelVO;import java.util.List;
import java.util.Map;public interface ActivityMapper {/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_activity** @mbggenerated Fri Sep 23 16:59:16 CST 2022*/int deleteByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_activity** @mbggenerated Fri Sep 23 16:59:16 CST 2022*/int insert(Activity record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_activity** @mbggenerated Fri Sep 23 16:59:16 CST 2022*/int insertSelective(Activity record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_activity** @mbggenerated Fri Sep 23 16:59:16 CST 2022*/Activity selectByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_activity** @mbggenerated Fri Sep 23 16:59:16 CST 2022*/int updateByPrimaryKeySelective(Activity record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_activity** @mbggenerated Fri Sep 23 16:59:16 CST 2022*/int updateByPrimaryKey(Activity record);//保存创建的市场活动int insertActivity(Activity record);/*** 根据条件分页查询市场活动的列表* @param map* @return*/List selectActivityByConditionForPage(Map map);/*** 根据条件查询市场活动的总条数* @param map* @return*/int selectCountOfActivityByCondition(Map map);/*** 根据ids数组批量删除市场活动* @param ids* @return*/int deleteActivityByIds(String[] ids);/*** 根据id查询市场活动的信息* @param id* @return*/Activity selectActivityById(String id);/*** 保存修改的市场活动* @param activity* @return*/int updateActivity(Activity activity);/*** 查询所有的市场活动进行导出* @return*/List selectAllActivitys();/*** 批量保存创建的市场活动* @param activityList* @return*/int insertActivityByList(List activityList);/*** 根据id查询市场活动的明细信息* @param id* @return*/Activity selectActivityForDetailById(String id);/*** 根据clueId查询该线索相关联的市场活动的明细信息* @param clueId* @return*/List selectActivityForDetailByClueId(String clueId);/*** 根据name模糊查询市场活动,并且把已经跟clueId关联过的市场活动排除* @param map* @return*/List selectActivityForDetailByNameClueId(Map map);/*** 根据name模糊查询市场活动,并且查询那些跟clueId关联过的市场活动* @param map* @return*/List selectActivityForConvertByNameClueId(Map map);/*** 通过市场活动id数组查询所有市场活动* @param ids 市场活动id数组* @return 市场活动集合*/List selectActivityForDetailByIds(String[] ids);/*** 通过市场活动模糊查询市场活动,并且查询那些跟clueId关联过的市场活动* @param map 封装的线索id和市场活动名参数* @return 市场活动集合*/List selectActivityForConvertByNameAndClueId(Map map);/*** 通过联系人id查询该联系人绑定的所有市场活动* @param contactsId 联系人id* @return 市场活动集合*/List selectActivityForDetailByContactsId(String contactsId);/*** 通过市场活动名和联系人id模糊查询市场活动* @param map 封装的联系人id和市场活动名参数* @return 市场活动集合*/List selectActivityForDetailByNameAndContactsId(Map map);/*** 通过市场活动名称进行模糊查询* @param activityName 市场活动模糊名称* @return 查询到的对应的市场活动*/List selectActivityByFuzzyName(String activityName);/*** 查询市场活动表中各个所有者的数据量* @return 数据集合*/List selectCountOfActivityGroupByOwner();
}
ActivityMappe.xmlr:
id, owner, name, start_date, end_date, cost, description, create_time, create_by, edit_time, edit_by delete from tbl_activitywhere id = #{id,jdbcType=CHAR} insert into tbl_activityid, owner, name, start_date, end_date, cost, description, create_time, create_by, edit_time, edit_by, #{id,jdbcType=CHAR}, #{owner,jdbcType=CHAR}, #{name,jdbcType=VARCHAR}, #{startDate,jdbcType=CHAR}, #{endDate,jdbcType=CHAR}, #{cost,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{createTime,jdbcType=CHAR}, #{createBy,jdbcType=VARCHAR}, #{editTime,jdbcType=CHAR}, #{editBy,jdbcType=VARCHAR}, update tbl_activityowner = #{owner,jdbcType=CHAR}, name = #{name,jdbcType=VARCHAR}, start_date = #{startDate,jdbcType=CHAR}, end_date = #{endDate,jdbcType=CHAR}, cost = #{cost,jdbcType=VARCHAR}, description = #{description,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=CHAR}, create_by = #{createBy,jdbcType=VARCHAR}, edit_time = #{editTime,jdbcType=CHAR}, edit_by = #{editBy,jdbcType=VARCHAR}, where id = #{id,jdbcType=CHAR} update tbl_activityset owner = #{owner,jdbcType=CHAR},name = #{name,jdbcType=VARCHAR},start_date = #{startDate,jdbcType=CHAR},end_date = #{endDate,jdbcType=CHAR},cost = #{cost,jdbcType=VARCHAR},description = #{description,jdbcType=VARCHAR},create_time = #{createTime,jdbcType=CHAR},create_by = #{createBy,jdbcType=VARCHAR},edit_time = #{editTime,jdbcType=CHAR},edit_by = #{editBy,jdbcType=VARCHAR}where id = #{id,jdbcType=CHAR} insert into tbl_activity (id, owner, name, start_date,end_date, cost, description,create_time, create_by)values (#{id,jdbcType=CHAR}, #{owner,jdbcType=CHAR}, #{name,jdbcType=VARCHAR}, #{startDate,jdbcType=CHAR},#{endDate,jdbcType=CHAR}, #{cost,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},#{createTime,jdbcType=CHAR}, #{createBy,jdbcType=VARCHAR}) delete from tbl_activity where id in#{id} update tbl_activityset owner=#{owner},name=#{name},start_date=#{startDate},end_date=#{endDate},cost=#{cost},description=#{description},edit_time=#{editTime},edit_by=#{editBy}where id=#{id} insert into tbl_activity(id, owner, name, start_date, end_date, cost, description, create_time, create_by)values(#{obj.id},#{obj.owner},#{obj.name},#{obj.startDate},#{obj.endDate},#{obj.cost},#{obj.description},#{obj.createTime},#{obj.createBy})
ActivityRemarkMapper:
package com.bjpowernode.crm.workbench.mapper;import com.bjpowernode.crm.workbench.domain.ActivityRemark;import java.util.List;public interface ActivityRemarkMapper {/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_activity_remark** @mbggenerated Sat Oct 31 14:13:10 CST 2020*/int deleteByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_activity_remark** @mbggenerated Sat Oct 31 14:13:10 CST 2020*/int insert(ActivityRemark record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_activity_remark** @mbggenerated Sat Oct 31 14:13:10 CST 2020*/int insertSelective(ActivityRemark record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_activity_remark** @mbggenerated Sat Oct 31 14:13:10 CST 2020*/ActivityRemark selectByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_activity_remark** @mbggenerated Sat Oct 31 14:13:10 CST 2020*/int updateByPrimaryKeySelective(ActivityRemark record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_activity_remark** @mbggenerated Sat Oct 31 14:13:10 CST 2020*/int updateByPrimaryKey(ActivityRemark record);/*** 根据activityId查询该市场活动下所有备注的明细信息* @param activityId* @return*/List selectActivityRemarkForDetailByActivityId(String activityId);/*** 保存创建的市场活动备注* @param remark* @return*/int insertActivityRemark(ActivityRemark remark);/*** 根据id删除市场活动备注* @param id* @return*/int deleteActivityRemarkById(String id);/*** 保存修改的市场活动备注* @param remark* @return*/int updateActivityRemark(ActivityRemark remark);
}
ActivityRemarkMapper.xml:
id, note_content, create_time, create_by, edit_time, edit_by, edit_flag, activity_id delete from tbl_activity_remarkwhere id = #{id,jdbcType=CHAR} insert into tbl_activity_remark (id, note_content, create_time, create_by, edit_time, edit_by, edit_flag, activity_id)values (#{id,jdbcType=CHAR}, #{noteContent,jdbcType=VARCHAR}, #{createTime,jdbcType=CHAR}, #{createBy,jdbcType=VARCHAR}, #{editTime,jdbcType=CHAR}, #{editBy,jdbcType=VARCHAR}, #{editFlag,jdbcType=CHAR}, #{activityId,jdbcType=CHAR}) insert into tbl_activity_remarkid, note_content, create_time, create_by, edit_time, edit_by, edit_flag, activity_id, #{id,jdbcType=CHAR}, #{noteContent,jdbcType=VARCHAR}, #{createTime,jdbcType=CHAR}, #{createBy,jdbcType=VARCHAR}, #{editTime,jdbcType=CHAR}, #{editBy,jdbcType=VARCHAR}, #{editFlag,jdbcType=CHAR}, #{activityId,jdbcType=CHAR}, update tbl_activity_remarknote_content = #{noteContent,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=CHAR}, create_by = #{createBy,jdbcType=VARCHAR}, edit_time = #{editTime,jdbcType=CHAR}, edit_by = #{editBy,jdbcType=VARCHAR}, edit_flag = #{editFlag,jdbcType=CHAR}, activity_id = #{activityId,jdbcType=CHAR}, where id = #{id,jdbcType=CHAR} update tbl_activity_remarkset note_content = #{noteContent,jdbcType=VARCHAR},create_time = #{createTime,jdbcType=CHAR},create_by = #{createBy,jdbcType=VARCHAR},edit_time = #{editTime,jdbcType=CHAR},edit_by = #{editBy,jdbcType=VARCHAR},edit_flag = #{editFlag,jdbcType=CHAR},activity_id = #{activityId,jdbcType=CHAR}where id = #{id,jdbcType=CHAR} insert into tbl_activity_remark(id, note_content, create_time, create_by, edit_flag, activity_id)values(#{id},#{ noteContent},#{ createTime},#{ createBy},#{ editFlag},#{ activityId}) delete from tbl_activity_remark where id=#{id} update tbl_activity_remarkset note_content=#{noteContent},edit_time=#{editTime},edit_by=#{editBy},edit_flag=#{editFlag}where id=#{id}
ClueActivityRelationMapper:
package com.bjpowernode.crm.workbench.mapper;import com.bjpowernode.crm.workbench.domain.ClueActivityRelation;import java.util.List;public interface ClueActivityRelationMapper {/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_clue_activity_relation** @mbggenerated Sun Mar 20 16:47:36 CST 2022*/int deleteByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_clue_activity_relation** @mbggenerated Sun Mar 20 16:47:36 CST 2022*/int insert(ClueActivityRelation record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_clue_activity_relation** @mbggenerated Sun Mar 20 16:47:36 CST 2022*/int insertSelective(ClueActivityRelation record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_clue_activity_relation** @mbggenerated Sun Mar 20 16:47:36 CST 2022*/ClueActivityRelation selectByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_clue_activity_relation** @mbggenerated Sun Mar 20 16:47:36 CST 2022*/int updateByPrimaryKeySelective(ClueActivityRelation record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_clue_activity_relation** @mbggenerated Sun Mar 20 16:47:36 CST 2022*/int updateByPrimaryKey(ClueActivityRelation record);/*** 批量保存线索新增关联的市场活动* @param clueActivityRelationList 线索和市场活动的关联关系集合* @return 新增条数*/int insertCreateClueActivityRelationByList(List clueActivityRelationList);/*** 通过市场活动id和线索id删除两者间的关系(绑定的市场活动)* @param clueActivityRelation 线索和市场活动的关联关系* @return 删除条数*/int deleteClueActivityRelationByClueIdAndActivityId(ClueActivityRelation clueActivityRelation);/*** 通过线索id数组(因为可能删除多个线索和市场活动对应的关联关系)* @param clueIds 线索id数组* @return 删除的条数*/int deleteClueActivityRelationByClueIds(String[] clueIds);/*** 通过线索id查询所有对应线索和市场活动关联关系* @param clueId 线索id* @return 关联关系集合*/List selectClueActivityRelationByClueId(String clueId);
}
ClueActivityRelationMapper.xml:
id, clue_id, activity_id delete from tbl_clue_activity_relationwhere id = #{id,jdbcType=CHAR} insert into tbl_clue_activity_relation (id, clue_id, activity_id)values (#{id,jdbcType=CHAR}, #{clueId,jdbcType=CHAR}, #{activityId,jdbcType=CHAR}) insert into tbl_clue_activity_relationid, clue_id, activity_id, #{id,jdbcType=CHAR}, #{clueId,jdbcType=CHAR}, #{activityId,jdbcType=CHAR}, update tbl_clue_activity_relationclue_id = #{clueId,jdbcType=CHAR}, activity_id = #{activityId,jdbcType=CHAR}, where id = #{id,jdbcType=CHAR} update tbl_clue_activity_relationset clue_id = #{clueId,jdbcType=CHAR},activity_id = #{activityId,jdbcType=CHAR}where id = #{id,jdbcType=CHAR} insert into tbl_clue_activity_relation(id, clue_id, activity_id)values(#{obj.id},#{obj.clueId},#{obj.activityId}) delete from tbl_clue_activity_relationwhere clue_id=#{clueId} and activity_id=#{activityId} delete from tbl_clue_activity_relationwhere clue_id in#{id}
ClueMapper:
package com.bjpowernode.crm.workbench.mapper;import com.bjpowernode.crm.workbench.domain.Clue;import java.util.List;
import java.util.Map;public interface ClueMapper {/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_clue** @mbggenerated Thu Mar 17 15:29:56 CST 2022*/int deleteByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_clue** @mbggenerated Thu Mar 17 15:29:56 CST 2022*/int insert(Clue record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_clue** @mbggenerated Thu Mar 17 15:29:56 CST 2022*/int insertSelective(Clue record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_clue** @mbggenerated Thu Mar 17 15:29:56 CST 2022*/Clue selectByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_clue** @mbggenerated Thu Mar 17 15:29:56 CST 2022*/int updateByPrimaryKeySelective(Clue record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_clue** @mbggenerated Thu Mar 17 15:29:56 CST 2022*/int updateByPrimaryKey(Clue record);/*** 新增线索* @param clue 新增的线索* @return 新增条数*/int insertClue(Clue clue);/*** 根据条件分页查询线索列表* @param map 查询条件* @return 查询到的线索*/List selectClueByConditionForPage(Map map);/*** 根据条件查询线索总条数* @param map 查询条件* @return 线索总条数*/int selectCountOfClueByCondition(Map map);/*** 通过id删除选则的线索* @param clueIds 线索id数组* @return 删除的条数*/int deleteClueByIds(String[] clueIds);/*** 通过id查询线索* @param id 线索id* @return 对应id的线索*/Clue selectClueById(String id);/*** 更新对应线索的数据* @param clue 更新的线索* @return 更新条数*/int updateClue(Clue clue);/*** 通过id查询线索详情* @param id 线索id* @return 对应id的线索*/Clue selectClueForDetailById(String id);List selectClueStageOfClueGroupByClueStage();List selectCountOfClueGroupByClueStage();
}
ClueMapper.xml:
id, fullname, appellation, owner, company, job, email, phone, website, mphone, state, source, create_by, create_time, edit_by, edit_time, description, contact_summary, next_contact_time, address delete from tbl_cluewhere id = #{id,jdbcType=CHAR} insert into tbl_clue (id, fullname, appellation, owner, company, job, email, phone, website, mphone, state, source, create_by, create_time, edit_by, edit_time, description, contact_summary, next_contact_time, address)values (#{id,jdbcType=CHAR}, #{fullname,jdbcType=VARCHAR}, #{appellation,jdbcType=VARCHAR}, #{owner,jdbcType=CHAR}, #{company,jdbcType=VARCHAR}, #{job,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{website,jdbcType=VARCHAR}, #{mphone,jdbcType=VARCHAR}, #{state,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=CHAR}, #{editBy,jdbcType=VARCHAR}, #{editTime,jdbcType=CHAR}, #{description,jdbcType=VARCHAR}, #{contactSummary,jdbcType=VARCHAR}, #{nextContactTime,jdbcType=CHAR}, #{address,jdbcType=VARCHAR}) insert into tbl_clueid, fullname, appellation, owner, company, job, email, phone, website, mphone, state, source, create_by, create_time, edit_by, edit_time, description, contact_summary, next_contact_time, address, #{id,jdbcType=CHAR}, #{fullname,jdbcType=VARCHAR}, #{appellation,jdbcType=VARCHAR}, #{owner,jdbcType=CHAR}, #{company,jdbcType=VARCHAR}, #{job,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{website,jdbcType=VARCHAR}, #{mphone,jdbcType=VARCHAR}, #{state,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=CHAR}, #{editBy,jdbcType=VARCHAR}, #{editTime,jdbcType=CHAR}, #{description,jdbcType=VARCHAR}, #{contactSummary,jdbcType=VARCHAR}, #{nextContactTime,jdbcType=CHAR}, #{address,jdbcType=VARCHAR}, update tbl_cluefullname = #{fullname,jdbcType=VARCHAR}, appellation = #{appellation,jdbcType=VARCHAR}, owner = #{owner,jdbcType=CHAR}, company = #{company,jdbcType=VARCHAR}, job = #{job,jdbcType=VARCHAR}, email = #{email,jdbcType=VARCHAR}, phone = #{phone,jdbcType=VARCHAR}, website = #{website,jdbcType=VARCHAR}, mphone = #{mphone,jdbcType=VARCHAR}, state = #{state,jdbcType=VARCHAR}, source = #{source,jdbcType=VARCHAR}, create_by = #{createBy,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=CHAR}, edit_by = #{editBy,jdbcType=VARCHAR}, edit_time = #{editTime,jdbcType=CHAR}, description = #{description,jdbcType=VARCHAR}, contact_summary = #{contactSummary,jdbcType=VARCHAR}, next_contact_time = #{nextContactTime,jdbcType=CHAR}, address = #{address,jdbcType=VARCHAR}, where id = #{id,jdbcType=CHAR} update tbl_clueset fullname = #{fullname,jdbcType=VARCHAR},appellation = #{appellation,jdbcType=VARCHAR},owner = #{owner,jdbcType=CHAR},company = #{company,jdbcType=VARCHAR},job = #{job,jdbcType=VARCHAR},email = #{email,jdbcType=VARCHAR},phone = #{phone,jdbcType=VARCHAR},website = #{website,jdbcType=VARCHAR},mphone = #{mphone,jdbcType=VARCHAR},state = #{state,jdbcType=VARCHAR},source = #{source,jdbcType=VARCHAR},create_by = #{createBy,jdbcType=VARCHAR},create_time = #{createTime,jdbcType=CHAR},edit_by = #{editBy,jdbcType=VARCHAR},edit_time = #{editTime,jdbcType=CHAR},description = #{description,jdbcType=VARCHAR},contact_summary = #{contactSummary,jdbcType=VARCHAR},next_contact_time = #{nextContactTime,jdbcType=CHAR},address = #{address,jdbcType=VARCHAR}where id = #{id,jdbcType=CHAR} insert into tbl_clue(id, fullname, appellation, owner, company, job, email, phone, website, mphone, state,source, create_by, create_time, description, contact_summary,next_contact_time, address)values (#{id},#{ fullname},#{ appellation},#{ owner},#{ company},#{ job},#{ email},#{ phone},#{ website},#{ mphone},#{ state},#{source},#{ createBy},#{ createTime},#{ description},#{ contactSummary},#{nextContactTime},#{ address}) delete from tbl_cluewhere id in#{id, jdbcType=VARCHAR} update tbl_clueset fullname=#{fullname}, appellation=#{appellation}, owner=#{owner}, company=#{company}, job=#{job}, email=#{email},phone=#{phone}, website=#{website}, mphone=#{mphone}, state=#{state}, source=#{source}, edit_by=#{editBy},edit_time=#{editTime}, description=#{description}, contact_summary=#{contactSummary},next_contact_time=#{nextContactTime}, address=#{address}where id=#{id}
ClueRemarkMapper:
package com.bjpowernode.crm.workbench.mapper;import com.bjpowernode.crm.workbench.domain.ClueRemark;import java.util.List;public interface ClueRemarkMapper {/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_clue_remark** @mbggenerated Fri Mar 18 20:26:12 CST 2022*/int deleteByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_clue_remark** @mbggenerated Fri Mar 18 20:26:12 CST 2022*/int insert(ClueRemark record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_clue_remark** @mbggenerated Fri Mar 18 20:26:12 CST 2022*/int insertSelective(ClueRemark record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_clue_remark** @mbggenerated Fri Mar 18 20:26:12 CST 2022*/ClueRemark selectByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_clue_remark** @mbggenerated Fri Mar 18 20:26:12 CST 2022*/int updateByPrimaryKeySelective(ClueRemark record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_clue_remark** @mbggenerated Fri Mar 18 20:26:12 CST 2022*/int updateByPrimaryKey(ClueRemark record);/*** 根据线索id查询该线索的所有备注详细信息* @param clueId 线索id* @return 备注列表*/List selectClueRemarkForDetailByClueId(String clueId);/*** 添加线索备注* @param clueRemark 线索备注* @return 添加的条数*/int insertClueRemark(ClueRemark clueRemark);/*** 通过线索id删除备注(用于删除线索时同时删除该线索备注;因为可能一次性会删除多个线索,所以传入的id是线索id数组)* @param clueIds 线索id* @return 删除的条数*/int deleteClueRemarkByClueId(String[] clueIds);/*** 通过线索备注的id删除线索备注* @param id 线索备注的id* @return 删除的条数*/int deleteClueRemarkById(String id);/*** 更新线索备注* @param clueRemark 更新的线索备注* @return 更新的条数*/int updateClueRemark(ClueRemark clueRemark);/*** 通过线索id查询市场活动备注* @param clueId 线索id* @return 该线索的所有备注集合*/List selectClueRemarkByClueId(String clueId);
}
ClueRemarkMapper.xml:
id, note_content, create_by, create_time, edit_by, edit_time, edit_flag, clue_id delete from tbl_clue_remarkwhere id = #{id,jdbcType=CHAR} insert into tbl_clue_remark (id, note_content, create_by, create_time, edit_by, edit_time, edit_flag, clue_id)values (#{id,jdbcType=CHAR}, #{noteContent,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=CHAR}, #{editBy,jdbcType=VARCHAR}, #{editTime,jdbcType=CHAR}, #{editFlag,jdbcType=CHAR}, #{clueId,jdbcType=CHAR}) insert into tbl_clue_remarkid, note_content, create_by, create_time, edit_by, edit_time, edit_flag, clue_id, #{id,jdbcType=CHAR}, #{noteContent,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=CHAR}, #{editBy,jdbcType=VARCHAR}, #{editTime,jdbcType=CHAR}, #{editFlag,jdbcType=CHAR}, #{clueId,jdbcType=CHAR}, update tbl_clue_remarknote_content = #{noteContent,jdbcType=VARCHAR}, create_by = #{createBy,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=CHAR}, edit_by = #{editBy,jdbcType=VARCHAR}, edit_time = #{editTime,jdbcType=CHAR}, edit_flag = #{editFlag,jdbcType=CHAR}, clue_id = #{clueId,jdbcType=CHAR}, where id = #{id,jdbcType=CHAR} update tbl_clue_remarkset note_content = #{noteContent,jdbcType=VARCHAR},create_by = #{createBy,jdbcType=VARCHAR},create_time = #{createTime,jdbcType=CHAR},edit_by = #{editBy,jdbcType=VARCHAR},edit_time = #{editTime,jdbcType=CHAR},edit_flag = #{editFlag,jdbcType=CHAR},clue_id = #{clueId,jdbcType=CHAR}where id = #{id,jdbcType=CHAR} insert intotbl_clue_remark(id, note_content, create_time, create_by, edit_flag, clue_id)values(#{id},#{noteContent},#{createTime},#{createBy},#{editFlag},#{clueId}) delete from tbl_clue_remarkwhere clue_id in#{id, jdbcType=VARCHAR} delete from tbl_clue_remarkwhere id=#{id} update tbl_clue_remarkset note_content=#{noteContent},edit_time=#{editTime},edit_by=#{editBy},edit_flag=#{editFlag}where id=#{id}
ContactsActivityRelationMapper :
package com.bjpowernode.crm.workbench.mapper;import com.bjpowernode.crm.workbench.domain.ContactsActivityRelation;import java.util.List;public interface ContactsActivityRelationMapper {/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_contacts_activity_relation** @mbggenerated Sun Mar 27 09:53:44 CST 2022*/int deleteByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_contacts_activity_relation** @mbggenerated Sun Mar 27 09:53:44 CST 2022*/int insert(ContactsActivityRelation record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_contacts_activity_relation** @mbggenerated Sun Mar 27 09:53:44 CST 2022*/int insertSelective(ContactsActivityRelation record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_contacts_activity_relation** @mbggenerated Sun Mar 27 09:53:44 CST 2022*/ContactsActivityRelation selectByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_contacts_activity_relation** @mbggenerated Sun Mar 27 09:53:44 CST 2022*/int updateByPrimaryKeySelective(ContactsActivityRelation record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_contacts_activity_relation** @mbggenerated Sun Mar 27 09:53:44 CST 2022*/int updateByPrimaryKey(ContactsActivityRelation record);/*** 通过集合插入联系人和市场活动关系的数据* @param contactsActivityRelationList 联系人和市场活动关系数据集合* @return 插入的条数*/int insertContactsActivityRelationByList(List contactsActivityRelationList);int deleteContactsActivityRelationByContactsIdAndActivityId(ContactsActivityRelation contactsActivityRelation);int deleteContactsActivityRelationByContactsIds(String[] contactsIds);
}
ContactsActivityRelationMapper .xml:
id, contacts_id, activity_id delete from tbl_contacts_activity_relationwhere id = #{id,jdbcType=CHAR} insert into tbl_contacts_activity_relation (id, contacts_id, activity_id)values (#{id,jdbcType=CHAR}, #{contactsId,jdbcType=CHAR}, #{activityId,jdbcType=CHAR}) insert into tbl_contacts_activity_relationid, contacts_id, activity_id, #{id,jdbcType=CHAR}, #{contactsId,jdbcType=CHAR}, #{activityId,jdbcType=CHAR}, update tbl_contacts_activity_relationcontacts_id = #{contactsId,jdbcType=CHAR}, activity_id = #{activityId,jdbcType=CHAR}, where id = #{id,jdbcType=CHAR} update tbl_contacts_activity_relationset contacts_id = #{contactsId,jdbcType=CHAR},activity_id = #{activityId,jdbcType=CHAR}where id = #{id,jdbcType=CHAR} insert into tbl_contacts_activity_relation(id, contacts_id, activity_id)values(#{obj.id}, #{obj.contactsId}, #{obj.activityId}) delete from tbl_contacts_activity_relationwhere contacts_id=#{contactsId} and activity_id=#{activityId} delete from tbl_contacts_activity_relationwhere contacts_id in#{id}
ContactsMapper:
package com.bjpowernode.crm.workbench.mapper;import com.bjpowernode.crm.workbench.domain.Contacts;
import com.bjpowernode.crm.workbench.domain.FunnelVO;import java.util.List;
import java.util.Map;public interface ContactsMapper {/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_contacts** @mbggenerated Thu Mar 24 21:35:58 CST 2022*/int deleteByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_contacts** @mbggenerated Thu Mar 24 21:35:58 CST 2022*/int insert(Contacts record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_contacts** @mbggenerated Thu Mar 24 21:35:58 CST 2022*/int insertSelective(Contacts record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_contacts** @mbggenerated Thu Mar 24 21:35:58 CST 2022*/Contacts selectByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_contacts** @mbggenerated Thu Mar 24 21:35:58 CST 2022*/int updateByPrimaryKeySelective(Contacts record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_contacts** @mbggenerated Thu Mar 24 21:35:58 CST 2022*/int updateByPrimaryKey(Contacts record);/*** 保存新增联系* @param contacts 联系对象封装的参数* @return 新增条数*/int insertContacts(Contacts contacts);/*** 根据条件分页查询联系人列表* @param map 查询条件* @return 查询到的联系人*/List selectContactsByConditionForPage(Map map);/*** 根据条件查询联系人总条数* @param map 查询条件* @return 联系人总条数*/int selectCountOfContactsByCondition(Map map);/*** 通过id查询联系人* @param id 联系人id* @return 对应id的联系人*/Contacts selectContactsById(String id);/*** 更新对应联系人的数据* @param contacts 更新的联系人* @return 更新条数*/int updateContacts(Contacts contacts);/*** 通过id删除选则的联系人* @param contactsIds 联系人id数组* @return 删除的条数*/int deleteContactsByIds(String[] contactsIds);/*** 通过联系人id查询联系人的详细信息* @param id 联系人id* @return 查询的联系人详细信息*/Contacts selectContactsForDetailById(String id);/*** 通过姓名模糊查询联系人* @param contactsName 模糊姓名* @return 查询到的线索*/List selectContactsByFuzzyName(String contactsName);List selectCountOfCustomerAndContactsGroupByCustomer();
}
ContactsMapper.xml:
id, owner, source, customer_id, fullname, appellation, email, mphone, job, create_by, create_time, edit_by, edit_time, description, contact_summary, next_contact_time, address delete from tbl_contactswhere id = #{id,jdbcType=CHAR} insert into tbl_contacts (id, owner, source,customer_id, fullname, appellation,email, mphone, job,create_by, create_time, edit_by,edit_time, description, contact_summary,next_contact_time, address)values (#{id,jdbcType=CHAR}, #{owner,jdbcType=CHAR}, #{source,jdbcType=VARCHAR},#{customerId,jdbcType=CHAR}, #{fullname,jdbcType=VARCHAR}, #{appellation,jdbcType=VARCHAR},#{email,jdbcType=VARCHAR}, #{mphone,jdbcType=VARCHAR}, #{job,jdbcType=VARCHAR},#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=CHAR}, #{editBy,jdbcType=VARCHAR},#{editTime,jdbcType=CHAR}, #{description,jdbcType=VARCHAR}, #{contactSummary,jdbcType=VARCHAR},#{nextContactTime,jdbcType=CHAR}, #{address,jdbcType=VARCHAR}) insert into tbl_contactsid, owner, source, customer_id, fullname, appellation, email, mphone, job, create_by, create_time, edit_by, edit_time, description, contact_summary, next_contact_time, address, #{id,jdbcType=CHAR}, #{owner,jdbcType=CHAR}, #{source,jdbcType=VARCHAR}, #{customerId,jdbcType=CHAR}, #{fullname,jdbcType=VARCHAR}, #{appellation,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{mphone,jdbcType=VARCHAR}, #{job,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=CHAR}, #{editBy,jdbcType=VARCHAR}, #{editTime,jdbcType=CHAR}, #{description,jdbcType=VARCHAR}, #{contactSummary,jdbcType=VARCHAR}, #{nextContactTime,jdbcType=CHAR}, #{address,jdbcType=VARCHAR}, update tbl_contactsowner = #{owner,jdbcType=CHAR}, source = #{source,jdbcType=VARCHAR}, customer_id = #{customerId,jdbcType=CHAR}, fullname = #{fullname,jdbcType=VARCHAR}, appellation = #{appellation,jdbcType=VARCHAR}, email = #{email,jdbcType=VARCHAR}, mphone = #{mphone,jdbcType=VARCHAR}, job = #{job,jdbcType=VARCHAR}, create_by = #{createBy,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=CHAR}, edit_by = #{editBy,jdbcType=VARCHAR}, edit_time = #{editTime,jdbcType=CHAR}, description = #{description,jdbcType=VARCHAR}, contact_summary = #{contactSummary,jdbcType=VARCHAR}, next_contact_time = #{nextContactTime,jdbcType=CHAR}, address = #{address,jdbcType=VARCHAR}, where id = #{id,jdbcType=CHAR} update tbl_contactsset owner = #{owner,jdbcType=CHAR},source = #{source,jdbcType=VARCHAR},customer_id = #{customerId,jdbcType=CHAR},fullname = #{fullname,jdbcType=VARCHAR},appellation = #{appellation,jdbcType=VARCHAR},email = #{email,jdbcType=VARCHAR},mphone = #{mphone,jdbcType=VARCHAR},job = #{job,jdbcType=VARCHAR},create_by = #{createBy,jdbcType=VARCHAR},create_time = #{createTime,jdbcType=CHAR},edit_by = #{editBy,jdbcType=VARCHAR},edit_time = #{editTime,jdbcType=CHAR},description = #{description,jdbcType=VARCHAR},contact_summary = #{contactSummary,jdbcType=VARCHAR},next_contact_time = #{nextContactTime,jdbcType=CHAR},address = #{address,jdbcType=VARCHAR}where id = #{id,jdbcType=CHAR} insert into tbl_contacts(id, owner, source, customer_id, fullname, appellation, email, mphone, job, create_by,create_time, description, contact_summary, next_contact_time, address)values (#{id}, #{owner}, #{source}, #{customerId}, #{fullname}, #{appellation}, #{email}, #{mphone}, #{job}, #{createBy},#{createTime}, #{description}, #{contactSummary}, #{nextContactTime}, #{address}) update tbl_contactsset owner=#{owner}, source=#{source}, customer_id=#{customerId}, fullname=#{fullname}, appellation=#{appellation},email=#{email}, mphone=#{mphone}, job=#{job}, edit_by=#{editBy}, edit_time=#{editTime}, description=#{description},contact_summary=#{contactSummary}, next_contact_time=#{nextContactTime},address=#{address}where id=#{id} delete from tbl_contactswhere id in#{id, jdbcType=VARCHAR}
ContactsRemarkMapper
package com.bjpowernode.crm.workbench.mapper;import com.bjpowernode.crm.workbench.domain.ContactsRemark;import java.util.List;public interface ContactsRemarkMapper {/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_contacts_remark** @mbggenerated Thu Mar 24 22:56:19 CST 2022*/int deleteByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_contacts_remark** @mbggenerated Thu Mar 24 22:56:19 CST 2022*/int insert(ContactsRemark record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_contacts_remark** @mbggenerated Thu Mar 24 22:56:19 CST 2022*/int insertSelective(ContactsRemark record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_contacts_remark** @mbggenerated Thu Mar 24 22:56:19 CST 2022*/ContactsRemark selectByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_contacts_remark** @mbggenerated Thu Mar 24 22:56:19 CST 2022*/int updateByPrimaryKeySelective(ContactsRemark record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_contacts_remark** @mbggenerated Thu Mar 24 22:56:19 CST 2022*/int updateByPrimaryKey(ContactsRemark record);/*** 批量插入联系人备注* @param contactsRemarkList 联系人备注集合* @return 插入条数*/int insertContactsRemarkByList(List contactsRemarkList);/*** 通过联系人id查询对应联系人的所有备注* @param contactsId 联系人id* @return 对应联系人备注集合*/List selectContactsRemarkForDetailByContactsId(String contactsId);/*** 新增一条联系人备注* @param contactsRemark 联系人备注* @return 新增条数*/int insertContactsRemark(ContactsRemark contactsRemark);/*** 通过联系人id删除备注(用于删除联系人时同时删除该联系人备注;因为可能一次性会删除多个联系人,所以传入的id是联系人id数组)* @param contactsIds 联系人id* @return 删除的条数*/int deleteContactsRemarkByContactsId(String[] contactsIds);/*** 通过联系人备注的id删除联系人备注* @param id 联系人备注的id* @return 删除的条数*/int deleteContactsRemarkById(String id);/*** 更新联系人备注* @param contactsRemark 更新的联系人备注* @return 更新的条数*/int updateContactsRemark(ContactsRemark contactsRemark);
}
ContactsRemarkMapper .xml:
id, note_content, create_by, create_time, edit_by, edit_time, edit_flag, contacts_id delete from tbl_contacts_remarkwhere id = #{id,jdbcType=CHAR} insert into tbl_contacts_remark (id, note_content, create_by, create_time, edit_by, edit_time, edit_flag, contacts_id)values (#{id,jdbcType=CHAR}, #{noteContent,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=CHAR}, #{editBy,jdbcType=VARCHAR}, #{editTime,jdbcType=CHAR}, #{editFlag,jdbcType=CHAR}, #{contactsId,jdbcType=CHAR}) insert into tbl_contacts_remarkid, note_content, create_by, create_time, edit_by, edit_time, edit_flag, contacts_id, #{id,jdbcType=CHAR}, #{noteContent,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=CHAR}, #{editBy,jdbcType=VARCHAR}, #{editTime,jdbcType=CHAR}, #{editFlag,jdbcType=CHAR}, #{contactsId,jdbcType=CHAR}, update tbl_contacts_remarknote_content = #{noteContent,jdbcType=VARCHAR}, create_by = #{createBy,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=CHAR}, edit_by = #{editBy,jdbcType=VARCHAR}, edit_time = #{editTime,jdbcType=CHAR}, edit_flag = #{editFlag,jdbcType=CHAR}, contacts_id = #{contactsId,jdbcType=CHAR}, where id = #{id,jdbcType=CHAR} update tbl_contacts_remarkset note_content = #{noteContent,jdbcType=VARCHAR},create_by = #{createBy,jdbcType=VARCHAR},create_time = #{createTime,jdbcType=CHAR},edit_by = #{editBy,jdbcType=VARCHAR},edit_time = #{editTime,jdbcType=CHAR},edit_flag = #{editFlag,jdbcType=CHAR},contacts_id = #{contactsId,jdbcType=CHAR}where id = #{id,jdbcType=CHAR} insert into tbl_contacts_remark(id, note_content, create_by, create_time, edit_by, edit_time, edit_flag, contacts_id)values(#{obj.id},#{obj.noteContent},#{obj.createBy},#{obj.createTime},#{obj.editBy},#{obj.editTime},#{obj.editFlag},#{obj.contactsId}) insert intotbl_contacts_remark(id, note_content, create_time, create_by, edit_flag, contacts_id)values(#{id},#{noteContent},#{createTime},#{createBy},#{editFlag},#{contactsId}) delete from tbl_contacts_remarkwhere contacts_id in#{id, jdbcType=VARCHAR} delete from tbl_contacts_remarkwhere id=#{id} update tbl_contacts_remarkset note_content=#{noteContent},edit_time=#{editTime},edit_by=#{editBy},edit_flag=#{editFlag}where id=#{id}
CustomerMapper
package com.bjpowernode.crm.workbench.mapper;import com.bjpowernode.crm.workbench.domain.Customer;import java.util.List;
import java.util.Map;public interface CustomerMapper {/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_customer** @mbggenerated Wed Mar 23 20:58:10 CST 2022*/int deleteByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_customer** @mbggenerated Wed Mar 23 20:58:10 CST 2022*/int insert(Customer record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_customer** @mbggenerated Wed Mar 23 20:58:10 CST 2022*/int insertSelective(Customer record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_customer** @mbggenerated Wed Mar 23 20:58:10 CST 2022*/Customer selectByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_customer** @mbggenerated Wed Mar 23 20:58:10 CST 2022*/int updateByPrimaryKeySelective(Customer record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_customer** @mbggenerated Wed Mar 23 20:58:10 CST 2022*/int updateByPrimaryKey(Customer record);/*** 插入新用户* @param customer 用户信息* @return 插入条数*/int insertCustomer(Customer customer);/*** 根据条件分页查询客户列表* @param map 查询条件* @return 查询到的客户*/List selectCustomerByConditionForPage(Map map);/*** 根据条件查询客户总条数* @param map 查询条件* @return 客户总条数*/int selectCountOfCustomerByCondition(Map map);/*** 通过id查询客户信息* @param id 客户id* @return 查询到的客户*/Customer selectCustomerById(String id);/*** 修改客户* @param customer 客户信息* @return 修改条数*/int updateCustomer(Customer customer);/*** 通过客户id数组删除对应的客户* @param ids 客户id数组* @return 删除的条数*/int deleteCustomerByIds(String[] ids);/*** 通过客户id查询客户的详细信息* @param id 客户id* @return 查询到的客户*/Customer selectCustomerForDetailById(String id);/*** 通过客户姓名模糊查询客户全名* @param customerName 模糊查询客户姓名* @return 匹配的客户全名*/List selectCustomerNameByFuzzyName(String customerName);/*** 通过客户姓名查询客户详细信息* @param customerName 客户姓名* @return 客户*/Customer selectCustomerByName(String customerName);/*** 通过客户姓名查询客户id* @param customerName 客户姓名* @return 客户姓名*/String selectCustomerIdByName(String customerName);
}
CustomerMapper.xml:
id, owner, name, website, phone, create_by, create_time, edit_by, edit_time, contact_summary, next_contact_time, description, address delete from tbl_customerwhere id = #{id,jdbcType=CHAR} insert into tbl_customer (id, owner, name, website, phone, create_by, create_time, edit_by, edit_time, contact_summary, next_contact_time, description, address)values (#{id,jdbcType=CHAR}, #{owner,jdbcType=CHAR}, #{name,jdbcType=VARCHAR}, #{website,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=CHAR}, #{editBy,jdbcType=VARCHAR}, #{editTime,jdbcType=CHAR}, #{contactSummary,jdbcType=VARCHAR}, #{nextContactTime,jdbcType=CHAR}, #{description,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}) insert into tbl_customerid, owner, name, website, phone, create_by, create_time, edit_by, edit_time, contact_summary, next_contact_time, description, address, #{id,jdbcType=CHAR}, #{owner,jdbcType=CHAR}, #{name,jdbcType=VARCHAR}, #{website,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=CHAR}, #{editBy,jdbcType=VARCHAR}, #{editTime,jdbcType=CHAR}, #{contactSummary,jdbcType=VARCHAR}, #{nextContactTime,jdbcType=CHAR}, #{description,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, update tbl_customerowner = #{owner,jdbcType=CHAR}, name = #{name,jdbcType=VARCHAR}, website = #{website,jdbcType=VARCHAR}, phone = #{phone,jdbcType=VARCHAR}, create_by = #{createBy,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=CHAR}, edit_by = #{editBy,jdbcType=VARCHAR}, edit_time = #{editTime,jdbcType=CHAR}, contact_summary = #{contactSummary,jdbcType=VARCHAR}, next_contact_time = #{nextContactTime,jdbcType=CHAR}, description = #{description,jdbcType=VARCHAR}, address = #{address,jdbcType=VARCHAR}, where id = #{id,jdbcType=CHAR} update tbl_customerset owner = #{owner,jdbcType=CHAR},name = #{name,jdbcType=VARCHAR},website = #{website,jdbcType=VARCHAR},phone = #{phone,jdbcType=VARCHAR},create_by = #{createBy,jdbcType=VARCHAR},create_time = #{createTime,jdbcType=CHAR},edit_by = #{editBy,jdbcType=VARCHAR},edit_time = #{editTime,jdbcType=CHAR},contact_summary = #{contactSummary,jdbcType=VARCHAR},next_contact_time = #{nextContactTime,jdbcType=CHAR},description = #{description,jdbcType=VARCHAR},address = #{address,jdbcType=VARCHAR}where id = #{id,jdbcType=CHAR} insert into tbl_customer(id, owner, name, website, phone, create_by, create_time, contact_summary,next_contact_time, description, address)values (#{id}, #{owner}, #{name}, #{website}, #{phone}, #{createBy},#{createTime},#{contactSummary},#{nextContactTime},#{description}, #{address}) update tbl_customerset owner=#{owner}, name=#{name}, website=#{website}, phone=#{phone},edit_by=#{editBy},edit_time=#{editTime},contact_summary=#{contactSummary},next_contact_time=#{nextContactTime}, description=#{description}, address=#{address}where id=#{id} delete from tbl_customerwhere id in#{id}
CustomerRemarkMapper
package com.bjpowernode.crm.workbench.mapper;import com.bjpowernode.crm.workbench.domain.CustomerRemark;import java.util.List;public interface CustomerRemarkMapper {/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_customer_remark** @mbggenerated Thu Mar 24 22:29:16 CST 2022*/int deleteByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_customer_remark** @mbggenerated Thu Mar 24 22:29:16 CST 2022*/int insert(CustomerRemark record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_customer_remark** @mbggenerated Thu Mar 24 22:29:16 CST 2022*/int insertSelective(CustomerRemark record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_customer_remark** @mbggenerated Thu Mar 24 22:29:16 CST 2022*/CustomerRemark selectByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_customer_remark** @mbggenerated Thu Mar 24 22:29:16 CST 2022*/int updateByPrimaryKeySelective(CustomerRemark record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_customer_remark** @mbggenerated Thu Mar 24 22:29:16 CST 2022*/int updateByPrimaryKey(CustomerRemark record);/*** 通过客户备注集合插入客户备注* @param customerRemarkList 客户备注集合* @return 插入条数*/int insertCustomerRemarkByList(List customerRemarkList);/*** 通过客户id查询该客户备注详细信息* @param customerId* @return*/List selectCustomerRemarkForDetailByCustomerId(String customerId);/*** 通过客户id数组删除备注(用于删除客户时同时删除该客户备注;因为可能一次性会删除多个客户,所以传入的id是客户id数组)* @param customerIds 客户id数组* @return 删除的条数*/int deleteCustomerRemarkByCustomerIds(String[] customerIds);/*** 新增客户备注* @param customerRemark 客户备注* @return 新增条数*/int insertCustomerRemark(CustomerRemark customerRemark);/*** 通过客户备注id删除备注* @param id 客户id* @return 删除的条数*/int deleteCustomerRemarkById(String id);/*** 更新客户备注* @param customerRemark 客户备注信息* @return 更新条数*/int updateCustomerRemark(CustomerRemark customerRemark);
}
CustomerRemarkMapper.xml:
id, note_content, create_by, create_time, edit_by, edit_time, edit_flag, customer_id delete from tbl_customer_remarkwhere id = #{id,jdbcType=CHAR} insert into tbl_customer_remark (id, note_content, create_by, create_time, edit_by, edit_time, edit_flag, customer_id)values (#{id,jdbcType=CHAR}, #{noteContent,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=CHAR}, #{editBy,jdbcType=VARCHAR}, #{editTime,jdbcType=CHAR}, #{editFlag,jdbcType=CHAR}, #{customerId,jdbcType=CHAR}) insert into tbl_customer_remarkid, note_content, create_by, create_time, edit_by, edit_time, edit_flag, customer_id, #{id,jdbcType=CHAR}, #{noteContent,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=CHAR}, #{editBy,jdbcType=VARCHAR}, #{editTime,jdbcType=CHAR}, #{editFlag,jdbcType=CHAR}, #{customerId,jdbcType=CHAR}, update tbl_customer_remarknote_content = #{noteContent,jdbcType=VARCHAR}, create_by = #{createBy,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=CHAR}, edit_by = #{editBy,jdbcType=VARCHAR}, edit_time = #{editTime,jdbcType=CHAR}, edit_flag = #{editFlag,jdbcType=CHAR}, customer_id = #{customerId,jdbcType=CHAR}, where id = #{id,jdbcType=CHAR} update tbl_customer_remarkset note_content = #{noteContent,jdbcType=VARCHAR},create_by = #{createBy,jdbcType=VARCHAR},create_time = #{createTime,jdbcType=CHAR},edit_by = #{editBy,jdbcType=VARCHAR},edit_time = #{editTime,jdbcType=CHAR},edit_flag = #{editFlag,jdbcType=CHAR},customer_id = #{customerId,jdbcType=CHAR}where id = #{id,jdbcType=CHAR} insert into tbl_customer_remark(id, note_content, create_by, create_time, edit_by, edit_time, edit_flag, customer_id)values(#{obj.id},#{obj.noteContent},#{obj.createBy},#{obj.createTime},#{obj.editBy},#{obj.editTime},#{obj.editFlag},#{obj.customerId}) delete from tbl_customer_remarkwhere customer_id in#{id} insert into tbl_customer_remark(id, note_content, create_by, create_time, edit_by, edit_time, edit_flag, customer_id)values(#{id},#{noteContent},#{createBy},#{createTime},#{editBy},#{editTime},#{editFlag},#{customerId}) delete from tbl_customer_remarkwhere id=#{id} update tbl_customer_remarkset note_content=#{noteContent},edit_time=#{editTime},edit_by=#{editBy},edit_flag=#{editFlag}where id=#{id}
TranHistoryMapper
package com.bjpowernode.crm.workbench.mapper;import com.bjpowernode.crm.workbench.domain.TranHistory;import java.util.List;public interface TranHistoryMapper {/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_tran_history** @mbggenerated Sat Apr 16 16:10:10 CST 2022*/int deleteByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_tran_history** @mbggenerated Sat Apr 16 16:10:10 CST 2022*/int insert(TranHistory record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_tran_history** @mbggenerated Sat Apr 16 16:10:10 CST 2022*/int insertSelective(TranHistory record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_tran_history** @mbggenerated Sat Apr 16 16:10:10 CST 2022*/TranHistory selectByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_tran_history** @mbggenerated Sat Apr 16 16:10:10 CST 2022*/int updateByPrimaryKeySelective(TranHistory record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_tran_history** @mbggenerated Sat Apr 16 16:10:10 CST 2022*/int updateByPrimaryKey(TranHistory record);/*** 新增交易历史记录* @param tranHistory 交易历史记录* @return 新增条数*/int insertTransactionHistory(TranHistory tranHistory);//根据交易的id查询交易历史的详细信息List selectTranHistoryForDetailByTranId(String id);int deleteTranHistoryByTranIds(String[] tranId);
}
TranHistoryMapper.xml:
id, stage, money, expected_date, create_time, create_by, tran_id delete from tbl_tran_historywhere id = #{id,jdbcType=CHAR} insert into tbl_tran_history (id, stage, money, expected_date, create_time, create_by, tran_id)values (#{id,jdbcType=CHAR}, #{stage,jdbcType=VARCHAR}, #{money,jdbcType=VARCHAR}, #{expectedDate,jdbcType=CHAR}, #{createTime,jdbcType=CHAR}, #{createBy,jdbcType=VARCHAR}, #{tranId,jdbcType=CHAR}) insert into tbl_tran_historyid, stage, money, expected_date, create_time, create_by, tran_id, #{id,jdbcType=CHAR}, #{stage,jdbcType=VARCHAR}, #{money,jdbcType=VARCHAR}, #{expectedDate,jdbcType=CHAR}, #{createTime,jdbcType=CHAR}, #{createBy,jdbcType=VARCHAR}, #{tranId,jdbcType=CHAR}, update tbl_tran_historystage = #{stage,jdbcType=VARCHAR}, money = #{money,jdbcType=VARCHAR}, expected_date = #{expectedDate,jdbcType=CHAR}, create_time = #{createTime,jdbcType=CHAR}, create_by = #{createBy,jdbcType=VARCHAR}, tran_id = #{tranId,jdbcType=CHAR}, where id = #{id,jdbcType=CHAR} update tbl_tran_historyset stage = #{stage,jdbcType=VARCHAR},money = #{money,jdbcType=VARCHAR},expected_date = #{expectedDate,jdbcType=CHAR},create_time = #{createTime,jdbcType=CHAR},create_by = #{createBy,jdbcType=VARCHAR},tran_id = #{tranId,jdbcType=CHAR}where id = #{id,jdbcType=CHAR} insert into tbl_tran_history (id, stage, money, expected_date, create_time, create_by, tran_id)values (#{id,jdbcType=CHAR}, #{stage,jdbcType=VARCHAR}, #{money,jdbcType=VARCHAR},#{expectedDate,jdbcType=CHAR}, #{createTime,jdbcType=CHAR}, #{createBy,jdbcType=VARCHAR},#{tranId,jdbcType=CHAR}) delete from tbl_tran_historywhere tran_id in#{id}
TranMapper
package com.bjpowernode.crm.workbench.mapper;import com.bjpowernode.crm.workbench.domain.FunnelVO;
import com.bjpowernode.crm.workbench.domain.Tran;import java.util.List;
import java.util.Map;public interface TranMapper {/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_tran** @mbggenerated Sun Mar 27 10:41:50 CST 2022*/int deleteByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_tran** @mbggenerated Sun Mar 27 10:41:50 CST 2022*/int insert(Tran record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_tran** @mbggenerated Sun Mar 27 10:41:50 CST 2022*/int insertSelective(Tran record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_tran** @mbggenerated Sun Mar 27 10:41:50 CST 2022*/Tran selectByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_tran** @mbggenerated Sun Mar 27 10:41:50 CST 2022*/int updateByPrimaryKeySelective(Tran record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_tran** @mbggenerated Sun Mar 27 10:41:50 CST 2022*/int updateByPrimaryKey(Tran record);/*** 新增一条交易记录* @param tran 交易信息* @return 新增条数*/int insertTran(Tran tran);List selectTransactionByConditionForPage(Map map);int selectCountOfTransactionByCondition(Map map);Tran selectTransactionById(String id);int updateTran(Tran tran);int deleteTranByIds(String[] ids);//查看交易的详细信息Tran selectTranForDetailById(String id);/*** 查询交易表中各个阶段的数据量* @return 数据集合*/List selectCountOfTranGroupByStage();
}
TranMapper.xml:
id, owner, money, name, expected_date, customer_id, stage, type, source, activity_id, contacts_id, create_by, create_time, edit_by, edit_time, description, contact_summary, next_contact_time delete from tbl_tranwhere id = #{id,jdbcType=CHAR} insert into tbl_tran (id, owner, money, name, expected_date, customer_id, stage, type, source, activity_id, contacts_id, create_by, create_time, edit_by, edit_time, description, contact_summary, next_contact_time)values (#{id,jdbcType=CHAR}, #{owner,jdbcType=CHAR}, #{money,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{expectedDate,jdbcType=CHAR}, #{customerId,jdbcType=CHAR}, #{stage,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, #{activityId,jdbcType=CHAR}, #{contactsId,jdbcType=CHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=CHAR}, #{editBy,jdbcType=VARCHAR}, #{editTime,jdbcType=CHAR}, #{description,jdbcType=VARCHAR}, #{contactSummary,jdbcType=VARCHAR}, #{nextContactTime,jdbcType=CHAR}) insert into tbl_tranid, owner, money, name, expected_date, customer_id, stage, type, source, activity_id, contacts_id, create_by, create_time, edit_by, edit_time, description, contact_summary, next_contact_time, #{id,jdbcType=CHAR}, #{owner,jdbcType=CHAR}, #{money,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{expectedDate,jdbcType=CHAR}, #{customerId,jdbcType=CHAR}, #{stage,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, #{activityId,jdbcType=CHAR}, #{contactsId,jdbcType=CHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=CHAR}, #{editBy,jdbcType=VARCHAR}, #{editTime,jdbcType=CHAR}, #{description,jdbcType=VARCHAR}, #{contactSummary,jdbcType=VARCHAR}, #{nextContactTime,jdbcType=CHAR}, update tbl_tranowner = #{owner,jdbcType=CHAR}, money = #{money,jdbcType=VARCHAR}, name = #{name,jdbcType=VARCHAR}, expected_date = #{expectedDate,jdbcType=CHAR}, customer_id = #{customerId,jdbcType=CHAR}, stage = #{stage,jdbcType=VARCHAR}, type = #{type,jdbcType=VARCHAR}, source = #{source,jdbcType=VARCHAR}, activity_id = #{activityId,jdbcType=CHAR}, contacts_id = #{contactsId,jdbcType=CHAR}, create_by = #{createBy,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=CHAR}, edit_by = #{editBy,jdbcType=VARCHAR}, edit_time = #{editTime,jdbcType=CHAR}, description = #{description,jdbcType=VARCHAR}, contact_summary = #{contactSummary,jdbcType=VARCHAR}, next_contact_time = #{nextContactTime,jdbcType=CHAR}, where id = #{id,jdbcType=CHAR} update tbl_transet owner = #{owner,jdbcType=CHAR},money = #{money,jdbcType=VARCHAR},name = #{name,jdbcType=VARCHAR},expected_date = #{expectedDate,jdbcType=CHAR},customer_id = #{customerId,jdbcType=CHAR},stage = #{stage,jdbcType=VARCHAR},type = #{type,jdbcType=VARCHAR},source = #{source,jdbcType=VARCHAR},activity_id = #{activityId,jdbcType=CHAR},contacts_id = #{contactsId,jdbcType=CHAR},create_by = #{createBy,jdbcType=VARCHAR},create_time = #{createTime,jdbcType=CHAR},edit_by = #{editBy,jdbcType=VARCHAR},edit_time = #{editTime,jdbcType=CHAR},description = #{description,jdbcType=VARCHAR},contact_summary = #{contactSummary,jdbcType=VARCHAR},next_contact_time = #{nextContactTime,jdbcType=CHAR}where id = #{id,jdbcType=CHAR} insert into tbl_tran(id, owner, money, name, expected_date, customer_id, stage, type, source, activity_id,contacts_id, create_by, create_time, description, contact_summary,next_contact_time)values (#{id}, #{owner}, #{money}, #{name}, #{expectedDate}, #{customerId}, #{stage}, #{type}, #{source}, #{activityId},#{contactsId}, #{createBy}, #{createTime}, #{description}, #{contactSummary}, #{nextContactTime}) update tbl_transet owner=#{owner}, money=#{money}, name=#{name}, expected_date=#{expectedDate}, customer_id=#{customerId}, stage=#{stage},type=#{type}, source=#{source},activity_id=#{activityId}, contacts_id=#{contactsId}, edit_by=#{editBy}, edit_time=#{editTime},description=#{description}, contact_summary=#{contactSummary},next_contact_time=#{nextContactTime}where id = #{id} delete from tbl_tranwhere id in#{id, jdbcType=VARCHAR}
TranRemarkMapper
package com.bjpowernode.crm.workbench.mapper;import com.bjpowernode.crm.workbench.domain.TranRemark;import java.util.List;public interface TranRemarkMapper {/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_tran_remark** @mbggenerated Sun Mar 27 10:57:44 CST 2022*/int deleteByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_tran_remark** @mbggenerated Sun Mar 27 10:57:44 CST 2022*/int insert(TranRemark record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_tran_remark** @mbggenerated Sun Mar 27 10:57:44 CST 2022*/int insertSelective(TranRemark record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_tran_remark** @mbggenerated Sun Mar 27 10:57:44 CST 2022*/TranRemark selectByPrimaryKey(String id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_tran_remark** @mbggenerated Sun Mar 27 10:57:44 CST 2022*/int updateByPrimaryKeySelective(TranRemark record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table tbl_tran_remark** @mbggenerated Sun Mar 27 10:57:44 CST 2022*/int updateByPrimaryKey(TranRemark record);/*** 通过交易备注集合插入交易备注* @param tranRemarkList 交易备注集合* @return 插入条数*/int insertTranRemarkByList(List tranRemarkList);//查看交易备注详细信息List selectTranRemarkForDetailByTranId(String id);int insertTranRemark(TranRemark tranRemark);int deleteTranRemarkById(String id);int updateTranRemark(TranRemark tranRemark);int deleteTranRemarkByTranIds(String[] tranId);
}
TranRemarkMapper.xml:
id, note_content, create_by, create_time, edit_by, edit_time, edit_flag, tran_id delete from tbl_tran_remarkwhere id = #{id,jdbcType=CHAR} insert into tbl_tran_remark (id, note_content, create_by, create_time, edit_by, edit_time, edit_flag, tran_id)values (#{id,jdbcType=CHAR}, #{noteContent,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=CHAR}, #{editBy,jdbcType=VARCHAR}, #{editTime,jdbcType=CHAR}, #{editFlag,jdbcType=CHAR}, #{tranId,jdbcType=CHAR}) insert into tbl_tran_remarkid, note_content, create_by, create_time, edit_by, edit_time, edit_flag, tran_id, #{id,jdbcType=CHAR}, #{noteContent,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=CHAR}, #{editBy,jdbcType=VARCHAR}, #{editTime,jdbcType=CHAR}, #{editFlag,jdbcType=CHAR}, #{tranId,jdbcType=CHAR}, update tbl_tran_remarknote_content = #{noteContent,jdbcType=VARCHAR}, create_by = #{createBy,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=CHAR}, edit_by = #{editBy,jdbcType=VARCHAR}, edit_time = #{editTime,jdbcType=CHAR}, edit_flag = #{editFlag,jdbcType=CHAR}, tran_id = #{tranId,jdbcType=CHAR}, where id = #{id,jdbcType=CHAR} update tbl_tran_remarkset note_content = #{noteContent,jdbcType=VARCHAR},create_by = #{createBy,jdbcType=VARCHAR},create_time = #{createTime,jdbcType=CHAR},edit_by = #{editBy,jdbcType=VARCHAR},edit_time = #{editTime,jdbcType=CHAR},edit_flag = #{editFlag,jdbcType=CHAR},tran_id = #{tranId,jdbcType=CHAR}where id = #{id,jdbcType=CHAR} insert into tbl_tran_remark(id, note_content, create_by, create_time, edit_by, edit_time, edit_flag, tran_id)values(#{obj.id}, #{obj.noteContent}, #{obj.createBy}, #{obj.createTime}, #{obj.editBy}, #{obj.editTime}, #{obj.editFlag}, #{obj.tranId}) insert into tbl_tran_remark(id, note_content, create_by, create_time, edit_by, edit_time, edit_flag, tran_id)values(#{id},#{noteContent},#{createBy},#{createTime},#{editBy},#{editTime},#{editFlag},#{tranId}) delete from tbl_tran_remarkwhere id=#{id} update tbl_tran_remarkset note_content=#{noteContent},edit_time=#{editTime},edit_by=#{editBy},edit_flag=#{editFlag}where id=#{id} delete from tbl_tran_remarkwhere tran_id in#{id}
上一篇:学习-Java输入输出之Reader类之字符数据输入
下一篇:QFile(文件)