Browse Source

Merge branch 'master' of http://git.dayaedu.com/yonge/mec

zouxuan 5 years ago
parent
commit
344050f6f0
40 changed files with 1871 additions and 38 deletions
  1. 5 0
      mec-common/common-core/pom.xml
  2. 46 0
      mec-common/common-core/src/main/java/com/ym/mec/common/entity/UploadReturnBean.java
  3. 113 0
      mec-common/common-core/src/main/java/com/ym/mec/common/service/impl/UploadFileService.java
  4. 0 0
      mec-thirdpart/src/main/java/com/ym/mec/thirdparty/exception/ThirdpartyException.java
  5. 0 0
      mec-thirdpart/src/main/java/com/ym/mec/thirdparty/storage/StoragePlugin.java
  6. 0 0
      mec-thirdpart/src/main/java/com/ym/mec/thirdparty/storage/StoragePluginContext.java
  7. 0 0
      mec-thirdpart/src/main/java/com/ym/mec/thirdparty/storage/vendors/AliyunOssStoragePlugin.java
  8. 2 2
      mec-thirdparty/pom.xml
  9. 36 0
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/exception/ThirdpartyException.java
  10. 24 0
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/storage/StoragePlugin.java
  11. 97 0
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/storage/StoragePluginContext.java
  12. 123 0
      mec-thirdparty/src/main/java/com/ym/mec/thirdparty/storage/vendors/AliyunOssStoragePlugin.java
  13. 36 0
      mec-util/src/main/java/com/ym/mec/util/exception/UtilException.java
  14. 258 0
      mec-util/src/main/java/com/ym/mec/util/image/VerifyCodeUtils.java
  15. 80 0
      mec-util/src/main/java/com/ym/mec/util/image/WatermarkUtils.java
  16. 161 0
      mec-util/src/main/java/com/ym/mec/util/upload/UploadUtil.java
  17. 148 0
      mec-util/src/main/java/com/yqh/p2p/utils/codec/NumEncodeUtil.java
  18. 48 0
      mec-web/src/main/java/com/ym/mec/web/controller/UploadFileController.java
  19. 33 0
      mec-web/src/main/java/com/ym/mec/web/controller/student/HotWordLabelController.java
  20. 56 0
      mec-web/src/main/java/com/ym/mec/web/controller/student/SuggestionController.java
  21. 63 0
      mec-web/src/main/java/com/ym/mec/web/controller/system/HotWordLabelManageController.java
  22. 10 0
      mec-web/src/main/java/com/ym/mec/web/controller/system/StudentManageController.java
  23. 9 0
      mec-web/src/main/java/com/ym/mec/web/dal/dao/HotWordsLabelDao.java
  24. 8 4
      mec-web/src/main/java/com/ym/mec/web/dal/dao/StudentManageDao.java
  25. 9 0
      mec-web/src/main/java/com/ym/mec/web/dal/dao/VipGroupCategoryDao.java
  26. 45 0
      mec-web/src/main/java/com/ym/mec/web/dal/dto/StudentManageAccountBaseInfoDto.java
  27. 70 0
      mec-web/src/main/java/com/ym/mec/web/dal/entity/HotWordsLabel.java
  28. 92 0
      mec-web/src/main/java/com/ym/mec/web/dal/entity/VipGroupCategory.java
  29. 8 0
      mec-web/src/main/java/com/ym/mec/web/service/HotWordsLabelService.java
  30. 8 0
      mec-web/src/main/java/com/ym/mec/web/service/StudentManageService.java
  31. 8 0
      mec-web/src/main/java/com/ym/mec/web/service/VipGroupCategoryService.java
  32. 21 14
      mec-web/src/main/java/com/ym/mec/web/service/impl/ClassGroupServiceImpl.java
  33. 19 9
      mec-web/src/main/java/com/ym/mec/web/service/impl/EmployeeServiceImpl.java
  34. 23 0
      mec-web/src/main/java/com/ym/mec/web/service/impl/HotWordsLabelServiceImpl.java
  35. 6 4
      mec-web/src/main/java/com/ym/mec/web/service/impl/StudentManageServiceImpl.java
  36. 23 0
      mec-web/src/main/java/com/ym/mec/web/service/impl/VipGroupCategoryServiceImpl.java
  37. 72 0
      mec-web/src/main/resources/config/mybatis/HotWordsLabelMapper.xml
  38. 19 0
      mec-web/src/main/resources/config/mybatis/StudentManageDao.xml
  39. 80 0
      mec-web/src/main/resources/config/mybatis/VipGroupCategoryMapper.xml
  40. 12 5
      pom.xml

+ 5 - 0
mec-common/common-core/pom.xml

@@ -38,5 +38,10 @@
 			<groupId>org.springframework.cloud</groupId>
 			<artifactId>spring-cloud-starter-openfeign</artifactId>
 		</dependency>
+
+		<dependency>
+			<groupId>com.ym</groupId>
+			<artifactId>mec-thirdparty</artifactId>
+		</dependency>
 	</dependencies>
 </project>

+ 46 - 0
mec-common/common-core/src/main/java/com/ym/mec/common/entity/UploadReturnBean.java

@@ -0,0 +1,46 @@
+package com.ym.mec.common.entity;
+
+/** 
+ * @author sunzl 
+ * 2015年8月26日 下午4:42:03 
+ * 上传返回对象
+ */
+public class UploadReturnBean {
+
+	public UploadReturnBean(String url, boolean status, String message) {
+		super();
+		this.url = url;
+		this.status = status;
+		this.message = message;
+	}
+
+	private String url;
+
+	private boolean status;// 上传状态
+
+	private String message;// 上传失败 返回原因
+
+	public String getUrl() {
+		return url;
+	}
+
+	public void setUrl(String url) {
+		this.url = url;
+	}
+
+	public boolean isStatus() {
+		return status;
+	}
+
+	public void setStatus(boolean status) {
+		this.status = status;
+	}
+
+	public String getMessage() {
+		return message;
+	}
+
+	public void setMessage(String message) {
+		this.message = message;
+	}
+}

+ 113 - 0
mec-common/common-core/src/main/java/com/ym/mec/common/service/impl/UploadFileService.java

@@ -0,0 +1,113 @@
+package com.ym.mec.common.service.impl;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import com.alibaba.nacos.api.config.ConfigService;
+import com.ym.mec.common.entity.UploadReturnBean;
+import com.ym.mec.common.exception.BizException;
+import com.ym.mec.thirdparty.storage.StoragePlugin;
+import com.ym.mec.util.upload.UploadUtil;
+
+/** 
+ * 上传工具服务层实现类
+ */
+@Service
+public class UploadFileService {
+
+	@Autowired
+	private ConfigService configService;
+
+	@Autowired
+	private StoragePlugin storagePlugin;
+
+	/** 最大上传大小,单位kb */
+	@Value("${common.upload.maxSize:10}")
+	private int maxSize;
+
+	/** 支持的扩展名 */
+	@Value("${common.upload.supportExtensions:jpg,jpeg,gif,png,mp3,mid,midi}")
+	private String supportExtensions;
+
+	/** 文件根目录 */
+	@Value("common.upload.fileRoot:/var/tmp/")
+	private String fileRoot;
+
+	public UploadReturnBean uploadFile(InputStream in, String ext) {
+
+		UploadReturnBean uploadReturn = new UploadReturnBean("", false, "");
+		String fileName = UploadUtil.getFileName(ext);
+
+		String supportType = supportExtensions;
+		if (!UploadUtil.validateImgFile(ext, supportType)) {
+			uploadReturn.setMessage("上传图片格式错误,目前只支持" + supportType);
+			return uploadReturn;
+		}
+
+		String root = fileRoot;
+		if (StringUtils.isBlank(root)) {
+			uploadReturn.setMessage("上传临时目录没有配置");
+			return uploadReturn;
+		}
+
+		String staticFloder = "";
+
+		String folder = UploadUtil.getFileFloder();
+		String filePath = UploadUtil.getFilePath(root, staticFloder, folder);
+
+		File file = uploadFile(in, filePath, fileName);
+
+		if (maxSize > 0 && maxSize < file.length() / 1024) {
+			FileUtils.deleteQuietly(file);
+			uploadReturn.setMessage("超出允许的大小限制");
+			return uploadReturn;
+		}
+
+		String url = storagePlugin.uploadFile(staticFloder + folder, file);
+
+		FileUtils.deleteQuietly(file);
+
+		uploadReturn.setStatus(true);
+		uploadReturn.setUrl(url);
+		return uploadReturn;
+	}
+
+	public void setMaxSize(int maxSize) {
+		this.maxSize = maxSize;
+	}
+
+	/**
+	 * 上传文件的工具方法
+	 * @param in
+	 * @param path
+	 * @return
+	 */
+	private File uploadFile(InputStream inputStream, String filePath, String fileName) {
+		File file = new File(filePath + "/" + fileName);
+		try {
+			if (!file.getParentFile().exists()) {
+				file.getParentFile().mkdirs();
+			}
+			FileOutputStream fos = new FileOutputStream(file);
+			IOUtils.copy(inputStream, fos);
+			if (!file.exists() || file.length() == 0) {
+				throw new BizException("图片上传出现错误,请重新上传");
+			}
+		} catch (IOException e) {
+			throw new BizException("图片上传失败", e);
+		} finally {
+			IOUtils.closeQuietly(inputStream);
+		}
+		return file;
+	}
+
+}

