org.apache.ibatis.annotations.Update Java Examples
The following examples show how to use
org.apache.ibatis.annotations.Update.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: sds Author: didi File: PointStrategyDao.java License: Apache License 2.0 | 6 votes |
/** * 更新降级点策略 * * @param strategyDO * @return */ @Update("<script> update point_strategy <set> " + " sds_scheme_name = #{newSdsSchemeName}, status = #{status}, operator_name = #{operatorName}, " + "operator_email = #{operatorEmail} " + "<if test='visitThreshold != null'> , visit_threshold = #{visitThreshold} </if> " + "<if test='concurrentThreshold != null'> , concurrent_threshold = #{concurrentThreshold} </if> " + "<if test='exceptionThreshold != null'> , exception_threshold = #{exceptionThreshold} </if> " + "<if test='exceptionRateThreshold != null'> , exception_rate_threshold = #{exceptionRateThreshold} </if> " + "<if test='exceptionRateStart != null'> , exception_rate_start = #{exceptionRateStart} </if> " + "<if test='timeoutThreshold != null'> , timeout_threshold = #{timeoutThreshold} </if> " + "<if test='timeoutCountThreshold != null'> , timeout_count_threshold = #{timeoutCountThreshold} </if> " + "<if test='tokenBucketGeneratedTokensInSecond != null'> , token_bucket_generated_tokens_in_second = " + "#{tokenBucketGeneratedTokensInSecond} </if> " + "<if test='tokenBucketSize != null'> , token_bucket_size = #{tokenBucketSize} </if> " + "<if test='delayTime != null'> , delay_time = #{delayTime} </if> " + "<if test='retryInterval != null'> , retry_interval = #{retryInterval} </if> " + "<if test='downgradeRate != null'> , downgrade_rate = #{downgradeRate} </if> " + "<if test='pressureTestDowngrade != null'> , pressure_test_downgrade = #{pressureTestDowngrade} </if> " + " </set> " + " where app_group_name = #{appGroupName}" + " and app_name = #{appName}" + " and point = #{point}" + " and sds_scheme_name = #{sdsSchemeName}" + " </script>") int updatePointStrategy(PointStrategyDO strategyDO);
Example #2
Source Project: hmdm-server Author: h-mdm File: ApplicationMapper.java License: Apache License 2.0 | 5 votes |
@Update("UPDATE configurationApplications " + "SET applicationId=#{newAppId}, applicationVersionId=#{newAppVerId} " + "WHERE applicationId=#{appId} AND applicationVersionId=#{appVerId}") void changeConfigurationsApplication(@Param("appId") Integer oldAppId, @Param("appVerId") Integer oldAppVerId, @Param("newAppId") Integer newAppId, @Param("newAppVerId") Integer newAppVerId);
Example #3
Source Project: hmdm-server Author: h-mdm File: ApplicationMapper.java License: Apache License 2.0 | 5 votes |
@Update("UPDATE applications " + "SET latestVersion = (" + " SELECT id " + " FROM applicationVersions apv1 " + " WHERE apv1.applicationId = applications.id " + " AND mdm_app_version_comparison_index(apv1.version) = " + " (SELECT MAX(mdm_app_version_comparison_index(apv2.version)) " + " FROM applicationVersions apv2 " + " WHERE apv2.applicationId = applications.id) " + " LIMIT 1) " + "WHERE id = #{id}") void recalculateLatestVersion(@Param("id") Integer applicationId);
Example #4
Source Project: hmdm-server Author: h-mdm File: ApplicationMapper.java License: Apache License 2.0 | 5 votes |
@Update("UPDATE configurationApplications " + "SET applicationVersionId = #{newId} " + "WHERE applicationId = #{appId} " + "AND action <> 2 " + "AND EXISTS (SELECT 1 " + " FROM configurations " + " WHERE configurations.id = configurationApplications.configurationId " + " AND configurations.autoUpdate IS TRUE)") int autoUpdateConfigurationsApplication(@Param("appId") Integer applicationId, @Param("newId") Integer newAppVersionId);
Example #5
Source Project: hmdm-server Author: h-mdm File: ApplicationMapper.java License: Apache License 2.0 | 5 votes |
@Update("UPDATE configurations " + "SET mainAppId = #{newId} " + "WHERE configurations.autoUpdate IS TRUE " + "AND EXISTS (SELECT 1 FROM applicationVersions " + " WHERE applicationVersions.id = configurations.mainAppId" + " AND applicationVersions.applicationId = #{appId})") int autoUpdateConfigurationsMainApplication(@Param("appId") Integer applicationId, @Param("newId") Integer newAppVersionId);
Example #6
Source Project: hmdm-server Author: h-mdm File: ApplicationMapper.java License: Apache License 2.0 | 5 votes |
@Update("UPDATE configurations " + "SET mainAppId = (" + " SELECT ca.applicationVersionId " + " FROM configurationApplications ca " + " INNER JOIN applications apps ON apps.id = ca.applicationId " + " WHERE ca.configurationId = configurations.id " + " AND ca.action = 1 " + " AND apps.pkg = (SELECT apps2.pkg " + " FROM applicationVersions av " + " INNER JOIN applications apps2 ON apps2.id = av.applicationId " + " WHERE av.id = configurations.mainAppId)" + ") " + "WHERE configurations.customerId = #{customerId} " + "AND NOT configurations.mainAppId IS NULL") int recheckConfigurationMainApplications(@Param("customerId") Integer customerId);
Example #7
Source Project: hmdm-server Author: h-mdm File: ApplicationMapper.java License: Apache License 2.0 | 5 votes |
@Update("UPDATE configurations " + "SET mainAppId = (" + " SELECT ca.applicationVersionId " + " FROM configurationApplications ca " + " INNER JOIN applications apps ON apps.id = ca.applicationId " + " WHERE ca.configurationId = configurations.id " + " AND ca.action = 1 " + " AND apps.pkg = (SELECT apps2.pkg " + " FROM applicationVersions av " + " INNER JOIN applications apps2 ON apps2.id = av.applicationId " + " WHERE av.id = configurations.mainAppId)" + ") " + "WHERE configurations.id = #{configurationId} " + "AND NOT configurations.mainAppId IS NULL") int recheckConfigurationMainApplication(@Param("configurationId") Integer configurationId);
Example #8
Source Project: hmdm-server Author: h-mdm File: ApplicationMapper.java License: Apache License 2.0 | 5 votes |
@Update("UPDATE configurations " + "SET contentAppId = (" + " SELECT ca.applicationVersionId " + " FROM configurationApplications ca " + " INNER JOIN applications apps ON apps.id = ca.applicationId " + " WHERE ca.configurationId = configurations.id " + " AND ca.action = 1 " + " AND apps.pkg = (SELECT apps2.pkg " + " FROM applicationVersions av " + " INNER JOIN applications apps2 ON apps2.id = av.applicationId " + " WHERE av.id = configurations.contentAppId)" + ") " + "WHERE configurations.customerId = #{customerId} " + "AND NOT configurations.contentAppId IS NULL") int recheckConfigurationContentApplications(@Param("customerId") Integer customerId);
Example #9
Source Project: hmdm-server Author: h-mdm File: ApplicationMapper.java License: Apache License 2.0 | 5 votes |
@Update("UPDATE configurations " + "SET contentAppId = (" + " SELECT ca.applicationVersionId " + " FROM configurationApplications ca " + " INNER JOIN applications apps ON apps.id = ca.applicationId " + " WHERE ca.configurationId = configurations.id " + " AND ca.action = 1 " + " AND apps.pkg = (SELECT apps2.pkg " + " FROM applicationVersions av " + " INNER JOIN applications apps2 ON apps2.id = av.applicationId " + " WHERE av.id = configurations.contentAppId)" + ") " + "WHERE configurations.id = #{configurationId} " + "AND NOT configurations.contentAppId IS NULL") int recheckConfigurationContentApplication(@Param("configurationId") Integer configurationId);
Example #10
Source Project: hmdm-server Author: h-mdm File: ApplicationMapper.java License: Apache License 2.0 | 5 votes |
@Update("UPDATE configurations " + "SET contentAppId = #{newId} " + "WHERE configurations.autoUpdate IS TRUE " + "AND EXISTS (SELECT 1 FROM applicationVersions " + " WHERE applicationVersions.id = configurations.contentAppId" + " AND applicationVersions.applicationId = #{appId})") int autoUpdateConfigurationsContentApplication(@Param("appId") Integer applicationId, @Param("newId") Integer newAppVersionId);
Example #11
Source Project: hmdm-server Author: h-mdm File: DeviceMapper.java License: Apache License 2.0 | 5 votes |
@Update("INSERT INTO deviceStatuses (deviceId, configFilesStatus, applicationsStatus) " + "VALUES (#{deviceId}, #{filesStatus}, #{appsStatus})" + "ON CONFLICT ON CONSTRAINT deviceStatuses_pr_key DO " + "UPDATE SET configFilesStatus = EXCLUDED.configFilesStatus, applicationsStatus = EXCLUDED.applicationsStatus") int updateDeviceStatuses(@Param("deviceId") Integer deviceId, @Param("filesStatus") DeviceConfigFilesStatus deviceConfigFilesStatus, @Param("appsStatus") DeviceApplicationsStatus deviceApplicatiosStatus);
Example #12
Source Project: hmdm-server Author: h-mdm File: ConfigurationMapper.java License: Apache License 2.0 | 5 votes |
@Update({"UPDATE configurations SET " + "name=#{name}, " + "description=#{description}, " + "password=#{password}, " + "backgroundColor=#{backgroundColor}, " + "textColor=#{textColor}, " + "backgroundImageUrl=#{backgroundImageUrl}, " + "iconSize=#{iconSize}, " + "desktopHeader=#{desktopHeader}, " + "requestUpdates=#{requestUpdates}, " + "pushOptions=#{pushOptions}, " + "autoBrightness=#{autoBrightness}, " + "brightness=#{brightness}, " + "manageTimeout=#{manageTimeout}, " + "timeout=#{timeout}, " + "lockVolume=#{lockVolume}, " + "passwordMode=#{passwordMode}, " + "useDefaultDesignSettings=#{useDefaultDesignSettings}, " + "gps=#{gps}, " + "bluetooth=#{bluetooth}, " + "wifi=#{wifi}, " + "mobileData=#{mobileData}, " + "usbStorage=#{usbStorage}, " + "mainAppId=#{mainAppId}, " + "contentAppId=#{contentAppId}, " + "eventReceivingComponent=#{eventReceivingComponent}, " + "kioskMode=#{kioskMode}, " + "wifiSSID=#{wifiSSID}, " + "wifiPassword=#{wifiPassword}, " + "wifiSecurityType=#{wifiSecurityType}, " + "autoUpdate=#{autoUpdate}, " + "blockStatusBar=#{blockStatusBar}, " + "systemUpdateType=#{systemUpdateType}, " + "systemUpdateFrom=#{systemUpdateFrom}, " + "systemUpdateTo=#{systemUpdateTo} " + "WHERE id=#{id}"}) void updateConfiguration(Configuration configuration);
Example #13
Source Project: hmdm-server Author: h-mdm File: PostgresDeviceLogMapper.java License: Apache License 2.0 | 5 votes |
@Update("UPDATE plugin_devicelog_settings_rules SET " + " settingId = #{settingId}, " + " name = #{name}, " + " active = #{active}, " + " applicationId = #{applicationId}, " + " severity = #{severity}, " + " filter = #{filter}, " + " groupId = #{groupId}, " + " configurationId = #{configurationId} " + "WHERE id = #{id}") void updatePluginSettingsRule(PostgresDeviceLogRule rule);
Example #14
Source Project: Spring-Boot-Book Author: xiuhuai File: UserMapper.java License: Apache License 2.0 | 4 votes |
@Update("update user set name=#{name},age=#{age} where id=#{id}") //void updataById(@Param("id")String id,@Param("name")String name); // void updataById(@Param("id")String id,@Param("name")String name); int updateById(User user);
Example #15
Source Project: Spring-Boot-Book Author: xiuhuai File: UserMapper.java License: Apache License 2.0 | 4 votes |
@Update("update user set name=#{name},age=#{age} where id=#{id}") //void updataById(@Param("id")String id,@Param("name")String name); // void updataById(@Param("id")String id,@Param("name")String name); int updateById(User user);
Example #16
Source Project: supplierShop Author: guchengwuyue File: StoreCouponMapper.java License: MIT License | 4 votes |
@Update("update store_coupon set use_num=use_num+1 where id=#{id}") void incUserNum(int id);
Example #17
Source Project: supplierShop Author: guchengwuyue File: StoreMemberMapper.java License: MIT License | 4 votes |
@Update("update store_member set user_money=user_money-#{money} where id=#{userId}") int decUserMony(@Param("userId") int userId,@Param("money") double money);
Example #18
Source Project: supplierShop Author: guchengwuyue File: StoreSpecGoodsPriceMapper.java License: MIT License | 4 votes |
@Update("update store_spec_goods_price set store_count=store_count-#{goodsNum} " + "where goods_id=#{goodsId} and `key`=#{specKey}") int decCount(@Param("goodsId") int goodsId, @Param("specKey") String specKey,@Param("goodsNum") int goodsNum);
Example #19
Source Project: open-capacity-platform Author: open-capacity-platform File: SysPermissionDao.java License: Apache License 2.0 | 4 votes |
@Update("update sys_permission t set t.name = #{name}, t.permission = #{permission}, t.updateTime = #{updateTime} where t.id = #{id}") int updateByOps(SysPermission sysPermission);
Example #20
Source Project: open-capacity-platform Author: open-capacity-platform File: SysRoleDao.java License: Apache License 2.0 | 4 votes |
@Update("update sys_role t set t.name = #{name} ,t.updateTime = #{updateTime} where t.id = #{id}") int updateByOps(SysRole sysRole);
Example #21
Source Project: open-capacity-platform Author: open-capacity-platform File: ClientDao.java License: Apache License 2.0 | 4 votes |
@Update("update oauth_client_details t set t.client_secret = #{clientSecret},t.client_secret_str = #{clientSecretStr} where t.id = #{id}") int update(Client client);
Example #22
Source Project: Demo Author: turoDog File: StudentMapper.java License: Apache License 2.0 | 4 votes |
@Update("update student set name = #{name}, age = #{age} where id = #{id}") int update(@Param("name") String name, @Param("age") Integer age, @Param("id") Integer id);
Example #23
Source Project: cloud-service Author: allenyiwen File: SysPermissionDao.java License: MIT License | 4 votes |
@Update("update sys_permission t set t.name = #{name}, t.permission = #{permission}, t.updateTime = #{updateTime} where t.id = #{id}") int update(SysPermission sysPermission);
Example #24
Source Project: cloud-service Author: allenyiwen File: SysRoleDao.java License: MIT License | 4 votes |
@Update("update sys_role t set t.name = #{name} ,t.updateTime = #{updateTime} where t.id = #{id}") int update(SysRole sysRole);
Example #25
Source Project: Moss Author: SpringCloud File: DictDataMapper.java License: Apache License 2.0 | 4 votes |
@Update("update t_dict_data set is_deleted=1 where dict_code=#{dictCode} ") void batchDeleteDictDataByDictCode(@Param("dictCode") String dictCode);
Example #26
Source Project: simple-microservice Author: lizhenliang File: StockMapper.java License: Apache License 2.0 | 4 votes |
@Update("update stock set real_stock=real_stock-#{count} where prod_id = #{productId}") Long deductionStock(@Param("productId") Long productId,@Param("count") int count);
Example #27
Source Project: hmdm-server Author: h-mdm File: CustomerMapper.java License: Apache License 2.0 | 4 votes |
@Update({"UPDATE customers SET name=#{name}, description=#{description} WHERE id=#{id} AND master = FALSE"}) void update(Customer customer);
Example #28
Source Project: hmdm-server Author: h-mdm File: CustomerMapper.java License: Apache License 2.0 | 4 votes |
@Update("UPDATE customers SET lastLoginTime = #{time} WHERE id = #{id}") int recordLastLoginTime(@Param("id") int customerId, @Param("time") long time);
Example #29
Source Project: hmdm-server Author: h-mdm File: ApplicationMapper.java License: Apache License 2.0 | 4 votes |
@Update({"UPDATE applications SET name=#{name}, pkg=#{pkg}, " + "showIcon=#{showIcon}, system=#{system}, customerId=#{customerId}, runAfterInstall = #{runAfterInstall}, runAtBoot = #{runAtBoot}, " + "type = #{type}, iconText = #{iconText}, iconId = #{iconId} " + "WHERE id=#{id}"}) void updateApplication(Application application);
Example #30
Source Project: hmdm-server Author: h-mdm File: ApplicationMapper.java License: Apache License 2.0 | 4 votes |
@Update({"UPDATE applicationVersions SET version = #{version}, url = #{url}, apkHash = #{apkHash} " + "WHERE id=#{id}"}) void updateApplicationVersion(ApplicationVersion applicationVersion);