问题如题:
MVC代码:
@At
@Ok("json")
@SLog(tag = "修改商品", msg = "ID:${args[0]}")
public Object editDo(@Param("id") String id, @Param("name") String name,
@Param("showName") String showName, @Param("showprice") BigDecimal showprice,
@Param("content") String content) {
try {
........
return Result.success("system.success");
} catch (Exception e) {
return Result.error("system.error");
}
}
form表单代码
<form id="editForm" role="form" class="form-horizontal parsley-form" data-parsley-validate
action="${base}/platform/zhubaodai/goods/editDo"
method="post" enctype="multipart/form-data">
<input name="id" type="hidden" value="${obj.data.id}"/>
<div class="form-group">
<label for="name" class="col-sm-2 control-label">名称</label>
<div class="col-sm-8">
<input class="form-control" name="name" type="text" id="name" value="${obj.data.name}">
</div>
</div>
<div class="form-group">
<label for="showName" class="col-sm-2 control-label">显示名称</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="showName" id="showName"
value="${obj.data.showName}">
</div>
</div>
<div class="form-group">
<label for="showPrice" class="col-sm-2 control-label">显示价格</label>
<div class="col-sm-8">
<input class="form-control" type="number" name="showPrice" id="showPrice"
value="${obj.data.showPrice}">
</div>
</div>
<div class="form-group">
<label for="content" class="col-sm-2 control-label">详情页内容</label>
<div class="col-sm-8">
<textarea id="content" name="content" style="width:100%;height:200px;">
${obj.content}
</textarea>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary" data-loading-text="正在保存...." id="save">保存</button>
</div>
</div>
</form>
content是使用百度的ueditor作为富文本编辑器的
发送数据
------WebKitFormBoundary4ElSDWAvVUcHsBQ7
Content-Disposition: form-data; name="id"
1612011404260001
------WebKitFormBoundary4ElSDWAvVUcHsBQ7
Content-Disposition: form-data; name="name"
sunshineGirl-moumoon
------WebKitFormBoundary4ElSDWAvVUcHsBQ7
Content-Disposition: form-data; name="showName"
sunShinesForYou
------WebKitFormBoundary4ElSDWAvVUcHsBQ7
Content-Disposition: form-data; name="showPrice"
12
------WebKitFormBoundary4ElSDWAvVUcHsBQ7
Content-Disposition: form-data; name="content"
<p><br/></p><p>キラキラ 阳差しを浴びて</p><p>Make up, and dressed, Are you ready to go?</p><p>Weather is great, it's your holiday</p><p>We gottta party all day long</p><p>Happy day Summer day</p><p>Sunshine Girl</p><p>I like it, Happy day Summer day</p><p><br/></p>
------WebKitFormBoundary4ElSDWAvVUcHsBQ7--
求大神