+ 0 - 0
mec-thirdpart/src/main/java/com/ym/mec/thirdpart/exception/ThirdpartException.java → mec-thirdpart/src/main/java/com/ym/mec/thirdparty/exception/ThirdpartyException.java


+ 0 - 0
mec-thirdpart/src/main/java/com/ym/mec/thirdpart/storage/StoragePlugin.java → mec-thirdpart/src/main/java/com/ym/mec/thirdparty/storage/StoragePlugin.java


+ 0 - 0
mec-thirdpart/src/main/java/com/ym/mec/thirdpart/storage/StoragePluginContext.java → mec-thirdpart/src/main/java/com/ym/mec/thirdparty/storage/StoragePluginContext.java


+ 0 - 0
mec-thirdpart/src/main/java/com/ym/mec/thirdpart/storage/vendors/AliyunOssStoragePlugin.java → mec-thirdpart/src/main/java/com/ym/mec/thirdparty/storage/vendors/AliyunOssStoragePlugin.java


+ 2 - 2
mec-thirdpart/pom.xml → mec-thirdparty/pom.xml

@@ -8,9 +8,9 @@
 		<version>1.0</version>
 	</parent>
 
-	<artifactId>mec-thirdpart</artifactId>
+	<artifactId>mec-thirdparty</artifactId>
 
-	<name>mec-thirdpart</name>
+	<name>mec-thirdparty</name>
 	<!-- FIXME change it to the project's website -->
 	<url>http://www.example.com</url>
 

+ 36 - 0
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/exception/ThirdpartyException.java

@@ -0,0 +1,36 @@
+package com.ym.mec.thirdparty.exception;
+
+import com.ym.mec.util.string.MessageFormatter;
+
+public class ThirdpartyException extends RuntimeException {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -4562885563376566463L;
+
+	public ThirdpartyException() {
+		super();
+	}
+
+	public ThirdpartyException(String message) {
+		super(message);
+	}
+
+	public ThirdpartyException(Throwable cause) {
+		super(cause);
+	}
+
+	public ThirdpartyException(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+	public ThirdpartyException(String message, Object... arguments) {
+		super(MessageFormatter.arrayFormat(message, arguments));
+	}
+
+	public ThirdpartyException(String message, Throwable cause, Object... args) {
+		super(MessageFormatter.arrayFormat(message, args), cause);
+	}
+
+}

+ 24 - 0
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/storage/StoragePlugin.java

@@ -0,0 +1,24 @@
+package com.ym.mec.thirdparty.storage;
+
+import java.io.File;
+import java.io.IOException;
+
+public interface StoragePlugin {
+
+	/**
+	 * 上传文件
+	 * @param folderName 文件夹
+	 * @param file 需要上传的文件
+	 * @return 返回文件路径
+	 */
+	String uploadFile(String folderName, File file);
+
+	/**
+	 * 下载文件
+	 * @param folderName 文件夹
+	 * @param fileName 文件名称
+	 * @return 返回文件内容
+	 * @throws IOException
+	 */
+	byte[] getFile(String folderName, String fileName) throws IOException;
+}

+ 97 - 0
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/storage/StoragePluginContext.java

@@ -0,0 +1,97 @@
+package com.ym.mec.thirdparty.storage;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.stereotype.Component;
+
+import com.ym.mec.thirdparty.exception.ThirdpartyException;
+import com.ym.mec.thirdparty.storage.vendors.AliyunOssStoragePlugin;
+
+@Component
+public class StoragePluginContext implements ApplicationContextAware, InitializingBean {
+
+	@Value("${thirdparty.storagePluginName:aliyun}")
+	private String storagePluginName;
+
+	private ApplicationContext applicationContext;
+
+	private final Map<String, String> mapper = new HashMap<String, String>() {
+		/**
+		 * 
+		 */
+		private static final long serialVersionUID = -9071481806931421021L;
+
+		{
+			put("aliyun", StringUtils.uncapitalize(AliyunOssStoragePlugin.class.getSimpleName()));
+		}
+	};
+
+	private StoragePlugin storagePlugin;
+
+	@Override
+	public void afterPropertiesSet() throws Exception {
+		if (StringUtils.isBlank(storagePluginName)) {
+			throw new ThirdpartyException("存储插件变量thirdparty.storagePlugName不能为空");
+		}
+
+		storagePlugin = getStoragePlugin(storagePluginName);
+
+		if (storagePlugin == null) {
+			throw new ThirdpartyException("存储插件{}不存在", storagePluginName);
+		}
+	}
+
+	@Override
+	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
+		this.applicationContext = applicationContext;
+	}
+
+	/**
+	 * 上传文件
+	 * @param vendors 供应商
+	 * @param folderName 文件夹
+	 * @param file 需要上传的文件
+	 * @return 返回文件路径
+	 */
+	public String uploadFile(String folderName, File file) {
+
+		return storagePlugin.uploadFile(folderName, file);
+	}
+
+	/**
+	 * 下载文件
+	 * @param vendors 供应商
+	 * @param folderName 文件夹
+	 * @param fileName 文件名称
+	 * @return 返回文件内容
+	 * @throws IOException
+	 */
+	public byte[] getFile(String folderName, String fileName) throws IOException {
+
+		return storagePlugin.getFile(folderName, fileName);
+	}
+
+	public void setStoragePluginName(String storagePluginName) {
+		this.storagePluginName = storagePluginName;
+	}
+
+	private StoragePlugin getStoragePlugin(String vendors) {
+		String beanId = mapper.get(vendors);
+
+		if (StringUtils.isBlank(beanId)) {
+			throw new ThirdpartyException("存储供应商不存在");
+		}
+
+		return applicationContext.getBean(beanId, StoragePlugin.class);
+	}
+
+}

+ 123 - 0
mec-thirdparty/src/main/java/com/ym/mec/thirdparty/storage/vendors/AliyunOssStoragePlugin.java

