From 068fc7f2e81178e55fa191a13709af64b1a163f6 Mon Sep 17 00:00:00 2001
From: EricsHu <hrr145632>
Date: 星期一, 05 十二月 2022 14:27:43 +0800
Subject: [PATCH] 处理编码

---
 src/main/java/com/qxueyou/scc/courseware/action/CourceCategoryController.java |  150 +++++++++++++++++++++++++-------------------------
 1 files changed, 75 insertions(+), 75 deletions(-)

diff --git a/src/main/java/com/qxueyou/scc/courseware/action/CourceCategoryController.java b/src/main/java/com/qxueyou/scc/courseware/action/CourceCategoryController.java
index 1331a6b..7f9f80a 100644
--- a/src/main/java/com/qxueyou/scc/courseware/action/CourceCategoryController.java
+++ b/src/main/java/com/qxueyou/scc/courseware/action/CourceCategoryController.java
@@ -37,10 +37,10 @@
 import com.qxueyou.scc.school.model.SchHandoutReCourse;
 
 /**
- * 科目类别管理controller
+ * 绉戠洰绫诲埆绠$悊controller
  * 
- * @author 德虎
- * @history 2014-11-25 新建 夏德虎
+ * @author 寰疯檸
+ * @history 2014-11-25 鏂板缓 澶忓痉铏�
  *
  */
 @Controller
