Parcourir la source

Merge remote-tracking branch 'origin/test'

Conflicts:
	src/main/webapp/WEB-INF/views/common.html
anderx il y a 5 ans
Parent
commit
2a800e6593

Fichier diff supprimé car celui-ci est trop grand
+ 515 - 540
src/main/java/com/goafanti/common/controller/WebpageController.java


+ 53 - 51
src/main/java/com/goafanti/common/utils/MobileMessageUtils.java

@@ -1,51 +1,53 @@
-package com.goafanti.common.utils;
-
-import com.aliyuncs.DefaultAcsClient;
-import com.aliyuncs.IAcsClient;
-import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;
-import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
-import com.aliyuncs.exceptions.ClientException;
-import com.aliyuncs.http.MethodType;
-import com.aliyuncs.profile.DefaultProfile;
-import com.aliyuncs.profile.IClientProfile;
-
-public class MobileMessageUtils {
-
-	private final static String SIGN_NAME = "技淘网";
-	private final static String CLIENT_EXCEPTION = "手机验证码异常:%s";
-
-	@SuppressWarnings("unused")
-	public static String sendMessage(String templateCode, String paramString, String mobile, String accessKey,
-			String accessSecret) {
-
-		IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKey, accessSecret);
-		try {
-			DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", "Dysmsapi", "dysmsapi.aliyuncs.com");
-			IAcsClient acsClient = new DefaultAcsClient(profile);
-			// 组装请求对象
-			SendSmsRequest request = new SendSmsRequest();
-			// 使用post提交
-			request.setMethod(MethodType.POST);
-			// 必填:待发送手机号。支持以逗号分隔的形式进行批量调用,批量上限为1000个手机号码,批量调用相对于单条调用及时性稍有延迟,验证码类型的短信推荐使用单条调用的方式
-			request.setPhoneNumbers(mobile);
-			// 必填:短信签名-可在短信控制台中找到
-			request.setSignName(SIGN_NAME);
-			// 必填:短信模板-可在短信控制台中找到
-			request.setTemplateCode(templateCode);
-			// 可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为
-			// 友情提示:如果JSON中需要带换行符,请参照标准的JSON协议对换行符的要求,比如短信内容中包含\r\n的情况在JSON中需要表示成\\r\\n,否则会导致JSON在服务端解析失败
-			request.setTemplateParam(paramString);
-			// 可选-上行短信扩展码(扩展码字段控制在7位或以下,无特殊需求用户请忽略此字段)
-			// request.setSmsUpExtendCode("90997");
-			// 可选:outId为提供给业务方扩展字段,最终在短信回执消息中将此值带回给调用者
-			// request.setOutId("yourOutId");
-			// 请求失败这里会抛ClientException异常
-			SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request);
-		} catch (ClientException e) {
-			LoggerUtils.fmtError(MobileMessageUtils.class, e, CLIENT_EXCEPTION, e.getMessage());
-			e.printStackTrace();
-		}
-		return null;
-	}
-
-}
+package com.goafanti.common.utils;
+
+import com.aliyuncs.DefaultAcsClient;
+import com.aliyuncs.IAcsClient;
+import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;
+import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
+import com.aliyuncs.exceptions.ClientException;
+import com.aliyuncs.http.MethodType;
+import com.aliyuncs.profile.DefaultProfile;
+import com.aliyuncs.profile.IClientProfile;
+
+public class MobileMessageUtils {
+
+	private final static String SIGN_NAME = "技淘网";
+	private final static String CLIENT_EXCEPTION = "手机验证码异常:%s";
+
+	@SuppressWarnings("unused")
+	public static String sendMessage(String templateCode, String paramString, String mobile, String accessKey,
+			String accessSecret) {
+
+		IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKey, accessSecret);
+		try {
+			throw new ClientException("短信异常");
+/*			DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", "Dysmsapi", "dysmsapi.aliyuncs.com");
+			IAcsClient acsClient = new DefaultAcsClient(profile);
+			// 组装请求对象
+			SendSmsRequest request = new SendSmsRequest();
+			// 使用post提交
+			request.setMethod(MethodType.POST);
+			// 必填:待发送手机号。支持以逗号分隔的形式进行批量调用,批量上限为1000个手机号码,批量调用相对于单条调用及时性稍有延迟,验证码类型的短信推荐使用单条调用的方式
+			request.setPhoneNumbers(mobile);
+			// 必填:短信签名-可在短信控制台中找到
+			request.setSignName(SIGN_NAME);
+			// 必填:短信模板-可在短信控制台中找到
+			request.setTemplateCode(templateCode);
+			// 可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为
+			// 友情提示:如果JSON中需要带换行符,请参照标准的JSON协议对换行符的要求,比如短信内容中包含\r\n的情况在JSON中需要表示成\\r\\n,否则会导致JSON在服务端解析失败
+			request.setTemplateParam(paramString);
+			// 可选-上行短信扩展码(扩展码字段控制在7位或以下,无特殊需求用户请忽略此字段)
+			// request.setSmsUpExtendCode("90997");
+			// 可选:outId为提供给业务方扩展字段,最终在短信回执消息中将此值带回给调用者
+			// request.setOutId("yourOutId");
+			// 请求失败这里会抛ClientException异常
+			SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request);
+*/		} catch (ClientException e) {
+			LoggerUtils.fmtError(MobileMessageUtils.class, e, CLIENT_EXCEPTION, e.getMessage());
+			e.printStackTrace();
+			return "短信异常!";
+		}		
+//		return null;
+	}
+
+}

+ 451 - 447
src/main/java/com/goafanti/message/controller/AdminMessageController.java