@@ -0,0 +1,123 @@
+package com.ym.mec.thirdparty.storage.vendors;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.commons.io.IOUtils;
+import org.springframework.beans.factory.DisposableBean;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import com.aliyun.oss.ClientConfiguration;
+import com.aliyun.oss.OSSClient;
+import com.aliyun.oss.model.OSSObject;
+import com.ym.mec.thirdparty.exception.ThirdpartyException;
+import com.ym.mec.thirdparty.storage.StoragePlugin;
+
+@Component
+public class AliyunOssStoragePlugin implements StoragePlugin, InitializingBean, DisposableBean {
+
+	@Value("${storage.oss.endpoint:oss-cn-beijing.aliyuncs.com}")
+	private String endpoint;
+
+	@Value("${storage.oss.accessKeyId:LTAIwZW9XqrfsZ4r}")
+	private String accessKeyId;
+
+	@Value("${storage.oss.accessKeySecret:5uDsNZmHMxcnxav8w9byII4zcPpu5G}")
+	private String accessKeySecret;
+
+	@Value("${storage.oss.bucketName:yooma-test}")
+	private String bucketName;
+
+	private OSSClient ossClient;
+
+	@Override
+	public void afterPropertiesSet() throws Exception {
+		// 创建ClientConfiguration。ClientConfiguration是OSSClient的配置类,可配置代理、连接超时、最大连接数等参数。
+		ClientConfiguration conf = new ClientConfiguration();
+
+		// 设置OSSClient允许打开的最大HTTP连接数,默认为1024个。
+		conf.setMaxConnections(200);
+		// 设置Socket层传输数据的超时时间,默认为50000毫秒。
+		conf.setSocketTimeout(10000);
+		// 设置建立连接的超时时间,默认为50000毫秒。
+		conf.setConnectionTimeout(10000);
+		// 设置从连接池中获取连接的超时时间(单位:毫秒),默认不超时。
+		conf.setConnectionRequestTimeout(1000);
+		// 设置连接空闲超时时间。超时则关闭连接,默认为60000毫秒。
+		conf.setIdleConnectionTime(10000);
+		// 设置失败请求重试次数,默认为3次。
+		conf.setMaxErrorRetry(5);
+		// 设置是否支持将自定义域名作为Endpoint,默认支持。
+		conf.setSupportCname(true);
+
+		ossClient = new OSSClient(endpoint, accessKeyId, accessKeySecret, conf);
+	}
+
+	@Override
+	public String uploadFile(String folderName, File file) {
+		if (!file.exists()) {
+			throw new ThirdpartyException("需要上传的文件[{}]不存在", file.getAbsolutePath());
+		}
+
+		if (folderName.endsWith("/")) {
+			folderName = folderName.substring(0, folderName.length() - 1);
+		}
+
+		ossClient.putObject(bucketName, folderName + "/" + file.getName(), file);
+
+		return "https://" + bucketName + "." + endpoint + "/" + folderName + "/" + file.getName();
+	}
+
+	@Override
+	public byte[] getFile(String folderName, String fileName) throws IOException {
+		OSSObject ossObject = ossClient.getObject(bucketName, folderName + "/" + fileName);
+		try {
+			return IOUtils.toByteArray(ossObject.getObjectContent());
+		} finally {
+			if (ossObject != null) {
+				ossObject.close();
+			}
+		}
+	}
+
+	@Override
+	public void destroy() throws Exception {
+		if (ossClient != null) {
+			ossClient.shutdown();
+		}
+	}
+
+	public void setEndpoint(String endpoint) {
+		this.endpoint = endpoint;
+	}
+
+	public void setAccessKeyId(String accessKeyId) {
+		this.accessKeyId = accessKeyId;
+	}
+
+	public void setAccessKeySecret(String accessKeySecret) {
+		this.accessKeySecret = accessKeySecret;
+	}
+
+	public void setBucketName(String bucketName) {
+		this.bucketName = bucketName;
+	}
+
+	public static void main(String[] args) throws Exception {
+		AliyunOssStoragePlugin aliyunOssStorageService = new AliyunOssStoragePlugin();
+		aliyunOssStorageService.setAccessKeyId("LTAIwZW9XqrfsZ4r");
+		aliyunOssStorageService.setAccessKeySecret("5uDsNZmHMxcnxav8w9byII4zcPpu5G");
+		aliyunOssStorageService.setBucketName("yooma-test");
+		aliyunOssStorageService.setEndpoint("oss-cn-beijing.aliyuncs.com");
+		aliyunOssStorageService.afterPropertiesSet();
+
+		File file = new File("e:/var/2.jpg");
+		System.out.println(aliyunOssStorageService.uploadFile("aaa", file));
+
+		System.err.println("***********" + aliyunOssStorageService.getFile("aaa", file.getName()).length);
+
+		aliyunOssStorageService.destroy();
+	}
+}

+ 36 - 0
mec-util/src/main/java/com/ym/mec/util/exception/UtilException.java

