|
|
|
@ -63,20 +63,22 @@ public class ResourceController extends Controller {
|
|
|
|
|
* @param thumb_id 缩略图id
|
|
|
|
|
* @param scheme_id 结构id
|
|
|
|
|
* @param structure_id 结构id
|
|
|
|
|
* @param down_count 下载次数
|
|
|
|
|
* @param stage_id 学段id
|
|
|
|
|
* @param subject_id 科目id
|
|
|
|
|
*/
|
|
|
|
|
@Before({POST.class})
|
|
|
|
|
@JwtCheckInterface({})
|
|
|
|
|
@EmptyInterface({"resource_title", "file_id", "file_md5"})
|
|
|
|
|
@IsNumericInterface({"resource_size_int", "scheme_id", "structure_id", "stage_id", "subject_id"})
|
|
|
|
|
public void addResourceBase(String resource_title, long resource_size_int,
|
|
|
|
|
String extension, String file_id, String file_md5,
|
|
|
|
|
String thumb_id, int scheme_id, int structure_id,
|
|
|
|
|
int down_count, int stage_id, int subject_id) {
|
|
|
|
|
int stage_id, int subject_id) {
|
|
|
|
|
//当前登录人员
|
|
|
|
|
String person_id = JwtUtil.getPersonId(getRequest());
|
|
|
|
|
String resource_size = CommonUtil.formatFileSize(resource_size_int);
|
|
|
|
|
String person_name = bm.getPersonById(person_id).getStr("person_name");
|
|
|
|
|
int down_count = 0;//下载次数
|
|
|
|
|
rm.addResourceBase(resource_title, resource_size, resource_size_int, person_name, person_id, extension,
|
|
|
|
|
file_id, file_md5, thumb_id, scheme_id, structure_id, down_count, stage_id, subject_id);
|
|
|
|
|
renderJson(RetKit.renderSuccess("操作成功"));
|
|
|
|
|