@@ -65,24 +65,24 @@
 	ISysBusinessCacheService sysBusinessCacheService ;*/
 
 	/**
-	 * APP2.0: 课程超市 选课 获取所有分类 <br>
+	 * APP2.0: 璇剧▼瓒呭競 閫夎 鑾峰彇鎵�鏈夊垎绫� <br>
 	 * URL /org/courcecategory/courseCatNew<br>
 	 * 
 	 * @method GET
-	 * @return 返回值JSON串:<br>
+	 * @return 杩斿洖鍊糐SON涓�:<br>
 	 *
 	 *         <pre>
-	 * [{"index":1,"code":"1CKJR","categoryName":"财会金融","categoryId":"18","imgPath":"/web/res/img/app/coursemarket_ico_accounting.png"},
+	 * [{"index":1,"code":"1CKJR","categoryName":"璐細閲戣瀺","categoryId":"18","imgPath":"/web/res/img/app/coursemarket_ico_accounting.png"},
 	 * ......
-	 * {"index":8,"code":"9QB","categoryName":"全部","categoryId":"26","imgPath":"/web/res/img/app/coursemarket_ico_classify.png"}]
+	 * {"index":8,"code":"9QB","categoryName":"鍏ㄩ儴","categoryId":"26","imgPath":"/web/res/img/app/coursemarket_ico_classify.png"}]
 	 * </pre>
 	 *
-	 *         字段值说明:
+	 *         瀛楁鍊艰鏄�:
 	 * 
 	 *         <pre>
-	 * index:索引
-	 * code:编码
-	 * categoryName:名字
+	 * index:绱㈠紩
+	 * code:缂栫爜
+	 * categoryName:鍚嶅瓧
 	 * categoryId:id
 	 * imgPath:logo URL
 	 * </pre>
@@ -94,7 +94,7 @@
 		page.setPageNum(1);
 		page.setPageSize(Integer.MAX_VALUE);
 
-		// 1. 查询该机构下所有的科目
+		// 1. 鏌ヨ璇ユ満鏋勪笅鎵�鏈夌殑绉戠洰
 		String hql = "select c from OrgCourseCategory c where c.deleteFlag is false and c.categoryLevel = ? order by c.code asc ";
 
 		List<OrgCourseCategory> lstLastCategory = commonDAO.findList(hql, page, CollectionUtils.newList(OrgCourseCategory.CATEGORY_LEVEL_FIRST), OrgCourseCategory.class);
@@ -144,29 +144,29 @@
 	}
 
 	/**
-	 * APP2.0: 课程超市 所有查询条件 <br>
+	 * APP2.0: 璇剧▼瓒呭競 鎵�鏈夋煡璇㈡潯浠� <br>
 	 * URL /org/courcecategory/courseCatContitionNew<br>
 	 * 
-	 * 返回值JSON串:<br>
+	 * 杩斿洖鍊糐SON涓�:<br>
 	 *
 	 * <pre>
 	 * {
 	 * "course":[
-	 * 		{"code":"0QB","children":[],"index":1,"categoryName":"全部","categoryId":"26","parentId":null},
-	 * 		{"code":"1CKJR","children":[],"index":2,"categoryName":"财会金融","categoryId":"18","parentId":null},
-	 * 		{"code":"2YYKS","children":[],"index":3,"categoryName":"语言考试","categoryId":"19","parentId":null},
-	 * 		{"code":"3YYL","children":[],"index":4,"categoryName":"医药类","categoryId":"20","parentId":null},
-	 * 		{"code":"4JGL","children":[],"index":5,"categoryName":"建工类","categoryId":"21","parentId":null},
-	 * 		{"code":"5ZYKZ","children":null,"index":6,"categoryName":"职业考证","categoryId":"22","parentId":null},
+	 * 		{"code":"0QB","children":[],"index":1,"categoryName":"鍏ㄩ儴","categoryId":"26","parentId":null},
+	 * 		{"code":"1CKJR","children":[],"index":2,"categoryName":"璐細閲戣瀺","categoryId":"18","parentId":null},
+	 * 		{"code":"2YYKS","children":[],"index":3,"categoryName":"璇█鑰冭瘯","categoryId":"19","parentId":null},
+	 * 		{"code":"3YYL","children":[],"index":4,"categoryName":"鍖昏嵂绫�","categoryId":"20","parentId":null},
+	 * 		{"code":"4JGL","children":[],"index":5,"categoryName":"寤哄伐绫�","categoryId":"21","parentId":null},
+	 * 		{"code":"5ZYKZ","children":null,"index":6,"categoryName":"鑱屼笟鑰冭瘉","categoryId":"22","parentId":null},
 	 * 		{"code":"6XLJY","children":[
-	 * 				{"code":null,"index":1,"categoryName":"经济学","categoryId":"5","parentId":"23"},
-	 * 			{"code":null,"index":2,"categoryName":"法学","categoryId":"6","parentId":"23"}
-	 * 			],"index":7,"categoryName":"学历教育","categoryId":"23","parentId":null},
-	 * 		{"code":"7ITJN","children":[],"index":8,"categoryName":"IT技能","categoryId":"24","parentId":null},
-	 * 		{"code":"8QT","children":[],"index":9,"categoryName":"其他","categoryId":"25","parentId":null}
+	 * 				{"code":null,"index":1,"categoryName":"缁忔祹瀛�","categoryId":"5","parentId":"23"},
+	 * 			{"code":null,"index":2,"categoryName":"娉曞","categoryId":"6","parentId":"23"}
+	 * 			],"index":7,"categoryName":"瀛﹀巻鏁欒偛","categoryId":"23","parentId":null},
+	 * 		{"code":"7ITJN","children":[],"index":8,"categoryName":"IT鎶�鑳�","categoryId":"24","parentId":null},
+	 * 		{"code":"8QT","children":[],"index":9,"categoryName":"鍏朵粬","categoryId":"25","parentId":null}
 	 * 	],
-	 * "city":[{"name":"深圳","index":1,"code":"sz"},{"name":"广州","index":2,"code":"gz"}],
-	 * "sort":[{"name":"价格由低到高","index":1,"code":"PRICE_ASC"},{"name":"价格由高到低","index":2,"code":"PRICE_DESC"}]
+	 * "city":[{"name":"娣卞湷","index":1,"code":"sz"},{"name":"骞垮窞","index":2,"code":"gz"}],
+	 * "sort":[{"name":"浠锋牸鐢变綆鍒伴珮","index":1,"code":"PRICE_ASC"},{"name":"浠锋牸鐢遍珮鍒颁綆","index":2,"code":"PRICE_DESC"}]
 	 * }
 	 * 
 	 * <pre>
@@ -179,7 +179,7 @@
 	}
 
 	/**
-	 * APP2.0: 该机构下所有课程的分类和科目 URL: /org/courcecategory/courseCategoryNew
+	 * APP2.0: 璇ユ満鏋勪笅鎵�鏈夎绋嬬殑鍒嗙被鍜岀鐩� URL: /org/courcecategory/courseCategoryNew
 	 * 
 	 * @return
 	 */