@@ -0,0 +1,36 @@
+package com.ym.mec.util.exception;
+
+import com.ym.mec.util.string.MessageFormatter;
+
+public class UtilException extends RuntimeException {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -4562885563376566463L;
+
+	public UtilException() {
+		super();
+	}
+
+	public UtilException(String message) {
+		super(message);
+	}
+
+	public UtilException(Throwable cause) {
+		super(cause);
+	}
+
+	public UtilException(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+	public UtilException(String message, Object... arguments) {
+		super(MessageFormatter.arrayFormat(message, arguments));
+	}
+
+	public UtilException(String message, Throwable cause, Object... args) {
+		super(MessageFormatter.arrayFormat(message, args), cause);
+	}
+
+}

+ 258 - 0
mec-util/src/main/java/com/ym/mec/util/image/VerifyCodeUtils.java

@@ -0,0 +1,258 @@
+package com.ym.mec.util.image;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.AffineTransform;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Arrays;
+import java.util.Random;
+
+import javax.imageio.ImageIO;
+
+/**
+ * 验证码工具类
+ */
+public class VerifyCodeUtils {
+
+	public static final String VERIFY_CODES = "23456789abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ";
+	private static Random random = new Random();
+
+	/**
+	 * 使用系统默认字符源生成验证码
+	 * @param verifySize	验证码长度
+	 * @return
+	 */
+	public static String generateVerifyCode(int verifySize) {
+		return generateVerifyCode(verifySize, VERIFY_CODES);
+	}
+
+	/**
+	 * 使用指定源生成验证码
+	 * @param verifySize	验证码长度
+	 * @param sources	验证码字符源
+	 * @return
+	 */
+	public static String generateVerifyCode(int verifySize, String sources) {
+		if (sources == null || sources.length() == 0) {
+			sources = VERIFY_CODES;
+		}
+		int codesLen = sources.length();
+		Random rand = new Random();
+		StringBuilder verifyCode = new StringBuilder(verifySize);
+		for (int i = 0; i < verifySize; i++) {
+			verifyCode.append(sources.charAt(rand.nextInt(codesLen - 1)));
+		}
+		return verifyCode.toString();
+	}
+
+	/**
+	 * 生成随机验证码文件,并返回验证码值
+	 * @param w
+	 * @param h
+	 * @param outputFile
+	 * @param verifySize
+	 * @return
+	 * @throws IOException
+	 */
+	public static String outputVerifyImage(int w, int h, File outputFile, int verifySize) throws IOException {
+		String verifyCode = generateVerifyCode(verifySize);
+		outputImage(w, h, outputFile, verifyCode);
+		return verifyCode;
+	}
+
+	/**
+	 * 输出随机验证码图片流,并返回验证码值
+	 * @param w
+	 * @param h
+	 * @param os
+	 * @param verifySize
+	 * @return
+	 * @throws IOException
+	 */
+	public static String outputVerifyImage(int w, int h, OutputStream os, int verifySize) throws IOException {
+		String verifyCode = generateVerifyCode(verifySize);
+		outputImage(w, h, os, verifyCode);
+		return verifyCode;
+	}
+
+	/**
+	 * 生成指定验证码图像文件
+	 * @param w
+	 * @param h
+	 * @param outputFile
+	 * @param code
+	 * @throws IOException
+	 */
+	public static void outputImage(int w, int h, File outputFile, String code) throws IOException {
+		if (outputFile == null) {
+			return;
+		}
+		File dir = outputFile.getParentFile();
+		if (!dir.exists()) {
+			dir.mkdirs();
+		}
+		try {
+			outputFile.createNewFile();
+			FileOutputStream fos = new FileOutputStream(outputFile);
+			outputImage(w, h, fos, code);
+			fos.close();
+		} catch (IOException e) {
+			throw e;
+		}
+	}
+
+	/**
+	 * 输出指定验证码图片流
+	 * @param w
+	 * @param h
+	 * @param os
+	 * @param code
+	 * @throws IOException
+	 */
+	public static void outputImage(int w, int h, OutputStream os, String code) throws IOException {
+		int verifySize = code.length();
+		BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
+		Random rand = new Random();
+		Graphics2D g2 = image.createGraphics();
+		g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+		Color[] colors = new Color[5];
+		Color[] colorSpaces = new Color[] { Color.WHITE, Color.CYAN, Color.GRAY, Color.LIGHT_GRAY, Color.MAGENTA, Color.ORANGE, Color.PINK, Color.YELLOW };
+		float[] fractions = new float[colors.length];
+		for (int i = 0; i < colors.length; i++) {
+			colors[i] = colorSpaces[rand.nextInt(colorSpaces.length)];
+			fractions[i] = rand.nextFloat();
+		}
+		Arrays.sort(fractions);
+
+		g2.setColor(Color.GRAY);// 设置边框色
+		g2.fillRect(0, 0, w, h);
+
+		Color c = getRandColor(200, 250);
+		g2.setColor(c);// 设置背景色
+		g2.fillRect(0, 2, w, h - 4);
+
+		// 绘制干扰线
+		Random random = new Random();
+		g2.setColor(getRandColor(160, 200));// 设置线条的颜色
+		for (int i = 0; i < 20; i++) {
+			int x = random.nextInt(w - 1);
+			int y = random.nextInt(h - 1);
+			int xl = random.nextInt(6) + 1;
+			int yl = random.nextInt(12) + 1;
+			g2.drawLine(x, y, x + xl + 40, y + yl + 20);
+		}
+
+		// 添加噪点
+		float yawpRate = 0.05f;// 噪声率
+		int area = (int) (yawpRate * w * h);
+		for (int i = 0; i < area; i++) {
+			int x = random.nextInt(w);
+			int y = random.nextInt(h);
+			int rgb = getRandomIntColor();
+			image.setRGB(x, y, rgb);
+		}
+
+		shear(g2, w, h, c);// 使图片扭曲
+
+		g2.setColor(getRandColor(100, 160));
+		int fontSize = h - 4;
+		Font font = new Font("Arial", Font.ITALIC, fontSize);
+		g2.setFont(font);
+		char[] chars = code.toCharArray();
+		for (int i = 0; i < verifySize; i++) {
+			AffineTransform affine = new AffineTransform();
+			affine.setToRotation(Math.PI / 4 * rand.nextDouble() * (rand.nextBoolean() ? 1 : -1), (w / verifySize) * i + fontSize / 2, h / 2);
+			g2.setTransform(affine);
+			g2.drawChars(chars, i, 1, ((w - 10) / verifySize) * i + 5, h / 2 + fontSize / 2 - 10);
+		}
+
+		g2.dispose();
+		ImageIO.write(image, "jpg", os);
+	}
+
+	private static Color getRandColor(int fc, int bc) {
+		if (fc > 255)
+			fc = 255;
+		if (bc > 255)
+			bc = 255;
+		int r = fc + random.nextInt(bc - fc);
+		int g = fc + random.nextInt(bc - fc);
+		int b = fc + random.nextInt(bc - fc);
+		return new Color(r, g, b);
+	}
+
+	private static int getRandomIntColor() {
+		int[] rgb = getRandomRgb();
+		int color = 0;
+		for (int c : rgb) {
+			color = color << 8;
+			color = color | c;
+		}
+		return color;
+	}
+
+	private static int[] getRandomRgb() {
+		int[] rgb = new int[3];
+		for (int i = 0; i < 3; i++) {
+			rgb[i] = random.nextInt(255);
+		}
+		return rgb;
+	}
+
+	private static void shear(Graphics g, int w1, int h1, Color color) {
+		shearX(g, w1, h1, color);
+		shearY(g, w1, h1, color);
+	}
+
+	private static void shearX(Graphics g, int w1, int h1, Color color) {
+
+		int period = random.nextInt(2);
+
+		boolean borderGap = true;
+		int frames = 1;
+		int phase = random.nextInt(2);
+
+		for (int i = 0; i < h1; i++) {
+			double d = (double) (period >> 1) * Math.sin((double) i / (double) period + (6.2831853071795862D * (double) phase) / (double) frames);
+			g.copyArea(0, i, w1, 1, (int) d, 0);
+			if (borderGap) {
+				g.setColor(color);
+				g.drawLine((int) d, i, 0, i);
+				g.drawLine((int) d + w1, i, w1, i);
+			}
+		}
+
+	}
+
+	private static void shearY(Graphics g, int w1, int h1, Color color) {
+
+		int period = random.nextInt(40) + 10; // 50;
+
+		boolean borderGap = true;
+		int frames = 20;
+		int phase = 7;
+		for (int i = 0; i < w1; i++) {
+			double d = (double) (period >> 1) * Math.sin((double) i / (double) period + (6.2831853071795862D * (double) phase) / (double) frames);
+			g.copyArea(i, 0, 1, h1, 0, (int) d);
+			if (borderGap) {
+				g.setColor(color);
+				g.drawLine(i, (int) d, i, 0);
+				g.drawLine(i, (int) d + h1, i, h1);
+			}
+
+		}
+
+	}
+
+	public static void main(String[] args) throws IOException {
+		String verifyCode = generateVerifyCode(4);
+		System.out.println(verifyCode);
+	}
+}

+ 80 - 0
mec-util/src/main/java/com/ym/mec/util/image/WatermarkUtils.java

@@ -0,0 +1,80 @@
+package com.ym.mec.util.image;
+
+import java.awt.AlphaComposite;
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Graphics2D;
+import java.awt.geom.Rectangle2D;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+/**
+ * 添加水印的工具类
+ */
+public class WatermarkUtils {
+
+	/**
+	 * Embeds a textual watermark over a source image to produce
+	 * a watermarked one.
+	 * @param text The text to be embedded as watermark.
+	 * @param sourceImageFile The source image file.
+	 * @param destImageFile The output image file.
+	 * @throws IOException 
+	 */
+	public static void addTextWatermark(String text, File sourceImageFile, File destImageFile) throws IOException {
+
+		BufferedImage sourceImage = ImageIO.read(sourceImageFile);
+		Graphics2D g2d = (Graphics2D) sourceImage.getGraphics();
+
+		// initializes necessary graphic properties
+		AlphaComposite alphaChannel = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.1f);
+		g2d.setComposite(alphaChannel);
+		g2d.setColor(Color.BLUE);
+		g2d.setFont(new Font("Arial", Font.BOLD, 64));
+		FontMetrics fontMetrics = g2d.getFontMetrics();
+		Rectangle2D rect = fontMetrics.getStringBounds(text, g2d);
+
+		// calculates the coordinate where the String is painted
+		int centerX = (sourceImage.getWidth() - (int) rect.getWidth()) / 2;
+		int centerY = sourceImage.getHeight() / 2;
+
+		// paints the textual watermark
+		g2d.drawString(text, centerX, centerY);
+
+		ImageIO.write(sourceImage, "png", destImageFile);
+		g2d.dispose();
+
+	}
+
+	/**
+	 * Embeds an image watermark over a source image to produce
+	 * a watermarked one.
+	 * @param watermarkImageFile The image file used as the watermark.
+	 * @param sourceImageFile The source image file.
+	 * @param destImageFile The output image file.
+	 * @throws IOException 
+	 */
+	public static void addImageWatermark(File watermarkImageFile, File sourceImageFile, File destImageFile) throws IOException {
+		BufferedImage sourceImage = ImageIO.read(sourceImageFile);
+		BufferedImage watermarkImage = ImageIO.read(watermarkImageFile);
+
+		// initializes necessary graphic properties
+		Graphics2D g2d = (Graphics2D) sourceImage.getGraphics();
+		AlphaComposite alphaChannel = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.3f);
+		g2d.setComposite(alphaChannel);
+
+		// calculates the coordinate where the image is painted
+		int topLeftX = (sourceImage.getWidth() - watermarkImage.getWidth()) / 2;
+		int topLeftY = (sourceImage.getHeight() - watermarkImage.getHeight()) / 2;
+
+		// paints the image watermark
+		g2d.drawImage(watermarkImage, topLeftX, topLeftY, null);
+
+		ImageIO.write(sourceImage, "png", destImageFile);
+		g2d.dispose();
+	}
+}

+ 161 - 0
mec-util/src/main/java/com/ym/mec/util/upload/UploadUtil.java

