标签:char enum val put span callable valueof bat build
mapper
@SelectProvider(type = RoleMenuSqlProvider.class,method = "updateRoleMenuRelation") @Options(statementType = StatementType.CALLABLE) HashMap updateRoleMenuRelation(HashMap<String,Object> paramMap);
SqlProvider
public String updateRoleMenuRelation(HashMap<String,String> paramMap){ StringBuilder sb=new StringBuilder(); sb.append("CALL updateRole(#{id,jdbcType=VARCHAR,mode=IN},#{role_id,jdbcType=VARCHAR,mode=IN},#{menu_id,jdbcType=VARCHAR,mode=IN},#{create_time,jdbcType=VARCHAR,mode=IN},#{update_time,jdbcType=VARCHAR,mode=IN},#{stamp,jdbcType=VARCHAR,mode=IN},#{version,jdbcType=INTEGER,mode=IN},#{visit_plat,jdbcType=INTEGER,mode=IN},#{visit_type,jdbcType=INTEGER,mode=IN},#{note,jdbcType=VARCHAR,mode=IN},#{is_used,jdbcType=INTEGER,mode=IN},#{result,jdbcType=INTEGER,mode=OUT});"); return sb.toString(); }
调用
HashMap<String, Object> paramMap = new HashMap<>(); paramMap.put("id", UUID.randomUUID().toString().replace("-", "")); paramMap.put("role_id", role_id); paramMap.put("menu_id", obj[i]); Date date=new Date(); paramMap.put("create_time", DateUtil.format(date, "yyyy-MM-dd HH:mm:dd")); paramMap.put("update_time", String.valueOf(date.getTime())); paramMap.put("stamp", stamp); paramMap.put("version", version); paramMap.put("visit_plat", visitPlat); paramMap.put("visit_type", visitType); paramMap.put("is_used", isUsed); paramMap.put("note", note); paramMap.put("result", null); HashMap hashMap = roleMenuMapper.updateRoleMenuRelation(paramMap); Integer resultNum += Integer.valueOf(hashMap.get("result").toString());
标签:char enum val put span callable valueof bat build
原文地址:https://www.cnblogs.com/cnsdhzzl/p/10205383.html