@@ -187,27 +187,27 @@
 	@RequestMapping(value = "courseCategoryNew", method = RequestMethod.GET)
 	public @ResponseBody List<OrgCourseCategory> getCourseCategoryData() {
 
-		// 1. 查询该机构下所有的科目
+		// 1. 鏌ヨ璇ユ満鏋勪笅鎵�鏈夌殑绉戠洰
 		String hql = "select courseId,name,price,imgPath,courseCategoryId " + " from OrgCourse c where c.deleteFlag is false";
 
-		// 2. 查询该机构下所有的科目对应的类别
+		// 2. 鏌ヨ璇ユ満鏋勪笅鎵�鏈夌殑绉戠洰瀵瑰簲鐨勭被鍒�
 		String hql_type = "select distinct c.category.categoryId,c.category.categoryName from OrgCourse c where " + " c.deleteFlag is false order by c.createTime ";
 
 		List<Object> args = new ArrayList<Object>(1);
-		// 如果是游客班 查所有机构 1:表示游客班
+		// 濡傛灉鏄父瀹㈢彮 鏌ユ墍鏈夋満鏋� 1:琛ㄧず娓稿鐝�
 //		if (!orgClassService.isCurrentVistorClass()) {
 //			hql = hql.concat(" and c.org.organizationId=?");
 //			hql_type = "select distinct c.category.categoryId,c.category.categoryName from OrgCourse c where " + " c.org.organizationId=? and c.deleteFlag is false order by c.createTime ";
 //			args = CollectionUtils.newList(ClientUtils.getOrgId());
 //		}
 
-		// 1. 查询该机构下所有的科目
+		// 1. 鏌ヨ璇ユ満鏋勪笅鎵�鏈夌殑绉戠洰
 		List<OrgCollegeCourse> lstCourse = categoryService.queryOrgCourseListNew(hql, args);
 
-		// 2. 查询该机构下所有的科目对应的类别
+		// 2. 鏌ヨ璇ユ満鏋勪笅鎵�鏈夌殑绉戠洰瀵瑰簲鐨勭被鍒�
 		List<OrgCourseCategory> lstCategory = categoryService.queryOrgCourseCategoryList(hql_type, args);
 
-		// 组装结构
+		// 缁勮缁撴瀯
 		List<OrgCollegeCourse> newLstCourse = null;
 		for (OrgCourseCategory category : lstCategory) {
 			newLstCourse = new ArrayList<OrgCollegeCourse>();
@@ -218,19 +218,19 @@
 			}
 			category.setCourseList(newLstCourse);
 		}
-		// 不限制值
+		// 涓嶉檺鍒跺��
 		String not_limit = Constants.NOT_LIMIT_VALUE;
-		// 重新组装类型 添加不限
+		// 閲嶆柊缁勮绫诲瀷 娣诲姞涓嶉檺
 		List<OrgCourseCategory> lstLastCategory = new ArrayList<OrgCourseCategory>();
-		// 添加第一个不限
+		// 娣诲姞绗竴涓笉闄�
 		OrgCourseCategory category = new OrgCourseCategory();
 		category.setCategoryId(not_limit);
-		category.setCategoryName("不限");
+		category.setCategoryName("涓嶉檺");
 
 		List<OrgCollegeCourse> lstLastCourse = new ArrayList<OrgCollegeCourse>();
 		OrgCollegeCourse course = new OrgCollegeCourse();
 		course.setCourseId(not_limit);
-		course.setName("不限");
+		course.setName("涓嶉檺");
 
 		lstLastCategory.add(category);
 		lstLastCategory.addAll(lstCategory);
@@ -238,7 +238,7 @@
 		for (OrgCourseCategory cate : lstLastCategory) {
 			lstLastCourse = new ArrayList<OrgCollegeCourse>();
 			lstLastCourse.add(course);
-			if (not_limit.equals(cate.getCategoryId())) {// 不限
+			if (not_limit.equals(cate.getCategoryId())) {// 涓嶉檺
 				lstLastCourse.addAll(lstCourse);
 			} else {
 				lstLastCourse.addAll(cate.getCourseList());
@@ -250,10 +250,10 @@
 		return lstLastCategory;
 	}
 
-	/******************************************************************* 上面为App接口,下面为后台接口 **************************/
+	/******************************************************************* 涓婇潰涓篈pp鎺ュ彛锛屼笅闈负鍚庡彴鎺ュ彛 **************************/
 
 	/**
-	 * 科目类别列表
+	 * 绉戠洰绫诲埆鍒楄〃
 	 * 
 	 * @return
 	 */
@@ -265,7 +265,7 @@
 	}
 
 	/**
-	 * 根据科目ID查询科目
+	 * 鏍规嵁绉戠洰ID鏌ヨ绉戠洰
 	 * 
 	 * @return
 	 */
@@ -276,7 +276,7 @@
 	}
 
 	/**
-	 * 新增
+	 * 鏂板
 	 * 
 	 * @return
 	 */