@@ -1,447 +1,451 @@
-package com.goafanti.message.controller;
-
-import java.text.ParseException;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.annotation.Resource;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.alibaba.fastjson.JSONObject;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.constant.AFTConstants;
-import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.CertifyApiController;
-import com.goafanti.common.error.BusinessException;
-import com.goafanti.common.model.JtMessageProducer;
-import com.goafanti.common.model.MessageFromSystem;
-import com.goafanti.common.utils.DateUtils;
-import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.message.bo.MessageListBo;
-import com.goafanti.message.enums.ConsumerType;
-import com.goafanti.message.enums.RecommendType;
-import com.goafanti.message.enums.SubjectType;
-import com.goafanti.message.service.JtMessageProducerService;
-import com.goafanti.message.service.MessageService;
-
-/**
- *  消息推送
- * @author Administrator
- *
- */
-@RestController
-@RequestMapping(value = "/api/admin/message")
-public class AdminMessageController extends CertifyApiController{
-	@Resource
-	private MessageService messageService;
-	@Resource
-	private JtMessageProducerService jtMessageProducerService;
-	
-	/**
-	 * 进入创建系统消息
-	 */
-	@RequestMapping(value = "/toCreateSystemMessage", method = RequestMethod.GET)
-	public Result toCreateSystemMessage(){
-		Result res = new Result();
-		JSONObject jsonObject = new JSONObject();
-		jsonObject.put("createTime", DateUtils.formatDate(new Date(), AFTConstants.YYYYMMDDHHMMSS));
-		res.setData(jsonObject);
-		return res;
-	}
-	/**
-	 * 
-	 * @param companyIds 公司集
-	 * @param userIds 用户集
-	 * @param adminIds 运营人员
-	 * @param societyTags 社会属性集
-	 * @param provinceIds 省份集
-	 * @param cityIds 城市集
-	 * @param areas 区域集
-	 * @param roles 角色集
-	 * @param industryIds 行业
-	 * @param subject  0-运营消息 , 1-客户消息 , 2-技淘推荐
-	 * @param isDraft 是否草稿
-	 * @throws ParseException 
-	 */
-	@RequestMapping(value = "/createSystemMessage", method = RequestMethod.POST)
-	public Result createSystemMessage(String personalUserIds,String organizationUserIds, String adminIds,String companyIds,String societyTags,String provinceIds,String cityIds,String areaIds,
-			String roles,String industryIds,String title,String body,Integer subject,Integer targetType,String createTime,Integer isDraft) throws ParseException{
-		Result res = new Result();
-		if(null == targetType){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须指定人员类型"));
-			return res;
-		}
-		if(null == subject){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须指定消息类型"));
-			return res;
-		}
-		if(StringUtils.isBlank(title) || StringUtils.isBlank(body)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息是的标题和内容不能为空"));
-			return res;
-		}
-		if(null == isDraft){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须说明是否为草稿"));
-			return res;
-		}
-		checkParam(personalUserIds,organizationUserIds,adminIds,companyIds,societyTags,provinceIds,cityIds,areaIds,roles,industryIds);
-		Map<Integer,String> targetMap = new HashMap<Integer, String>();
-		if(targetType == ConsumerType.PERSON_CUSTOMER_RETAIL.getTypeCode()) targetMap.put(targetType, personalUserIds);
-		if(targetType == ConsumerType.ORGANIZATION_CUSTOMER_RETAIL.getTypeCode()) targetMap.put(targetType, organizationUserIds);
-		if(targetType == ConsumerType.USER_RETAIL.getTypeCode()) targetMap.put(targetType, adminIds);
-		if(targetType == ConsumerType.SOCIETY_TAG.getTypeCode()) targetMap.put(targetType, societyTags);
-		if(targetType == ConsumerType.LOCATION.getTypeCode()){
-			 targetMap.put(targetType, ConsumerType.LOCATION.getTypeName());
-			 targetMap.put(ConsumerType.LOCATION_PROVINCE.getTypeCode(), provinceIds);
-			 targetMap.put(ConsumerType.LOCATION_CITY.getTypeCode(), cityIds);
-			 targetMap.put(ConsumerType.LOCATION_AREA.getTypeCode(), areaIds);
-		}
-		if(targetType == ConsumerType.COMPANY.getTypeCode()) targetMap.put(targetType, companyIds);
-		if(targetType == ConsumerType.ROLE.getTypeCode()) targetMap.put(targetType, roles);
-		if(targetType == ConsumerType.INDUSTRY.getTypeCode()) targetMap.put(targetType, industryIds);
-		if(StringUtils.isBlank(targetMap.get(targetType))){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须选定目标群体"));
-			return res;
-		}
-		messageService.insertSystemMessage(targetMap,targetType, title, body, subject,
-				DateUtils.parseDate(createTime,AFTConstants.YYYYMMDDHHMMSS),isDraft);
-		return res;
-	}
-	
-	/**
-	 * 
-	 * @param projectIds 项目
-	 * @param personalAchievementIds 个人成果
-	 * @param organizationAchievementIds 组织成果
-	 * @param personalDemandIds 个人需求
-	 * @param organizationDemandIds 组织需求
-	 * @param userIds 专家
-	 * @param newsIds 政策
-	 * @param sourceType 资源类型
-	 * @param userIds 用户类型
-	 * @param societyTags 社会属性
-	 * @param provinceIds 省
-	 * @param cityIds 市
-	 * @param areaIds 区
-	 * @param targetType 目标类型
-	 * @param isDraft 是否草稿
-	 * @return
-	 */
-	@RequestMapping(value = "/createRecommendMessage", method = RequestMethod.POST)
-	public Result createRecommendMessage(String projectIds,String personalAchievementIds,String organizationAchievementIds,
-			String personalDemandIds,String organizationDemandIds, String expertIds, String newsIds,Integer sourceType,
-			String personalUserIds,String organizationUserIds,String societyTags,String provinceIds,String cityIds,String areaIds,String industryIds,Integer targetType,Integer isDraft){
-		Result res = new Result();
-		if(null == sourceType){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须指定推荐类型"));
-			return res;
-		}
-		if(null == targetType){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须指定目标群体"));
-			return res;
-		}
-		if(null == isDraft){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须说明是否为草稿"));
-			return res;
-		}
-		checkParam(projectIds,projectIds,personalAchievementIds,organizationAchievementIds,personalDemandIds,organizationDemandIds,
-				expertIds,newsIds,personalUserIds,organizationUserIds,provinceIds,cityIds,areaIds,industryIds);
-		Map<Integer,String> sourceMap = new HashMap<Integer, String>();
-		if(sourceType == RecommendType.TECH_SERVICE.getTypeCode()) sourceMap.put(sourceType, projectIds);
-		if(sourceType == RecommendType.PERSON_ACHIEVEMENT.getTypeCode()) sourceMap.put(sourceType, personalAchievementIds);
-		if(sourceType == RecommendType.ORGANIZATION_ACHIEVEMENT.getTypeCode()) sourceMap.put(sourceType, organizationAchievementIds);
-		if(sourceType == RecommendType.PERSONAL_DEMAND.getTypeCode()) sourceMap.put(sourceType, personalDemandIds);
-		if(sourceType == RecommendType.ORGANIZATION_DEMAND.getTypeCode()) sourceMap.put(sourceType, organizationDemandIds);
-		if(sourceType == RecommendType.EXPERT.getTypeCode()) sourceMap.put(sourceType, expertIds);
-		if(sourceType == RecommendType.NEWS.getTypeCode()) sourceMap.put(sourceType, newsIds);
-		if(StringUtils.isBlank(sourceMap.get(sourceType))){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须选定推荐内容"));
-			return res;
-		}
-		Map<Integer,String> targetMap = new HashMap<Integer, String>();
-		if(targetType == ConsumerType.PERSON_CUSTOMER_RETAIL.getTypeCode()) targetMap.put(targetType, personalUserIds);
-		if(targetType == ConsumerType.ORGANIZATION_CUSTOMER_RETAIL.getTypeCode()) targetMap.put(targetType, organizationUserIds);
-		if(targetType == ConsumerType.SOCIETY_TAG.getTypeCode()) targetMap.put(targetType, societyTags);
-		if(targetType == ConsumerType.LOCATION.getTypeCode()){
-			 targetMap.put(targetType, ConsumerType.LOCATION.getTypeName());
-			 targetMap.put(ConsumerType.LOCATION_PROVINCE.getTypeCode(), provinceIds);
-			 targetMap.put(ConsumerType.LOCATION_CITY.getTypeCode(), cityIds);
-			 targetMap.put(ConsumerType.LOCATION_AREA.getTypeCode(), areaIds);
-		}
-		if(targetType == ConsumerType.INDUSTRY.getTypeCode()) targetMap.put(targetType, industryIds);
-		if(StringUtils.isBlank(targetMap.get(targetType))){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须指定目标群体"));
-			return res;
-		}
-		messageService.insertRecommendMessage(sourceMap,sourceType,targetMap,targetType,SubjectType.TUI_JIAN.getTypeCode(),isDraft);
-		return res;
-		
-	}
-	
-	/**
-	 * 查看消息列表
-	 * @param isDraft 是否未草稿
-	 * @param subject 消息类型
-	 * @return
-	 */
-	@RequestMapping(value = "/listSystemMessage", method = RequestMethod.GET)
-	public Result listSystemMessage(Integer isDraft,Integer subject,Integer page,Integer pageNo,Integer pageSize){
-		Result res = new Result();
-		if(null == isDraft){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息发送状态不能为空"));
-			return res;
-		}
-		/*if(null == subject){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "消息类型不能为空"));
-			return res;
-		}*/
-		res.setData(messageService.listSystemMessage(isDraft, subject,pageNo,pageSize));
-		return res;
-	}
-	
-	/**
-	 * 更新消息
-	 * @param messageId 消息ID
-	 * @param title 消息标题
-	 * @param body 消息内容
-	 * @return
-	 */
-	@RequestMapping(value = "/updateSystemMessage", method = RequestMethod.POST)
-	public Result updateSystemMessage(String messageId,String title,String body,Integer isDraft){
-		Result res = new Result();
-		if(StringUtils.isBlank(messageId)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息编号不能为空"));
-			return res;
-		}
-		if(null == isDraft){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息发送状态不能为空"));
-			return res;
-		}
-		if(StringUtils.isBlank(title) || StringUtils.isBlank(body)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息标题和消息内容不能为空"));
-			return res;
-		}
-		messageService.updateSystemMessage(messageId, title, body, isDraft);
-		return res;
-	}
-	
-	/**
-	 * 删除消息
-	 * @param messageId 消息ID
-	 * @return
-	 */
-	@RequestMapping(value = "/deleteSystemMessage", method = RequestMethod.GET)
-	public Result deleteSystemMessage(String messageId){
-		Result res = new Result();
-		if(StringUtils.isBlank(messageId)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息编号为空"));
-			return res;
-		}
-		messageService.deleteSystemMessage(messageId);
-		return res;
-	}
-	
-	/**
-	 * 读取消息详情
-	 * @param messageId 消息ID
-	 * @return
-	 */
-	@RequestMapping(value = "/getSystemMessageDetail", method = RequestMethod.GET)
-	public Result getSystemMessageDetail(String messageId){
-		Result res = new Result();
-		if(StringUtils.isBlank(messageId)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息编号为空"));
-			return res;
-		}
-		// 读取消息详情
-		MessageFromSystem mfs = messageService.selectSystemMessageDetail(messageId);
-		MessageListBo bo = new MessageListBo();
-		bo.setCreateTime(mfs.getCreateTime() == null ? ""
-				: DateUtils.formatDate(mfs.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS));
-		bo.setResourceType(String.valueOf(mfs.getResourceType()));
-		bo.setSubject(String.valueOf(mfs.getSubject()));
-		bo.setMessageId(mfs.getId());
-		bo.setTitle(mfs.getTitle());
-		bo.setBody(mfs.getBody());
-		bo.setResourceId(mfs.getResourceId());
-		bo.setConsumerType(""+mfs.getConsumerType());
-		res.setData(bo);
-		return res;
-	}
-	
-	/**
-	 * 校验
-	 * @param ids
-	 */
-	public void checkParam(String... ids){
-		String regex = "^[0-9a-z-,]*$";
-		for(String s:ids){
-			if(StringUtils.isNotBlank(s) && !Pattern.matches(regex, s)){
-				throw new BusinessException(buildError(ErrorConstants.PARAM_ERROR, "参数不合法", s));
-			}
-		}
-	} 
-	
-	//消息编号检查
-	private Result checkMessageId(String messageId){
-		Result res = new Result();
-		if(StringUtils.isBlank(messageId)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息编号不能为空"));
-		}
-		return res;
-	}
-	
-	//消息数据检查
-	private Result checkMessage(JtMessageProducer messageProducer){
-		Result res = new Result();
-		if(StringUtils.isBlank(messageProducer.getTitle())){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息标题不能为空"));
-		}
-		if(null == messageProducer.getSubject()){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息类别不能为空"));
-		}
-		if(null == messageProducer.getIsDraft()){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息是否为草稿没指定"));
-		}
-		if(null == messageProducer.getIsSend()){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息是否要发送没指定"));
-		}
-		if(null == messageProducer.getDeleteSign()){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息是否为删除没指定"));
-		}
-		return res;
-	}
-	
-	/**
-	 * 发送消息接口
-	 * @param messageId
-	 * @return
-	 */
-	@RequestMapping(value = "/sendMessage", method = RequestMethod.GET)
-	public Result sendMessage(String messageId){
-		Result res = checkMessageId(messageId);
-		if (res.getError().isEmpty()) {
-			//发送消息
-			res.setData(jtMessageProducerService.addSendMessage(messageId));
-		}
-		return res;
-	}
-	/**
-	 * 发送短信消息
-	 * @param messageId
-	 * @return
-	 */
-	@RequestMapping(value = "/mobileMessage", method = RequestMethod.GET)
-	public Result mobileMessage(String messageCode){
-		Result res = checkMessageCode(messageCode);
-		if (res.getError().isEmpty()) {
-			//发送消息
-			res.setData(jtMessageProducerService.saveMobileMessage(messageCode));
-		}
-		return res;
-	}
-	
-	private Result checkMessageCode(String messageCode) {
-		Result res = new Result();
-		String regex = "^(SMS_)\\d{9}$";
-		Pattern p = Pattern.compile(regex);
-		Matcher m = p.matcher(messageCode);
-		if ( !m.matches()) {
-			res.getError().add(buildError("", "消息Codec错误"));
-			}
-		return res;
-	}
-	
-	/**
-	 * 获得单个消息数据接口
-	 * @param messageId
-	 * @return
-	 */
-	@RequestMapping(value="/getMessageById", method = RequestMethod.GET)
-	public Result getMessageById(String messageId){
-		Result res = checkMessageId(messageId);
-		if (res.getError().isEmpty()) {
-			//查看消息
-			res.setData(jtMessageProducerService.getMessageById(messageId));
-		}
-		return res;
-	}
-	
-	/**
-	 * 修改消息接口
-	 * @param messageProducer
-	 * @return
-	 */
-	@RequestMapping(value="/updMessageById", method = RequestMethod.POST)
-	public Result updMessageById(JtMessageProducer messageProducer, String messageSendTime){
-		Result res = checkMessageId(messageProducer.getId());
-		try {
-			messageProducer.setSendTime(DateUtils.parseDate(messageSendTime,AFTConstants.YYYYMMDDHHMMSS));
-		} catch (Exception e) {
-			messageProducer.setSendTime(null);
-		}
-		if (res.getError().isEmpty()) {
-			//查看消息
-			res.setData(jtMessageProducerService.updateMessageById(messageProducer));
-		}
-		return res;
-	} 
-	
-	/**
-	 * 获得消息列表
-	 * @param messageProducer
-	 * @param sendStartTime
-	 * @param sendEndTime
-	 * @param pageNo
-	 * @param pageSize
-	 * @return
-	 */
-	@RequestMapping(value="/getMessageList", method = RequestMethod.GET)
-	public Result getMessageList(JtMessageProducer messageProducer,String sendStartTime, String sendEndTime,String messageCode,Integer subject, Integer pageNo,Integer pageSize ){
-		Result res = new Result();
-		/*if(StringUtils.isBlank(TokenManager.getUserId())){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "登录数据失效"));
-			return res;
-		}*/
-		if (res.getError().isEmpty()) {
-			//查看消息列表
-			res.setData(jtMessageProducerService.getMessageList(messageProducer, sendStartTime, sendEndTime, messageCode, subject,pageNo, pageSize ));
-		}
-		return res;
-	}
-	
-	
-	/**
-	 * 新增消息接口
-	 * @param messageProducer
-	 * @return
-	 */
-	@RequestMapping(value="/createMyMessage", method = RequestMethod.POST)
-	public Result createMyMessage(JtMessageProducer messageProducer, String messageCreateTime){
-		try {
-			messageProducer.setCreateTime(DateUtils.parseDate(messageCreateTime,AFTConstants.YYYYMMDDHHMMSS));
-		} catch (Exception e) {
-			messageProducer.setCreateTime(null);
-		}
-		Result res = checkMessage(messageProducer);
-		
-		if(StringUtils.isBlank(TokenManager.getUserId()) && StringUtils.isBlank(TokenManager.getAdminId())){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "登录数据失效"));
-		}
-		if (res.getError().isEmpty()) {
-			//新增消息
-			int err = jtMessageProducerService.addMessage(messageProducer);
-			if(err == -1){
-				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "没有找到您的用户信息,不能创建消息"));
-			}
-			res.setData(err);
-		}
-		return res;
-	}
-}
+package com.goafanti.message.controller;
+
+import java.text.ParseException;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.annotation.Resource;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.alibaba.fastjson.JSONObject;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.error.BusinessException;
+import com.goafanti.common.model.JtMessageProducer;
+import com.goafanti.common.model.MessageFromSystem;
+import com.goafanti.common.utils.DateUtils;
+import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.message.bo.MessageListBo;
+import com.goafanti.message.enums.ConsumerType;
+import com.goafanti.message.enums.RecommendType;
+import com.goafanti.message.enums.SubjectType;
+import com.goafanti.message.service.JtMessageProducerService;
+import com.goafanti.message.service.MessageService;
+
+/**
+ *  消息推送
+ * @author Administrator
+ *
+ */
+@RestController
+@RequestMapping(value = "/api/admin/message")
+public class AdminMessageController extends CertifyApiController{
+	@Resource
+	private MessageService messageService;
+	@Resource
+	private JtMessageProducerService jtMessageProducerService;
+	
+	/**
+	 * 进入创建系统消息
+	 */
+	@RequestMapping(value = "/toCreateSystemMessage", method = RequestMethod.GET)
+	public Result toCreateSystemMessage(){
+		Result res = new Result();
+		JSONObject jsonObject = new JSONObject();
+		jsonObject.put("createTime", DateUtils.formatDate(new Date(), AFTConstants.YYYYMMDDHHMMSS));
+		res.setData(jsonObject);
+		return res;
+	}
+	/**
+	 * 
+	 * @param companyIds 公司集
+	 * @param userIds 用户集
+	 * @param adminIds 运营人员
+	 * @param societyTags 社会属性集
+	 * @param provinceIds 省份集
+	 * @param cityIds 城市集
+	 * @param areas 区域集
+	 * @param roles 角色集
+	 * @param industryIds 行业
+	 * @param subject  0-运营消息 , 1-客户消息 , 2-技淘推荐
+	 * @param isDraft 是否草稿
+	 * @throws ParseException 
+	 */
+	@RequestMapping(value = "/createSystemMessage", method = RequestMethod.POST)
+	public Result createSystemMessage(String personalUserIds,String organizationUserIds, String adminIds,String companyIds,String societyTags,String provinceIds,String cityIds,String areaIds,
+			String roles,String industryIds,String title,String body,Integer subject,Integer targetType,String createTime,Integer isDraft) throws ParseException{
+		Result res = new Result();
+		if(null == targetType){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须指定人员类型"));
+			return res;
+		}
+		if(null == subject){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须指定消息类型"));
+			return res;
+		}
+		if(StringUtils.isBlank(title) || StringUtils.isBlank(body)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息是的标题和内容不能为空"));
+			return res;
+		}
+		if(null == isDraft){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须说明是否为草稿"));
+			return res;
+		}
+		checkParam(personalUserIds,organizationUserIds,adminIds,companyIds,societyTags,provinceIds,cityIds,areaIds,roles,industryIds);
+		Map<Integer,String> targetMap = new HashMap<Integer, String>();
+		if(targetType == ConsumerType.PERSON_CUSTOMER_RETAIL.getTypeCode()) targetMap.put(targetType, personalUserIds);
+		if(targetType == ConsumerType.ORGANIZATION_CUSTOMER_RETAIL.getTypeCode()) targetMap.put(targetType, organizationUserIds);
+		if(targetType == ConsumerType.USER_RETAIL.getTypeCode()) targetMap.put(targetType, adminIds);
+		if(targetType == ConsumerType.SOCIETY_TAG.getTypeCode()) targetMap.put(targetType, societyTags);
+		if(targetType == ConsumerType.LOCATION.getTypeCode()){
+			 targetMap.put(targetType, ConsumerType.LOCATION.getTypeName());
+			 targetMap.put(ConsumerType.LOCATION_PROVINCE.getTypeCode(), provinceIds);
+			 targetMap.put(ConsumerType.LOCATION_CITY.getTypeCode(), cityIds);
+			 targetMap.put(ConsumerType.LOCATION_AREA.getTypeCode(), areaIds);
+		}
+		if(targetType == ConsumerType.COMPANY.getTypeCode()) targetMap.put(targetType, companyIds);
+		if(targetType == ConsumerType.ROLE.getTypeCode()) targetMap.put(targetType, roles);
+		if(targetType == ConsumerType.INDUSTRY.getTypeCode()) targetMap.put(targetType, industryIds);
+		if(StringUtils.isBlank(targetMap.get(targetType))){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须选定目标群体"));
+			return res;
+		}
+		messageService.insertSystemMessage(targetMap,targetType, title, body, subject,
+				DateUtils.parseDate(createTime,AFTConstants.YYYYMMDDHHMMSS),isDraft);
+		return res;
+	}
+	
+	/**
+	 * 
+	 * @param projectIds 项目
+	 * @param personalAchievementIds 个人成果
+	 * @param organizationAchievementIds 组织成果
+	 * @param personalDemandIds 个人需求
+	 * @param organizationDemandIds 组织需求
+	 * @param userIds 专家
+	 * @param newsIds 政策
+	 * @param sourceType 资源类型
+	 * @param userIds 用户类型
+	 * @param societyTags 社会属性
+	 * @param provinceIds 省
+	 * @param cityIds 市
+	 * @param areaIds 区
+	 * @param targetType 目标类型
+	 * @param isDraft 是否草稿
+	 * @return
+	 */
+	@RequestMapping(value = "/createRecommendMessage", method = RequestMethod.POST)
+	public Result createRecommendMessage(String projectIds,String personalAchievementIds,String organizationAchievementIds,
+			String personalDemandIds,String organizationDemandIds, String expertIds, String newsIds,Integer sourceType,
+			String personalUserIds,String organizationUserIds,String societyTags,String provinceIds,String cityIds,String areaIds,String industryIds,Integer targetType,Integer isDraft){
+		Result res = new Result();
+		if(null == sourceType){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须指定推荐类型"));
+			return res;
+		}
+		if(null == targetType){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须指定目标群体"));
+			return res;
+		}
+		if(null == isDraft){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须说明是否为草稿"));
+			return res;
+		}
+		checkParam(projectIds,projectIds,personalAchievementIds,organizationAchievementIds,personalDemandIds,organizationDemandIds,
+				expertIds,newsIds,personalUserIds,organizationUserIds,provinceIds,cityIds,areaIds,industryIds);
+		Map<Integer,String> sourceMap = new HashMap<Integer, String>();
+		if(sourceType == RecommendType.TECH_SERVICE.getTypeCode()) sourceMap.put(sourceType, projectIds);
+		if(sourceType == RecommendType.PERSON_ACHIEVEMENT.getTypeCode()) sourceMap.put(sourceType, personalAchievementIds);
+		if(sourceType == RecommendType.ORGANIZATION_ACHIEVEMENT.getTypeCode()) sourceMap.put(sourceType, organizationAchievementIds);
+		if(sourceType == RecommendType.PERSONAL_DEMAND.getTypeCode()) sourceMap.put(sourceType, personalDemandIds);
+		if(sourceType == RecommendType.ORGANIZATION_DEMAND.getTypeCode()) sourceMap.put(sourceType, organizationDemandIds);
+		if(sourceType == RecommendType.EXPERT.getTypeCode()) sourceMap.put(sourceType, expertIds);
+		if(sourceType == RecommendType.NEWS.getTypeCode()) sourceMap.put(sourceType, newsIds);
+		if(StringUtils.isBlank(sourceMap.get(sourceType))){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须选定推荐内容"));
+			return res;
+		}
+		Map<Integer,String> targetMap = new HashMap<Integer, String>();
+		if(targetType == ConsumerType.PERSON_CUSTOMER_RETAIL.getTypeCode()) targetMap.put(targetType, personalUserIds);
+		if(targetType == ConsumerType.ORGANIZATION_CUSTOMER_RETAIL.getTypeCode()) targetMap.put(targetType, organizationUserIds);
+		if(targetType == ConsumerType.SOCIETY_TAG.getTypeCode()) targetMap.put(targetType, societyTags);
+		if(targetType == ConsumerType.LOCATION.getTypeCode()){
+			 targetMap.put(targetType, ConsumerType.LOCATION.getTypeName());
+			 targetMap.put(ConsumerType.LOCATION_PROVINCE.getTypeCode(), provinceIds);
+			 targetMap.put(ConsumerType.LOCATION_CITY.getTypeCode(), cityIds);
+			 targetMap.put(ConsumerType.LOCATION_AREA.getTypeCode(), areaIds);
+		}
+		if(targetType == ConsumerType.INDUSTRY.getTypeCode()) targetMap.put(targetType, industryIds);
+		if(StringUtils.isBlank(targetMap.get(targetType))){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "必须指定目标群体"));
+			return res;
+		}
+		messageService.insertRecommendMessage(sourceMap,sourceType,targetMap,targetType,SubjectType.TUI_JIAN.getTypeCode(),isDraft);
+		return res;
+		
+	}
+	
+	/**
+	 * 查看消息列表
+	 * @param isDraft 是否未草稿
+	 * @param subject 消息类型
+	 * @return
+	 */
+	@RequestMapping(value = "/listSystemMessage", method = RequestMethod.GET)
+	public Result listSystemMessage(Integer isDraft,Integer subject,Integer page,Integer pageNo,Integer pageSize){
+		Result res = new Result();
+		if(null == isDraft){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息发送状态不能为空"));
+			return res;
+		}
+		/*if(null == subject){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "消息类型不能为空"));
+			return res;
+		}*/
+		res.setData(messageService.listSystemMessage(isDraft, subject,pageNo,pageSize));
+		return res;
+	}
+	
+	/**
+	 * 更新消息
+	 * @param messageId 消息ID
+	 * @param title 消息标题
+	 * @param body 消息内容
+	 * @return
+	 */
+	@RequestMapping(value = "/updateSystemMessage", method = RequestMethod.POST)
+	public Result updateSystemMessage(String messageId,String title,String body,Integer isDraft){
+		Result res = new Result();
+		if(StringUtils.isBlank(messageId)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息编号不能为空"));
+			return res;
+		}
+		if(null == isDraft){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息发送状态不能为空"));
+			return res;
+		}
+		if(StringUtils.isBlank(title) || StringUtils.isBlank(body)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息标题和消息内容不能为空"));
+			return res;
+		}
+		messageService.updateSystemMessage(messageId, title, body, isDraft);
+		return res;
+	}
+	
+	/**
+	 * 删除消息
+	 * @param messageId 消息ID
+	 * @return
+	 */
+	@RequestMapping(value = "/deleteSystemMessage", method = RequestMethod.GET)
+	public Result deleteSystemMessage(String messageId){
+		Result res = new Result();
+		if(StringUtils.isBlank(messageId)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息编号为空"));
+			return res;
+		}
+		messageService.deleteSystemMessage(messageId);
+		return res;
+	}
+	
+	/**
+	 * 读取消息详情
+	 * @param messageId 消息ID
+	 * @return
+	 */
+	@RequestMapping(value = "/getSystemMessageDetail", method = RequestMethod.GET)
+	public Result getSystemMessageDetail(String messageId){
+		Result res = new Result();
+		if(StringUtils.isBlank(messageId)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息编号为空"));
+			return res;
+		}
+		// 读取消息详情
+		MessageFromSystem mfs = messageService.selectSystemMessageDetail(messageId);
+		MessageListBo bo = new MessageListBo();
+		bo.setCreateTime(mfs.getCreateTime() == null ? ""
+				: DateUtils.formatDate(mfs.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS));
+		bo.setResourceType(String.valueOf(mfs.getResourceType()));
+		bo.setSubject(String.valueOf(mfs.getSubject()));
+		bo.setMessageId(mfs.getId());
+		bo.setTitle(mfs.getTitle());
+		bo.setBody(mfs.getBody());
+		bo.setResourceId(mfs.getResourceId());
+		bo.setConsumerType(""+mfs.getConsumerType());
+		res.setData(bo);
+		return res;
+	}
+	
+	/**
+	 * 校验
+	 * @param ids
+	 */
+	public void checkParam(String... ids){
+		String regex = "^[0-9a-z-,]*$";
+		for(String s:ids){
+			if(StringUtils.isNotBlank(s) && !Pattern.matches(regex, s)){
+				throw new BusinessException(buildError(ErrorConstants.PARAM_ERROR, "参数不合法", s));
+			}
+		}
+	} 
+	
+	//消息编号检查
+	private Result checkMessageId(String messageId){
+		Result res = new Result();
+		if(StringUtils.isBlank(messageId)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息编号不能为空"));
+		}
+		return res;
+	}
+	
+	//消息数据检查
+	private Result checkMessage(JtMessageProducer messageProducer){
+		Result res = new Result();
+		if(StringUtils.isBlank(messageProducer.getTitle())){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息标题不能为空"));
+		}
+		if(null == messageProducer.getSubject()){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息类别不能为空"));
+		}
+		if(null == messageProducer.getIsDraft()){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息是否为草稿没指定"));
+		}
+		if(null == messageProducer.getIsSend()){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息是否要发送没指定"));
+		}
+		if(null == messageProducer.getDeleteSign()){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "消息是否为删除没指定"));
+		}
+		return res;
+	}
+	
+	/**
+	 * 发送消息接口
+	 * @param messageId
+	 * @return
+	 */
+	@RequestMapping(value = "/sendMessage", method = RequestMethod.GET)
+	public Result sendMessage(String messageId){
+		Result res = checkMessageId(messageId);
+		if (res.getError().isEmpty()) {
+			//发送消息
+			res.setData(jtMessageProducerService.addSendMessage(messageId));
+		}
+		return res;
+	}
+	/**
+	 * 发送短信消息
+	 * @param messageId
+	 * @return
+	 */
+	@RequestMapping(value = "/mobileMessage", method = RequestMethod.GET)
+	public Result mobileMessage(String messageCode){
+		Result res = checkMessageCode(messageCode);
+		if (res.getError().isEmpty()) {
+			//发送消息
+			int i=jtMessageProducerService.saveMobileMessage(messageCode);
+			if (i<0) {
+				res.getError().add(buildError(ErrorConstants.M_CODE_ERROR));
+			}
+			res.setData(i);
+		}
+		return res;
+	}
+	
+	private Result checkMessageCode(String messageCode) {
+		Result res = new Result();
+		String regex = "^(SMS_)\\d{9}$";
+		Pattern p = Pattern.compile(regex);
+		Matcher m = p.matcher(messageCode);
+		if ( !m.matches()) {
+			res.getError().add(buildError("", "消息Codec错误"));
+			}
+		return res;
+	}
+	
+	/**
+	 * 获得单个消息数据接口
+	 * @param messageId
+	 * @return
+	 */
+	@RequestMapping(value="/getMessageById", method = RequestMethod.GET)
+	public Result getMessageById(String messageId){
+		Result res = checkMessageId(messageId);
+		if (res.getError().isEmpty()) {
+			//查看消息
+			res.setData(jtMessageProducerService.getMessageById(messageId));
+		}
+		return res;
+	}
+	
+	/**
+	 * 修改消息接口
+	 * @param messageProducer
+	 * @return
+	 */
+	@RequestMapping(value="/updMessageById", method = RequestMethod.POST)
+	public Result updMessageById(JtMessageProducer messageProducer, String messageSendTime){
+		Result res = checkMessageId(messageProducer.getId());
+		try {
+			messageProducer.setSendTime(DateUtils.parseDate(messageSendTime,AFTConstants.YYYYMMDDHHMMSS));
+		} catch (Exception e) {
+			messageProducer.setSendTime(null);
+		}
+		if (res.getError().isEmpty()) {
+			//查看消息
+			res.setData(jtMessageProducerService.updateMessageById(messageProducer));
+		}
+		return res;
+	} 
+	
+	/**
+	 * 获得消息列表
+	 * @param messageProducer
+	 * @param sendStartTime
+	 * @param sendEndTime
+	 * @param pageNo
+	 * @param pageSize
+	 * @return
+	 */
+	@RequestMapping(value="/getMessageList", method = RequestMethod.GET)
+	public Result getMessageList(JtMessageProducer messageProducer,String sendStartTime, String sendEndTime,String messageCode,Integer subject, Integer pageNo,Integer pageSize ){
+		Result res = new Result();
+		/*if(StringUtils.isBlank(TokenManager.getUserId())){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "登录数据失效"));
+			return res;
+		}*/
+		if (res.getError().isEmpty()) {
+			//查看消息列表
+			res.setData(jtMessageProducerService.getMessageList(messageProducer, sendStartTime, sendEndTime, messageCode, subject,pageNo, pageSize ));
+		}
+		return res;
+	}
+	
+	
+	/**
+	 * 新增消息接口
+	 * @param messageProducer
+	 * @return
+	 */
+	@RequestMapping(value="/createMyMessage", method = RequestMethod.POST)
+	public Result createMyMessage(JtMessageProducer messageProducer, String messageCreateTime){
+		try {
+			messageProducer.setCreateTime(DateUtils.parseDate(messageCreateTime,AFTConstants.YYYYMMDDHHMMSS));
+		} catch (Exception e) {
+			messageProducer.setCreateTime(null);
+		}
+		Result res = checkMessage(messageProducer);
+		
+		if(StringUtils.isBlank(TokenManager.getUserId()) && StringUtils.isBlank(TokenManager.getAdminId())){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "登录数据失效"));
+		}
+		if (res.getError().isEmpty()) {
+			//新增消息
+			int err = jtMessageProducerService.addMessage(messageProducer);
+			if(err == -1){
+				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"", "没有找到您的用户信息,不能创建消息"));
+			}
+			res.setData(err);
+		}
+		return res;
+	}
+}