@@ -0,0 +1,161 @@
+package com.ym.mec.util.upload;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.StringUtils;
+
+import com.ym.mec.util.exception.UtilException;
+import com.yqh.p2p.utils.codec.NumEncodeUtil;
+
+/** 
+ * @author sunzl 
+ * 2015年7月20日 上午11:56:51 
+ * 上传工具类
+ */
+public class UploadUtil {
+
+	/**
+	 * 日期格式化工具
+	 */
+
+
+	/**
+	 * 校验上传文件的合法性
+	 * @param fileName
+	 * @param puffixs
+	 * @return
+	 */
+	public static boolean validateImgFile(String ext, String puffixs) {
+
+		String[] puffixArr = puffixs.split(",");
+
+		List<String> puffixList = Arrays.asList(puffixArr);
+
+		if (StringUtils.isBlank(ext)) {
+			return false;
+		}
+		if (puffixList.contains(ext.toLowerCase())) {
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * 获得文件的扩展名
+	 * @param fileName
+	 * @return
+	 */
+	public static String getExtension(String fileName) {
+		if (StringUtils.isBlank(fileName)) {
+			return "";
+		}
+		if (fileName.lastIndexOf(".") != -1 && fileName.lastIndexOf(".") != 0) {
+			return fileName.substring(fileName.lastIndexOf(".") + 1);
+		}
+
+		return "";
+	}
+
+	/**
+	 * 获得文件原名称
+	 * @param fileName
+	 * @return
+	 */
+	public static String getOriFileName(String fileName) {
+		if (StringUtils.isBlank(fileName)) {
+			return "";
+		}
+		if (fileName.lastIndexOf(".") != -1 && fileName.lastIndexOf(".") != 0) {
+			return fileName.substring(0, fileName.lastIndexOf("."));
+		}
+
+		return "";
+	}
+
+	/**
+	 * 获取文件名称
+	 * @param path
+	 * @param dir
+	 * @param ext
+	 * @return
+	 */
+	public static String getFileName(String ext) {
+		String fileName = "";
+		fileName = NumEncodeUtil.longToN62(System.currentTimeMillis()) + "." + ext;
+		return fileName;
+	}
+
+	/**
+	 * 获得上传路径
+	 * @param root
+	 * @param dir
+	 * @return
+	 */
+	public static String getFilePath(String root, String dir, String floder) {
+		String path = root + dir + floder;
+		return path;
+	}
+
+	/**
+	 * 获得上传图片的文件夹
+	 * @return
+	 */
+	public static String getFileFloder() {
+		DateFormat format = new SimpleDateFormat("yyyyMM/");
+		String floder = format.format(new Date());
+		return floder;
+	}
+
+	/**
+	 * 获得上传zip的文件夹
+	 * @return
+	 */
+	public static String getZipFloder() {
+		DateFormat format = new SimpleDateFormat("yyyyMMddhhmmss/");
+		String floder = format.format(new Date());
+		return floder;
+	}
+
+	/**
+	 * 创建zip解压后的文件夹
+	 * @return
+	 */
+	public static String getZipFolder(String root, String dir, String dataStr) {
+		String folder = root + dir + dataStr;
+		return folder;
+	}
+
+	/**
+	 * 上传文件的工具方法
+	 * @param in
+	 * @param path
+	 * @return
+	 */
+	public static boolean uploadFile(InputStream inputStream, String filePath, String fileName) {
+		try {
+			File file = new File(filePath + "/" + fileName);
+			if (!file.getParentFile().exists()) {
+				file.getParentFile().mkdirs();
+			}
+			FileOutputStream fos = new FileOutputStream(file);
+			IOUtils.copy(inputStream, fos);
+			if (!file.exists() || file.length() == 0) {
+				throw new UtilException("图片上传出现错误,请重新上传");
+			}
+		} catch (IOException e) {
+			throw new UtilException("图片上传失败", e);
+		} finally {
+			IOUtils.closeQuietly(inputStream);
+		}
+		return true;
+	}
+}

+ 148 - 0
mec-util/src/main/java/com/yqh/p2p/utils/codec/NumEncodeUtil.java

@@ -0,0 +1,148 @@
+package com.yqh.p2p.utils.codec;
+
+/**
+ * 62进制数字
+ */
+public class NumEncodeUtil {
+	/**
+	 * 62个字母和数字,含大小写
+	 */
+	public static final char[] N62_CHARS = { '0', '1', '2', '3', '4', '5', '6',
+			'7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
+			'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
+			'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
+			'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
+			'x', 'y', 'z' };
+	/**
+	 * 36个小写字母和数字
+	 */
+	public static final char[] N36_CHARS = { '0', '1', '2', '3', '4', '5', '6',
+			'7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
+			'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
+			'x', 'y', 'z' };
+	/**
+	 * 长整型用N36表示的最大长度
+	 */
+	public static final int LONG_N36_LEN = 13;
+	/**
+	 * 长整型用N62表示的最大长度
+	 */
+	public static final int LONG_N62_LEN = 11;
+
+	/**
+	 * 长整型转换成字符串
+	 * 
+	 * @param l
+	 * @param chars
+	 * @return
+	 */
+	private static StringBuilder longToNBuf(long l, char[] chars) {
+		int upgrade = chars.length;
+		StringBuilder result = new StringBuilder();
+		int last;
+		while (l > 0) {
+			last = (int) (l % upgrade);
+			result.append(chars[last]);
+			l /= upgrade;
+		}
+		return result;
+	}
+
+	/**
+	 * 长整数转换成N62
+	 * 
+	 * @param l
+	 * @return
+	 */
+	public static String longToN62(long l) {
+		return longToNBuf(l, N62_CHARS).reverse().toString();
+	}
+
+	/**
+	 * 长整型转换成N36
+	 * 
+	 * @param l
+	 * @return
+	 */
+	public static String longToN36(long l) {
+		return longToNBuf(l, N36_CHARS).reverse().toString();
+	}
+
+	/**
+	 * 长整数转换成N62
+	 * 
+	 * @param l
+	 * @param length
+	 *            如不足length长度,则补足0。
+	 * @return
+	 */
+	public static String longToN62(long l, int length) {
+		StringBuilder sb = longToNBuf(l, N62_CHARS);
+		for (int i = sb.length(); i < length; i++) {
+			sb.append('0');
+		}
+		return sb.reverse().toString();
+	}
+
+	/**
+	 * 长整型转换成N36
+	 * 
+	 * @param l
+	 * @param length
+	 *            如不足length长度,则补足0。
+	 * @return
+	 */
+	public static String longToN36(long l, int length) {
+		StringBuilder sb = longToNBuf(l, N36_CHARS);
+		for (int i = sb.length(); i < length; i++) {
+			sb.append('0');
+		}
+		return sb.reverse().toString();
+	}
+
+	/**
+	 * N62转换成整数
+	 * 
+	 * @param n62
+	 * @return
+	 */
+	public static long n62ToLong(String n62) {
+		return nToLong(n62, N62_CHARS);
+	}
+
+	/**
+	 * N36转换成整数
+	 * 
+	 * @param n36
+	 * @return
+	 */
+	public static long n36ToLong(String n36) {
+		return nToLong(n36, N36_CHARS);
+	}
+
+	private static long nToLong(String s, char[] chars) {
+		char[] nc = s.toCharArray();
+		long result = 0;
+		long pow = 1;
+		for (int i = nc.length - 1; i >= 0; i--, pow *= chars.length) {
+			int n = findNIndex(nc[i], chars);
+			result += n * pow;
+		}
+		return result;
+	}
+
+	private static int findNIndex(char c, char[] chars) {
+		for (int i = 0; i < chars.length; i++) {
+			if (c == chars[i]) {
+				return i;
+			}
+		}
+		throw new RuntimeException("N62(N36)非法字符:" + c);
+	}
+
+	public static void main(String[] args) {
+		String str = longToN62(13720176797l);
+		System.out.println(str);
+		System.out.println(n62ToLong(str));
+	}
+}

+ 48 - 0
mec-web/src/main/java/com/ym/mec/web/controller/UploadFileController.java

@@ -0,0 +1,48 @@
+package com.ym.mec.web.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiParam;
+
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.entity.UploadReturnBean;
+import com.ym.mec.common.service.impl.UploadFileService;
+import com.ym.mec.util.upload.UploadUtil;
+
+/** 
+ * 上传控制层
+ */
+@RestController
+@Api(tags = "文件上传服务")
+public class UploadFileController extends BaseController {
+
+	private final static Logger LOGGER = LoggerFactory.getLogger(UploadFileController.class);
+
+	@Autowired
+	private UploadFileService uploadFileService;
+
+	@PostMapping(value = "uploadFile", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+	public Object uploadFile(@ApiParam(value = "上传的文件", required = true) @RequestParam("file") MultipartFile file) {
+		try {
+			if (file != null && StringUtils.isNotBlank(file.getOriginalFilename())) {
+				UploadReturnBean bean = uploadFileService.uploadFile(file.getInputStream(), UploadUtil.getExtension(file.getOriginalFilename()));
+				if (bean.isStatus()) {
+					return succeed(bean);
+				}
+				return failed(bean.getMessage());
+			}
+		} catch (Exception e) {
+			LOGGER.error("上传失败", e);
+		}
+		return failed("上传失败");
+	}
+}

+ 33 - 0
mec-web/src/main/java/com/ym/mec/web/controller/student/HotWordLabelController.java

@@ -0,0 +1,33 @@
+package com.ym.mec.web.controller.student;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.page.QueryInfo;
+import com.ym.mec.web.service.HotWordsLabelService;
+
+/**
+ * @Author Joburgess
+ * @Date 2019/9/21
+ */
+@Api("热词标签")
+@RequestMapping("hotWordLabel")
+@RestController
+public class HotWordLabelController extends BaseController {
+
+    @Autowired
+    private HotWordsLabelService hotWordsLabelService;
+
+    @ApiOperation("分页查询热词列表")
+    @PostMapping("/queryPage")
+    public Object queryPage(QueryInfo queryInfo){
+        return succeed(hotWordsLabelService.queryPage(queryInfo));
+    }
+
+}

+ 56 - 0
mec-web/src/main/java/com/ym/mec/web/controller/student/SuggestionController.java

@@ -0,0 +1,56 @@
+package com.ym.mec.web.controller.student;
+
+import com.ym.mec.common.page.QueryInfo;
+import com.ym.mec.web.dal.entity.SysSuggestion;
+import com.ym.mec.web.service.SysSuggestionService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static com.ym.mec.common.controller.BaseController.succeed;
+
+/**
+ * @Author Joburgess
+ * @Date 2019/9/21
+ */
+@Api("平台建议")
+@RequestMapping("suggestion")
+@RestController
+public class SuggestionController {
+
+    @Autowired
+    private SysSuggestionService suggestionService;
+
+    @ApiOperation(value = "新增建议")
+    @PostMapping("/add")
+    public Object add(SysSuggestion SysSuggestion) {
+        suggestionService.insert(SysSuggestion);
+        return succeed();
+    }
+
+    @ApiOperation(value = "删除建议")
+    @PostMapping("/del/{id}")
+    public Object del(@ApiParam(value = "建议编号", required = true) @PathVariable("id") Integer id) {
+        suggestionService.delete(Long.valueOf(id));
+        return succeed();
+    }
+
+    @ApiOperation(value = "修改建议")
+    @PostMapping("/update")
+    public Object update(SysSuggestion SysSuggestion) {
+        suggestionService.update(SysSuggestion);
+        return succeed();
+    }
+
+
+    @ApiOperation("分页查询建议列表")
+    @PostMapping("/queryPage")
+    public Object queryPage(QueryInfo queryInfo){
+        return succeed(suggestionService.queryPage(queryInfo));
+    }
+}

+ 63 - 0
mec-web/src/main/java/com/ym/mec/web/controller/system/HotWordLabelManageController.java

@@ -0,0 +1,63 @@
+package com.ym.mec.web.controller.system;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+
+import java.util.Date;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.page.QueryInfo;
+import com.ym.mec.web.dal.entity.HotWordsLabel;
+import com.ym.mec.web.service.HotWordsLabelService;
+
+/**
+ * @Author Joburgess
+ * @Date 2019/9/21
+ */
+@Api("热词标签管理")
+@RequestMapping("hotWordLabelManage")
+@RestController
+public class HotWordLabelManageController extends BaseController {
+
+    @Autowired
+    private HotWordsLabelService hotWordsLabelService;
+
+
+
+    @ApiOperation(value = "新增热词标签")
+    @PostMapping("/add")
+    public Object add(HotWordsLabel hotWordsLabel) {
+        hotWordsLabelService.insert(hotWordsLabel);
+        return succeed();
+    }
+
+    @ApiOperation(value = "删除热词标签")
+    @PostMapping("/del/{id}")
+    public Object del(@ApiParam(value = "热词标签编号", required = true) @PathVariable("id") Integer id) {
+        hotWordsLabelService.delete(id);
+        return succeed();
+    }
+
+    @ApiOperation(value = "修改热词标签")
+    @PostMapping("/update")
+    public Object update(HotWordsLabel hotWordsLabel) {
+        hotWordsLabel.setUpdateTime(new Date());
+        hotWordsLabelService.update(hotWordsLabel);
+        return succeed();
+    }
+
+
+    @ApiOperation("分页查询热词列表")
+    @PostMapping("/queryPage")
+    public Object queryPage(QueryInfo queryInfo){
+        return succeed(hotWordsLabelService.queryPage(queryInfo));
+    }
+
+}

+ 10 - 0
mec-web/src/main/java/com/ym/mec/web/controller/system/StudentManageController.java

@@ -5,6 +5,7 @@ import com.ym.mec.web.dal.page.StudentManageAttendanceQueryInfo;
 import com.ym.mec.web.dal.page.StudentManageCourseQueryInfo;
 import com.ym.mec.web.dal.page.StudentManageQueryInfo;
 import com.ym.mec.web.service.StudentManageService;
+import com.ym.mec.web.service.SysUserCashAccountService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
@@ -23,6 +24,9 @@ public class StudentManageController extends BaseController {
     @Autowired
     private StudentManageService studentManageService;
 
+    @Autowired
+    private SysUserCashAccountService sysUserCashAccountService;
+
     @ApiOperation(value = "获取学生列表")
     @GetMapping("/queryStudentList")
     public Object queryStudentList(@RequestBody StudentManageQueryInfo queryInfo){
@@ -59,4 +63,10 @@ public class StudentManageController extends BaseController {
         return succeed(studentManageService.findStudentVipGroups(userId));
     }
 
+    @ApiOperation(value = "获取用户默认账户基本信息")
+    @PostMapping("/getUserCashAccountBaseInfo/{userID}")
+    public Object getUserCashAccountBaseInfo(@PathVariable("userID") Long userID){
+        return succeed(studentManageService.getStudentAccountBaseInfo(userID));
+    }
+
 }

+ 9 - 0
mec-web/src/main/java/com/ym/mec/web/dal/dao/HotWordsLabelDao.java

@@ -0,0 +1,9 @@
+package com.ym.mec.web.dal.dao;
+
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.web.dal.entity.HotWordsLabel;
+
+public interface HotWordsLabelDao extends BaseDAO<Integer, HotWordsLabel> {
+
+	
+}

+ 8 - 4
mec-web/src/main/java/com/ym/mec/web/dal/dao/StudentManageDao.java

@@ -1,9 +1,6 @@
 package com.ym.mec.web.dal.dao;
 
-import com.ym.mec.web.dal.dto.StudentManageBaseDto;
-import com.ym.mec.web.dal.dto.StudentManageBaseInfoOfMusicGroupDto;
-import com.ym.mec.web.dal.dto.StudentManageCourseListDto;
-import com.ym.mec.web.dal.dto.StudentManageListDto;
+import com.ym.mec.web.dal.dto.*;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -78,4 +75,11 @@ public interface StudentManageDao {
      */
     int countStudentAttendances(Map<String,Object> params);
 
+    /**
+     * @Author: Joburgess
+     * @Date: 2019/9/21
+     * 获取学上账户基本信息
+     */
+    StudentManageAccountBaseInfoDto getStudentAccountBaseInfo(Long userID);
+
 }

+ 9 - 0
mec-web/src/main/java/com/ym/mec/web/dal/dao/VipGroupCategoryDao.java

@@ -0,0 +1,9 @@
+package com.ym.mec.web.dal.dao;
+
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.web.dal.entity.VipGroupCategory;
+
+public interface VipGroupCategoryDao extends BaseDAO<Integer, VipGroupCategory> {
+
+	
+}

+ 45 - 0
mec-web/src/main/java/com/ym/mec/web/dal/dto/StudentManageAccountBaseInfoDto.java

@@ -0,0 +1,45 @@
+package com.ym.mec.web.dal.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+
+/**
+ * @Author Joburgess
+ * @Date 2019/9/21
+ */
+public class StudentManageAccountBaseInfoDto {
+
+    @ApiModelProperty(value = "账户余额",required = false)
+    private BigDecimal balance;
+
+    @ApiModelProperty(value = "银行名称",required = false)
+    private String bankName;
+
+    @ApiModelProperty(value = "银行卡号",required = false)
+    private String cardNo;
+
+    public BigDecimal getBalance() {
+        return balance;
+    }
+
+    public void setBalance(BigDecimal balance) {
+        this.balance = balance;
+    }
+
+    public String getBankName() {
+        return bankName;
+    }
+
+    public void setBankName(String bankName) {
+        this.bankName = bankName;
+    }
+
+    public String getCardNo() {
+        return cardNo;
+    }
+
+    public void setCardNo(String cardNo) {
+        this.cardNo = cardNo;
+    }
+}

+ 70 - 0
mec-web/src/main/java/com/ym/mec/web/dal/entity/HotWordsLabel.java

@@ -0,0 +1,70 @@
+package com.ym.mec.web.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(hot_words_label):
+ */
+public class HotWordsLabel {
+
+	/**  */
+	private Integer id;
+	
+	/**  */
+	private String name;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	/**  */
+	private java.util.Date updateTime;
+	
+	/**  */
+	private String delFlag;
+	
+	public void setId(Integer id){
+		this.id = id;
+	}
+	
+	public Integer getId(){
+		return this.id;
+	}
+			
+	public void setName(String name){
+		this.name = name;
+	}
+	
+	public String getName(){
+		return this.name;
+	}
+			
+	public void setCreateTime(java.util.Date createTime){
+		this.createTime = createTime;
+	}
+	
+	public java.util.Date getCreateTime(){
+		return this.createTime;
+	}
+			
+	public void setUpdateTime(java.util.Date updateTime){
+		this.updateTime = updateTime;
+	}
+	
+	public java.util.Date getUpdateTime(){
+		return this.updateTime;
+	}
+			
+	public void setDelFlag(String delFlag){
+		this.delFlag = delFlag;
+	}
+	
+	public String getDelFlag(){
+		return this.delFlag;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 92 - 0
mec-web/src/main/java/com/ym/mec/web/dal/entity/VipGroupCategory.java

@@ -0,0 +1,92 @@
+package com.ym.mec.web.dal.entity;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+/**
+ * 对应数据库表(vip_group_category):
+ */
+public class VipGroupCategory {
+
+	/**  */
+	private Integer id;
+	
+	/** 名称 */
+	private String name;
+	
+	/** 线上薪水 */
+	private long onlineClassesSalary;
+	
+	/** 线下薪水 */
+	private long offlineClassesSalary;
+	
+	/**  */
+	private String delFlag;
+	
+	/**  */
+	private java.util.Date createTime;
+	
+	/**  */
+	private java.util.Date updateTime;
+	
+	public void setId(Integer id){
+		this.id = id;
+	}
+	
+	public Integer getId(){
+		return this.id;
+	}
+			
+	public void setName(String name){
+		this.name = name;
+	}
+	
+	public String getName(){
+		return this.name;
+	}
+			
+	public void setOnlineClassesSalary(long onlineClassesSalary){
+		this.onlineClassesSalary = onlineClassesSalary;
+	}
+	
+	public long getOnlineClassesSalary(){
+		return this.onlineClassesSalary;
+	}
+			
+	public void setOfflineClassesSalary(long offlineClassesSalary){
+		this.offlineClassesSalary = offlineClassesSalary;
+	}
+	
+	public long getOfflineClassesSalary(){
+		return this.offlineClassesSalary;
+	}
+			
+	public void setDelFlag(String delFlag){
+		this.delFlag = delFlag;
+	}
+	
+	public String getDelFlag(){
+		return this.delFlag;
+	}
+			
+	public void setCreateTime(java.util.Date createTime){
+		this.createTime = createTime;
+	}
+	
+	public java.util.Date getCreateTime(){
+		return this.createTime;
+	}
+			
+	public void setUpdateTime(java.util.Date updateTime){
+		this.updateTime = updateTime;
+	}
+	
+	public java.util.Date getUpdateTime(){
+		return this.updateTime;
+	}
+			
+	@Override
+	public String toString() {
+		return ToStringBuilder.reflectionToString(this);
+	}
+
+}

+ 8 - 0
mec-web/src/main/java/com/ym/mec/web/service/HotWordsLabelService.java

@@ -0,0 +1,8 @@
+package com.ym.mec.web.service;
+
+import com.ym.mec.common.service.BaseService;
+import com.ym.mec.web.dal.entity.HotWordsLabel;
+
+public interface HotWordsLabelService extends BaseService<Integer, HotWordsLabel> {
+
+}

+ 8 - 0
mec-web/src/main/java/com/ym/mec/web/service/StudentManageService.java

@@ -1,6 +1,7 @@
 package com.ym.mec.web.service;
 
 import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.web.dal.dto.StudentManageAccountBaseInfoDto;
 import com.ym.mec.web.dal.dto.StudentManageBaseDto;
 import com.ym.mec.web.dal.dto.StudentManageBaseInfoOfMusicGroupDto;
 import com.ym.mec.web.dal.dto.StudentManageVipGroupDto;
@@ -58,4 +59,11 @@ public interface StudentManageService {
      */
     List<StudentManageVipGroupDto> findStudentVipGroups(Long userID);
 
+    /**
+     * @Author: Joburgess
+     * @Date: 2019/9/21
+     * 获取学上账户基本信息
+     */
+    StudentManageAccountBaseInfoDto getStudentAccountBaseInfo(Long userID);
+
 }

+ 8 - 0
mec-web/src/main/java/com/ym/mec/web/service/VipGroupCategoryService.java

@@ -0,0 +1,8 @@
+package com.ym.mec.web.service;
+
+import com.ym.mec.common.service.BaseService;
+import com.ym.mec.web.dal.entity.VipGroupCategory;
+
+public interface VipGroupCategoryService extends BaseService<Integer, VipGroupCategory> {
+
+}

+ 21 - 14
mec-web/src/main/java/com/ym/mec/web/service/impl/ClassGroupServiceImpl.java

@@ -1,25 +1,32 @@
 package com.ym.mec.web.service.impl;
 
-import com.ym.mec.common.page.PageInfo;
-import com.ym.mec.common.page.QueryInfo;
-import com.ym.mec.util.collection.MapUtil;
-import com.ym.mec.web.dal.dto.HighClassGroup;
-import com.ym.mec.web.dal.entity.*;
-import com.ym.mec.web.dal.enums.ClassGroupStudentStatusEnum;
-import com.ym.mec.web.dal.enums.ClassGroupTypeEnum;
-import com.ym.mec.web.dal.enums.TeachTypeEnum;
-import com.ym.mec.web.dal.page.TeacherCourseQueryInfo;
-import com.ym.mec.web.service.*;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.domain.Page;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.web.dal.dao.ClassGroupDao;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.*;
+import com.ym.mec.web.dal.dto.HighClassGroup;
+import com.ym.mec.web.dal.entity.ClassGroup;
+import com.ym.mec.web.dal.entity.ClassGroupRelation;
+import com.ym.mec.web.dal.entity.ClassGroupStudentMapper;
+import com.ym.mec.web.dal.entity.ClassGroupTeacherMapper;
+import com.ym.mec.web.dal.entity.MusicGroup;
+import com.ym.mec.web.dal.entity.TeacherDefaultMusicGroupSalary;
+import com.ym.mec.web.dal.enums.ClassGroupStudentStatusEnum;
+import com.ym.mec.web.dal.enums.ClassGroupTypeEnum;
+import com.ym.mec.web.service.ClassGroupRelationService;
+import com.ym.mec.web.service.ClassGroupService;
+import com.ym.mec.web.service.ClassGroupStudentMapperService;
+import com.ym.mec.web.service.ClassGroupTeacherMapperService;
+import com.ym.mec.web.service.MusicGroupService;
+import com.ym.mec.web.service.TeacherDefaultMusicGroupSalaryService;
 
 @Service
 public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup> implements ClassGroupService {

+ 19 - 9
mec-web/src/main/java/com/ym/mec/web/service/impl/EmployeeServiceImpl.java

@@ -1,5 +1,24 @@
 package com.ym.mec.web.service.impl;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Base64;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.stereotype.Service;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.client.RestTemplate;
+
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.page.PageInfo;
@@ -13,15 +32,6 @@ import com.ym.mec.web.dal.enums.EmployeeOperateEnum;
 import com.ym.mec.web.dal.enums.ParamEnum;
 import com.ym.mec.web.dal.page.EmployeeQueryInfo;
 import com.ym.mec.web.service.EmployeeService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.*;
-import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
-import org.springframework.stereotype.Service;
-import org.springframework.util.MultiValueMap;
-import org.springframework.web.client.RestTemplate;
-
-import java.io.IOException;
-import java.util.*;
 
 @Service
 public class EmployeeServiceImpl extends BaseServiceImpl<Integer, Employee>  implements EmployeeService {

+ 23 - 0
mec-web/src/main/java/com/ym/mec/web/service/impl/HotWordsLabelServiceImpl.java

@@ -0,0 +1,23 @@
+package com.ym.mec.web.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+import com.ym.mec.web.dal.dao.HotWordsLabelDao;
+import com.ym.mec.web.dal.entity.HotWordsLabel;
+import com.ym.mec.web.service.HotWordsLabelService;
+
+@Service
+public class HotWordsLabelServiceImpl extends BaseServiceImpl<Integer, HotWordsLabel>  implements HotWordsLabelService {
+	
+	@Autowired
+	private HotWordsLabelDao hotWordsLabelDao;
+
+	@Override
+	public BaseDAO<Integer, HotWordsLabel> getDAO() {
+		return hotWordsLabelDao;
+	}
+	
+}

+ 6 - 4
mec-web/src/main/java/com/ym/mec/web/service/impl/StudentManageServiceImpl.java

@@ -6,10 +6,7 @@ import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.web.dal.dao.StudentManageDao;
 import com.ym.mec.web.dal.dao.VipGroupDao;
-import com.ym.mec.web.dal.dto.StudentManageBaseDto;
-import com.ym.mec.web.dal.dto.StudentManageBaseInfoOfMusicGroupDto;
-import com.ym.mec.web.dal.dto.StudentManageListDto;
-import com.ym.mec.web.dal.dto.StudentManageVipGroupDto;
+import com.ym.mec.web.dal.dto.*;
 import com.ym.mec.web.dal.page.StudentManageAttendanceQueryInfo;
 import com.ym.mec.web.dal.page.StudentManageCourseQueryInfo;
 import com.ym.mec.web.dal.page.StudentManageQueryInfo;
@@ -117,4 +114,9 @@ public class StudentManageServiceImpl implements StudentManageService {
     public List<StudentManageVipGroupDto> findStudentVipGroups(Long userID) {
         return vipGroupDao.findStudentVipGroups(userID);
     }
+
+    @Override
+    public StudentManageAccountBaseInfoDto getStudentAccountBaseInfo(Long userID) {
+        return studentManageDao.getStudentAccountBaseInfo(userID);
+    }
 }

+ 23 - 0
mec-web/src/main/java/com/ym/mec/web/service/impl/VipGroupCategoryServiceImpl.java

@@ -0,0 +1,23 @@
+package com.ym.mec.web.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.service.impl.BaseServiceImpl;
+import com.ym.mec.web.dal.dao.VipGroupCategoryDao;
+import com.ym.mec.web.dal.entity.VipGroupCategory;
+import com.ym.mec.web.service.VipGroupCategoryService;
+
+@Service
+public class VipGroupCategoryServiceImpl extends BaseServiceImpl<Integer, VipGroupCategory>  implements VipGroupCategoryService {
+	
+	@Autowired
+	private VipGroupCategoryDao vipGroupCategoryDao;
+
+	@Override
+	public BaseDAO<Integer, VipGroupCategory> getDAO() {
+		return vipGroupCategoryDao;
+	}
+	
+}

+ 72 - 0
mec-web/src/main/resources/config/mybatis/HotWordsLabelMapper.xml

@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!--
+这个文件是自动生成的。
+不要修改此文件。所有改动将在下次重新自动生成时丢失。
+-->
+<mapper namespace="com.ym.mec.web.dal.dao.HotWordsLabelDao">
+	
+	<resultMap type="com.ym.mec.web.dal.entity.HotWordsLabel" id="HotWordsLabel">
+		<result column="id_" property="id" />
+		<result column="name_" property="name" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+		<result column="del_flag_" property="delFlag" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="HotWordsLabel" >
+		SELECT * FROM hot_words_label WHERE id_ = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="HotWordsLabel">
+		SELECT * FROM hot_words_label ORDER BY id_
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.web.dal.entity.HotWordsLabel" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!--
+		<selectKey resultClass="int" keyProperty="id" > 
+		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
+		</selectKey>
+		-->
+		INSERT INTO hot_words_label (id_,name_,create_time_,update_time_,del_flag_) VALUES(#{id},#{name},#{createTime},#{updateTime},#{delFlag})
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.web.dal.entity.HotWordsLabel">
+		UPDATE hot_words_label <set>
+<if test="delFlag != null">
+del_flag_ = #{delFlag},
+</if>
+<if test="id != null">
+id_ = #{id},
+</if>
+<if test="updateTime != null">
+update_time_ = #{updateTime},
+</if>
+<if test="name != null">
+name_ = #{name},
+</if>
+<if test="createTime != null">
+create_time_ = #{createTime},
+</if>
+</set> WHERE id_ = #{id} 
+	</update>
+	
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM hot_words_label WHERE id_ = #{id} 
+	</delete>
+	
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="HotWordsLabel" parameterType="map">
+		SELECT * FROM hot_words_label ORDER BY id_ <include refid="global.limit"/>
+	</select>
+	
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM hot_words_label
+	</select>
+</mapper>

+ 19 - 0
mec-web/src/main/resources/config/mybatis/StudentManageDao.xml

@@ -41,6 +41,12 @@
         <result property="attendanceStatus" column="status_" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
     </resultMap>
 
+    <resultMap id="studentManageAccountBaseInfo" type="com.ym.mec.web.dal.dto.StudentManageAccountBaseInfoDto">
+        <result property="balance" column="balance_"/>
+        <result property="bankName" column="bank_name_"/>
+        <result property="cardNo" column="card_no_"/>
+    </resultMap>
+
     <sql id="queryCondition">
         <where>
             cgsm.user_id_ IS NOT NULL
@@ -261,4 +267,17 @@
         <include refid="studentManageAttendanceQueryCondition"/>
     </select>
 
+    <select id="getStudentAccountBaseInfo" resultMap="studentManageAccountBaseInfo">
+        SELECT
+            suca.balance_,
+            subc.bank_name_,
+            subc.card_no_
+        FROM
+            sys_user_cash_account suca
+            LEFT JOIN sys_user_bank_card subc ON suca.user_id_ = subc.user_id_
+            AND subc.is_default_ = 1
+        WHERE
+            suca.user_id_ =#{userID}
+    </select>
+
 </mapper>

+ 80 - 0
mec-web/src/main/resources/config/mybatis/VipGroupCategoryMapper.xml

@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!--
+这个文件是自动生成的。
+不要修改此文件。所有改动将在下次重新自动生成时丢失。
+-->
+<mapper namespace="com.ym.mec.web.dal.dao.VipGroupCategoryDao">
+	
+	<resultMap type="com.ym.mec.web.dal.entity.VipGroupCategory" id="VipGroupCategory">
+		<result column="id_" property="id" />
+		<result column="name_" property="name" />
+		<result column="online_classes_salary_" property="onlineClassesSalary" />
+		<result column="offline_classes_salary_" property="offlineClassesSalary" />
+		<result column="del_flag_" property="delFlag" />
+		<result column="create_time_" property="createTime" />
+		<result column="update_time_" property="updateTime" />
+	</resultMap>
+	
+	<!-- 根据主键查询一条记录 -->
+	<select id="get" resultMap="VipGroupCategory" >
+		SELECT * FROM vip_group_category WHERE id_ = #{id} 
+	</select>
+	
+	<!-- 全查询 -->
+	<select id="findAll" resultMap="VipGroupCategory">
+		SELECT * FROM vip_group_category ORDER BY id_
+	</select>
+	
+	<!-- 向数据库增加一条记录 -->
+	<insert id="insert" parameterType="com.ym.mec.web.dal.entity.VipGroupCategory" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
+		<!--
+		<selectKey resultClass="int" keyProperty="id" > 
+		SELECT SEQ_WSDEFINITION_ID.nextval AS ID FROM DUAL 
+		</selectKey>
+		-->
+		INSERT INTO vip_group_category (id_,name_,online_classes_salary_,offline_classes_salary_,del_flag_,create_time_,update_time_) VALUES(#{id},#{name},#{onlineClassesSalary},#{offlineClassesSalary},#{delFlag},#{createTime},#{updateTime})
+	</insert>
+	
+	<!-- 根据主键查询一条记录 -->
+	<update id="update" parameterType="com.ym.mec.web.dal.entity.VipGroupCategory">
+		UPDATE vip_group_category <set>
+<if test="delFlag != null">
+del_flag_ = #{delFlag},
+</if>
+<if test="id != null">
+id_ = #{id},
+</if>
+<if test="onlineClassesSalary != null">
+online_classes_salary_ = #{onlineClassesSalary},
+</if>
+<if test="updateTime != null">
+update_time_ = #{updateTime},
+</if>
+<if test="offlineClassesSalary != null">
+offline_classes_salary_ = #{offlineClassesSalary},
+</if>
+<if test="name != null">
+name_ = #{name},
+</if>
+<if test="createTime != null">
+create_time_ = #{createTime},
+</if>
+</set> WHERE id_ = #{id} 
+	</update>
+	
+	<!-- 根据主键删除一条记录 -->
+	<delete id="delete" >
+		DELETE FROM vip_group_category WHERE id_ = #{id} 
+	</delete>
+	
+	<!-- 分页查询 -->
+	<select id="queryPage" resultMap="VipGroupCategory" parameterType="map">
+		SELECT * FROM vip_group_category ORDER BY id_ <include refid="global.limit"/>
+	</select>
+	
+	<!-- 查询当前表的总记录数 -->
+	<select id="queryCount" resultType="int">
+		SELECT COUNT(*) FROM vip_group_category
+	</select>
+</mapper>

+ 12 - 5
pom.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 
 	<groupId>com.ym</groupId>
@@ -72,6 +73,12 @@
 
 			<dependency>
 				<groupId>com.ym</groupId>
+				<artifactId>mec-thirdparty</artifactId>
+				<version>1.0</version>
+			</dependency>
+
+			<dependency>
+				<groupId>com.ym</groupId>
 				<artifactId>snakerflowy</artifactId>
 				<version>1.0</version>
 			</dependency>
@@ -317,8 +324,8 @@
 		<module>cms</module>
 		<module>mec-im</module>
 		<module>workflowy</module>
-	  <module>mec-workflow</module>
-    <module>mec-thirdpart</module>
-    <module>mec-client-api</module>
-  </modules>
+		<module>mec-workflow</module>
+		<module>mec-thirdparty</module>
+		<module>mec-client-api</module>
+	</modules>
 </project>