@@ -287,7 +287,7 @@
 	}
 
 	/**
-	 * 删除
+	 * 鍒犻櫎
 	 * 
 	 * @return
 	 */
@@ -298,7 +298,7 @@
 	}
 
 	/**
-	 * 更新
+	 * 鏇存柊
 	 * 
 	 * @return
 	 */
@@ -309,7 +309,7 @@
 	}
 
 	/**
-	 * 新增类别层级
+	 * 鏂板绫诲埆灞傜骇
 	 * 
 	 * @return
 	 */
@@ -325,12 +325,12 @@
 			return result;
 		}
 		
-		return new Result(false,"参数错误");
+		return new Result(false,"鍙傛暟閿欒");
 		
 	}
 
 	/**
-	 * 类别层级数据
+	 * 绫诲埆灞傜骇鏁版嵁
 	 * 
 	 * @return
 	 */
@@ -355,7 +355,7 @@
 			if(null == orgCollegeCourse){
 				continue;
 			}
-			//去除掉不content内容
+			//鍘婚櫎鎺変笉content鍐呭
 			orgCollegeCourse.setContent("");
 	
 			if(null == map.get(orgCollegeCourse.getCourseCategoryId())){
@@ -374,7 +374,7 @@
 	}
 	
 	/**
-	 * 视频类别层级数据
+	 * 瑙嗛绫诲埆灞傜骇鏁版嵁
 	 * 
 	 * @return
 	 */
@@ -384,7 +384,7 @@
 	}
 	
 	/**
-	 * 讲义类别层级数据
+	 * 璁蹭箟绫诲埆灞傜骇鏁版嵁
 	 * 
 	 * @return
 	 */
@@ -394,7 +394,7 @@
 	}
 	
 	/**
-	 * 练习类别层级数据
+	 * 缁冧範绫诲埆灞傜骇鏁版嵁
 	 * 
 	 * @return
 	 */
@@ -404,7 +404,7 @@
 	}
 	
 	/**
-	 * 讲义类别层级数据
+	 * 璁蹭箟绫诲埆灞傜骇鏁版嵁
 	 * 
 	 * @return
 	 */
@@ -414,8 +414,8 @@
 	}
 	
 	/**
-	 * 查询视频讲义练习在各个科目下的数量
-	 * @param type 1:视频 2:讲义 3:练习
+	 * 鏌ヨ瑙嗛璁蹭箟缁冧範鍦ㄥ悇涓鐩笅鐨勬暟閲�
+	 * @param type 1:瑙嗛 2锛氳涔� 3锛氱粌涔�
 	 * @return
 	 */
 	@SuppressWarnings("unchecked")
@@ -470,7 +470,7 @@
 	}
 
 	/**
-	 * ztree层级数据
+	 * ztree灞傜骇鏁版嵁
 	 * 
 	 * @return
 	 *//*
@@ -482,7 +482,7 @@
 	}
 	
 	*//**
-	 * ztree层级数据
+	 * ztree灞傜骇鏁版嵁
 	 * 
 	 * @return
 	 *//*
@@ -494,7 +494,7 @@
 	}*/
 
 	/**
-	 * 查询
+	 * 鏌ヨ
 	 * 
 	 * @return
 	 */
@@ -506,7 +506,7 @@
 	}
 	
 	/**
-	 * 查询专业信息
+	 * 鏌ヨ涓撲笟淇℃伅
 	 * 
 	 * @return
 	 */
@@ -556,7 +556,7 @@
 	}
 
 	/**
-	 * 获取机构名字
+	 * 鑾峰彇鏈烘瀯鍚嶅瓧
 	 * 
 	 * @return
 	 */
@@ -568,7 +568,7 @@
 	}
 
 	/**
-	 * 删除科目
+	 * 鍒犻櫎绉戠洰
 	 * 
 	 * @return
 	 */