+ 172 - 168
src/main/java/com/goafanti/message/service/impl/JtMessageProducerServiceImpl.java

@@ -1,168 +1,172 @@
-package com.goafanti.message.service.impl;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-
-import com.goafanti.common.constant.AFTConstants;
-import com.goafanti.common.dao.AdminMapper;
-import com.goafanti.common.dao.JtMessageConsumerMapper;
-import com.goafanti.common.dao.JtMessageProducerMapper;
-import com.goafanti.common.dao.UserMapper;
-import com.goafanti.common.model.JtMessageConsumer;
-import com.goafanti.common.model.JtMessageProducer;
-import com.goafanti.common.utils.MobileMessageUtils;
-import com.goafanti.core.mybatis.BaseMybatisDao;
-import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.message.JGMessageHelper;
-import com.goafanti.message.service.JtMessageProducerService;
-
-@Service
-public class JtMessageProducerServiceImpl  extends BaseMybatisDao<JtMessageProducerMapper> implements JtMessageProducerService{
-	@Autowired
-	private JtMessageProducerMapper jtMessageProducerMapper;
-	@Autowired
-	private UserMapper userMapper;
-	@Autowired
-	private AdminMapper adminMapper;
-	@Autowired
-	private JtMessageConsumerMapper jtMessageConsumerMapper;
-	@Autowired
-	private JGMessageHelper jgMessageHelper;
-	@Value(value = "${accessKey}")
-	private String					accessKey			= null;
-	@Value(value = "${accessSecret}")
-	private String					accessSecret		= null;
-	
-
-	@Override
-	public int addMessage(JtMessageProducer messageProducer) {
-		//处理消息内容
-		messageProducer.setId(UUID.randomUUID().toString());
-		//获得当前登录用户名字
-		String create = adminMapper.selectByPrimaryKey(TokenManager.getAdminId()).getName();
-		if(StringUtils.isBlank(create)){
-			create = userMapper.selectByPrimaryKey(TokenManager.getUserId()).getUsername();
-		}
-		if(StringUtils.isBlank(create)){
-			return -1;
-		}
-		messageProducer.setCreater(create);
-		if(null != messageProducer.getCreateTime()){
-			messageProducer.setCreateTime(new Date());
-		}
-		if (messageProducer.getResourceType()==null) {
-			messageProducer.setResourceType(-1);//安卓跳转处理
-		}
-		return jtMessageProducerMapper.insertSelective(messageProducer);
-	}
-	
-	@Override
-	public int addSendMessage(String messageId) {
-		// 获得所有正常使用的注册用户
-		List<JtMessageConsumer> list = userMapper.getAllUser();
-		Iterator<JtMessageConsumer> it = list.iterator();
-		while (it.hasNext()) {
-			JtMessageConsumer mc = (JtMessageConsumer) it.next();
-			mc.setId(UUID.randomUUID().toString());
-			mc.setMessageId(messageId);
-		}
-		JtMessageProducer messageProducer = new JtMessageProducer();
-		messageProducer.setId(messageId);
-		messageProducer.setSendTime(new Date());
-		messageProducer.setIsSend(true);
-		messageProducer.setIsDraft(false);
-		jtMessageProducerMapper.updateByPrimaryKeySelective(messageProducer);
-		JtMessageProducer producer=jtMessageProducerMapper.selectByPrimaryKey(messageId);
-		if (producer!=null) {
-			if (producer.getSubject()==1) {
-				//推送消息
-				jgMessageHelper.sendPushMessage(producer);
-			}
-		}
-		return jtMessageConsumerMapper.addBatch(list);
-	}
-	
-
-	@Override
-	public JtMessageProducer getMessageById(String messageId) {
-		return jtMessageProducerMapper.selectByPrimaryKey(messageId);
-	}
-
-	@Override
-	public int updateMessageById(JtMessageProducer messageProducer) {
-		int count = 0;
-		// 修改消息
-		messageProducer.setCreateTime(null);//不修改创建时间
-		count = jtMessageProducerMapper.updateByPrimaryKeySelective(messageProducer);
-		// 推送消息
-		if(messageProducer.getIsSend() && !messageProducer.getDeleteSign() && !messageProducer.getIsDraft()){
-			if(null == messageProducer.getSendTime()) messageProducer.setSendTime(new Date());
-			count += addSendMessage(messageProducer.getId());
-		}
-		return count;
-	}
-
-	@SuppressWarnings("unchecked")
-	@Override
-	public Pagination<JtMessageProducer> getMessageList(JtMessageProducer messageProducer, String sendStartTime, String sendEndTime,
-			String messageCode,Integer subject,Integer pageNo,Integer pageSize){
-		if(pageNo==null || pageNo<1)pageNo=1;
-		if(pageSize==null ||pageSize<1)pageSize=10; 
-		Map<String, Object> params=new HashMap<String,Object>();
-		//params.put("create", TokenManager.getUserId());
-		if(StringUtils.isNotBlank(messageProducer.getTitle()))params.put("title",messageProducer.getTitle());
-		if(null != messageProducer.getIsDraft())params.put("isDraft",messageProducer.getIsDraft());
-		if(null != messageProducer.getIsSend())params.put("isSend",messageProducer.getIsSend());
-		if(StringUtils.isNotBlank(sendStartTime))params.put("sendStartTime",sendStartTime);
-		if(StringUtils.isNotBlank(sendEndTime))params.put("sendEndTime",sendEndTime);
-		if(StringUtils.isNotBlank(messageCode))params.put("code",messageCode);
-		if(null!=subject)params.put("subject",subject);
-		return (Pagination<JtMessageProducer>) findPage("getMyMessageList", "getMyMessageCount", params, pageNo, pageSize);
-	}
-
-	@Override
-	public int saveMobileMessage(String messageCode) {
-		String regex = "^(1[1-9][0-9])\\d{8}$";
-		Pattern p = Pattern.compile(regex);
-		List<String> mobileList=userMapper.getUserListMobile();
-		String mobile="";
-		for (String string : mobileList) {
-			if (null!=string) {
-				Matcher m = p.matcher(string);
-			if ( m.matches()) {
-				mobile+=string+",";
-				}
-			}
-		}
-		if(mobile.length()>1)mobile=mobile.substring(0, mobile.length()-1);
-		MobileMessageUtils.sendMessage(messageCode, null, mobile, accessKey, accessSecret);
-		JtMessageProducer producer=new JtMessageProducer();
-		producer.setId(UUID.randomUUID().toString());
-		producer.setCreater(AFTConstants.DEFAULT_INITIATOR);
-		producer.setTitle("");
-		producer.setSubject(2);
-		producer.setIsSend(true);
-		producer.setIsDraft(false);
-		producer.setDeleteSign(false);
-		producer.setCode(messageCode);
-		producer.setSendTime(new Date());
-		jtMessageProducerMapper.insertSelective(producer);
-		return 1;
-		
-	}
-
-
-}
+package com.goafanti.message.service.impl;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.dao.AdminMapper;
+import com.goafanti.common.dao.JtMessageConsumerMapper;
+import com.goafanti.common.dao.JtMessageProducerMapper;
+import com.goafanti.common.dao.UserMapper;
+import com.goafanti.common.model.JtMessageConsumer;
+import com.goafanti.common.model.JtMessageProducer;
+import com.goafanti.common.utils.MobileMessageUtils;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.message.JGMessageHelper;
+import com.goafanti.message.service.JtMessageProducerService;
+
+@Service
+public class JtMessageProducerServiceImpl  extends BaseMybatisDao<JtMessageProducerMapper> implements JtMessageProducerService{
+	@Autowired
+	private JtMessageProducerMapper jtMessageProducerMapper;
+	@Autowired
+	private UserMapper userMapper;
+	@Autowired
+	private AdminMapper adminMapper;
+	@Autowired
+	private JtMessageConsumerMapper jtMessageConsumerMapper;
+	@Autowired
+	private JGMessageHelper jgMessageHelper;
+	@Value(value = "${accessKey}")
+	private String					accessKey			= null;
+	@Value(value = "${accessSecret}")
+	private String					accessSecret		= null;
+	
+
+	@Override
+	public int addMessage(JtMessageProducer messageProducer) {
+		//处理消息内容
+		messageProducer.setId(UUID.randomUUID().toString());
+		//获得当前登录用户名字
+		String create = adminMapper.selectByPrimaryKey(TokenManager.getAdminId()).getName();
+		if(StringUtils.isBlank(create)){
+			create = userMapper.selectByPrimaryKey(TokenManager.getUserId()).getUsername();
+		}
+		if(StringUtils.isBlank(create)){
+			return -1;
+		}
+		messageProducer.setCreater(create);
+		if(null != messageProducer.getCreateTime()){
+			messageProducer.setCreateTime(new Date());
+		}
+		if (messageProducer.getResourceType()==null) {
+			messageProducer.setResourceType(-1);//安卓跳转处理
+		}
+		return jtMessageProducerMapper.insertSelective(messageProducer);
+	}
+	
+	@Override
+	public int addSendMessage(String messageId) {
+		// 获得所有正常使用的注册用户
+		List<JtMessageConsumer> list = userMapper.getAllUser();
+		Iterator<JtMessageConsumer> it = list.iterator();
+		while (it.hasNext()) {
+			JtMessageConsumer mc = (JtMessageConsumer) it.next();
+			mc.setId(UUID.randomUUID().toString());
+			mc.setMessageId(messageId);
+		}
+		JtMessageProducer messageProducer = new JtMessageProducer();
+		messageProducer.setId(messageId);
+		messageProducer.setSendTime(new Date());
+		messageProducer.setIsSend(true);
+		messageProducer.setIsDraft(false);
+		jtMessageProducerMapper.updateByPrimaryKeySelective(messageProducer);
+		JtMessageProducer producer=jtMessageProducerMapper.selectByPrimaryKey(messageId);
+		if (producer!=null) {
+			if (producer.getSubject()==1) {
+				//推送消息
+				jgMessageHelper.sendPushMessage(producer);
+			}
+		}
+		return jtMessageConsumerMapper.addBatch(list);
+	}
+	
+
+	@Override
+	public JtMessageProducer getMessageById(String messageId) {
+		return jtMessageProducerMapper.selectByPrimaryKey(messageId);
+	}
+
+	@Override
+	public int updateMessageById(JtMessageProducer messageProducer) {
+		int count = 0;
+		// 修改消息
+		messageProducer.setCreateTime(null);//不修改创建时间
+		count = jtMessageProducerMapper.updateByPrimaryKeySelective(messageProducer);
+		// 推送消息
+		if(messageProducer.getIsSend() && !messageProducer.getDeleteSign() && !messageProducer.getIsDraft()){
+			if(null == messageProducer.getSendTime()) messageProducer.setSendTime(new Date());
+			count += addSendMessage(messageProducer.getId());
+		}
+		return count;
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<JtMessageProducer> getMessageList(JtMessageProducer messageProducer, String sendStartTime, String sendEndTime,
+			String messageCode,Integer subject,Integer pageNo,Integer pageSize){
+		if(pageNo==null || pageNo<1)pageNo=1;
+		if(pageSize==null ||pageSize<1)pageSize=10; 
+		Map<String, Object> params=new HashMap<String,Object>();
+		//params.put("create", TokenManager.getUserId());
+		if(StringUtils.isNotBlank(messageProducer.getTitle()))params.put("title",messageProducer.getTitle());
+		if(null != messageProducer.getIsDraft())params.put("isDraft",messageProducer.getIsDraft());
+		if(null != messageProducer.getIsSend())params.put("isSend",messageProducer.getIsSend());
+		if(StringUtils.isNotBlank(sendStartTime))params.put("sendStartTime",sendStartTime);
+		if(StringUtils.isNotBlank(sendEndTime))params.put("sendEndTime",sendEndTime);
+		if(StringUtils.isNotBlank(messageCode))params.put("code",messageCode);
+		if(null!=subject)params.put("subject",subject);
+		return (Pagination<JtMessageProducer>) findPage("getMyMessageList", "getMyMessageCount", params, pageNo, pageSize);
+	}
+
+	@Override
+	public int saveMobileMessage(String messageCode) {
+		String regex = "^(1[1-9][0-9])\\d{8}$";
+		Pattern p = Pattern.compile(regex);
+		List<String> mobileList=userMapper.getUserListMobile();
+		String mobile="";
+		for (String string : mobileList) {
+			if (null!=string) {
+				Matcher m = p.matcher(string);
+			if ( m.matches()) {
+				mobile+=string+",";
+				}
+			}
+		}
+		if(mobile.length()>1)mobile=mobile.substring(0, mobile.length()-1);
+		String ret=MobileMessageUtils.sendMessage(messageCode, null, mobile, accessKey, accessSecret);
+		if (StringUtils.isNotBlank(ret)) {
+			return -1;
+		}
+		JtMessageProducer producer=new JtMessageProducer();
+		producer.setId(UUID.randomUUID().toString());
+		producer.setCreater(AFTConstants.DEFAULT_INITIATOR);
+		producer.setTitle("");
+		producer.setSubject(2);
+		producer.setIsSend(true);
+		producer.setIsDraft(false);
+		producer.setDeleteSign(false);
+		producer.setCode(messageCode);
+		producer.setSendTime(new Date());
+		jtMessageProducerMapper.insertSelective(producer);
+		return 1;
+		
+	}
+
+
+}

Fichier diff supprimé car celui-ci est trop grand
+ 769 - 768
src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java


+ 73 - 89
src/main/resources/props/config_local.properties

@@ -1,91 +1,75 @@
-#Driver
-jdbc.driverClassName=com.mysql.jdbc.Driver
-#\u6570\u636e\u5e93\u94fe\u63a5\uff0c
-jdbc.url=jdbc:mysql://192.168.0.17:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
-#\u5e10\u53f7
-jdbc.username=dev
-#\u5bc6\u7801
-jdbc.password=123456
-#\u68c0\u6d4b\u6570\u636e\u5e93\u94fe\u63a5\u662f\u5426\u6709\u6548\uff0c\u5fc5\u987b\u914d\u7f6e
-jdbc.validationQuery=SELECT 'x'
-#\u521d\u59cb\u8fde\u63a5\u6570
-jdbc.initialSize=3
-#\u6700\u5927\u8fde\u63a5\u6c60\u6570\u91cf
-jdbc.maxActive=20
-#\u53bb\u6389\uff0c\u914d\u7f6e\u6587\u4ef6\u5bf9\u5e94\u53bb\u6389
-#jdbc.maxIdle=20
-#\u914d\u7f6e0,\u5f53\u7ebf\u7a0b\u6c60\u6570\u91cf\u4e0d\u8db3\uff0c\u81ea\u52a8\u8865\u5145\u3002
-jdbc.minIdle=0
-#\u83b7\u53d6\u94fe\u63a5\u8d85\u65f6\u65f6\u95f4\u4e3a1\u5206\u949f\uff0c\u5355\u4f4d\u4e3a\u6beb\u79d2\u3002
-jdbc.maxWait=120000
-#\u83b7\u53d6\u94fe\u63a5\u7684\u65f6\u5019\uff0c\u4e0d\u6821\u9a8c\u662f\u5426\u53ef\u7528\uff0c\u5f00\u542f\u4f1a\u6709\u635f\u6027\u80fd\u3002
-jdbc.testOnBorrow=false
-#\u5f52\u8fd8\u94fe\u63a5\u5230\u8fde\u63a5\u6c60\u7684\u65f6\u5019\u6821\u9a8c\u94fe\u63a5\u662f\u5426\u53ef\u7528\u3002
-jdbc.testOnReturn=false
-#\u6b64\u9879\u914d\u7f6e\u4e3atrue\u5373\u53ef\uff0c\u4e0d\u5f71\u54cd\u6027\u80fd\uff0c\u5e76\u4e14\u4fdd\u8bc1\u5b89\u5168\u6027\u3002\u610f\u4e49\u4e3a\uff1a\u7533\u8bf7\u8fde\u63a5\u7684\u65f6\u5019\u68c0\u6d4b\uff0c\u5982\u679c\u7a7a\u95f2\u65f6\u95f4\u5927\u4e8etimeBetweenEvictionRunsMillis\uff0c\u6267\u884cvalidationQuery\u68c0\u6d4b\u8fde\u63a5\u662f\u5426\u6709\u6548\u3002
-jdbc.testWhileIdle=true
-#1.Destroy\u7ebf\u7a0b\u4f1a\u68c0\u6d4b\u8fde\u63a5\u7684\u95f4\u9694\u65f6\u95f4
-#2.testWhileIdle\u7684\u5224\u65ad\u4f9d\u636e
-jdbc.timeBetweenEvictionRunsMillis=60000
-#\u4e00\u4e2a\u94fe\u63a5\u751f\u5b58\u7684\u65f6\u95f4\uff08\u4e4b\u524d\u7684\u503c\uff1a25200000\uff0c\u8fd9\u4e2a\u65f6\u95f4\u6709\u70b9BT\uff0c\u8fd9\u4e2a\u7ed3\u679c\u4e0d\u77e5\u9053\u662f\u600e\u4e48\u6765\u7684\uff0c\u6362\u7b97\u540e\u7684\u7ed3\u679c\u662f\uff1a25200000/1000/60/60 = 7\u4e2a\u5c0f\u65f6\uff09
-jdbc.minEvictableIdleTimeMillis=300000
-#\u94fe\u63a5\u4f7f\u7528\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u662f\u5426\u56de\u6536
-jdbc.removeAbandoned=true
-#\u8d85\u8fc7\u65f6\u95f4\u9650\u5236\u65f6\u95f4\uff08\u5355\u4f4d\u79d2\uff09\uff0c\u76ee\u524d\u4e3a5\u5206\u949f\uff0c\u5982\u679c\u6709\u4e1a\u52a1\u5904\u7406\u65f6\u95f4\u8d85\u8fc75\u5206\u949f\uff0c\u53ef\u4ee5\u9002\u5f53\u8c03\u6574\u3002
-jdbc.removeAbandonedTimeout=300
-#\u94fe\u63a5\u56de\u6536\u7684\u65f6\u5019\u63a7\u5236\u53f0\u6253\u5370\u4fe1\u606f\uff0c\u6d4b\u8bd5\u73af\u5883\u53ef\u4ee5\u52a0\u4e0atrue\uff0c\u7ebf\u4e0a\u73af\u5883false\u3002\u4f1a\u5f71\u54cd\u6027\u80fd\u3002
-jdbc.logAbandoned=true
-#\u7edf\u8ba1\u76d1\u63a7
-jdbc.filters=stat
-
-logging.level.com.goafanti=DEBUG
-
-jedis.host=192.168.0.17
-jedis.port=6379
-jedis.timeout=5000
-jedis.password=aft123456
-
-pwd.hash_algorithm_name=md5
-pwd.hash_iterations=2
-
-session.timeout=12000000
-session.validate.timespan=18000000
-
-app.name=AFT
-app.mobile.website=http://m.kedexinxi.com
-template.cacheable=false
-
-static.host=//sclient.jishutao.com:8088/client/1.0.0
+#Driver
+jdbc.driverClassName=com.mysql.jdbc.Driver
+jdbc.url=jdbc:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+jdbc.username=dev
+jdbc.password=123456
+#jdbc.url=jdbc:mysql://101.37.32.31:3306/aft20181217?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+#jdbc.username=root
+#jdbc.password=aftdev
+jdbc.validationQuery=SELECT 'x'
+jdbc.initialSize=3
+jdbc.maxActive=20
+jdbc.minIdle=0
+jdbc.maxWait=60000
+jdbc.testOnBorrow=false
+jdbc.testOnReturn=false
+jdbc.testWhileIdle=true
+jdbc.timeBetweenEvictionRunsMillis=60000
+jdbc.minEvictableIdleTimeMillis=300000
+jdbc.removeAbandoned=true
+jdbc.removeAbandonedTimeout=300
+jdbc.logAbandoned=false
+jdbc.filters=stat
 
-portal.host=//sportal.jishutao.com:80/portal/1.0.1
+logging.level.com.goafanti=ERROR
 
-avatar.host=//sclient.jishutao.com
-avatar.upload.host=//sclient.jishutao.com/upload
-
-upload.path=F:/jitao/public/upload
-upload.private.path=F:/jitao/private/upload
-
-accessKey=LTAIqTgQLLwz252Z
-accessSecret=ICGuiUnqzaar7urw4zecVcJrJ1MHg9
-aesSecretKey=aft1234567890123
-
-mobileCodeTemplate=SMS_37845022
-patentTemplate=SMS_72005286
-examineAdopt=SMS_147971258
-examineNoAdopt=SMS_147971261
-
-easemob.client.url=https://a1.easemob.com/1117170814115609/jitao
-easemob.client.id=YXA6RUDGkIDSEeemq9_4PWzcNA
-easemob.client.secret=YXA61NHE0renI5N8gEgizoI5ivM9SYE
-
-jiguang.appKey=dbcea43366e038073452a04e
-jiguang.masterSecret=59792298288e4f635c737def
-jiguang.pushUrl=https://api.jpush.cn/v3/push
-
-ffmpeg.path=E\:\\mytools\\ffmpeg-20181028-bdfd2e3-win64-static\\bin\\ffmpeg.exe
-ffprobe.path=E\:\\mytools\\ffmpeg-20181028-bdfd2e3-win64-static\\bin\\ffprobe.exe
-
-video.server=http://192.168.0.20
-video.temppath=F:/data/local/video
-
-collect_flag=true
+jedis.host=localhost
+jedis.port=6379
+jedis.timeout=5000
+jedis.password=aft123456
+
+pwd.hash_algorithm_name=md5
+pwd.hash_iterations=2
+
+session.timeout=12000000
+session.validate.timespan=18000000
+
+app.name=AFT
+app.mobile.website=http://m.jishutao.com/1.0/template/index.html
+template.cacheable=false
+
+static.host=//ss.jishutao.com/client/1.2.5
+portal.host=//ss.jishutao.com/portal/1.2.5
+#本地
+#static.host=//sclient.jishutao.com:8088/client/1.0.2
+#portal.host=//sportal.jishutao.com:80/portal/1.0.2
+
+avatar.host=//ss.jishutao.com
+avatar.upload.host=//ss.jishutao.com/upload
+
+upload.path=/data/static/junbang/upload
+upload.private.path=/data/static/private/jb/upload
+
+accessKey=LTAIqTgQLLwz252Z
+accessSecret=ICGuiUnqzaar7urw4zecVcJrJ1MHg9
+aesSecretKey=aft1234567890123
+
+mobileCodeTemplate=SMS_37845022
+mobileRemindCodeTemplate=SMS_137421952
+patentTemplate=SMS_72005286
+examineAdopt=SMS_147971258
+examineNoAdopt=SMS_147971261
+
+easemob.client.url=https://a1.easemob.com/1117170814115609/jitao
+easemob.client.id=YXA6RUDGkIDSEeemq9_4PWzcNA
+easemob.client.secret=YXA61NHE0renI5N8gEgizoI5ivM9SYE
+
+jiguang.appKey=dbcea43366e038073452a04e
+jiguang.masterSecret=59792298288e4f635c737def
+jiguang.pushUrl=https://api.jpush.cn/v3/push
+
+collect_flag=true
+ffmpeg.path=/usr/bin/ffmpeg
+ffprobe.path=/usr/bin/ffprobe
+video.server=http://119.23.60.246
+video.temppath=/data/video/

+ 8 - 16
src/main/webapp/WEB-INF/views/common.html

@@ -58,10 +58,6 @@
 					<span class="webkitDown"></span>
 				</a>
 				<div class="xialaewm">
-					<div class="cont_rightapps" id="iPhone">
-						<img th:src="${portalHost+'/img/erweima_iphone.png'}" alt="">
-						<p>iPhone版</p>
-					</div>
 					<div class="cont_rights android" id="Android">
 						<img th:src="${portalHost+'/img/erweima_android.jpg'}" alt="">
 						<p>Android版</p>
@@ -245,11 +241,11 @@
                          <a th:href="@{/portal/service/safeguarding}">维权</a>
                         </div>
                      </li>                         
-                     <li th:class="${subM}=='special'?active:''" >
+                     <!-- <li th:class="${subM}=='special'?active:''" >
                      	<div>
                          <a th:href="@{/portal/special}">社区</a>
                         </div>
-                     </li>                         
+                     </li>      -->                    
                 </ul>
             </div>
             <!-- <div class="logo_photo">全国统一服务热线:400-8800-962</div> -->
@@ -296,24 +292,20 @@
 					<div class="text_top">
 						<a th:href="@{/portal/aboutUs}">关于公司/</a>
 						<a th:href="@{/portal/contactUs}">联系我们</a>
-						<p> Copyright &copy 2016-2017 科德 版权所有 <a href="http://www.miitbeian.gov.cn/" target="_blank">湘ICP备15019731号</a>
+						<p> Copyright &copy 2016-2020 科德 版权所有 <a href="http://www.beian.miit.gov.cn/" target="_blank">湘ICP备15019731号</a>
 							-2 技术支持:湖南阿凡提信息科技有限公司</p>
 					</div>
 					<div class="text_center">
-						<div class="cont_left">
-							<img th:src="${portalHost+'/img/dizhi.jpg'}" alt=""/>
-							<p>湖南省长沙市营盘东路19号金山大厦八楼</p>
+						<div class="cont_left" style="width: 365px">
+							<img th:src="${portalHost+'/img/dizhi.jpg'}" alt="" style="margin-left: 155px;"/>
+							<p>湖南省长沙市岳麓区茶子山东路湘江财富金融中心D栋12层</p>
 						</div>
-						<div class="cont_center">
+						<div class="cont_center" style="margin-left: 110px;">
 							<img th:src="${portalHost+'/img/dianhua.jpg'}" alt=""/>
 							<p>合作电话:0731-89907207</p>
 							<p>400-8800-962</p>
 						</div>
-						<div class="cont_rightapp">
-							<img th:src="${portalHost+'/img/erweima_iphone.png'}" alt=""/>
-							<p>iPhone版</p>
-						</div>
-						<div class="cont_right android">
+						<div class="cont_right android"  style="margin-left: 210px;">
 							<img th:src="${portalHost+'/img/erweima_android.jpg'}" alt=""/>
 							<p>Android版</p>
 						</div>

+ 241 - 297
src/main/webapp/WEB-INF/views/portal/index.html

@@ -1,300 +1,244 @@
-<!DOCTYPE html>
-<html  xmlns="http://www.w3.org/1999/xhtml"
-	xmlns:th="http://www.thymeleaf.org"
-	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
-<head th:replace="common::header(~{::title},~{::link})">
-	<meta charset="UTF-8">
-	<meta name="viewport" content="width=device-width, initial-scale=1.0">
-	<meta http-equiv="X-UA-Compatible" content="ie=edge">
-	<meta name="Keywords" content="高新技术企业认定_双软评估_军工认证_知识产权贯标_知识产权转移_科德"/>
-	<meta name="Description" content="科德信息咨询有限公司17年来专注于国家高新技术企业认定,知识产权贯标,知识产权转移,双软评估,
-体系认证,专利申请,军工三证,工程技术研究中心,创新小巨人等湖南省市科技项目申报、
-成果转化的信息咨询旗舰企业,获得政府部门权威认证的咨询服务机构."/>
-	  <link rel="icon" type="image/png" th:href="${portalHost+'/img/ico_logo.png'}" sizes="16x16">
-	<title>技淘网-知识产权新运用</title>
-<link th:href="${portalHost+'/dll/dll.css'}" rel="stylesheet">
-<link th:href="${portalHost+'/vendors.css'}" rel="stylesheet">
-<link th:href="${portalHost+'/index.css'}" rel="stylesheet"></head>
-<body>
-	<div th:replace="common::nav('','index')"></div>
-	
-	<!-- banner -->
-		<div id="myCarousel" class="carousel" th:if="${#lists.size(bannerlist) eq 1}">
-			<!-- 轮播(Carousel)项目 -->
-			<div class="carousel-inner" th:each="banner,bStatus:${bannerlist}">
-				<div class="item active">
-					<a href="javacript:void(0);" th:if="${banner.forwardUrl}!=null and ${banner.forwardUrl}!=''" th:href="|${basePath }${ banner.forwardUrl}"><img th:src="|${avatarUploadHost}${banner.imgUrl}" th:alt="${banner.text}"></a>
-					<a th:if="${banner.forwardUrl}==null or ${banner.forwardUrl}==''"><img th:src="|${avatarUploadHost}${banner.imgUrl}" th:alt="${banner.text}"></a>
-				</div>
-			</div>
-		</div>
-		<div id="myCarousel" class="carousel slide" th:if="${#lists.size(bannerlist) > 1}">
-			<!-- 轮播(Carousel)指标 -->
-			<ol class="carousel-indicators"><!-- 循环圆点 -->
-				<li data-target="#myCarousel" th:attr="data-slide-to=${bStatus.index}" class="active" th:each="banner,bStatus:${bannerlist}" th:if="${bStatus.first}"></li>
-				<li data-target="#myCarousel" th:attr="data-slide-to=${bStatus.index}" th:each="banner,bStatus:${bannerlist}" th:unless="${bStatus.first}"></li>
-			</ol>
-			<!-- 轮播(Carousel)项目 -->
-			<div class="carousel-inner" >
-				<div class="item active" th:each="banner,bStatus:${bannerlist}" th:if="${bStatus.first}">
-				<!-- /portal/continueHigh  /portal/militaryProject   /portal/practicalPatent -->
-					<a th:if="${banner.forwardUrl}!=null and ${banner.forwardUrl}!=''" th:href="|${basePath }${ banner.forwardUrl}"><img th:src="|${avatarUploadHost}${banner.imgUrl}" th:alt="${banner.text}"></a>
-					<a th:if="${banner.forwardUrl}==null or ${banner.forwardUrl}==''" ><img th:src="|${avatarUploadHost}${banner.imgUrl}" th:alt="${banner.text}"></a>
-				</div>
-				<div class="item" th:each="banner,bStatus:${bannerlist}" th:unless="${bStatus.first}">
-					<a th:if="${banner.forwardUrl}!=null and ${banner.forwardUrl}!=''" th:href="|${basePath }${ banner.forwardUrl}"><img th:src="|${avatarUploadHost}${banner.imgUrl}" th:alt="${banner.text}"></a>
-					<a th:if="${banner.forwardUrl}==null or ${banner.forwardUrl}==''" ><img th:src="|${avatarUploadHost}${banner.imgUrl}" th:alt="${banner.text}"></a>
-				</div>
-			</div>
-			<!-- 轮播(Carousel)导航 -->
-			<a class="carousel-control left" href="#myCarousel" data-slide="prev">&lsaquo;</a>
-			<a class="carousel-control right" href="#myCarousel" data-slide="next">&rsaquo;</a>
-		</div>
-		
-		<div class="indexSearch">
-			<!-- <ul class="jumpType">
-				<li class="active">成果</li>
-				<li>需求</li>
-				<li>专利</li>
-				<li>政策</li>
-				<li>项目</li>
-			</ul> -->
-			<div class="search-inp">
-				<div class="input-group searchDiv">
-					<input type="text" class="form-control demandSearch" placeholder="输入你感兴趣的内容">
-					<img th:src="${portalHost+'/img/newMenu/searchImg.png'}" alt="" class="searchImg">
-				
-				</div>
-				 <a  th:href="@{/portal/assessment}" class="zaixian">在线评估</a>
-				 
-				
-				<a th:href="@{/portal/evaluation/evaluate}" href="/portal/evaluation/evaluate" class="gaoqi">高企自评</a>
-			</div>
-			<ul class="jump">
-				<li>
-					<a href="/portal/thinkTank/policyList?type=1">政策</a>
-				</li>
-				<li>
-					<a href="/portal/thinkTank/policyList?type=0">资讯</a>
-				</li>
-				<li>
-					<a href="/portal/thinkTank/policyList?type=99">技淘观点</a>
-				</li>
-				<li>
-					<a href="/portal/thinkTank/policyList?type=98">知产百科</a>
-				</li>
-			</ul>
-			<!-- <span class="apply head_login">申请会员</span> -->
-		</div>
-
-	<!-- 主体内容区域 -->
-	<div id="terrace">
-			<div class="terrace_title">
-			
-				<img th:src="${portalHost+'/img/indedImg/inded12.png'}" alt="" />
-			</div>
-			<div class="terrace_cont">
-				<div>
-					<img th:src="${portalHost+'/img/indedImg/inded1.png'}" alt="" />
-					<div class="terraceH">
-						<h4>智慧</h4>
-						<p>海量智力成果认知您的需求</p>
-					</div>
-				</div>
-				<div>
-					<img th:src="${portalHost+'/img/indedImg/inded1.png'}" alt="" />
-					<div class="terraceH">
-						<h4>合伙</h4>
-						<p>秉承十七载荣赢数万客户</p>
-					</div>
-				</div><div>
-					<img th:src="${portalHost+'/img/indedImg/inded1.png'}" alt="" />
-					<div class="terraceH">
-						<h4>社区</h4>
-						<p>严选数千位专家顾问答疑解惑</p>
-					</div>
-				</div>
-			</div>
-		</div>
-		<div id="apply">
-			<div class="apply">
-				<div class="apply_left">
-					<a >
-						<img th:src="${portalHost+'/img/indedImg/inded15.jpg'}" alt="" />
-					</a>
-				</div>
-				<div class="apply_right">
-					<div th:each="p0,pcStatus:${patentCategory}">
-						<a th:href="'/portal/service/patentList?secondId='+${p0.topLevelId}">
-							<img th:src="${portalHost+'/img/indedImg/inded20.jpg'}" alt="" th:if="${pcStatus.index}==0"/>
-							<img th:src="${portalHost+'/img/indedImg/inded21.jpg'}" alt="" th:if="${pcStatus.index}==1"/>
-							<img th:src="${portalHost+'/img/indedImg/inded22.jpg'}" alt="" th:if="${pcStatus.index}==2"/>
-							<img th:src="${portalHost+'/img/indedImg/inded23.jpg'}" alt="" th:if="${pcStatus.index}==3"/>
-							<img th:src="${portalHost+'/img/indedImg/inded24.jpg'}" alt="" th:if="${pcStatus.index}==4"/>
-							<img th:src="${portalHost+'/img/indedImg/inded25.jpg'}" alt="" th:if="${pcStatus.index}==5"/>
-							<h4 th:text="${p0.topLevel}"> 发明专利</h4>
-						</a>
-					</div>
-				</div>
-			</div>
-			
-		</div>
-		<div id="wield">
-			<div class="terrace_title">
-				<img th:src="${portalHost+'/img/indedImg/inded4.png'}" alt="" />
-			</div>
-			<div class="wield_cont">
-				<div class="video">
+<!DOCTYPE html>
+<html  xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:th="http://www.thymeleaf.org"
+	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<head th:replace="common::header(~{::title},~{::link})">
+	<meta charset="UTF-8">
+	<meta name="viewport" content="width=device-width, initial-scale=1.0">
+	<meta http-equiv="X-UA-Compatible" content="ie=edge">
+	<meta name="Keywords" content="高新技术企业认定_双软评估_军工认证_知识产权贯标_知识产权转移_科德"/>
+	<meta name="Description" content="科德信息咨询有限公司17年来专注于国家高新技术企业认定,知识产权贯标,知识产权转移,双软评估,
+体系认证,专利申请,军工三证,工程技术研究中心,创新小巨人等湖南省市科技项目申报、
+成果转化的信息咨询旗舰企业,获得政府部门权威认证的咨询服务机构."/>
+	  <link rel="icon" type="image/png" th:href="${portalHost+'/img/ico_logo.png'}" sizes="16x16">
+	<title>技淘网-知识产权新运用</title>
+<link th:href="${portalHost+'/dll/dll.css'}" rel="stylesheet">
+<link th:href="${portalHost+'/vendors.css'}" rel="stylesheet">
+<link th:href="${portalHost+'/index.css'}" rel="stylesheet"></head>
+<body>
+	<div th:replace="common::nav('','index')"></div>
+	
+	<!-- banner -->
+		<div id="myCarousel" class="carousel" th:if="${#lists.size(bannerlist) eq 1}">
+			<!-- 轮播(Carousel)项目 -->
+			<div class="carousel-inner" th:each="banner,bStatus:${bannerlist}">
+				<div class="item active">
+					<a href="javacript:void(0);" th:if="${banner.forwardUrl}!=null and ${banner.forwardUrl}!=''" th:href="|${basePath }${ banner.forwardUrl}"><img th:src="|${avatarUploadHost}${banner.imgUrl}" th:alt="${banner.text}"></a>
+					<a th:if="${banner.forwardUrl}==null or ${banner.forwardUrl}==''"><img th:src="|${avatarUploadHost}${banner.imgUrl}" th:alt="${banner.text}"></a>
+				</div>
+			</div>
+		</div>
+		<div id="myCarousel" class="carousel slide" th:if="${#lists.size(bannerlist) > 1}">
+			<!-- 轮播(Carousel)指标 -->
+			<ol class="carousel-indicators"><!-- 循环圆点 -->
+				<li data-target="#myCarousel" th:attr="data-slide-to=${bStatus.index}" class="active" th:each="banner,bStatus:${bannerlist}" th:if="${bStatus.first}"></li>
+				<li data-target="#myCarousel" th:attr="data-slide-to=${bStatus.index}" th:each="banner,bStatus:${bannerlist}" th:unless="${bStatus.first}"></li>
+			</ol>
+			<!-- 轮播(Carousel)项目 -->
+			<div class="carousel-inner" >
+				<div class="item active" th:each="banner,bStatus:${bannerlist}" th:if="${bStatus.first}">
+				<!-- /portal/continueHigh  /portal/militaryProject   /portal/practicalPatent -->
+					<a th:if="${banner.forwardUrl}!=null and ${banner.forwardUrl}!=''" th:href="|${basePath }${ banner.forwardUrl}"><img th:src="|${avatarUploadHost}${banner.imgUrl}" th:alt="${banner.text}"></a>
+					<a th:if="${banner.forwardUrl}==null or ${banner.forwardUrl}==''" ><img th:src="|${avatarUploadHost}${banner.imgUrl}" th:alt="${banner.text}"></a>
+				</div>
+				<div class="item" th:each="banner,bStatus:${bannerlist}" th:unless="${bStatus.first}">
+					<a th:if="${banner.forwardUrl}!=null and ${banner.forwardUrl}!=''" th:href="|${basePath }${ banner.forwardUrl}"><img th:src="|${avatarUploadHost}${banner.imgUrl}" th:alt="${banner.text}"></a>
+					<a th:if="${banner.forwardUrl}==null or ${banner.forwardUrl}==''" ><img th:src="|${avatarUploadHost}${banner.imgUrl}" th:alt="${banner.text}"></a>
+				</div>
+			</div>
+			<!-- 轮播(Carousel)导航 -->
+			<a class="carousel-control left" href="#myCarousel" data-slide="prev">&lsaquo;</a>
+			<a class="carousel-control right" href="#myCarousel" data-slide="next">&rsaquo;</a>
+		</div>
+		
+	<!-- 	<div class="indexSearch">
+			<ul class="jumpType">
+				<li class="active">成果</li>
+				<li>需求</li>
+				<li>专利</li>
+				<li>政策</li>
+				<li>项目</li>
+			</ul>
+			<div class="search-inp">
+				<div class="input-group searchDiv">
+					<input type="text" class="form-control demandSearch" placeholder="输入你感兴趣的内容">
+					<img th:src="${portalHost+'/img/newMenu/searchImg.png'}" alt="" class="searchImg">
+				
+				</div>
+				 <a  th:href="@{/portal/assessment}" class="zaixian">在线评估</a>
+				 
+				
+				<a th:href="@{/portal/evaluation/evaluate}" href="/portal/evaluation/evaluate" class="gaoqi">高企自评</a>
+			</div>
+			<ul class="jump">
+				<li>
+					<a href="/portal/thinkTank/policyList?type=1">政策</a>
+				</li>
+				<li>
+					<a href="/portal/thinkTank/policyList?type=0">资讯</a>
+				</li>
+				<li>
+					<a href="/portal/thinkTank/policyList?type=99">技淘观点</a>
+				</li>
+				<li>
+					<a href="/portal/thinkTank/policyList?type=98">知产百科</a>
+				</li>
+			</ul>
+			<span class="apply head_login">申请会员</span>
+		</div> -->
+
+	<!-- 主体内容区域 -->
+	<div id="terrace">
+			<div class="terrace_title">
+			
+				<img th:src="${portalHost+'/img/indedImg/inded12.png'}" alt="" />
+			</div>
+			<!-- 
+			<div class="terrace_cont">
+				<div>
+					<img th:src="${portalHost+'/img/indedImg/inded1.png'}" alt="" />
+					<div class="terraceH">
+						<h4>智慧</h4>
+						<p>海量智力成果认知您的需求</p>
+					</div>
+				</div>
+				<div>
+					<img th:src="${portalHost+'/img/indedImg/inded1.png'}" alt="" />
+					<div class="terraceH">
+						<h4>合伙</h4>
+						<p>秉承十七载荣赢数万客户</p>
+					</div>
+				</div><div>
+					<img th:src="${portalHost+'/img/indedImg/inded1.png'}" alt="" />
+					<div class="terraceH">
+						<h4>社区</h4>
+						<p>严选数千位专家顾问答疑解惑</p>
+					</div>
+				</div>
+			</div>-->
+		</div> 
+		<div id="apply">
+			<div class="apply">
+				<div class="apply_left">
+					<a >
+						<img th:src="${portalHost+'/img/indedImg/inded15.jpg'}" alt="" />
+					</a>
+				</div>
+				<div class="apply_right">
+					<div th:each="p0,pcStatus:${patentCategory}">
+						<a th:href="'/portal/service/patentList?secondId='+${p0.topLevelId}">
+							<img th:src="${portalHost+'/img/indedImg/inded20.jpg'}" alt="" th:if="${pcStatus.index}==0"/>
+							<img th:src="${portalHost+'/img/indedImg/inded21.jpg'}" alt="" th:if="${pcStatus.index}==1"/>
+							<img th:src="${portalHost+'/img/indedImg/inded22.jpg'}" alt="" th:if="${pcStatus.index}==2"/>
+							<img th:src="${portalHost+'/img/indedImg/inded23.jpg'}" alt="" th:if="${pcStatus.index}==3"/>
+							<img th:src="${portalHost+'/img/indedImg/inded24.jpg'}" alt="" th:if="${pcStatus.index}==4"/>
+							<img th:src="${portalHost+'/img/indedImg/inded25.jpg'}" alt="" th:if="${pcStatus.index}==5"/>
+							<h4 th:text="${p0.topLevel}"> 发明专利</h4>
+						</a>
+					</div>
+				</div>
+			</div>
+			
+		</div>
+		<div class="container">
+		<div class="RecommendTitle">
+			<h2>政策资讯</h2>
+			<span></span>
+		</div>
+		<div class="news">
+			<div class="consultation"  style="width: 1200px;">
+				<a href="/portal/thinkTank/policyList?type=0" style="color: black;position: relative;left: 1120px;font-size: 16px;">更多资讯&gt;&gt;</a>
+				<ul style="display: flex; flex-wrap: wrap;">
+					
+					<li th:each="n:${news}" style="width: 600px;">
+						<a th:href="@{/portal/news/newsDetail(id=${n.id},type=1)}">
+							<div class="time">
+								<span th:text="${#dates.format(n.releaseDate,'MM-dd')}">03-12</span>
+								<span th:text="${#dates.format(n.releaseDate,'yyyy')}">2018</span>
+							</div>
+							<div class="newTxt">
+								<h5 th:text="${#strings.abbreviate(n.title,18)}">加奖金哦违法爱按金额积分经济积分经济积分经济if啊积分经济交往和居委会看看哇卡哇卡...</h5>
+								<p th:text="${#strings.abbreviate(n.summary,65)}">哈哈哈哈海鸥科技打飞机附近的啊我的㘝技打飞机附近的啊我的技打飞机附近的啊我的技打飞机附近的啊我的技打飞机附近的啊我的酒店设计大姐姐 但是大家觉得结算单基督教圣诞节ajd...</p>
+							</div>
+						</a>
+					</li>
+				</ul>
+			</div>
+		</div>
+	</div>
+		<!-- <div id="wield">
+			<div class="terrace_title">
+				<img th:src="${portalHost+'/img/indedImg/inded4.png'}" alt="" />
+			</div>
+			<div class="wield_cont">
+				<div class="video">
 					<video id="video1" controls="true" controlslist="nodownload">
-<!-- 						<source src="http://118.190.205.7:8000/Pear-Demo-Yosemite_National_Park.mp4 "  type="video/mp4"> -->
-						<source th:src="${vurl == null? 'http://118.190.205.7:8000/Pear-Demo-Yosemite_National_Park.mp4': videoServer+vurl}"  type="video/mp4">
+						<source src="http://118.190.205.7:8000/Pear-Demo-Yosemite_National_Park.mp4 "  type="video/mp4">
+						<source th:src="${vurl == null? 'http://118.190.205.7:8000/Pear-Demo-Yosemite_National_Park.mp4': videoServer+vurl}"  type="video/mp4">
+
+						您的浏览器不支持 HTML5 video 标签。
+					</video>
+				</div>
+				<img th:src="${portalHost+'/img/indedImg/inded5.png'}" alt="" />
+			</div>
+				<div class="moreVideo">
+				<a href="/portal/video.html">查看更多视频 >></a>
+			</div>
+		</div> -->
+		<!-- <div class="brands">
+			<a th:href="@{/portal/service/brandBuild}">
+			<img th:src="${portalHost+'/img/indedImg/inded6.png'}" alt="" />
+			</a>
+		</div>
+		<div class="brands">
+			<a th:href="@{/portal/service/marketOpen}">
+			<img th:src="${portalHost+'/img/indedImg/inded7.png'}" alt="" />
+			</a>
+			<div class="brandsDiv">
+				<img th:src="${portalHost+'/img/indedImg/inded31.jpg'}" alt="" class="active"/>
+				<img th:src="${portalHost+'/img/indedImg/inded32.jpg'}" alt="" />
+				<img th:src="${portalHost+'/img/indedImg/inded33.jpg'}" alt="" />
+			</div>
+		</div>
+		<div class="brands">
+			<a th:href="@{/portal/service/governmentSupport}">
+			<img th:src="${portalHost+'/img/indedImg/inded8.png'}" alt="" />
+			</a>
+		</div>
+		<div class="brands">
+			<a th:href="@{/portal/service/taxFinance}">
+			<img th:src="${portalHost+'/img/indedImg/inded9.png'}" alt="" />
+			</a>
+			<div>
+				<img th:src="${portalHost+'/img/indedImg/inded34.jpg'}" alt="" class="active"/>
+				<img th:src="${portalHost+'/img/indedImg/inded35.jpg'}" alt="" />
+				<img th:src="${portalHost+'/img/indedImg/inded36.jpg'}" alt="" />
+			</div>
+		</div> -->
+		<div id="hotProject">
+			<div class="terrace_title">
+				<img th:src="${portalHost+'/img/indedImg/inded10.png'}" alt="" />
+			</div>
+			<div class="hotProject_cont" >
+				<div th:each="p,pStatus:${projects}">
+					<img th:src="${p.maxImgUrl}==null or ${p.maxImgUrl}==''?${portalHost+'/img/indedImg/inded11.png'}:${avatarUploadHost+p.maxImgUrl}" alt="">
+					<h3 th:text="${p.name}">高新认定</h3>
+					<p th:text="${p.advertisement}==null or ${p.advertisement}==''?'暂无简介':${#strings.abbreviate(p.advertisement,30)}"></p>
+					<a th:href="@{/portal/service/serviceDetail(id=${p.id})}">立即办理</a>
+				</div>
+			</div>
+		</div>
+	
+		
+	<footer>
+		<div th:replace="common::copyright"></div>
+		<div th:replace="common::login"></div>
+	</footer>
+	<div th:replace="common::footer(~{::script})">
+		<script type="text/javascript" th:src="${portalHost + '/dll/dll.js'}"></script>
+		<script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
+		<script type="text/javascript" th:src="${portalHost+'/index.js'}"></script>
+	</div>
+</body>
 
-						您的浏览器不支持 HTML5 video 标签。
-					</video>
-				</div>
-				<img th:src="${portalHost+'/img/indedImg/inded5.png'}" alt="" />
-			</div>
-				<div class="moreVideo">
-				<a href="/portal/video.html">查看更多视频 >></a>
-			</div>
-		</div>
-		<div class="brands">
-			<a th:href="@{/portal/service/brandBuild}">
-			<img th:src="${portalHost+'/img/indedImg/inded6.png'}" alt="" />
-			</a>
-		</div>
-		<div class="brands">
-			<a th:href="@{/portal/service/marketOpen}">
-			<img th:src="${portalHost+'/img/indedImg/inded7.png'}" alt="" />
-			</a>
-			<div class="brandsDiv">
-				<img th:src="${portalHost+'/img/indedImg/inded31.jpg'}" alt="" class="active"/>
-				<img th:src="${portalHost+'/img/indedImg/inded32.jpg'}" alt="" />
-				<img th:src="${portalHost+'/img/indedImg/inded33.jpg'}" alt="" />
-			</div>
-		</div>
-		<div class="brands">
-			<a th:href="@{/portal/service/governmentSupport}">
-			<img th:src="${portalHost+'/img/indedImg/inded8.png'}" alt="" />
-			</a>
-		</div>
-		<div class="brands">
-			<a th:href="@{/portal/service/taxFinance}">
-			<img th:src="${portalHost+'/img/indedImg/inded9.png'}" alt="" />
-			</a>
-			<div>
-				<img th:src="${portalHost+'/img/indedImg/inded34.jpg'}" alt="" class="active"/>
-				<img th:src="${portalHost+'/img/indedImg/inded35.jpg'}" alt="" />
-				<img th:src="${portalHost+'/img/indedImg/inded36.jpg'}" alt="" />
-			</div>
-		</div>
-		<div id="hotProject">
-			<div class="terrace_title">
-				<img th:src="${portalHost+'/img/indedImg/inded10.png'}" alt="" />
-			</div>
-			<div class="hotProject_cont" >
-				<div th:each="p,pStatus:${projects}">
-					<img th:src="${p.maxImgUrl}==null or ${p.maxImgUrl}==''?${portalHost+'/img/indedImg/inded11.png'}:${avatarUploadHost+p.maxImgUrl}" alt="">
-					<h3 th:text="${p.name}">高新认定</h3>
-					<p th:text="${p.advertisement}==null or ${p.advertisement}==''?'暂无简介':${#strings.abbreviate(p.advertisement,30)}"></p>
-					<a th:href="@{/portal/service/serviceDetail(id=${p.id})}">立即办理</a>
-				</div>
-			</div>
-		</div>
-	<div class="container">
-		<div class="RecommendTitle">
-			<h2>政策资讯</h2>
-			<span></span>
-		</div>
-		<div class="news">
-			<div class="policy">
-				<h4>政策
-					<a th:href="@{/portal/thinkTank/policyList?type=1}"><span class="line"></span><span>></span></a> 
-					
-				</h4>
-				<img th:if="${policys[0]}!=null" th:src="(${policys[0].titleImg}==null or ${policys[0].titleImg} == '')?${portalHost+'/img/index/index_new2.jpg'}:${avatarUploadHost+policys[0].titleImg}" alt="">
-				<ul>				
-					<li th:each="p,pStatus:${policys}" th:if="${pStatus.index}==0">
-						<a th:href="@{/portal/news/newsDetail(id=${p.id},type=0)}">
-							<div class="time">
-								<span th:text="${#dates.format(p.releaseDate,'MM-dd')}">03-12</span>
-								<span th:text="${#dates.format(p.releaseDate,'yyyy')}">2018</span>
-							</div>
-							<div class="newTxt">
-								<h5 th:text="${#strings.abbreviate(p.title,18)}"></h5>
-								<p th:text="${#strings.abbreviate(p.summary,65)}"></p>
-							</div>
-						</a>
-					</li>
-				</ul>
-			</div>
-			<div class="consultation">
-				<h4>资讯
-				 <a th:href="@{/portal/thinkTank/policyList?type=0}"><span class="line"></span><span>></span></a>
-				</h4>
-				<ul>
-					
-					<li th:each="n:${news}">
-						<a th:href="@{/portal/news/newsDetail(id=${n.id},type=1)}">
-							<div class="time">
-								<span th:text="${#dates.format(n.releaseDate,'MM-dd')}">03-12</span>
-								<span th:text="${#dates.format(n.releaseDate,'yyyy')}">2018</span>
-							</div>
-							<div class="newTxt">
-								<h5 th:text="${#strings.abbreviate(n.title,18)}">加奖金哦违法爱按金额积分经济积分经济积分经济if啊积分经济交往和居委会看看哇卡哇卡...</h5>
-								<p th:text="${#strings.abbreviate(n.summary,65)}">哈哈哈哈海鸥科技打飞机附近的啊我的㘝技打飞机附近的啊我的技打飞机附近的啊我的技打飞机附近的啊我的技打飞机附近的啊我的酒店设计大姐姐 但是大家觉得结算单基督教圣诞节ajd...</p>
-							</div>
-						</a>
-					</li>
-				</ul>
-			</div>
-		</div>
-		<div class="RecommendTitle">
-			<h2>技淘观点精选</h2>
-			<span></span>
-		</div>
-		<!-- <div class="view">
-			<h4>
-				<a th:href="@{/portal/thinkTank/policyList?type=99}"><span class="line"></span><span>></span></a>
-			</h4>
-		</div> -->
-		<div class="publicNumber">
-			<!-- <div class="video" >
-				<iframe frameborder="0" width="565" height="320" th:src="${videoUrl}==null?'https://v.qq.com/iframe/player.html?vid=y0721rsmr4r&tiny=0&auto=0':${videoUrl}" allowfullscreen></iframe>
-			</div> -->
-			<ul>
-				
-				<li th:each="sc:${subscription}">
-					<a th:href="@{/portal/news/newsDetail(id=${sc.id},type=1)}">
-						<div class="time">
-							<span th:text="${#dates.format(sc.releaseDate,'MM-dd')}">03-12</span>
-							<span th:text="${#dates.format(sc.releaseDate,'yyyy')}">2018</span>
-						</div>
-						<p th:text="${#strings.abbreviate(sc.title,18)}"></p>
-					</a>
-				</li>
-			</ul>
-		</div>
-		<a th:href="@{/portal/thinkTank/policyList?type=99}" class="more">MORE
-			<span></span>
-		</a>
-	</div>
-	<div class="initModel">
-		<div>
-			<span class="glyphicon glyphicon-remove"></span>
-			<a th:href="@{/portal/invitation}" class="moreActive">了解活动规则详情 >></a>
-			<a th:href="@{/user/signIn}" class="ljZhuCe">立即注册 >></a>
-		</div>
-	</div>
-	<footer>
-		<div th:replace="common::copyright"></div>
-		<div th:replace="common::login"></div>
-	</footer>
-	<div th:replace="common::footer(~{::script})">
-		<script type="text/javascript" th:src="${portalHost + '/dll/dll.js'}"></script>
-		<script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
-		<script type="text/javascript" th:src="${portalHost+'/index.js'}"></script>
-	</div>
-</body>
-
 </html>

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
src/main/webapp/WEB-INF/views/portal/technologyTrading/tradingIndex.html