replaceList

  1. int replaceList(const ReplaceListReq &req)

功能: 根据指定主键更新list上指定索引的数据

参数:

  1. struct ReplaceListReq
  2. {
  3. 1 require string moduleName; //模块名
  4. 2 require string mainKey; //主键
  5. 3 require map<string, UpdateValue> data; //新数据
  6. 4 require long index; //待替换数据在列表中的索引
  7. 5 require int expireTime; //过期时间
  8. };
  9. struct UpdateValue
  10. {
  11. 1 require Op op; //更新动作,只支持SET
  12. 2 require string value; //用来替换的值,字段为数值类型时,此值不能包含非数字字符
  13. };

返回值

返回值 含义
ET_MODULE_NAME_INVALID 模块名错误
ET_KEY_AREA_ERR 当前key不属于本机服务,需要更新路由表重新访问
ET_FORBID_OPT 正在迁移,禁止操作
ET_SERVER_TYPE_ERR SLAVE状态下不提供接口服务
ET_PARAM_DIGITAL_ERR 字段错误,例如值为数字类型的字段包含了非数字字符
ET_PARAM_TOO_LONG 字段大小超过限制
ET_PARAM_OP_ERR op错误,只支持SET
ET_PARAM_NOT_EXIST 字段不存在
ET_KEY_INVALID mainKey无效
ET_INPUT_PARAM_ERROR mainKey为空
ET_SYS_ERR 系统异常
ET_SUCC 替换成功