@@ -579,7 +579,7 @@
 	}
 
 	/**
-	 * 删除专业
+	 * 鍒犻櫎涓撲笟
 	 * 
 	 * @return
 	 */
@@ -590,7 +590,7 @@
 	}
 
 	/**
-	 * 3初始化科目
+	 * 3鍒濆鍖栫鐩�
 	 * 
 	 * @return
 	 */
@@ -651,18 +651,18 @@
 			
 			i++;
 		}
-		return new Result(true,"总共有"+lstCourse.size()+",初始化了"+i+"条");
+		return new Result(true,"鎬诲叡鏈�"+lstCourse.size()+",鍒濆鍖栦簡"+i+"鏉�");
 	}
 	
 	/**
-	 * 2先初始化课件数据,再初始化上面的科目
+	 * 2鍏堝垵濮嬪寲璇句欢鏁版嵁锛屽啀鍒濆鍖栦笂闈㈢殑绉戠洰
 	 * 
 	 * @return
 	 */
 	@RequestMapping(value = "/initCourseWare", method = RequestMethod.POST)
 	public @ResponseBody Result initCourseWare() {
 		
-		//视频
+		//瑙嗛
 		int i = 0;
 		String hql = " from MediaVideoReCourse where deleteFlag is false";
 		List<MediaVideoReCourse> videos = commonDAO.find(hql, MediaVideoReCourse.class);
@@ -677,7 +677,7 @@
 			commonService.save(course);
 			i++;
 		}
-		//讲义
+		//璁蹭箟
 		int y = 0;
 		hql = " from SchHandoutReCourse where deleteFlag is false";
 		List<SchHandoutReCourse> handouts = commonDAO.find(hql, SchHandoutReCourse.class);
@@ -692,7 +692,7 @@
 			commonService.save(course);
 			y++;
 		}
-		//练习
+		//缁冧範
 		int z = 0;
 		hql = " from ExerciseReCourse where deleteFlag is false";
 		List<ExerciseReCourse> exers = commonDAO.find(hql, ExerciseReCourse.class);
@@ -707,11 +707,11 @@
 			commonService.save(course);
 			z++;
 		}
-		return new Result(true,"视频总共"+videos.size()+"个,成功了"+i+"个"+"讲义总共"+handouts.size()+"个,成功了"+y+"个"+"练习总共"+exers.size()+"个,成功了"+z+"个");
+		return new Result(true,"瑙嗛鎬诲叡"+videos.size()+"涓�,鎴愬姛浜�"+i+"涓�"+"璁蹭箟鎬诲叡"+handouts.size()+"涓�,鎴愬姛浜�"+y+"涓�"+"缁冧範鎬诲叡"+exers.size()+"涓�,鎴愬姛浜�"+z+"涓�");
 	}
 	
 	/**
-	 * 1初始化班级 机构ID
+	 * 1鍒濆鍖栫彮绾� 鏈烘瀯ID
 	 * 
 	 * @return
 	 */
@@ -736,11 +736,11 @@
 			commonService.save(orgClass);
 			i++;
 		}
-		return new Result(true,"班级总共"+ocs.size()+",成功了"+i+"个");
+		return new Result(true,"鐝骇鎬诲叡"+ocs.size()+",鎴愬姛浜�"+i+"涓�");
 	}
 	
 	/**
-	 * 初始化levelCode
+	 * 鍒濆鍖杔evelCode
 	 * 
 	 * @return
 	 */
@@ -834,8 +834,8 @@
 	@SuppressWarnings("unused")
 	private String generateLevelCode(String name) {
 
-		// 转拼音
-		//使用微软自带中文输入法用鼠标翻页,选择第一页之后的数据时,会生成(li'zhi.dr)这种账号
+		// 杞嫾闊�
+		//浣跨敤寰蒋鑷甫涓枃杈撳叆娉曠敤榧犳爣缈婚〉锛岄�夋嫨绗竴椤典箣鍚庣殑鏁版嵁鏃讹紝浼氱敓鎴�(li'zhi.dr)杩欑璐﹀彿
 		String[] arrUnidecode = WordProcessUtils.toPinyin(name.replace(" ",""), " ").replaceAll("'", "").split(" ");
 		
 		String orgCode = "";

--
Gitblit v1.8.0