@Update("create table if not exists ${tableName}(" + "id bigint not null," + "IntVersion varchar(60)," + "AlarmUniqueId varchar(60)," + "NeName varchar(60)," + "SystemName varchar(60)," + "EquipmentType varchar(60)," + "Vendor varchar(60)," + "LocateNeName varchar(60)," + "LocateNeType varchar(60)," + "LocateInfo varchar(60)," + "EventTime varchar(60)," + "CancelTime varchar(60)," + "AlarmType varchar(60)," + "VendorAlarmType varchar(60)," + "VendorSeverity varchar(60)," + "VendorAlarmId varchar(60)," + "AlarmStatus varchar(60)," + "AlarmTitle varchar(200)," + "ProbableCauseTxt varchar(200)," + "AlarmText varchar(200)," + "job varchar(20)," + "instance varchar(20)," + "primary key(id)) character set='utf8'" ) public void createIfNotExistsTable(@Param("tableName")String tableName);
/** * {@link AccountImportForm.ExistPolicy} */ @Update("<script>" + "update users u join" + "<foreach item='item' index='index' collection='accounts' open='(' separator='union' close=')'>" + "<if test='index==0'>(select #{item.id} id,#{item.password} password,#{item.nick} nick,#{item.school} school,#{item.email} email)</if>" + "<if test='index!=0'>(select #{item.id},#{item.password},#{item.nick},#{item.school},#{item.email})</if>" + "</foreach>" + "t on u.user_id=t.id" + "<set>" + "<if test='(mask&1)!=0'>u.disabled=false,</if>" + "<if test='(mask&2)!=0'>u.password=t.password,</if>" + "<if test='(mask&4)!=0'>" + "u.nick=t.nick,u.school=t.school,u.email=nullif(t.email,'')," + "</if>" + "modified_time=now()" + "</set>" + "</script>") int batchUpdate(@Param("accounts") List<Account> accounts, @Param("mask") int mask);
@CacheEvict(value = Constants.Cache.LANGUAGE, allEntries = true) @Update("<script>update language " + "<set>" + "<if test='param2.id!=null'>id=#{param2.id},</if>" + "<if test='param2.name!=null'>name=#{param2.name},</if>" + "<if test='param2.sourceExtension!=null'>source_extension=#{param2.sourceExtension},</if>" + "<if test='param2.compileCommand!=null'>compile_command=#{param2.compileCommand},</if>" + "<if test='param2.executeCommand!=null'>execute_command=#{param2.executeCommand},</if>" + "<if test='param2.executableExtension!=null'>executable_extension=#{param2.executableExtension},</if>" + "<if test='param2.timeFactor!=null'>time_factor=#{param2.timeFactor},</if>" + "<if test='param2.extMemory!=null'>ext_memory=#{param2.extMemory},</if>" + "<if test='param2.description!=null'>description=#{param2.description},</if>" + "<if test='param2.disabled!=null'>disabled=#{param2.disabled},</if>" + "</set> where id=#{param1}" + "</script>") long update(long id, Language language);
public MapperAnnotationBuilder(Configuration configuration, Class<?> type) { String resource = type.getName().replace('.', '/') + ".java (best guess)"; this.assistant = new MapperBuilderAssistant(configuration, resource); this.configuration = configuration; this.type = type; sqlAnnotationTypes.add(Select.class); sqlAnnotationTypes.add(Insert.class); sqlAnnotationTypes.add(Update.class); sqlAnnotationTypes.add(Delete.class); sqlProviderAnnotationTypes.add(SelectProvider.class); sqlProviderAnnotationTypes.add(InsertProvider.class); sqlProviderAnnotationTypes.add(UpdateProvider.class); sqlProviderAnnotationTypes.add(DeleteProvider.class); }
private SqlCommandType getSqlCommandType(Method method) { Class<? extends Annotation> type = getSqlAnnotationType(method); if (type == null) { type = getSqlProviderAnnotationType(method); if (type == null) { return SqlCommandType.UNKNOWN; } if (type == SelectProvider.class) { type = Select.class; } else if (type == InsertProvider.class) { type = Insert.class; } else if (type == UpdateProvider.class) { type = Update.class; } else if (type == DeleteProvider.class) { type = Delete.class; } } return SqlCommandType.valueOf(type.getSimpleName().toUpperCase(Locale.ENGLISH)); }
public MybatisMapperAnnotationBuilder(Configuration configuration, Class<?> type) { // 执行父类 super(configuration, type); String resource = type.getName().replace('.', '/') + ".java (best guess)"; this.assistant = new MapperBuilderAssistant(configuration, resource); this.configuration = configuration; this.type = type; sqlAnnotationTypes.add(Select.class); sqlAnnotationTypes.add(Insert.class); sqlAnnotationTypes.add(Update.class); sqlAnnotationTypes.add(Delete.class); sqlProviderAnnotationTypes.add(SelectProvider.class); sqlProviderAnnotationTypes.add(InsertProvider.class); sqlProviderAnnotationTypes.add(UpdateProvider.class); sqlProviderAnnotationTypes.add(DeleteProvider.class); }
@Update("CREATE TABLE IF NOT EXISTS `tb_product` (\n" + " `pdt_id` varchar(50) NOT NULL DEFAULT '' COMMENT '产品货号',\n" + " `pdt_name` varchar(100) NOT NULL DEFAULT '' COMMENT '产品名称',\n" + " `pdt_color` varchar(20) NOT NULL DEFAULT '0' COMMENT '产品颜色',\n" + " `pdt_counts` varchar(100) NOT NULL DEFAULT '' COMMENT '产品库存',\n" + " `pdt_cost` double(20,2) NOT NULL DEFAULT '0.00' COMMENT '成本价',\n" + " `pdt_price` float(11,2) NOT NULL DEFAULT '0.00' COMMENT '标价',\n" + " `pdt_total` double(20,2) NOT NULL DEFAULT '0.00' COMMENT '库存总数',\n" + " `pdt_comment` text COMMENT '备注',\n" + " `total_rmb` double(20,2) NOT NULL DEFAULT '0.00' COMMENT '库存总价值',\n" + " `datetime` datetime NOT NULL COMMENT '记录时间',\n" + " `timeLastOp` datetime NOT NULL COMMENT '最后一次操作时间',\n" + " `flag` tinyint(3) NOT NULL DEFAULT '0' COMMENT '[0]有效数据 [1]废弃的',\n" + " PRIMARY KEY (`pdt_id`),\n" + " UNIQUE KEY `pdt_id` (`pdt_id`)\n" + ") ENGINE=InnoDB DEFAULT CHARSET=utf8;") void createTable();
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table SQLTOOL_METADATA * * @mbggenerated */ @Update({ "update SQLTOOL_METADATA", "set SQL_TYPE = #{sqlType,jdbcType=VARCHAR},", "NAME = #{name,jdbcType=VARCHAR},", "DESCRIPTION = #{description,jdbcType=VARCHAR},", "OWNED_BY = #{ownedBy,jdbcType=VARCHAR},", "PUBLISHED_FLG = #{publishedFlg,jdbcType=INTEGER},", "REGISTERED_AT = #{registeredAt,jdbcType=TIMESTAMP},", "UPDATED_AT = #{updatedAt,jdbcType=TIMESTAMP},", "CREATED_AT = #{createdAt,jdbcType=TIMESTAMP},", "LOCK_VERSION = #{lockVersion,jdbcType=INTEGER},", "DELETED_FLG = #{deletedFlg,jdbcType=INTEGER}", "where ID = #{id,jdbcType=INTEGER}" }) int updateByPrimaryKey(SqltoolMetadata record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table MAIL_LOG * * @mbggenerated */ @Update({ "update MAIL_LOG", "set LAUNCHED_BY = #{launchedBy,jdbcType=VARCHAR},", "LAUNCHED_AT = #{launchedAt,jdbcType=TIMESTAMP},", "MAIL_STATUS = #{mailStatus,jdbcType=INTEGER},", "MESSAGE_NAME = #{messageName,jdbcType=VARCHAR},", "SCHEDULED_AT = #{scheduledAt,jdbcType=TIMESTAMP},", "SENT_AT = #{sentAt,jdbcType=TIMESTAMP},", "FROM_ADDR = #{fromAddr,jdbcType=VARCHAR},", "SUBJECT = #{subject,jdbcType=VARCHAR},", "BODY = #{body,jdbcType=VARCHAR},", "UPDATED_AT = #{updatedAt,jdbcType=TIMESTAMP},", "CREATED_AT = #{createdAt,jdbcType=TIMESTAMP},", "LOCK_VERSION = #{lockVersion,jdbcType=INTEGER},", "DELETED_FLG = #{deletedFlg,jdbcType=INTEGER}", "where ID = #{id,jdbcType=BIGINT}" }) int updateByPrimaryKey(MailLog record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table SQLTOOL_CLAUSE * * @mbggenerated */ @Update({ "update SQLTOOL_CLAUSE", "set DATABASE_NAME = #{databaseName,jdbcType=VARCHAR},", "SELECT_CLAUSE = #{selectClause,jdbcType=VARCHAR},", "FROM_CLAUSE = #{fromClause,jdbcType=VARCHAR},", "WHERE_CLAUSE = #{whereClause,jdbcType=VARCHAR},", "GROUP_BY_CLAUSE = #{groupByClause,jdbcType=VARCHAR},", "HAVING_CLAUSE = #{havingClause,jdbcType=VARCHAR},", "ORDER_BY_CLAUSE = #{orderByClause,jdbcType=VARCHAR},", "PARAM_MAP = #{paramMap,jdbcType=VARCHAR},", "UPDATED_AT = #{updatedAt,jdbcType=TIMESTAMP},", "CREATED_AT = #{createdAt,jdbcType=TIMESTAMP},", "LOCK_VERSION = #{lockVersion,jdbcType=INTEGER},", "DELETED_FLG = #{deletedFlg,jdbcType=INTEGER}", "where ID = #{id,jdbcType=INTEGER}" }) int updateByPrimaryKey(SqltoolClause record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table ASYNC_PROCESS_FILE * * @mbggenerated */ @Update({ "update ASYNC_PROCESS_FILE", "set ASYNC_ID = #{asyncId,jdbcType=BIGINT},", "HANDLER_NAME = #{handlerName,jdbcType=VARCHAR},", "PARAM_NAME = #{paramName,jdbcType=VARCHAR},", "ORIGINAL_FILENAME = #{originalFilename,jdbcType=VARCHAR},", "CONTENT_TYPE = #{contentType,jdbcType=VARCHAR},", "FILE_SIZE = #{fileSize,jdbcType=BIGINT},", "UPDATED_AT = #{updatedAt,jdbcType=TIMESTAMP},", "CREATED_AT = #{createdAt,jdbcType=TIMESTAMP},", "LOCK_VERSION = #{lockVersion,jdbcType=INTEGER},", "DELETED_FLG = #{deletedFlg,jdbcType=INTEGER}", "where ID = #{id,jdbcType=BIGINT}" }) int updateByPrimaryKey(AsyncProcessFile record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table ASYNC_PROCESS * * @mbggenerated */ @Update({ "update ASYNC_PROCESS", "set LAUNCHED_BY = #{launchedBy,jdbcType=VARCHAR},", "DESCRIPTION = #{description,jdbcType=VARCHAR},", "ASYNC_TYPE = #{asyncType,jdbcType=VARCHAR},", "ASYNC_STATUS = #{asyncStatus,jdbcType=VARCHAR},", "REGISTERED_AT = #{registeredAt,jdbcType=TIMESTAMP},", "LAUNCHED_AT = #{launchedAt,jdbcType=TIMESTAMP},", "STARTED_AT = #{startedAt,jdbcType=TIMESTAMP},", "FINISHED_AT = #{finishedAt,jdbcType=TIMESTAMP},", "UPDATED_AT = #{updatedAt,jdbcType=TIMESTAMP},", "CREATED_AT = #{createdAt,jdbcType=TIMESTAMP},", "LOCK_VERSION = #{lockVersion,jdbcType=INTEGER},", "DELETED_FLG = #{deletedFlg,jdbcType=INTEGER}", "where ID = #{id,jdbcType=BIGINT}" }) int updateByPrimaryKey(AsyncProcess record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table TODO * * @mbggenerated */ @Update({ "update TODO", "set POSTED_BY = #{postedBy,jdbcType=VARCHAR},", "POSTED_AT = #{postedAt,jdbcType=TIMESTAMP},", "DUE_DT = #{dueDt,jdbcType=DATE},", "DONE_AT = #{doneAt,jdbcType=TIMESTAMP},", "DONE_FLG = #{doneFlg,jdbcType=INTEGER},", "DESCRIPTION = #{description,jdbcType=VARCHAR},", "UPDATED_AT = #{updatedAt,jdbcType=TIMESTAMP},", "CREATED_AT = #{createdAt,jdbcType=TIMESTAMP},", "LOCK_VERSION = #{lockVersion,jdbcType=INTEGER},", "DELETED_FLG = #{deletedFlg,jdbcType=INTEGER}", "where ID = #{id,jdbcType=BIGINT}" }) int updateByPrimaryKey(Todo record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table MAIL_LOG * * @mbggenerated */ @Update({ "update MAIL_LOG", "set LAUNCHED_BY = #{launchedBy,jdbcType=VARCHAR},", "LAUNCHED_AT = #{launchedAt,jdbcType=TIMESTAMP},", "MAIL_STATUS = #{mailStatus,jdbcType=INTEGER},", "MESSAGE_NAME = #{messageName,jdbcType=VARCHAR},", "SCHEDULED_AT = #{scheduledAt,jdbcType=TIMESTAMP},", "SENT_AT = #{sentAt,jdbcType=TIMESTAMP},", "FROM_ADDR = #{fromAddr,jdbcType=VARCHAR},", "REPLY_TO_ADDR = #{replyToAddr,jdbcType=VARCHAR},", "SUBJECT = #{subject,jdbcType=VARCHAR},", "BODY = #{body,jdbcType=VARCHAR},", "UPDATED_AT = #{updatedAt,jdbcType=TIMESTAMP},", "CREATED_AT = #{createdAt,jdbcType=TIMESTAMP},", "LOCK_VERSION = #{lockVersion,jdbcType=INTEGER},", "DELETED_FLG = #{deletedFlg,jdbcType=INTEGER}", "where ID = #{id,jdbcType=BIGINT}" }) int updateByPrimaryKey(MailLog record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table ZIPCD_MASTER * * @mbggenerated */ @Update({ "update ZIPCD_MASTER", "set CITY_CD = #{cityCd,jdbcType=INTEGER},", "ZIPCD = #{zipcd,jdbcType=VARCHAR},", "PREF = #{pref,jdbcType=VARCHAR},", "CITY = #{city,jdbcType=VARCHAR},", "ADDR = #{addr,jdbcType=VARCHAR},", "PREF_KANA = #{prefKana,jdbcType=VARCHAR},", "CITY_KANA = #{cityKana,jdbcType=VARCHAR},", "ADDR_KANA = #{addrKana,jdbcType=VARCHAR},", "UPDATED_AT = #{updatedAt,jdbcType=TIMESTAMP},", "CREATED_AT = #{createdAt,jdbcType=TIMESTAMP},", "LOCK_VERSION = #{lockVersion,jdbcType=INTEGER},", "DELETED_FLG = #{deletedFlg,jdbcType=INTEGER}", "where ID = #{id,jdbcType=BIGINT}" }) int updateByPrimaryKey(ZipcdMaster record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table m_crm_opportunity * * @mbg.generated Sat Oct 21 18:03:12 ICT 2017 */ @Update({ "update m_crm_opportunity", "set opportunityName = #{opportunityname,jdbcType=VARCHAR},", "currencyid = #{currencyid,jdbcType=VARCHAR},", "accountid = #{accountid,jdbcType=INTEGER},", "amount = #{amount,jdbcType=DOUBLE},", "type = #{type,jdbcType=VARCHAR},", "source = #{source,jdbcType=VARCHAR},", "expectedClosedDate = #{expectedcloseddate,jdbcType=TIMESTAMP},", "campaignid = #{campaignid,jdbcType=INTEGER},", "nextStep = #{nextstep,jdbcType=VARCHAR},", "probability = #{probability,jdbcType=INTEGER},", "createdTime = #{createdtime,jdbcType=TIMESTAMP},", "createdUser = #{createduser,jdbcType=VARCHAR},", "sAccountId = #{saccountid,jdbcType=INTEGER},", "assignUser = #{assignuser,jdbcType=VARCHAR},", "opportunityType = #{opportunitytype,jdbcType=VARCHAR},", "salesStage = #{salesstage,jdbcType=VARCHAR},", "lastUpdatedTime = #{lastupdatedtime,jdbcType=TIMESTAMP},", "avatarId = #{avatarid,jdbcType=VARCHAR},", "description = #{description,jdbcType=LONGVARCHAR}", "where id = #{id,jdbcType=INTEGER}" }) int updateByPrimaryKeyWithBLOBs(Opportunity record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table m_crm_opportunity * * @mbg.generated Sat Oct 21 18:03:12 ICT 2017 */ @Update({ "update m_crm_opportunity", "set opportunityName = #{opportunityname,jdbcType=VARCHAR},", "currencyid = #{currencyid,jdbcType=VARCHAR},", "accountid = #{accountid,jdbcType=INTEGER},", "amount = #{amount,jdbcType=DOUBLE},", "type = #{type,jdbcType=VARCHAR},", "source = #{source,jdbcType=VARCHAR},", "expectedClosedDate = #{expectedcloseddate,jdbcType=TIMESTAMP},", "campaignid = #{campaignid,jdbcType=INTEGER},", "nextStep = #{nextstep,jdbcType=VARCHAR},", "probability = #{probability,jdbcType=INTEGER},", "createdTime = #{createdtime,jdbcType=TIMESTAMP},", "createdUser = #{createduser,jdbcType=VARCHAR},", "sAccountId = #{saccountid,jdbcType=INTEGER},", "assignUser = #{assignuser,jdbcType=VARCHAR},", "opportunityType = #{opportunitytype,jdbcType=VARCHAR},", "salesStage = #{salesstage,jdbcType=VARCHAR},", "lastUpdatedTime = #{lastupdatedtime,jdbcType=TIMESTAMP},", "avatarId = #{avatarid,jdbcType=VARCHAR}", "where id = #{id,jdbcType=INTEGER}" }) int updateByPrimaryKey(Opportunity record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table m_crm_campaign * * @mbg.generated Sat Oct 21 18:03:12 ICT 2017 */ @Update({ "update m_crm_campaign", "set campaignName = #{campaignname,jdbcType=VARCHAR},", "startDate = #{startdate,jdbcType=TIMESTAMP},", "endDate = #{enddate,jdbcType=TIMESTAMP},", "currencyId = #{currencyid,jdbcType=VARCHAR},", "budget = #{budget,jdbcType=DOUBLE},", "actualCost = #{actualcost,jdbcType=DOUBLE},", "expectedRevenue = #{expectedrevenue,jdbcType=DOUBLE},", "expectedCost = #{expectedcost,jdbcType=DOUBLE},", "impression = #{impression,jdbcType=INTEGER},", "createdTime = #{createdtime,jdbcType=TIMESTAMP},", "createdUser = #{createduser,jdbcType=VARCHAR},", "sAccountId = #{saccountid,jdbcType=INTEGER},", "status = #{status,jdbcType=VARCHAR},", "type = #{type,jdbcType=VARCHAR},", "assignUser = #{assignuser,jdbcType=VARCHAR},", "lastUpdatedTime = #{lastupdatedtime,jdbcType=TIMESTAMP},", "avatarId = #{avatarid,jdbcType=VARCHAR},", "impressionnote = #{impressionnote,jdbcType=LONGVARCHAR},", "objective = #{objective,jdbcType=LONGVARCHAR},", "description = #{description,jdbcType=LONGVARCHAR}", "where id = #{id,jdbcType=INTEGER}" }) int updateByPrimaryKeyWithBLOBs(CampaignWithBLOBs record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table m_crm_customer * * @mbg.generated Sat Oct 21 18:03:12 ICT 2017 */ @Update({ "update m_crm_customer", "set firstname = #{firstname,jdbcType=VARCHAR},", "lastname = #{lastname,jdbcType=VARCHAR},", "leadsource = #{leadsource,jdbcType=INTEGER},", "assignUser = #{assignuser,jdbcType=VARCHAR},", "department = #{department,jdbcType=VARCHAR},", "officePhone = #{officephone,jdbcType=VARCHAR},", "mobile = #{mobile,jdbcType=VARCHAR},", "homePhone = #{homephone,jdbcType=VARCHAR},", "assisstant = #{assisstant,jdbcType=VARCHAR},", "assisstantPhone = #{assisstantphone,jdbcType=VARCHAR},", "birthday = #{birthday,jdbcType=DATE},", "createdTime = #{createdtime,jdbcType=TIMESTAMP},", "createdUser = #{createduser,jdbcType=VARCHAR},", "sAccountId = #{saccountid,jdbcType=INTEGER},", "lastUpdatedTime = #{lastupdatedtime,jdbcType=TIMESTAMP},", "title = #{title,jdbcType=VARCHAR}", "where id = #{id,jdbcType=INTEGER}" }) int updateByPrimaryKey(Customer record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table m_crm_call * * @mbg.generated Sat Oct 21 18:03:12 ICT 2017 */ @Update({ "update m_crm_call", "set subject = #{subject,jdbcType=VARCHAR},", "startDate = #{startdate,jdbcType=TIMESTAMP},", "durationInSeconds = #{durationinseconds,jdbcType=INTEGER},", "calltype = #{calltype,jdbcType=VARCHAR},", "type = #{type,jdbcType=VARCHAR},", "typeid = #{typeid,jdbcType=INTEGER},", "lastUpdatedTime = #{lastupdatedtime,jdbcType=TIMESTAMP},", "createdTime = #{createdtime,jdbcType=TIMESTAMP},", "createdUser = #{createduser,jdbcType=VARCHAR},", "assignUser = #{assignuser,jdbcType=VARCHAR},", "contactId = #{contactid,jdbcType=INTEGER},", "sAccountId = #{saccountid,jdbcType=INTEGER},", "status = #{status,jdbcType=VARCHAR},", "purpose = #{purpose,jdbcType=VARCHAR},", "isClosed = #{isclosed,jdbcType=BIT},", "description = #{description,jdbcType=LONGVARCHAR},", "result = #{result,jdbcType=LONGVARCHAR}", "where id = #{id,jdbcType=INTEGER}" }) int updateByPrimaryKeyWithBLOBs(CallWithBLOBs record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table m_crm_contract * * @mbg.generated Sat Oct 21 18:03:12 ICT 2017 */ @Update({ "update m_crm_contract", "set contractname = #{contractname,jdbcType=VARCHAR},", "status = #{status,jdbcType=VARCHAR},", "code = #{code,jdbcType=VARCHAR},", "accountid = #{accountid,jdbcType=INTEGER},", "opportunityid = #{opportunityid,jdbcType=INTEGER},", "currencyid = #{currencyid,jdbcType=VARCHAR},", "customersigneddate = #{customersigneddate,jdbcType=TIMESTAMP},", "companysigneddate = #{companysigneddate,jdbcType=TIMESTAMP},", "type = #{type,jdbcType=VARCHAR},", "description = #{description,jdbcType=VARCHAR},", "startdate = #{startdate,jdbcType=TIMESTAMP},", "enddate = #{enddate,jdbcType=TIMESTAMP},", "contractvalue = #{contractvalue,jdbcType=DECIMAL},", "createdTime = #{createdtime,jdbcType=TIMESTAMP},", "createdUser = #{createduser,jdbcType=VARCHAR},", "sAccountId = #{saccountid,jdbcType=INTEGER},", "assignUser = #{assignuser,jdbcType=VARCHAR},", "lastUpdatedTime = #{lastupdatedtime,jdbcType=TIMESTAMP}", "where id = #{id,jdbcType=INTEGER}" }) int updateByPrimaryKey(Contract record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table m_crm_case * * @mbg.generated Sat Oct 21 18:03:12 ICT 2017 */ @Update({ "update m_crm_case", "set priority = #{priority,jdbcType=VARCHAR},", "status = #{status,jdbcType=VARCHAR},", "type = #{type,jdbcType=VARCHAR},", "subject = #{subject,jdbcType=VARCHAR},", "accountId = #{accountid,jdbcType=INTEGER},", "createdTime = #{createdtime,jdbcType=TIMESTAMP},", "createdUser = #{createduser,jdbcType=VARCHAR},", "sAccountId = #{saccountid,jdbcType=INTEGER},", "assignUser = #{assignuser,jdbcType=VARCHAR},", "lastUpdatedTime = #{lastupdatedtime,jdbcType=TIMESTAMP},", "reason = #{reason,jdbcType=VARCHAR},", "origin = #{origin,jdbcType=VARCHAR},", "email = #{email,jdbcType=VARCHAR},", "phonenumber = #{phonenumber,jdbcType=VARCHAR},", "description = #{description,jdbcType=LONGVARCHAR},", "resolution = #{resolution,jdbcType=LONGVARCHAR}", "where id = #{id,jdbcType=INTEGER}" }) int updateByPrimaryKeyWithBLOBs(CaseWithBLOBs record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table m_crm_task * * @mbg.generated Sat Oct 21 18:03:12 ICT 2017 */ @Update({ "update m_crm_task", "set subject = #{subject,jdbcType=VARCHAR},", "startdate = #{startdate,jdbcType=TIMESTAMP},", "duedate = #{duedate,jdbcType=TIMESTAMP},", "contactId = #{contactid,jdbcType=INTEGER},", "typeid = #{typeid,jdbcType=INTEGER},", "createdTime = #{createdtime,jdbcType=TIMESTAMP},", "createdUser = #{createduser,jdbcType=VARCHAR},", "sAccountId = #{saccountid,jdbcType=INTEGER},", "status = #{status,jdbcType=VARCHAR},", "assignUser = #{assignuser,jdbcType=VARCHAR},", "priority = #{priority,jdbcType=VARCHAR},", "type = #{type,jdbcType=VARCHAR},", "lastUpdatedTime = #{lastupdatedtime,jdbcType=TIMESTAMP},", "isClosed = #{isclosed,jdbcType=BIT},", "description = #{description,jdbcType=LONGVARCHAR}", "where id = #{id,jdbcType=INTEGER}" }) int updateByPrimaryKeyWithBLOBs(CrmTask record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table m_crm_task * * @mbg.generated Sat Oct 21 18:03:12 ICT 2017 */ @Update({ "update m_crm_task", "set subject = #{subject,jdbcType=VARCHAR},", "startdate = #{startdate,jdbcType=TIMESTAMP},", "duedate = #{duedate,jdbcType=TIMESTAMP},", "contactId = #{contactid,jdbcType=INTEGER},", "typeid = #{typeid,jdbcType=INTEGER},", "createdTime = #{createdtime,jdbcType=TIMESTAMP},", "createdUser = #{createduser,jdbcType=VARCHAR},", "sAccountId = #{saccountid,jdbcType=INTEGER},", "status = #{status,jdbcType=VARCHAR},", "assignUser = #{assignuser,jdbcType=VARCHAR},", "priority = #{priority,jdbcType=VARCHAR},", "type = #{type,jdbcType=VARCHAR},", "lastUpdatedTime = #{lastupdatedtime,jdbcType=TIMESTAMP},", "isClosed = #{isclosed,jdbcType=BIT}", "where id = #{id,jdbcType=INTEGER}" }) int updateByPrimaryKey(CrmTask record);
public MybatisMapperAnnotationBuilder(Configuration configuration, Class<?> type) { // TODO 执行父类 super(configuration, type); String resource = type.getName().replace('.', '/') + ".java (best guess)"; this.assistant = new MapperBuilderAssistant(configuration, resource); this.configuration = configuration; this.type = type; sqlAnnotationTypes.add(Select.class); sqlAnnotationTypes.add(Insert.class); sqlAnnotationTypes.add(Update.class); sqlAnnotationTypes.add(Delete.class); sqlProviderAnnotationTypes.add(SelectProvider.class); sqlProviderAnnotationTypes.add(InsertProvider.class); sqlProviderAnnotationTypes.add(UpdateProvider.class); sqlProviderAnnotationTypes.add(DeleteProvider.class); }
@Update({ "update user", "set username = #{username,jdbcType=VARCHAR},", "password = #{password,jdbcType=VARCHAR},", "role = #{role,jdbcType=INTEGER}", "where id = #{id,jdbcType=INTEGER}" }) int updateByPrimaryKey(User record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table SysCode * * @mbggenerated Wed Jul 12 20:57:03 CST 2017 */ @Update({ "update SysCode", "set codeTypeId = #{codeTypeId,jdbcType=INTEGER},", "codeName = #{codeName,jdbcType=VARCHAR},", "parentCodeId = #{parentCodeId,jdbcType=INTEGER}", "where codeId = #{codeId,jdbcType=INTEGER}" }) int updateByPrimaryKey(SysCode record);
@Update("<script>update contest" + "<set>" + "<if test='c.title!=null'>title=#{c.title},</if>" + "<if test='c.description!=null'>description=#{c.description},</if>" + "<if test='c.startTime!=null'>start_time=#{c.startTime},</if>" + "<if test='c.endTime!=null'>end_time=#{c.endTime},</if>" + "<if test='c.disabled!=null'>disabled=#{c.disabled},</if>" + "<if test='c.description!=null'>description=#{c.description},</if>" + "<if test='c.createdTime!=null'>created_time=#{c.createdTime},</if>" + "<if test='c.modifiedTime!=null'>modified_time=#{c.modifiedTime},</if>" + "</set>" + "<where>contest_id=#{id}</where>" + "</script>") long updateSelective(@Param("id") long id, @Nonnull @Param("c") Contest contest);