anderx лет назад: 5
Родитель
Сommit
2bb9709dfc
31 измененных файлов с 1 добавлено и 3282 удалено
  1. 0 152
      src/main/java/com/goafanti/activity/bo/ActivityListBo.java
  2. 0 148
      src/main/java/com/goafanti/activity/bo/InputActivity.java
  3. 0 216
      src/main/java/com/goafanti/activity/controller/AdminActivityApiController.java
  4. 0 28
      src/main/java/com/goafanti/activity/service/ActivityService.java
  5. 0 139
      src/main/java/com/goafanti/activity/service/impl/ActivityServiceImpl.java
  6. 0 127
      src/main/java/com/goafanti/activityUser/bo/ActivityUserListBo.java
  7. 0 74
      src/main/java/com/goafanti/activityUser/controller/AdminActivityUserApiController.java
  8. 0 66
      src/main/java/com/goafanti/activityUser/controller/UserActivityUserApiController.java
  9. 0 34
      src/main/java/com/goafanti/activityUser/service/ActivityUserService.java
  10. 0 131
      src/main/java/com/goafanti/activityUser/service/impl/ActivityUserServiceImpl.java
  11. 0 6
      src/main/java/com/goafanti/app/controller/AppUserController.java
  12. 0 6
      src/main/java/com/goafanti/app/controller/OpenAppUserController.java
  13. 0 96
      src/main/java/com/goafanti/banners/controller/AdminBannersApiController.java
  14. 0 62
      src/main/java/com/goafanti/banners/enums/BannersType.java
  15. 0 71
      src/main/java/com/goafanti/banners/service/BannersService.java
  16. 1 305
      src/main/java/com/goafanti/common/controller/WebpageController.java
  17. 0 26
      src/main/java/com/goafanti/common/dao/ActivityMapper.java
  18. 0 31
      src/main/java/com/goafanti/common/dao/ActivityUserMapper.java
  19. 0 260
      src/main/java/com/goafanti/common/mapper/ActivityMapper.xml
  20. 0 86
      src/main/java/com/goafanti/common/mapper/ActivityMapperExt.xml
  21. 0 227
      src/main/java/com/goafanti/common/mapper/ActivityUserMapper.xml
  22. 0 122
      src/main/java/com/goafanti/portal/controller/PortalActivityController.java
  23. 0 90
      src/main/java/com/goafanti/portal/controller/PortalBigShotController.java
  24. 0 63
      src/main/java/com/goafanti/portal/controller/PortalFinancialController.java
  25. 0 107
      src/main/java/com/goafanti/portal/controller/PortalInterestApiController.java
  26. 0 43
      src/main/java/com/goafanti/portal/controller/PortalMemberController.java
  27. 0 181
      src/main/java/com/goafanti/portal/controller/PortalNewsController.java
  28. 0 49
      src/main/java/com/goafanti/portal/controller/PortalOrderApiController.java
  29. 0 113
      src/main/java/com/goafanti/portal/controller/PortalSearchController.java
  30. 0 135
      src/main/java/com/goafanti/portal/controller/PortalServicesController.java
  31. 0 88
      src/main/java/com/goafanti/portal/controller/PortalStarController.java

+ 0 - 152
src/main/java/com/goafanti/activity/bo/ActivityListBo.java

@@ -1,152 +0,0 @@
-package com.goafanti.activity.bo;
-
-import java.util.Date;
-
-import org.apache.commons.lang3.time.DateFormatUtils;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.annotation.JsonFormat.Shape;
-import com.goafanti.common.constant.AFTConstants;
-
-public class ActivityListBo {
-	private Long	id;
-
-	/**
-	 * 开始时间
-	 */
-	private Date	startTime;
-
-	/**
-	 * 结束时间
-	 */
-	private Date	endTime;
-
-	/**
-	 * 标题
-	 */
-	private String	name;
-
-	/**
-	 * 主办单位
-	 */
-	private String	host;
-
-	/**
-	 * 活动类型
-	 */
-	private Integer	type;
-
-	/**
-	 * 活动形式
-	 */
-	private Integer	form;
-
-	/**
-	 * 报名截止时间
-	 */
-	private Date	enrollDeadline;
-	
-	@JsonFormat(shape = Shape.STRING)
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-
-	public Date getStartTime() {
-		return startTime;
-	}
-
-	public void setStartTime(Date startTime) {
-		this.startTime = startTime;
-	}
-
-	public Date getEndTime() {
-		return endTime;
-	}
-
-	public void setEndTime(Date endTime) {
-		this.endTime = endTime;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getHost() {
-		return host;
-	}
-
-	public void setHost(String host) {
-		this.host = host;
-	}
-	
-	@JsonFormat(shape = Shape.STRING)
-	public Integer getType() {
-		return type;
-	}
-
-	public void setType(Integer type) {
-		this.type = type;
-	}
-	
-	@JsonFormat(shape = Shape.STRING)
-	public Integer getForm() {
-		return form;
-	}
-
-	public void setForm(Integer form) {
-		this.form = form;
-	}
-
-	public Date getEnrollDeadline() {
-		return enrollDeadline;
-	}
-
-	public void setEnrollDeadline(Date enrollDeadline) {
-		this.enrollDeadline = enrollDeadline;
-	}
-
-	public String getStartTimeFormattedDate() {
-		if (this.startTime == null) {
-			return null;
-		} else {
-			return DateFormatUtils.format(this.startTime, AFTConstants.YYYYMMDDHHMMSS);
-		}
-	}
-
-	public void setStartTimeFormattedDate(String startTimeFormattedDate) {
-
-	}
-
-	public String getEndTimeFormattedDate() {
-		if (this.endTime == null) {
-			return null;
-		} else {
-			return DateFormatUtils.format(this.endTime, AFTConstants.YYYYMMDDHHMMSS);
-		}
-	}
-
-	public void setEndTimeFormattedDate(String endTimeFormattedDate) {
-
-	}
-
-	public String getEnrollDeadlineFormattedDate() {
-		if (this.enrollDeadline == null) {
-			return null;
-		} else {
-			return DateFormatUtils.format(this.enrollDeadline, AFTConstants.YYYYMMDDHHMMSS);
-		}
-	}
-
-	public void setEnrollDeadlineFormattedDate(String enrollDeadlineFormattedDate) {
-
-	}
-
-}

+ 0 - 148
src/main/java/com/goafanti/activity/bo/InputActivity.java

@@ -1,148 +0,0 @@
-package com.goafanti.activity.bo;
-
-import javax.validation.constraints.Max;
-import javax.validation.constraints.Min;
-import javax.validation.constraints.Size;
-
-
-import com.goafanti.common.constant.ErrorConstants;
-
-public class InputActivity {
-	@Size(min = 0, max = 18, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String	id;
-
-	@Size(min = 0, max = 45, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String	name;
-
-	@Size(min = 0, max = 128, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String	address;
-
-	@Size(min = 0, max = 45, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String	host;
-
-	@Size(min = 0, max = 45, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String	undertake;
-
-	@Size(min = 0, max = 255, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String	asist;
-
-	@Max(value = 9, message = "{" + ErrorConstants.PARAM_ERROR + "}")
-	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
-	private Integer	type;
-
-	@Max(value = 9, message = "{" + ErrorConstants.PARAM_ERROR + "}")
-	@Min(value = 0, message = "{" + ErrorConstants.PARAM_ERROR + "}")
-	private Integer	form;
-
-	@Size(min = 0, max = 1000, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String	imgUrls;
-
-	@Size(min = 0, max = 255, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String	result;
-
-	@Size(min = 0, max = 255, message = "{" + ErrorConstants.PARAM_SIZE_ERROR + "}")
-	private String	titleUrl;
-
-	/**
-	 * 描述
-	 */
-	private String	summary;
-	
-	public String getId() {
-		return id;
-	}
-
-	public void setId(String id) {
-		this.id = id;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getAddress() {
-		return address;
-	}
-
-	public void setAddress(String address) {
-		this.address = address;
-	}
-
-	public String getHost() {
-		return host;
-	}
-
-	public void setHost(String host) {
-		this.host = host;
-	}
-
-	public String getUndertake() {
-		return undertake;
-	}
-
-	public void setUndertake(String undertake) {
-		this.undertake = undertake;
-	}
-
-	public String getAsist() {
-		return asist;
-	}
-
-	public void setAsist(String asist) {
-		this.asist = asist;
-	}
-
-	public Integer getType() {
-		return type;
-	}
-
-	public void setType(Integer type) {
-		this.type = type;
-	}
-
-	public Integer getForm() {
-		return form;
-	}
-
-	public void setForm(Integer form) {
-		this.form = form;
-	}
-
-	public String getImgUrls() {
-		return imgUrls;
-	}
-
-	public void setImgUrls(String imgUrls) {
-		this.imgUrls = imgUrls;
-	}
-
-	public String getResult() {
-		return result;
-	}
-
-	public void setResult(String result) {
-		this.result = result;
-	}
-
-	public String getTitleUrl() {
-		return titleUrl;
-	}
-
-	public void setTitleUrl(String titleUrl) {
-		this.titleUrl = titleUrl;
-	}
-
-	public String getSummary() {
-		return summary;
-	}
-
-	public void setSummary(String summary) {
-		this.summary = summary;
-	}
-	
-
-}

+ 0 - 216
src/main/java/com/goafanti/activity/controller/AdminActivityApiController.java

@@ -1,216 +0,0 @@
-package com.goafanti.activity.controller;
-
-import java.util.Arrays;
-import java.util.Calendar;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-import javax.validation.Valid;
-
-import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.BindingResult;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.goafanti.activity.bo.InputActivity;
-import com.goafanti.activity.service.ActivityService;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.BaseApiController;
-import com.goafanti.common.enums.ActivityCacheKey;
-import com.goafanti.common.enums.ActivityFields;
-import com.goafanti.common.enums.AttachmentType;
-import com.goafanti.common.model.Activity;
-import com.goafanti.common.utils.StringUtils;
-import com.goafanti.core.mybatis.JDBCIdGenerator;
-
-/**
- * 活动圈
- */
-@RestController
-@RequestMapping(value = "/api/admin/activity")
-public class AdminActivityApiController extends BaseApiController {
-	@Resource
-	private ActivityService	activityService;
-	@Autowired
-	JDBCIdGenerator			idGenerator;
-	
-	/**
-	 * 活动报名列表
-	 */
-	@RequestMapping(value = "/signUpList", method = RequestMethod.GET)
-	public Result signUpList(){
-		Result res = new Result();
-		return res;
-	}
-
-	/**
-	 * 活动列表
-	 */
-	@RequestMapping(value = "/list", method = RequestMethod.GET)
-	public Result list(String sTime, String eTime, String name, String host, Integer type, Integer form,
-			String pageSize, String pageNo) {
-		Result res = new Result();
-		Integer pNo = 1;
-		Integer pSize = 10;
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
-		}
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
-		}
-		res.setData(activityService.listActivity(sTime, eTime, name, host, type, form, pNo, pSize));
-		return res;
-	}
-
-	/**
-	 * 新增
-	 */
-	@RequestMapping(value = "/add", method = RequestMethod.POST)
-	public Result add(@Valid InputActivity ia, BindingResult bindingResult, String startTimeFormattedDate,
-			String endTimeFormattedDate, String enrollDeadlineFormattedDate) {
-		Result res = new Result();
-		if (bindingResult.hasErrors()) {
-			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
-					ActivityFields.getFieldDesc(bindingResult.getFieldError().getField())));
-			return res;
-		}
-
-		res = disposeInputActivity(res, ia, startTimeFormattedDate);
-		if (!res.getError().isEmpty()) {
-			return res;
-		}
-
-		activityService.save((Activity) res.getData(), startTimeFormattedDate, endTimeFormattedDate,
-				enrollDeadlineFormattedDate);
-		return res;
-	}
-
-	/**
-	 * 修改
-	 */
-	@RequestMapping(value = "/update", method = RequestMethod.POST)
-	public Result update(@Valid InputActivity ia, BindingResult bindingResult, String startTimeFormattedDate,
-			String endTimeFormattedDate, String enrollDeadlineFormattedDate) {
-		Result res = new Result();
-		if (bindingResult.hasErrors()) {
-			res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
-					ActivityFields.getFieldDesc(bindingResult.getFieldError().getField())));
-			return res;
-		}
-
-		if (StringUtils.isBlank(ia.getId())) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "活动ID"));
-			return res;
-		}
-
-		res = disposeInputActivity(res, ia, startTimeFormattedDate);
-		if (!res.getError().isEmpty()) {
-			return res;
-		}
-
-		activityService.update((Activity) res.getData(), startTimeFormattedDate, endTimeFormattedDate,
-				enrollDeadlineFormattedDate, Long.parseLong(ia.getId()));
-		return res;
-	}
-
-	/**
-	 * 详情
-	 */
-	@RequestMapping(value = "/detail", method = RequestMethod.GET)
-	public Result detail(Long id) {
-		Result res = new Result();
-		if (null == id) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "活动Id"));
-			return res;
-		}
-		res.setData(activityService.findActivityDetail(id));
-		return res;
-	}
-
-	/**
-	 * 删除
-	 */
-	@RequestMapping(value = "/delete", method = RequestMethod.POST)
-	public Result delete(@RequestParam(name = "ids[]", required = false) String[] ids) {
-		Result res = new Result();
-		if (ids == null || ids.length < 1) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", ""));
-		} else {
-			res.setData(activityService.batchDeleteByPrimaryKey(Arrays.asList(ids)));
-		}
-		return res;
-	}
-
-	/**
-	 * 活动图片上传
-	 */
-	@RequestMapping(value = "/upload", method = RequestMethod.POST)
-	public Result upload(HttpServletRequest req, String sign) {
-		Result res = new Result();
-		AttachmentType attachmentType = AttachmentType.getField(sign);
-		if (attachmentType == AttachmentType.ACTIVITY_TITLE_PICTURE
-				|| attachmentType == AttachmentType.ACTIVITY_CONTENT_PICTURE) {
-			Calendar c = Calendar.getInstance();
-			res.setData(handleFile(res, false, req, sign, String.valueOf(c.get(Calendar.YEAR)),
-					String.valueOf(c.get(Calendar.MONTH) + 1), idGenerator.generateId().toString()));
-		} else {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
-		}
-		return res;
-	}
-
-	/**
-	 * 清除缓存
-	 */
-	@RequestMapping(value = "/cleanCache", method = RequestMethod.POST)
-	public Result cleanCache(String cacheKey) {
-		Result res = new Result();
-		if (StringUtils.isBlank(cacheKey)) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "缓存标记"));
-			return res;
-		}
-		if (ActivityCacheKey.ACTIVITY_PORTAL_LIST_CACHE_KEY.getCode().equals(cacheKey)) {
-			activityService.cleanActivityPortalList(); // 清除门户端科技活动列表缓存
-		} else {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "缓存标记"));
-		}
-		return res;
-	}
-	
-	
-
-	private Result disposeInputActivity(Result res, InputActivity ia, String startTimeFormattedDate) {
-		if (StringUtils.isBlank(ia.getName())) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "标题"));
-			return res;
-		}
-
-		if (StringUtils.isBlank(startTimeFormattedDate)) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "活动开始时间"));
-			return res;
-		}
-
-		if (null == ia.getType()) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "活动类型"));
-			return res;
-		}
-
-		if (null == ia.getForm()) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "活动形式"));
-			return res;
-		}
-
-		if (StringUtils.isBlank(ia.getAddress())) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "活动地点"));
-			return res;
-		}
-		Activity a = new Activity();
-		BeanUtils.copyProperties(ia, a);
-		res.setData(a);
-		return res;
-	}
-}

+ 0 - 28
src/main/java/com/goafanti/activity/service/ActivityService.java

@@ -1,28 +0,0 @@
-package com.goafanti.activity.service;
-
-import java.util.List;
-
-import com.goafanti.activity.bo.ActivityListBo;
-import com.goafanti.common.model.Activity;
-import com.goafanti.core.mybatis.page.Pagination;
-
-public interface ActivityService {
-
-	Pagination<ActivityListBo> listActivity(String sTime, String eTime, String name, String host, Integer type, Integer form,
-			Integer pNo, Integer pSize);
-
-	void save(Activity a, String startTimeFormattedDate, String endTimeFormattedDate,
-			String enrollDeadlineFormattedDate);
-
-	int update(Activity data, String startTimeFormattedDate, String endTimeFormattedDate,
-			String enrollDeadlineFormattedDate, Long id);
-
-	int batchDeleteByPrimaryKey(List<String> asList);
-
-	Activity findActivityDetail(Long id);
-
-	List<Activity> findPortalList(Integer pageNo, Integer pageSize, Integer form);
-
-	void cleanActivityPortalList();
-
-}

+ 0 - 139
src/main/java/com/goafanti/activity/service/impl/ActivityServiceImpl.java

@@ -1,139 +0,0 @@
-package com.goafanti.activity.service.impl;
-
-import java.text.ParseException;
-import java.util.Calendar;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.cache.annotation.CacheEvict;
-import org.springframework.cache.annotation.Cacheable;
-import org.springframework.stereotype.Service;
-
-import com.goafanti.activity.bo.ActivityListBo;
-import com.goafanti.activity.service.ActivityService;
-import com.goafanti.common.constant.AFTConstants;
-import com.goafanti.common.dao.ActivityMapper;
-import com.goafanti.common.model.Activity;
-import com.goafanti.common.utils.DateUtils;
-import com.goafanti.common.utils.LoggerUtils;
-import com.goafanti.core.mybatis.BaseMybatisDao;
-import com.goafanti.core.mybatis.JDBCIdGenerator;
-import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.news.service.NewsService;
-
-@Service
-public class ActivityServiceImpl extends BaseMybatisDao<ActivityMapper> implements ActivityService {
-	@Autowired
-	private ActivityMapper	activityMapper;
-	@Autowired
-	private JDBCIdGenerator	idGenerator;
-	
-	private static final Logger	logger	= LoggerFactory.getLogger(NewsService.class);
-
-	@SuppressWarnings("unchecked")
-	@Override
-	public Pagination<ActivityListBo> listActivity(String sTime, String eTime, String name, String host, Integer type,
-			Integer form, Integer pNo, Integer pSize) {
-
-		Map<String, Object> params = new HashMap<>();
-
-		try {
-			params.put("sTime", StringUtils.isBlank(sTime) ? null : DateUtils.parseDate(sTime, AFTConstants.YYYYMMDDHHMMSS));
-			params.put("eTime", StringUtils.isBlank(eTime) ? null
-					: DateUtils.addDays(DateUtils.parseDate(eTime, AFTConstants.YYYYMMDDHHMMSS), 1));
-		} catch (ParseException e) {
-		}
-
-		if (StringUtils.isNotBlank(name)) {
-			params.put("name", name);
-		}
-
-		if (StringUtils.isNotBlank(host)) {
-			params.put("host", host);
-		}
-
-		if (null != type) {
-			params.put("type", type);
-		}
-
-		if (null != form) {
-			params.put("form", form);
-		}
-
-		if (pNo == null || pNo < 0) {
-			pNo = 1;
-		}
-
-		if (pSize == null || pSize < 0 || pSize > 10) {
-			pSize = 10;
-		}
-		return (Pagination<ActivityListBo>) findPage("findActivityListByPage", "findActivityCount", params, pNo, pSize);
-	}
-
-	@Override
-	public void save(Activity a, String startTimeFormattedDate, String endTimeFormattedDate,
-			String enrollDeadlineFormattedDate) {
-		Calendar now = Calendar.getInstance();
-		now.set(Calendar.MILLISECOND, 0);
-		a.setCreateTime(now.getTime());
-		a.setId(idGenerator.generateId());
-		activityMapper
-				.insert(disposeActivity(a, startTimeFormattedDate, endTimeFormattedDate, enrollDeadlineFormattedDate));
-	}
-
-	@Override
-	public int update(Activity a, String startTimeFormattedDate, String endTimeFormattedDate,
-			String enrollDeadlineFormattedDate, Long id) {
-		a.setId(id);
-		return activityMapper.updateByPrimaryKeyWithBLOBs(
-				disposeActivity(a, startTimeFormattedDate, endTimeFormattedDate, enrollDeadlineFormattedDate));
-	}
-
-	private Activity disposeActivity(Activity a, String startTimeFormattedDate, String endTimeFormattedDate,
-			String enrollDeadlineFormattedDate) {
-		try {
-			if (StringUtils.isNotBlank(startTimeFormattedDate)) {
-				a.setStartTime(DateUtils.parseDate(startTimeFormattedDate, AFTConstants.YYYYMMDDHHMMSS));
-			}
-			if (StringUtils.isNotBlank(endTimeFormattedDate)) {
-				a.setEndTime(DateUtils.parseDate(endTimeFormattedDate, AFTConstants.YYYYMMDDHHMMSS));
-			}
-			if (StringUtils.isNotBlank(enrollDeadlineFormattedDate)) {
-				a.setEnrollDeadline(DateUtils.parseDate(enrollDeadlineFormattedDate, AFTConstants.YYYYMMDDHHMMSS));
-			}
-		} catch (ParseException e) {
-		}
-		return a;
-	}
-
-	@Override
-	public int batchDeleteByPrimaryKey(List<String> id) {
-		return activityMapper.batchDeleteByPrimaryKey(id);
-	}
-
-	@Override
-	public Activity findActivityDetail(Long id) {
-		return activityMapper.selectByPrimaryKey(id);
-	}
-
-	@Cacheable(value = "ActivityPortalListCache", key = "'ActivityPortalList:Page:'+#pageNo+'Size:'+#pageSize+'Form:'+#form")
-	public List<Activity> findPortalList(Integer pageNo, Integer pageSize, Integer form) {
-		Map<String, Object> params = new HashMap<String, Object>();
-		params.put("pageSize", pageSize);
-		params.put("pageNo", pageNo);
-		params.put("form", form);
-		return activityMapper.findPortalList(params);
-	}
-
-	@CacheEvict(value = "ActivityPortalListCache", allEntries = true)
-	public void cleanActivityPortalList() {
-		LoggerUtils.debug(logger, "清除门户端科技活动列表缓存:[%s]");
-		
-	}
-
-}

+ 0 - 127
src/main/java/com/goafanti/activityUser/bo/ActivityUserListBo.java

@@ -1,127 +0,0 @@
-package com.goafanti.activityUser.bo;
-
-import java.util.Date;
-
-import org.apache.commons.lang3.time.DateFormatUtils;
-
-import com.goafanti.common.constant.AFTConstants;
-import com.goafanti.common.model.ActivityUser;
-
-public class ActivityUserListBo extends ActivityUser {
-	private String	activityName;
-
-	private Integer	number;
-
-	private String	mobile;
-
-	private String	username;
-
-	private String	unitName;
-
-	private Date	startTime;
-
-	private Date	endTime;
-
-	private Date	enrollDeadline;
-
-	public String getActivityName() {
-		return activityName;
-	}
-
-	public void setActivityName(String activityName) {
-		this.activityName = activityName;
-	}
-
-	public Integer getNumber() {
-		return number;
-	}
-
-	public void setNumber(Integer number) {
-		this.number = number;
-	}
-
-	public String getMobile() {
-		return mobile;
-	}
-
-	public void setMobile(String mobile) {
-		this.mobile = mobile;
-	}
-
-	public String getUsername() {
-		return username;
-	}
-
-	public void setUsername(String username) {
-		this.username = username;
-	}
-
-	public String getUnitName() {
-		return unitName;
-	}
-
-	public void setUnitName(String unitName) {
-		this.unitName = unitName;
-	}
-
-	public Date getStartTime() {
-		return startTime;
-	}
-
-	public void setStartTime(Date startTime) {
-		this.startTime = startTime;
-	}
-
-	public Date getEndTime() {
-		return endTime;
-	}
-
-	public void setEndTime(Date endTime) {
-		this.endTime = endTime;
-	}
-
-	public Date getEnrollDeadline() {
-		return enrollDeadline;
-	}
-
-	public void setEnrollDeadline(Date enrollDeadline) {
-		this.enrollDeadline = enrollDeadline;
-	}
-
-	public String getStartTimeFormattedDate() {
-		if (this.startTime == null) {
-			return null;
-		} else {
-			return DateFormatUtils.format(this.startTime, AFTConstants.YYYYMMDDHHMMSS);
-		}
-	}
-
-	public void setCreateTimeFormattedDate(String startTimeFormattedDate) {
-
-	}
-
-	public String getEndTimeFormattedDate() {
-		if (this.endTime == null) {
-			return null;
-		} else {
-			return DateFormatUtils.format(this.endTime, AFTConstants.YYYYMMDDHHMMSS);
-		}
-	}
-
-	public void setEndTimeFormattedDate(String endTimeFormattedDate) {
-
-	}
-	
-	public String getEnrollDeadlineFormattedDate() {
-		if (this.enrollDeadline == null) {
-			return null;
-		} else {
-			return DateFormatUtils.format(this.enrollDeadline, AFTConstants.YYYYMMDDHHMMSS);
-		}
-	}
-
-	public void setEnrollDeadlineFormattedDate(String enrollDeadlineFormattedDate) {
-
-	}
-
-}

+ 0 - 74
src/main/java/com/goafanti/activityUser/controller/AdminActivityUserApiController.java

@@ -1,74 +0,0 @@
-package com.goafanti.activityUser.controller;
-
-import javax.annotation.Resource;
-
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.goafanti.activityUser.service.ActivityUserService;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.BaseApiController;
-import com.goafanti.common.utils.StringUtils;
-
-@RestController
-@RequestMapping(value = "/api/admin/activityUser")
-public class AdminActivityUserApiController extends BaseApiController {
-	@Resource
-	private ActivityUserService activityUserService;
-
-	/**
-	 * 活动圈个人用户报名列表
-	 */
-	@RequestMapping(value = "/userList", method = RequestMethod.GET)
-	public Result activityUserList(String activityName, String mobile, String username, Integer number, String pageSize,
-			String pageNo) {
-		Result res = new Result();
-		res.setData(activityUserService.listActivityUser(activityName, mobile, username, number, getPSize(pageSize),
-				getPNo(pageNo)));
-		return res;
-	}
-
-	/**
-	 * 活动圈组织用户报名列表
-	 */
-	@RequestMapping(value = "/orgList", method = RequestMethod.GET)
-	public Result activityOrgList(String activityName, String mobile, String unitName, Integer number, String pageSize,
-			String pageNo) {
-		Result res = new Result();
-		res.setData(activityUserService.listActivityOrg(activityName, mobile, unitName, number, getPSize(pageSize),
-				getPNo(pageNo)));
-		return res;
-	}
-
-	/**
-	 * 批量删除活动报名记录
-	 */
-	@RequestMapping(value = "/delete", method = RequestMethod.POST)
-	public Result delete(String aid, String uid) {
-		Result res = new Result();
-		if (StringUtils.isBlank(aid) || StringUtils.isBlank(uid) || !StringUtils.isNumeric(aid)) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", ""));
-		} else {
-			res.setData(activityUserService.batchDeleteByPrimaryKey(Long.parseLong(aid), uid));
-		}
-		return res;
-	}
-
-	private Integer getPNo(String pageNo) {
-		Integer pNo = 1;
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
-		}
-		return pNo;
-	}
-
-	private Integer getPSize(String pageSize) {
-		Integer pSize = 10;
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
-		}
-		return pSize;
-	}
-}

+ 0 - 66
src/main/java/com/goafanti/activityUser/controller/UserActivityUserApiController.java

@@ -1,66 +0,0 @@
-package com.goafanti.activityUser.controller;
-
-import javax.annotation.Resource;
-
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.goafanti.activityUser.service.ActivityUserService;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.BaseApiController;
-import com.goafanti.common.model.ActivityUser;
-import com.goafanti.core.shiro.token.TokenManager;
-
-@RestController
-@RequestMapping(value = "/api/user/activity")
-public class UserActivityUserApiController extends BaseApiController {
-	@Resource
-	private ActivityUserService activityUserService;
-
-	/**
-	 * 报名
-	 */
-	@RequestMapping(value = "/signUp", method = RequestMethod.POST)
-	public Result signUp(Long aid) {
-		Result res = new Result();
-		if (null == aid) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "活动ID"));
-			return res;
-		}
-		ActivityUser au = activityUserService.selectByAidAndUid(aid, TokenManager.getUserId());
-		if (null == au) {
-			res.setData(activityUserService.save(aid));
-		} else {
-			res.setData(activityUserService.update(au));
-		}
-		return res;
-	}
-
-	/**
-	 * 取消报名
-	 */
-	@RequestMapping(value = "/signOff", method = RequestMethod.POST)
-	public Result signOff(Long aid) {
-		Result res = new Result();
-		if (null == aid) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "活动ID"));
-			return res;
-		}
-		return res.data(activityUserService.batchDeleteByPrimaryKey(aid, TokenManager.getUserId()));
-	}
-
-	/**
-	 * 取消报名
-	 */
-	@RequestMapping(value = "/isSigned", method = RequestMethod.GET)
-	public Result isSigned(Long aid) {
-		Result res = new Result();
-		if (null == aid) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "活动ID"));
-			return res;
-		}
-		return res.data(activityUserService.selectByAidAndUid(aid, TokenManager.getUserId()) != null);
-	}
-}

+ 0 - 34
src/main/java/com/goafanti/activityUser/service/ActivityUserService.java

@@ -1,34 +0,0 @@
-package com.goafanti.activityUser.service;
-
-import java.util.List;
-
-import org.springframework.ui.ModelMap;
-
-import com.goafanti.activityUser.bo.ActivityUserListBo;
-import com.goafanti.common.model.ActivityUser;
-import com.goafanti.common.model.ActivityUserKey;
-import com.goafanti.core.mybatis.page.Pagination;
-
-public interface ActivityUserService {
-
-	ActivityUser selectByUid(String userId);
-
-	int save(Long aid);
-
-	int update(ActivityUser au);
-
-	Pagination<ActivityUserListBo> listActivityUser(String activityName, String mobile, String username, Integer number,
-			Integer pageSize, Integer pageNo);
-
-	Pagination<ActivityUserListBo> listActivityOrg(String activityName, String mobile, String unitName, Integer number,
-			Integer pSize, Integer pNo);
-
-	ActivityUser selectByPrimaryKey(ActivityUserKey key);
-
-	ActivityUser selectByAidAndUid(Long aid, String userId);
-
-	int batchDeleteByPrimaryKey(Long aid, String uid);
-
-	List<ModelMap> selectUserActivities();
-
-}

+ 0 - 131
src/main/java/com/goafanti/activityUser/service/impl/ActivityUserServiceImpl.java

@@ -1,131 +0,0 @@
-package com.goafanti.activityUser.service.impl;
-
-import java.util.Calendar;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.ui.ModelMap;
-
-import com.goafanti.activityUser.bo.ActivityUserListBo;
-import com.goafanti.activityUser.service.ActivityUserService;
-import com.goafanti.common.dao.ActivityUserMapper;
-import com.goafanti.common.model.ActivityUser;
-import com.goafanti.common.model.ActivityUserKey;
-import com.goafanti.common.utils.StringUtils;
-import com.goafanti.core.mybatis.BaseMybatisDao;
-import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.core.shiro.token.TokenManager;
-
-@Service
-public class ActivityUserServiceImpl extends BaseMybatisDao<ActivityUserMapper> implements ActivityUserService {
-
-	@Autowired
-	private ActivityUserMapper activityUserMapper;
-
-	@Override
-	public ActivityUser selectByUid(String uid) {
-		return activityUserMapper.selectByUid(uid);
-	}
-
-	@Override
-	public int save(Long aid) {
-		ActivityUser au = new ActivityUser();
-		au.setAid(aid);
-		au.setUid(TokenManager.getUserId());
-		Calendar now = Calendar.getInstance();
-		now.set(Calendar.MILLISECOND, 0);
-		au.setCreateTime(now.getTime());
-		au.setLastUpdateTime(au.getCreateTime());
-		return activityUserMapper.insert(au);
-	}
-
-	@Override
-	public int update(ActivityUser au) {
-		Calendar now = Calendar.getInstance();
-		now.set(Calendar.MILLISECOND, 0);
-		au.setLastUpdateTime(now.getTime());
-		return activityUserMapper.updateByPrimaryKey(au);
-	}
-
-	@SuppressWarnings("unchecked")
-	@Override
-	public Pagination<ActivityUserListBo> listActivityUser(String activityName, String mobile, String username,
-			Integer number, Integer pSize, Integer pNo) {
-
-		if (pNo == null || pNo < 0) {
-			pNo = 1;
-		}
-
-		if (pSize == null || pSize < 0 || pSize > 10) {
-			pSize = 10;
-		}
-
-		return (Pagination<ActivityUserListBo>) findPage("findActivityUserListByPage", "findActivityUserCount",
-				disposeActivityList(activityName, mobile, number, username, null), pNo, pSize);
-	}
-
-	@SuppressWarnings("unchecked")
-	@Override
-	public Pagination<ActivityUserListBo> listActivityOrg(String activityName, String mobile, String unitName,
-			Integer number, Integer pSize, Integer pNo) {
-		if (pNo == null || pNo < 0) {
-			pNo = 1;
-		}
-
-		if (pSize == null || pSize < 0 || pSize > 10) {
-			pSize = 10;
-		}
-		return (Pagination<ActivityUserListBo>) findPage("findActivityOrgListByPage", "findActivityOrgCount",
-				disposeActivityList(activityName, mobile, number, null, unitName), pNo, pSize);
-	}
-
-	private Map<String, Object> disposeActivityList(String activityName, String mobile, Integer number, String username,
-			String unitName) {
-		Map<String, Object> params = new HashMap<>();
-
-		if (StringUtils.isNotBlank(mobile)) {
-			params.put("mobile", mobile);
-		}
-
-		if (null != number) {
-			params.put("number", number);
-		}
-
-		if (StringUtils.isNotBlank(activityName)) {
-			params.put("activityName", activityName);
-		}
-
-		if (StringUtils.isNotBlank(username)) {
-			params.put("username", username);
-		}
-
-		if (StringUtils.isNotBlank(unitName)) {
-			params.put("unitName", unitName);
-		}
-		return params;
-	}
-
-	@Override
-	public int batchDeleteByPrimaryKey(Long aid, String uid) {
-		return activityUserMapper.batchDeleteByPrimaryKey(aid, uid);
-	}
-
-	@Override
-	public ActivityUser selectByPrimaryKey(ActivityUserKey key) {
-		return activityUserMapper.selectByPrimaryKey(key);
-	}
-
-	@Override
-	public ActivityUser selectByAidAndUid(Long aid, String uid) {
-		return activityUserMapper.selectByAidAndUid(aid, uid);
-	}
-
-	@Override
-	public List<ModelMap> selectUserActivities() {
-		return activityUserMapper.selectUserActivities(TokenManager.getUserId());
-	}
-
-}

+ 0 - 6
src/main/java/com/goafanti/app/controller/AppUserController.java

@@ -17,8 +17,6 @@ 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.activity.service.ActivityService;
-import com.goafanti.banners.service.BannersService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
@@ -56,10 +54,6 @@ public class AppUserController extends BaseApiController {
 	@Resource
 	private EasemobUtils   easemobUtils;
 	@Resource
-	private BannersService		bannersService;
-	@Resource
-	private ActivityService		activityService;
-	@Resource
 	private NewsService			newsService;
 	@Resource
 	private DemandService		demandService;

+ 0 - 6
src/main/java/com/goafanti/app/controller/OpenAppUserController.java

@@ -6,8 +6,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
-import com.goafanti.activity.service.ActivityService;
-import com.goafanti.banners.service.BannersService;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseApiController;
@@ -30,10 +28,6 @@ public class OpenAppUserController extends BaseApiController {
 	@Resource
 	private EasemobUtils   easemobUtils;
 	@Resource
-	private BannersService		bannersService;
-	@Resource
-	private ActivityService		activityService;
-	@Resource
 	private NewsService			newsService;
 	@Resource
 	private DemandService		demandService;

+ 0 - 96
src/main/java/com/goafanti/banners/controller/AdminBannersApiController.java

@@ -1,96 +0,0 @@
-package com.goafanti.banners.controller;
-
-import java.util.Calendar;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-import javax.validation.Valid;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.util.Assert;
-import org.springframework.validation.BindingResult;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-
-import com.goafanti.banners.enums.BannersType;
-import com.goafanti.banners.service.BannersService;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.controller.BaseApiController;
-import com.goafanti.common.enums.AttachmentType;
-import com.goafanti.common.model.Banners;
-import com.goafanti.common.utils.StringUtils;
-import com.goafanti.core.mybatis.JDBCIdGenerator;
-
-@Controller
-@RequestMapping(value = "/api/admin/banners")
-public class AdminBannersApiController extends BaseApiController {
-	@Resource
-	BannersService	bannersService;
-	@Autowired
-	JDBCIdGenerator	idGenerator;
-
-	@RequestMapping(value = "/upload", method = RequestMethod.POST)
-	public Result upload(String sign, HttpServletRequest req) {
-		Assert.isTrue(StringUtils.isNotBlank(sign) && BannersType.containsType(sign), "广告图位置标示不正确。");
-		Result res = res();
-		Calendar c = Calendar.getInstance();
-		res.data(handleFile(res, false, req, AttachmentType.BANNERS_PIC.getCode(), String.valueOf(c.get(Calendar.YEAR)),
-				String.valueOf(c.get(Calendar.MONTH) + 1), idGenerator.generateId().toString()));
-		return res;
-	}
-
-	@RequestMapping(value = "/save", method = RequestMethod.POST)
-	public Result save(@Valid Banners banners, BindingResult bindingResult) {
-		Assert.notNull(banners, "广告图参数不正确");
-		Assert.isTrue(StringUtils.isNotBlank(banners.getSign()) && BannersType.containsType(banners.getSign()),
-				"广告图位置标示不正确。");
-		Assert.hasText(banners.getImgurl(), "广告图url参数不正确");
-		Assert.isTrue(!bindingResult.hasFieldErrors(),
-				bindingResult.hasFieldErrors() ? bindingResult.getFieldError().getDefaultMessage() : "");
-		Result res = res();
-		if (banners.getId() == null) {
-			banners.setId(idGenerator.generateId());
-			res.data(bannersService.insertBanner(banners));
-		} else {
-			res.data(bannersService.updateBanner(banners));
-		}
-		return res;
-	}
-
-	@RequestMapping(value = "/list", method = RequestMethod.GET)
-	public Result portalBannersList(String key, String pageNo, String pageSize) {
-		Assert.isTrue(StringUtils.isBlank(key) || BannersType.containsType(key), "广告图位置标示不正确。");
-		Integer pN = getPageNo(pageNo);
-		Integer pS = getPageSize(pageSize);
-		Map<String, Object> result = new HashMap<>();
-		result.put("list", bannersService.findBannersList(key, (pN - 1) * pS, pS));
-		result.put("total", bannersService.findBannersListCount(key));
-		return res().data(result);
-	}
-
-	@RequestMapping(value = "/delete", method = RequestMethod.POST)
-	public Result delete(String id) {
-		Assert.isTrue(StringUtils.isNumeric(id), "广告图id不正确。");
-		return res().data(bannersService.deleteBanner(Long.valueOf(id)));
-	}
-
-	@RequestMapping(value = "/clearCache", method = RequestMethod.GET)
-	public Result clearCache(String key) {
-		Assert.isTrue(StringUtils.isNotBlank(key) && BannersType.containsType(key), "广告图位置标示不正确。");
-		bannersService.cleanList(key);
-		return res().data(bannersService.findPortalBanners(key));
-	}
-
-	@RequestMapping(value = "/keys", method = RequestMethod.GET)
-	public Result portalBannersKeys() {
-		Map<String, String> types = new HashMap<>();
-		for (BannersType type : BannersType.values()) {
-			types.put(type.getKey(), type.getDesc());
-		}
-		return res().data(types);
-	}
-
-}

+ 0 - 62
src/main/java/com/goafanti/banners/enums/BannersType.java

@@ -1,62 +0,0 @@
-package com.goafanti.banners.enums;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public enum BannersType {
-	SHOU_YE("SHOU_YE", "首页广告图"),
-	JI_SHU_JIAO_YI("JI_SHU_JIAO_YI", "技术交易首页广告图"),
-	DA_KA_SHUO_1("DA_KA_SHUO_1", "大咖说头部广告图"),
-	DA_KA_SHUO_2("DA_KA_SHUO_2", "大咖说明星广告图"),
-	DA_KA_SHUO_3("DA_KA_SHUO_3", "大咖说活动广告图"),
-	KE_JI_MING_XING("KE_JI_MING_XING", "科技明星广告图"),
-	KE_JI_JIANG_TANG("KE_JI_JIANG_TANG", "科技讲堂广告图"),
-	HUO_DONG_QUAN("HUO_DONG_QUAN", "活动圈广告图"),
-	HUO_DONG_XIANG_QING("HUO_DONG_XIANG_QING", "活动详情广告图"),
-	JIAN_SHE_BING_TUAN("JIAN_SHE_BING_TUAN", "建设兵团广告图"),
-	GUO_JI_YE_WU("GUO_JI_YE_WU", "国际业务广告图"),
-	FU_WU_HUI("FU_WU_HUI", "服务汇首页广告图"),
-	GAO_QI_REN_DING("GAO_QI_REN_DING", "高企认定广告图"),
-	ZHI_SHI_CHAN_QUAN_FU_WU("ZHI_SHI_CHAN_QUAN_FU_WU", "知识产权服务广告图"),
-	ZHI_SHI_CHAN_QUAN_SHEN_QING("ZHI_SHI_CHAN_QUAN_SHEN_QING", "知识产权申请广告图"),
-	ZHUAN_LI_YUN_YING("ZHUAN_LI_YUN_YING", "专利运营广告图"),
-	ZHI_SHI_CHAN_QUAN_GUAN_BIAO("ZHI_SHI_CHAN_QUAN_GUAN_BIAO", "知识产权贯标广告图"),
-	JI_SHU_PING_GU("JI_SHU_PING_GU", "技术评估广告图"),
-	CE_YUAN_DI("CE_YUAN_DI", "策源地广告图"),
-	CHUANG_YE_QUAN("CHUANG_YE_QUAN", "创业圈广告图"),
-	APP("APP", "APP首页广告图"),
-	JIN_RONG_QUAN("JIN_RONG_QUAN", "金融圈广告图");
-
-	private String							key;
-	private String							desc;
-
-	private static Map<String, BannersType>	types	= new HashMap<String, BannersType>();
-
-	private BannersType(String code, String desc) {
-		this.key = code;
-		this.desc = desc;
-	}
-
-	static {
-		for (BannersType value : BannersType.values()) {
-			types.put(value.getKey(), value);
-		}
-	}
-
-	public static BannersType getField(String code) {
-		return types.get(code);
-	}
-
-	public static boolean containsType(String code) {
-		return types.containsKey(code);
-	}
-
-	public String getKey() {
-		return key;
-	}
-
-	public String getDesc() {
-		return desc;
-	}
-
-}

+ 0 - 71
src/main/java/com/goafanti/banners/service/BannersService.java

@@ -1,71 +0,0 @@
-package com.goafanti.banners.service;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.cache.annotation.CacheEvict;
-import org.springframework.cache.annotation.Cacheable;
-import org.springframework.stereotype.Service;
-
-import com.goafanti.common.dao.BannersMapper;
-import com.goafanti.common.model.Banners;
-import com.goafanti.common.utils.LoggerUtils;
-import com.goafanti.core.mybatis.BaseMybatisDao;
-
-@Service
-public class BannersService extends BaseMybatisDao<BannersMapper> {
-	@Autowired
-	BannersMapper				bannersMapper;
-
-	private static final Logger	logger	= LoggerFactory.getLogger(BannersService.class);
-
-	public int insertBanner(Banners banners) {
-		return bannersMapper.insertSelective(banners);
-	}
-
-	public int updateBanner(Banners banners) {
-		return bannersMapper.updateByPrimaryKeySelective(banners);
-	}
-
-	public int deleteBanner(Long id) {
-		return bannersMapper.deleteByPrimaryKey(id);
-	}
-
-	public List<Banners> findBannersList(String sign, Integer pageNo, Integer pageSize) {
-		return portalBanners(sign, pageNo, pageSize);
-	}
-	
-	public int findBannersListCount(String sign) {
-		return bannersMapper.findBannerListCount(sign);
-	}
-
-	public List<Banners> previewPortalBanners(String key) {
-		return portalBanners(key, 0, 6);
-	}
-
-	@Cacheable(value = "BannersListCache", key = "'BannersList:Key:'+#key")
-	public List<Banners> findPortalBanners(String key) {
-		return portalBanners(key, 0, 6);
-	}
-
-	private List<Banners> portalBanners(String sign, Integer pageNo, Integer pageSize) {
-		Map<String, Object> params = new HashMap<String, Object>();
-		if (StringUtils.isNotBlank(sign)) {
-			params.put("sign", sign);
-		}
-		params.put("pageSize", pageSize);
-		params.put("pageNo", pageNo);
-		return bannersMapper.findBannerList(params);
-	}
-
-	@CacheEvict(value = "BannersListCache", key = "'BannersList:Key:'+#key")
-	public void cleanList(String key) {
-		LoggerUtils.debug(logger, "清除广告图列表缓存:[%s]", key);
-	}
-
-}

+ 1 - 305
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -1,6 +1,5 @@
 package com.goafanti.common.controller;
 
-import java.util.List;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
@@ -10,15 +9,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.servlet.ModelAndView;
 
-import com.goafanti.banners.enums.BannersType;
-import com.goafanti.banners.service.BannersService;
-import com.goafanti.common.model.Banners;
-import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.demand.service.DemandService;
 import com.goafanti.user.service.OrganizationIdentityService;
 import com.goafanti.user.service.UserIdentityService;
-import com.goafanti.news.bo.NewsPortalList;
-import com.goafanti.news.enums.NewsType;
 import com.goafanti.news.service.NewsService;
 
 @Controller
@@ -28,8 +21,6 @@ public class WebpageController extends BaseController {
 	private DemandService demandService;
 
 
-	@Resource
-	private BannersService bannersService;
 
 	@Resource
 	private UserIdentityService userIdentityService;
@@ -42,75 +33,7 @@ public class WebpageController extends BaseController {
 	
 	
 
-	@RequestMapping(value = "/user/account/index", method = RequestMethod.GET)
-	public ModelAndView index(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/user/account/index");
-		return modelview;
-	}
-
-	@RequestMapping(value = "/user/account/evaluateInfo", method = RequestMethod.GET)
-	public ModelAndView evaluateInfo(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/user/account/evaluateInfo");
-		return modelview;
-	}
-
-	@RequestMapping(value = "/user/account/set", method = RequestMethod.GET)
-	public ModelAndView userSet(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/user/account/set");
-		return modelview;
-	}
-
-	@RequestMapping(value = "/user/account/achievement", method = RequestMethod.GET)
-	public ModelAndView userAchievement(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/user/account/achievement");
-		return modelview;
-	}
-
-	@RequestMapping(value = "/user/account/demand", method = RequestMethod.GET)
-	public ModelAndView userDemand(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/user/account/demand");
-		return modelview;
-	}
-
-	@RequestMapping(value = "/user/login", method = RequestMethod.GET)
-	public String userLogin(HttpServletRequest request, ModelAndView modelview) {
-		return "/user/login";
-	}
-
-	@RequestMapping(value = "/user/logout", method = RequestMethod.GET)
-	public String userLogout(HttpServletRequest request, ModelAndView modelview) {
-		TokenManager.logout();
-		//return userLogin(request, modelview);
-		return "redirect:/admin/login";
-	}
-
-	@RequestMapping(value = "/user/signIn", method = RequestMethod.GET)
-	public String userSignin(HttpServletRequest request, ModelAndView modelview) {
-		return "/user/signIn";
-	}
-
-	@RequestMapping(value = "/user/msignIn", method = RequestMethod.GET)
-	public String mSignin(HttpServletRequest request, ModelAndView modelview) {
-		return "/user/msignIn";
-	}
-
-	@RequestMapping(value = "/user/certify", method = RequestMethod.GET)
-	public ModelAndView userCertify(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/user/certify");
-		return modelview;
-	}
-
-	@RequestMapping(value = "/user/groupCertify", method = RequestMethod.GET)
-	public ModelAndView userGroupCertify(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/user/groupCertify");
-		return modelview;
-	}
-
-	@RequestMapping(value = "/user/account/services", method = RequestMethod.GET)
-	public ModelAndView userServices(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/user/account/services");
-		return modelview;
-	}
+	
 
 	@RequestMapping(value = "/admin/login", method = RequestMethod.GET)
 	public String adminLogin(HttpServletRequest request, ModelAndView modelview) {
@@ -217,233 +140,6 @@ public class WebpageController extends BaseController {
 		return modelview;
 	}
 	
-	/**
-	 * 首页
-	 */
-	@RequestMapping(value = "/portal/index", method = RequestMethod.GET)
-	public ModelAndView portalIndex(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/admin/login");
-		/*List<Banners> banners = bannersService.findPortalBanners(BannersType.SHOU_YE.getKey());
-		if (!banners.isEmpty()) {
-			modelview.addObject("banner", banners.get(0));
-		}
-		//政策
-		modelview.addObject("jtdt", newsService.findIndexNewsList(0, NewsType.JTDT.getCode(), 4));
-		//服务项目
-		/*List<BusinessProject> projectList=marketingManagementService.selectHotProject(5);
-		
-		List<MarketingManagementBo> achievementList = marketingManagementService.selectMarketList(request,
-				MarketingPage.mainAchievement.getBoothType(),MarketingPage.mainAchievement.getBoothSize());
-		List<MarketingManagementBo> demandList = marketingManagementService.selectMarketList(request,
-				MarketingPage.mainDemand.getBoothType(),MarketingPage.mainDemand.getBoothSize());
-		List<MarketingManagementBo> speciaList = marketingManagementService.selectMarketList(request,
-				MarketingPage.specialist.getBoothType(), MarketingPage.specialist.getBoothSize());
-		modelview.addObject("achievementList", achievementList);
-		modelview.addObject("demandList", demandList);
-		modelview.addObject("speciaList", speciaList);
-		modelview.addObject("projectList", projectList);*/
-		return modelview; 
-	}
-
-	@RequestMapping(value = "/portal/technologyTrading/achievement", method = RequestMethod.GET)
-	public ModelAndView portalSearchAchievement(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/technologyTrading/achievement");
-		return modelview;
-	}
-
-	@RequestMapping(value = "/portal/membership", method = RequestMethod.GET)
-	public ModelAndView membership(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/membership");
-		return modelview;
-	}
-
-	@RequestMapping(value = "/portal/technologyTrading/demand", method = RequestMethod.GET)
-	public ModelAndView portalSearchDemand(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/technologyTrading/demand");
-		return modelview;
-	}
-
-	@RequestMapping(value = "/portal/search/subscriberUser", method = RequestMethod.GET)
-	public ModelAndView portalSearchSubscriberUser(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/search/subscriberUser");
-		return modelview;
-	}
-
-	@RequestMapping(value = "/portal/search/subscriberOrg", method = RequestMethod.GET)
-	public ModelAndView portalSearchSubscriberOrg(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/search/subscriberOrg");
-		return modelview;
-	}
-
-	/**
-	 * 评估页
-	 */
-	@RequestMapping(value = "/portal/evaluation/index", method = RequestMethod.GET)
-	public ModelAndView evaluation(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/evaluation/index");
-		handleBanners(modelview, BannersType.JI_SHU_PING_GU);
-		return modelview;
-	}
-
-	/**
-	 * 服务汇
-	 */
-	@RequestMapping(value = "/portal/service/serviceIndex", method = RequestMethod.GET)
-	public ModelAndView portalServiceServiceIndex(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/service/serviceIndex");
-		handleBanners(modelview, BannersType.FU_WU_HUI);
-		return modelview;
-	}
-
-	/**
-	 * 知识产权
-	 * 
-	 * @param request
-	 * @param modelview
-	 * @return
-	 */
-	@RequestMapping(value = "/portal/service/propertyRight", method = RequestMethod.GET)
-	public ModelAndView propertyRight(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/service/propertyRight");
-		return modelview;
-	}
-
-	/**
-	 * 高企认定
-	 * 
-	 * @param request
-	 * @param modelview
-	 * @return
-	 */
-	@RequestMapping(value = "/portal/service/highTechCognizance", method = RequestMethod.GET)
-	public ModelAndView highTechCognizance(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/service/highTechCognizance");
-		return modelview;
-	}
-
-	/**
-	 * 技术交易
-	 */
-	@RequestMapping(value = "/portal/technologyTrading/index", method = RequestMethod.GET)
-	public ModelAndView portalTechnologyTradingIndex(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/technologyTrading/index");
-		handleBanners(modelview, BannersType.JI_SHU_JIAO_YI);
-		List<NewsPortalList> newsPortalList=newsService.portalNewsPolicy();		
-		modelview.addObject("newsPortalList", newsPortalList);
-		List<NewsPortalList> portalNewsQuestion=newsService.portalNewsQuestion();		
-		modelview.addObject("portalNewsQuestion", portalNewsQuestion);
-		return modelview;
-	}
-
-	/**
-	 * 
-	 * 智库咨询
-	 * 
-	 * @param request
-	 * @param modelview
-	 * @return
-	 */
-	@RequestMapping(value = "/portal/thinkTank/index", method = RequestMethod.GET)
-	public ModelAndView thinkTank(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/thinkTank/index");
-		return modelview;
-	}
-
-	/**
-	 * 政策列表
-	 * 
-	 * @return
-	 */
-	@SuppressWarnings("unchecked")
-	@RequestMapping(value = "/portal/thinkTank/policyList", method = RequestMethod.GET)
-	public ModelAndView policyList(ModelAndView modelview) {
-		modelview.setViewName("/portal/thinkTank/policyList");
-		List<NewsPortalList> newsList = (List<NewsPortalList>) newsService.portalNewsList(5, 1, null, null, null, null)
-				.getList();
-		modelview.addObject("newsList", newsList);
-		return modelview;
-	}
-
-	/**
-	 * 会员介绍
-	 * 
-	 * @param request
-	 * @param modelview
-	 * @return
-	 */
-	@RequestMapping(value = "/portal/member")
-	public ModelAndView member(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/member");
-		return modelview;
-	}
-	
-	/**
-	 *  营销管理
-	 * @param request
-	 * @param modelview
-	 * @return
-	 */
-	/*@RequestMapping(value="/admin/marketing")
-	public ModelAndView marketing(HttpServletRequest request, ModelAndView modelview){
-		modelview.setViewName("/admin/marketing");
-		return modelview;
-	}*/
-	
-	/**
-	 *  技术评估
-	 * @param request
-	 * @param modelview
-	 * @return
-	 */
-	@RequestMapping(value="/portal/technologyTrading/assessMent")
-	public ModelAndView assessMent(HttpServletRequest request, ModelAndView modelview){
-		modelview.setViewName("/portal/technologyTrading/assessMent");
-		modelview.addObject("zcfg", newsService.findIndexNewsList(0, NewsType.KJZX.getCode(), 4));
-		return modelview;
-	}
-	
-	/**
-	 *  关于我们
-	 * @param request
-	 * @param modelview
-	 * @return
-	 */
-	@RequestMapping(value="/portal/aboutUs" ,method = RequestMethod.GET)
-	public ModelAndView aboutUs(HttpServletRequest request, ModelAndView modelview){
-		modelview.setViewName("/portal/aboutUs");
-		return modelview;
-	}
-	
-	/**
-	 * 联系我们
-	 * @param request
-	 * @param modelview
-	 * @return
-	 */
-	@RequestMapping(value="/portal/contactUs"  ,method = RequestMethod.GET)
-	public ModelAndView contactUs(HttpServletRequest request, ModelAndView modelview){
-		modelview.setViewName("/portal/contactUs");
-		return modelview;
-	}
-	private void handleBanners(ModelAndView modelview, BannersType bannersType) {
-		List<Banners> banners = bannersService.findPortalBanners(bannersType.getKey());
-		if (!banners.isEmpty()) {
-			modelview.addObject("banners", banners);
-		}
-	} 
-	
-	/**
-	 * 服务-推荐
-	 * 
-	 * @param request
-	 * @param modelview
-	 * @return
-	 */
-	@RequestMapping(value = "/portal/service/recommended")
-	public ModelAndView recommended(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/service/recommended");
-		return modelview;
-	}
 	
 	@RequestMapping(value = "/admin/statistics", method = RequestMethod.GET)
 	public ModelAndView adminStatistics(HttpServletRequest request, ModelAndView modelview) {

+ 0 - 26
src/main/java/com/goafanti/common/dao/ActivityMapper.java

@@ -1,26 +0,0 @@
-package com.goafanti.common.dao;
-
-import java.util.List;
-import java.util.Map;
-
-import com.goafanti.common.model.Activity;
-
-public interface ActivityMapper {
-    int deleteByPrimaryKey(Long id);
-
-    int insert(Activity record);
-
-    int insertSelective(Activity record);
-
-    Activity selectByPrimaryKey(Long id);
-
-    int updateByPrimaryKeySelective(Activity record);
-
-    int updateByPrimaryKeyWithBLOBs(Activity record);
-
-    int updateByPrimaryKey(Activity record);
-
-	int batchDeleteByPrimaryKey(List<String> id);
-
-	List<Activity> findPortalList(Map<String, Object> params);
-}

+ 0 - 31
src/main/java/com/goafanti/common/dao/ActivityUserMapper.java

@@ -1,31 +0,0 @@
-package com.goafanti.common.dao;
-
-import java.util.List;
-
-import org.apache.ibatis.annotations.Param;
-import org.springframework.ui.ModelMap;
-
-import com.goafanti.common.model.ActivityUser;
-import com.goafanti.common.model.ActivityUserKey;
-
-public interface ActivityUserMapper {
-	int deleteByPrimaryKey(ActivityUserKey key);
-
-	int insert(ActivityUser record);
-
-	int insertSelective(ActivityUser record);
-
-	ActivityUser selectByPrimaryKey(ActivityUserKey key);
-
-	int updateByPrimaryKeySelective(ActivityUser record);
-
-	int updateByPrimaryKey(ActivityUser record);
-
-	ActivityUser selectByUid(String uid);
-
-	int batchDeleteByPrimaryKey(@Param("aid") Long aid, @Param("uid") String uid);
-
-	ActivityUser selectByAidAndUid(@Param("aid") Long aid, @Param("uid") String uid);
-
-	List<ModelMap> selectUserActivities(@Param("uid") String uid);
-}

+ 0 - 260
src/main/java/com/goafanti/common/mapper/ActivityMapper.xml

@@ -1,260 +0,0 @@
-<?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.goafanti.common.dao.ActivityMapper" >
-  <resultMap id="BaseResultMap" type="com.goafanti.common.model.Activity" >
-    <id column="id" property="id" jdbcType="BIGINT" />
-    <result column="start_time" property="startTime" jdbcType="TIMESTAMP" />
-    <result column="end_time" property="endTime" jdbcType="TIMESTAMP" />
-    <result column="name" property="name" jdbcType="VARCHAR" />
-    <result column="status" property="status" jdbcType="INTEGER" />
-    <result column="address" property="address" jdbcType="VARCHAR" />
-    <result column="host" property="host" jdbcType="VARCHAR" />
-    <result column="undertake" property="undertake" jdbcType="VARCHAR" />
-    <result column="asist" property="asist" jdbcType="VARCHAR" />
-    <result column="type" property="type" jdbcType="INTEGER" />
-    <result column="form" property="form" jdbcType="INTEGER" />
-    <result column="img_urls" property="imgUrls" jdbcType="VARCHAR" />
-    <result column="result" property="result" jdbcType="VARCHAR" />
-    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
-    <result column="enroll_deadline" property="enrollDeadline" jdbcType="TIMESTAMP" />
-    <result column="title_url" property="titleUrl" jdbcType="VARCHAR" />
-  </resultMap>
-  <resultMap id="ResultMapWithBLOBs" type="com.goafanti.common.model.Activity" extends="BaseResultMap" >
-    <result column="summary" property="summary" jdbcType="LONGVARCHAR" />
-  </resultMap>
-  <sql id="Base_Column_List" >
-    id, start_time, end_time, name, status, address, host, undertake, asist, type, form, 
-    img_urls, result, create_time, enroll_deadline, title_url
-  </sql>
-  <sql id="Blob_Column_List" >
-    summary
-  </sql>
-  <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Long" >
-    select 
-    <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
-    from activity
-    where id = #{id,jdbcType=BIGINT}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
-    delete from activity
-    where id = #{id,jdbcType=BIGINT}
-  </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.Activity" >
-    insert into activity (id, start_time, end_time, 
-      name, status, address, 
-      host, undertake, asist, 
-      type, form, img_urls, 
-      result, create_time, enroll_deadline, 
-      title_url, summary)
-    values (#{id,jdbcType=BIGINT}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, 
-      #{name,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{address,jdbcType=VARCHAR}, 
-      #{host,jdbcType=VARCHAR}, #{undertake,jdbcType=VARCHAR}, #{asist,jdbcType=VARCHAR}, 
-      #{type,jdbcType=INTEGER}, #{form,jdbcType=INTEGER}, #{imgUrls,jdbcType=VARCHAR}, 
-      #{result,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{enrollDeadline,jdbcType=TIMESTAMP}, 
-      #{titleUrl,jdbcType=VARCHAR}, #{summary,jdbcType=LONGVARCHAR})
-  </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.Activity" >
-    insert into activity
-    <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="id != null" >
-        id,
-      </if>
-      <if test="startTime != null" >
-        start_time,
-      </if>
-      <if test="endTime != null" >
-        end_time,
-      </if>
-      <if test="name != null" >
-        name,
-      </if>
-      <if test="status != null" >
-        status,
-      </if>
-      <if test="address != null" >
-        address,
-      </if>
-      <if test="host != null" >
-        host,
-      </if>
-      <if test="undertake != null" >
-        undertake,
-      </if>
-      <if test="asist != null" >
-        asist,
-      </if>
-      <if test="type != null" >
-        type,
-      </if>
-      <if test="form != null" >
-        form,
-      </if>
-      <if test="imgUrls != null" >
-        img_urls,
-      </if>
-      <if test="result != null" >
-        result,
-      </if>
-      <if test="createTime != null" >
-        create_time,
-      </if>
-      <if test="enrollDeadline != null" >
-        enroll_deadline,
-      </if>
-      <if test="titleUrl != null" >
-        title_url,
-      </if>
-      <if test="summary != null" >
-        summary,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="id != null" >
-        #{id,jdbcType=BIGINT},
-      </if>
-      <if test="startTime != null" >
-        #{startTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="endTime != null" >
-        #{endTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="name != null" >
-        #{name,jdbcType=VARCHAR},
-      </if>
-      <if test="status != null" >
-        #{status,jdbcType=INTEGER},
-      </if>
-      <if test="address != null" >
-        #{address,jdbcType=VARCHAR},
-      </if>
-      <if test="host != null" >
-        #{host,jdbcType=VARCHAR},
-      </if>
-      <if test="undertake != null" >
-        #{undertake,jdbcType=VARCHAR},
-      </if>
-      <if test="asist != null" >
-        #{asist,jdbcType=VARCHAR},
-      </if>
-      <if test="type != null" >
-        #{type,jdbcType=INTEGER},
-      </if>
-      <if test="form != null" >
-        #{form,jdbcType=INTEGER},
-      </if>
-      <if test="imgUrls != null" >
-        #{imgUrls,jdbcType=VARCHAR},
-      </if>
-      <if test="result != null" >
-        #{result,jdbcType=VARCHAR},
-      </if>
-      <if test="createTime != null" >
-        #{createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="enrollDeadline != null" >
-        #{enrollDeadline,jdbcType=TIMESTAMP},
-      </if>
-      <if test="titleUrl != null" >
-        #{titleUrl,jdbcType=VARCHAR},
-      </if>
-      <if test="summary != null" >
-        #{summary,jdbcType=LONGVARCHAR},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Activity" >
-    update activity
-    <set >
-      <if test="startTime != null" >
-        start_time = #{startTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="endTime != null" >
-        end_time = #{endTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="name != null" >
-        name = #{name,jdbcType=VARCHAR},
-      </if>
-      <if test="status != null" >
-        status = #{status,jdbcType=INTEGER},
-      </if>
-      <if test="address != null" >
-        address = #{address,jdbcType=VARCHAR},
-      </if>
-      <if test="host != null" >
-        host = #{host,jdbcType=VARCHAR},
-      </if>
-      <if test="undertake != null" >
-        undertake = #{undertake,jdbcType=VARCHAR},
-      </if>
-      <if test="asist != null" >
-        asist = #{asist,jdbcType=VARCHAR},
-      </if>
-      <if test="type != null" >
-        type = #{type,jdbcType=INTEGER},
-      </if>
-      <if test="form != null" >
-        form = #{form,jdbcType=INTEGER},
-      </if>
-      <if test="imgUrls != null" >
-        img_urls = #{imgUrls,jdbcType=VARCHAR},
-      </if>
-      <if test="result != null" >
-        result = #{result,jdbcType=VARCHAR},
-      </if>
-      <if test="createTime != null" >
-        create_time = #{createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="enrollDeadline != null" >
-        enroll_deadline = #{enrollDeadline,jdbcType=TIMESTAMP},
-      </if>
-      <if test="titleUrl != null" >
-        title_url = #{titleUrl,jdbcType=VARCHAR},
-      </if>
-      <if test="summary != null" >
-        summary = #{summary,jdbcType=LONGVARCHAR},
-      </if>
-    </set>
-    where id = #{id,jdbcType=BIGINT}
-  </update>
-  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.Activity" >
-    update activity
-    set start_time = #{startTime,jdbcType=TIMESTAMP},
-      end_time = #{endTime,jdbcType=TIMESTAMP},
-      name = #{name,jdbcType=VARCHAR},
-      status = #{status,jdbcType=INTEGER},
-      address = #{address,jdbcType=VARCHAR},
-      host = #{host,jdbcType=VARCHAR},
-      undertake = #{undertake,jdbcType=VARCHAR},
-      asist = #{asist,jdbcType=VARCHAR},
-      type = #{type,jdbcType=INTEGER},
-      form = #{form,jdbcType=INTEGER},
-      img_urls = #{imgUrls,jdbcType=VARCHAR},
-      result = #{result,jdbcType=VARCHAR},
-      create_time = #{createTime,jdbcType=TIMESTAMP},
-      enroll_deadline = #{enrollDeadline,jdbcType=TIMESTAMP},
-      title_url = #{titleUrl,jdbcType=VARCHAR},
-      summary = #{summary,jdbcType=LONGVARCHAR}
-    where id = #{id,jdbcType=BIGINT}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Activity" >
-    update activity
-    set start_time = #{startTime,jdbcType=TIMESTAMP},
-      end_time = #{endTime,jdbcType=TIMESTAMP},
-      name = #{name,jdbcType=VARCHAR},
-      status = #{status,jdbcType=INTEGER},
-      address = #{address,jdbcType=VARCHAR},
-      host = #{host,jdbcType=VARCHAR},
-      undertake = #{undertake,jdbcType=VARCHAR},
-      asist = #{asist,jdbcType=VARCHAR},
-      type = #{type,jdbcType=INTEGER},
-      form = #{form,jdbcType=INTEGER},
-      img_urls = #{imgUrls,jdbcType=VARCHAR},
-      result = #{result,jdbcType=VARCHAR},
-      create_time = #{createTime,jdbcType=TIMESTAMP},
-      enroll_deadline = #{enrollDeadline,jdbcType=TIMESTAMP},
-      title_url = #{titleUrl,jdbcType=VARCHAR}
-    where id = #{id,jdbcType=BIGINT}
-  </update>
-</mapper>

+ 0 - 86
src/main/java/com/goafanti/common/mapper/ActivityMapperExt.xml

@@ -1,86 +0,0 @@
-<?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.goafanti.common.dao.ActivityMapper">
-	<select id="findActivityListByPage" parameterType="String" resultType="com.goafanti.activity.bo.ActivityListBo">
-		select
-			id,
-			start_time as startTime,
-			end_time as endTime, 
-			name,
-			host,
-			type,
-			form,
-			enroll_deadline as enrollDeadline
-		from activity
-		where 1=1
-		<if test="sTime != null">
-			and start_time <![CDATA[ >= ]]> #{sTime,jdbcType=TIMESTAMP}
-		</if>
-		<if test="eTime != null">
-			and start_time <![CDATA[ < ]]> #{eTime,jdbcType=TIMESTAMP}
-		</if>
-		<if test="name != null">
-			and name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
-		</if>
-		<if test="host != null">
-			and host like CONCAT('%',#{host,jdbcType=VARCHAR},'%')
-		</if>
-		<if test="type != null">
-			and type = #{type,jdbcType=INTEGER}
-		</if>
-		<if test="form != null">
-			and form = #{form,jdbcType=INTEGER}
-		</if>
-		order by start_time desc
-		<if test="page_sql!=null">
-			${page_sql}
-		</if>
-	</select>
-	
-	<select id="findActivityCount" parameterType="String" resultType="java.lang.Integer">
-		select
-			count(1)
-		from activity
-		where 1=1
-		<if test="sTime != null">
-			and start_time <![CDATA[ >= ]]> #{sTime,jdbcType=TIMESTAMP}
-		</if>
-		<if test="eTime != null">
-			and start_time <![CDATA[ < ]]> #{eTime,jdbcType=TIMESTAMP}
-		</if>
-		<if test="name != null">
-			and name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
-		</if>
-		<if test="host != null">
-			and host like CONCAT('%',#{host,jdbcType=VARCHAR},'%')
-		</if>
-		<if test="type != null">
-			and type = #{type,jdbcType=INTEGER}
-		</if>
-		<if test="form != null">
-			and form = #{form,jdbcType=INTEGER}
-		</if>
-	</select>
-	
-  <delete id="batchDeleteByPrimaryKey" parameterType="java.util.List">
-  	delete
-  		from activity
-  	where id in
-  	<foreach item="item" index="index" collection="list" open="("
-			separator="," close=")">
-			#{item}
-	</foreach>
-  </delete>
-  
-  <select id="findPortalList" resultMap="BaseResultMap">
-	select
-		<include refid="Base_Column_List" />
-	from activity
-	where 1=1
-	<if test="form != null">
-		and form = #{form,jdbcType=INTEGER}
-	</if>
-	order by start_time desc
-	limit #{pageNo,jdbcType=INTEGER}, #{pageSize,jdbcType=INTEGER}
-</select>
-</mapper>

+ 0 - 227
src/main/java/com/goafanti/common/mapper/ActivityUserMapper.xml

@@ -1,227 +0,0 @@
-<?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.goafanti.common.dao.ActivityUserMapper" >
-  <resultMap id="BaseResultMap" type="com.goafanti.common.model.ActivityUser" >
-    <id column="aid" property="aid" jdbcType="BIGINT" />
-    <id column="uid" property="uid" jdbcType="VARCHAR" />
-    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
-    <result column="last_update_time" property="lastUpdateTime" jdbcType="TIMESTAMP" />
-  </resultMap>
-  <sql id="Base_Column_List" >
-    aid, uid, create_time, last_update_time
-  </sql>
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="com.goafanti.common.model.ActivityUserKey" >
-    select 
-    <include refid="Base_Column_List" />
-    from activity_user
-    where aid = #{aid,jdbcType=BIGINT}
-      and uid = #{uid,jdbcType=VARCHAR}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="com.goafanti.common.model.ActivityUserKey" >
-    delete from activity_user
-    where aid = #{aid,jdbcType=BIGINT}
-      and uid = #{uid,jdbcType=VARCHAR}
-  </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.ActivityUser" >
-    insert into activity_user (aid, uid, create_time, 
-      last_update_time)
-    values (#{aid,jdbcType=BIGINT}, #{uid,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{lastUpdateTime,jdbcType=TIMESTAMP})
-  </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.ActivityUser" >
-    insert into activity_user
-    <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="aid != null" >
-        aid,
-      </if>
-      <if test="uid != null" >
-        uid,
-      </if>
-      <if test="createTime != null" >
-        create_time,
-      </if>
-      <if test="lastUpdateTime != null" >
-        last_update_time,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="aid != null" >
-        #{aid,jdbcType=BIGINT},
-      </if>
-      <if test="uid != null" >
-        #{uid,jdbcType=VARCHAR},
-      </if>
-      <if test="createTime != null" >
-        #{createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="lastUpdateTime != null" >
-        #{lastUpdateTime,jdbcType=TIMESTAMP},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.ActivityUser" >
-    update activity_user
-    <set >
-      <if test="createTime != null" >
-        create_time = #{createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="lastUpdateTime != null" >
-        last_update_time = #{lastUpdateTime,jdbcType=TIMESTAMP},
-      </if>
-    </set>
-    where aid = #{aid,jdbcType=BIGINT}
-      and uid = #{uid,jdbcType=VARCHAR}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.ActivityUser" >
-    update activity_user
-    set create_time = #{createTime,jdbcType=TIMESTAMP},
-      last_update_time = #{lastUpdateTime,jdbcType=TIMESTAMP}
-    where aid = #{aid,jdbcType=BIGINT}
-      and uid = #{uid,jdbcType=VARCHAR}
-  </update>
-  
-  <select id="selectByUid" resultMap="BaseResultMap" parameterType="java.lang.String" >
-    select 
-    <include refid="Base_Column_List" />
-    from activity_user
-    where  uid = #{uid,jdbcType=VARCHAR}
-  </select>
-  
-  <select id="findActivityUserListByPage" parameterType="String" resultType="com.goafanti.activityUser.bo.ActivityUserListBo">
-  	select
-  		au.aid,
-  		au.uid,
-  		au.create_time as createTime,
-  		au.last_update_time as lastUpdateTime,
-  		a.name as activityName,
-  		u.number,
-  		u.mobile,
-  		ui.username,
-  		a.start_time as startTime,
-  		a.end_time as endTime,
-  		a.enroll_deadline as enrollDeadline
-  	from activity_user au
-  	left join user u on u.id = au.uid
-  	left join user_identity ui on ui.uid = au.uid
-  	left join activity a on a.id = au.aid
-  	where u.type = 0 
-  	<if test="mobile != null">
-  		and u.mobile = #{mobile,jdbcType=VARCHAR}
-  	</if>
-  	<if test="number != null">
-  		and u.number = #{number,jdbcType=INTEGER}
-  	</if>
-  	<if test="activityName != null">
-  		and a.name like CONCAT('%',#{activityName,jdbcType=VARCHAR},'%')
-  	</if>
-  	<if test="username != null">
-  		and ui.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
-  	</if>
-  	order by au.last_update_time desc
-  	<if test="page_sql!=null">
-		${page_sql}
-	</if>
-  </select>
-  
-  <select id="findActivityUserCount" parameterType="String" resultType="java.lang.Integer">
-  	select
-  		count(1)
-  	from activity_user au
-  	left join user u on u.id = au.uid
-  	left join user_identity ui on ui.uid = au.uid
-  	left join activity a on a.id = au.aid
-  	where u.type = 0 
-  	<if test="mobile != null">
-  		and u.mobile = #{mobile,jdbcType=VARCHAR}
-  	</if>
-  	<if test="number != null">
-  		and u.number = #{number,jdbcType=INTEGER}
-  	</if>
-  	<if test="activityName != null">
-  		and a.name like CONCAT('%',#{activityName,jdbcType=VARCHAR},'%')
-  	</if>
-  	<if test="username != null">
-  		and ui.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
-  	</if>
-  </select>
-  
-  <select id="findActivityOrgListByPage" parameterType="String" resultType="com.goafanti.activityUser.bo.ActivityUserListBo">
-  	select
-  		au.aid,
-  		au.uid,
-  		au.create_time as createTime,
-  		au.last_update_time as lastUpdateTime,
-  		a.name as activityName,
-  		u.number,
-  		u.mobile,
-  		oi.unit_name as unitName,
-  		a.start_time as startTime,
-  		a.end_time as endTime,
-  		a.enroll_deadline as enrollDeadline
-  	from activity_user au
-  	left join user u on u.id = au.uid
-  	left join organization_identity oi on oi.uid = au.uid
-  	left join activity a on a.id = au.aid
-  	where u.type = 1 
-  	<if test="mobile != null">
-  		and u.mobile = #{mobile,jdbcType=VARCHAR}
-  	</if>
-  	<if test="number != null">
-  		and u.number = #{number,jdbcType=INTEGER}
-  	</if>
-  	<if test="activityName != null">
-  		and a.name like CONCAT('%',#{activityName,jdbcType=VARCHAR},'%')
-  	</if>
-  	<if test="unitName != null">
-  		and oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
-  	</if>
-  	order by au.last_update_time desc
-  	<if test="page_sql!=null">
-		${page_sql}
-	</if>
-  </select>
-  
-  <select id="findActivityOrgCount" parameterType="String" resultType="java.lang.Integer">
-  	select
-  		count(1)
-  	from activity_user au
-  	left join user u on u.id = au.uid
-  	left join organization_identity oi on oi.uid = au.uid
-  	left join activity a on a.id = au.aid
-  	where u.type = 1 
-  	<if test="mobile != null">
-  		and u.mobile = #{mobile,jdbcType=VARCHAR}
-  	</if>
-  	<if test="number != null">
-  		and u.number = #{number,jdbcType=INTEGER}
-  	</if>
-  	<if test="activityName != null">
-  		and a.name like CONCAT('%',#{activityName,jdbcType=VARCHAR},'%')
-  	</if>
-  	<if test="unitName != null">
-  		and oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
-  	</if>
-  </select>
-  
-  <delete id="batchDeleteByPrimaryKey">
-  	delete
-  		from activity_user
-  	where aid = #{aid,jdbcType=BIGINT}
-      and uid = #{uid,jdbcType=VARCHAR}
-  </delete>
-  
-  <select id="selectByAidAndUid" resultMap="BaseResultMap" >
-    select 
-    <include refid="Base_Column_List" />
-    from activity_user
-    where aid = #{aid,jdbcType=BIGINT}
-      and uid = #{uid,jdbcType=VARCHAR}
-  </select>
-  <select id="selectUserActivities" resultType="org.springframework.ui.ModelMap">
-	select au.aid as aid, au.uid as uid, a.name as name,a.start_time as startTime, a.end_time as endTime, a.enroll_deadline as enrollDeadline
-    from activity_user au
-    left join activity a on au.aid=a.id
-    where uid = #{uid,jdbcType=VARCHAR}
-    order by au.create_time desc
-  </select>
-</mapper>

+ 0 - 122
src/main/java/com/goafanti/portal/controller/PortalActivityController.java

@@ -1,122 +0,0 @@
-package com.goafanti.portal.controller;
-
-import java.util.List;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.servlet.ModelAndView;
-
-import com.goafanti.activity.service.ActivityService;
-import com.goafanti.banners.enums.BannersType;
-import com.goafanti.banners.service.BannersService;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.BaseController;
-import com.goafanti.common.model.Banners;
-import com.goafanti.common.utils.StringUtils;
-
-@Controller
-public class PortalActivityController extends BaseController {
-	@Resource
-	private ActivityService	activityService;
-	@Resource
-	private BannersService	bannersService;
-
-	/**
-	 * 活动圈
-	 */
-	@RequestMapping(value = "/portal/activity/activityIndex", method = RequestMethod.GET)
-	public ModelAndView portalActivityActivityIndex(HttpServletRequest request, ModelAndView modelview,
-			String noCache) {
-		modelview.setViewName("/portal/activity/activityIndex");
-		if (StringUtils.equals(noCache, "clear")) {
-			activityService.cleanActivityPortalList();
-		}
-		modelview.addObject("activityList", activityService.findPortalList(0, 3, null));
-		handleBanners(modelview, BannersType.HUO_DONG_QUAN);
-		return modelview;
-	}
-
-	/**
-	 * 活动详情
-	 */
-	@RequestMapping(value = "/portal/activity/details", method = RequestMethod.GET)
-	public ModelAndView portalActivityDetails(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/activity/details");
-		handleBanners(modelview, BannersType.HUO_DONG_XIANG_QING);
-		return modelview;
-	}
-	
-	/**
-	 * 活动详情列表
-	 */
-	@RequestMapping(value = "/portal/activity/activityList", method = RequestMethod.GET)
-	public ModelAndView portalActivityList(HttpServletRequest request, ModelAndView modelview){
-		modelview.setViewName("/portal/activity/activityList");
-		return modelview;
-	}
-	
-	/**
-	 * 活动列表
-	 */
-	@RequestMapping(value = "/portal/activity/list", method = RequestMethod.GET)
-	@ResponseBody
-	public Result portalActivityList(String pageSize, String pageNo, Integer form, String noCache){
-		Result res = new Result();
-		if (StringUtils.equals(noCache, "clear")) {
-			activityService.cleanActivityPortalList();
-		}
-		
-		Integer pN = getPageNo(pageNo);
-		Integer pS = getPageSize(pageSize);
-		res.setData(activityService.findPortalList((pN - 1) * pS, pS, form));
-		return res;
-	}
-	
-	/**
-	 * 活动详情info
-	 */
-	@RequestMapping(value = "/portal/activity/detailInfo", method = RequestMethod.GET)
-	@ResponseBody
-	public Result portalActivityDetail(String id){
-		Result res = new Result();
-		if (StringUtils.isBlank(id)){
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "活动ID"));
-			return res;
-		}
-		if (!StringUtils.isNumeric(id)){
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "活动ID"));
-			return res;
-		}
-		res.setData(activityService.findActivityDetail(Long.parseLong(id)));
-		return res;
-	}
-
-	private void handleBanners(ModelAndView modelview, BannersType bannersType) {
-		List<Banners> banners = bannersService.findPortalBanners(bannersType.getKey());
-		if (!banners.isEmpty()) {
-			modelview.addObject("banners", banners);
-		}
-	}
-	
-	private Integer getPageNo(String pageNo){
-		if (StringUtils.isNumeric(pageNo)) {
-			Integer pn = Integer.parseInt(pageNo);
-			return pn < 1 ? 1 : pn;
-		}
-		return 1;
-	}
-	
-	private Integer getPageSize(String pageSize){
-		if (StringUtils.isNumeric(pageSize)) {
-			Integer ps = Integer.parseInt(pageSize);
-			return ps > 50 ? 50 : (ps < 5 ? 5 : ps);
-		}
-		return 5;
-	}
-}

+ 0 - 90
src/main/java/com/goafanti/portal/controller/PortalBigShotController.java

@@ -1,90 +0,0 @@
-package com.goafanti.portal.controller;
-
-import java.util.List;
-
-import javax.annotation.Resource;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.servlet.ModelAndView;
-
-import com.goafanti.banners.enums.BannersType;
-import com.goafanti.banners.service.BannersService;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.constant.AFTConstants;
-import com.goafanti.common.controller.BaseController;
-import com.goafanti.common.model.Banners;
-import com.goafanti.common.model.User;
-import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.star.bo.BigShotStarListBo;
-import com.goafanti.star.service.StarService;
-import com.goafanti.user.service.UserInterestService;
-
-/**
- * 大咖说
- */
-@Controller
-public class PortalBigShotController extends BaseController {
-	@Resource
-	private StarService					starService;
-	@Resource
-	private UserInterestService			userInterestService;
-	@Resource
-	private BannersService				bannersService;
-
-	@RequestMapping(value = "/portal/scienceTechnology/bigShot", method = RequestMethod.GET)
-	public ModelAndView bigShot() {
-		ModelAndView mv = new ModelAndView();
-		List<BigShotStarListBo> starList = starService.listBigShotStar(AFTConstants.BIG_SHOT_STAR_CACHE_KEY);
-		if (null != starList && starList.size() > 0) {
-			for (BigShotStarListBo bo : starList) {
-				if (StringUtils.isNotBlank(bo.getUid())) {
-					bo.setFansNum(userInterestService.countByToUid(bo.getUid()));
-				}
-				if (StringUtils.isNotBlank(bo.getEngagedField())) {
-					String engagedField = "";
-					String[] arr = bo.getEngagedField().split(",|,");
-					if (null != arr && arr.length > 0) {
-						for (String s : arr) {
-							if (StringUtils.isNumeric(s)) {
-								/*engagedField += engagedFieldGlossoryService.selectByPrimaryKey(Integer.parseInt(s))
-										.getName();*/
-							}
-						}
-					}
-					bo.setEngagedField(engagedField);
-				}
-			}
-			mv.addObject("starList", starList);
-		}
-		handleBanners(mv, BannersType.DA_KA_SHUO_1, "banners");
-		handleBanners(mv, BannersType.DA_KA_SHUO_2, "starBanners");
-		handleBanners(mv, BannersType.DA_KA_SHUO_3, "actBanners");
-		mv.setViewName("/portal/scienceTechnology/bigShot");
-		return mv;
-	}
-
-	/**
-	 * 关注状态
-	 */
-	@RequestMapping(value = "/portal/scienceTechnology/bigShot/interestStatus", method = RequestMethod.GET)
-	@ResponseBody
-	public Result interestStatus() {
-		Result res = new Result();
-		if (TokenManager.getToken() instanceof User) {
-			res.setData(starService.findBigShotInterestStatus(TokenManager.getUserId()));
-		}
-		return res;
-	}
-
-	private void handleBanners(ModelAndView modelview, BannersType bannersType, String name) {
-		List<Banners> banners = bannersService.findPortalBanners(bannersType.getKey());
-		if (!banners.isEmpty()) {
-			modelview.addObject(name, banners);
-		}
-	}
-
-}

+ 0 - 63
src/main/java/com/goafanti/portal/controller/PortalFinancialController.java

@@ -1,63 +0,0 @@
-package com.goafanti.portal.controller;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.servlet.ModelAndView;
-
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.controller.BaseController;
-import com.goafanti.user.bo.OrgPartnerDetailBo;
-
-/**
- * 
- * @author Administrator
- *	科技金融
- */
-@Controller
-public class PortalFinancialController extends BaseController{
-
-	/**
-	 * 金融机构查询 
-	 * @return
-	 */
-	@RequestMapping(value = "/portal/financial/search", method = RequestMethod.GET)
-	@ResponseBody
-	public Result financialSearch(Integer provinceId,String keyword,Integer pageSize,Integer pageNo){
-		pageSize = pageSize == null ? 10 : pageSize;
-		pageNo = pageNo == null ? 10 : pageNo;
-		Result result = new Result();
-		
-		return result;
-	}
-	
-	/**
-	 * 金融机构详情
-	 * @param organizationId
-	 * @return
-	 */
-	@RequestMapping(value = "/portal/financial/investmentDetail", method = RequestMethod.GET)
-	public ModelAndView investmentDetail(String organizationId){
-		ModelAndView mv = new ModelAndView();
-		OrgPartnerDetailBo bo=new OrgPartnerDetailBo();
-		mv.setViewName("/portal/financial/investmentDetail");
-		List<OrgPartnerDetailBo> list = new ArrayList<OrgPartnerDetailBo>();
-		mv.addObject("bo",bo);
-		mv.addObject("recommendCompanyList",list);
-		return mv;
-	}
-	@RequestMapping(value = "/portal/financial/investmentInstitution", method = RequestMethod.GET)
-	public ModelAndView investmentInstitution(String organizationId){
-		ModelAndView mv = new ModelAndView();
-		OrgPartnerDetailBo bo=new OrgPartnerDetailBo();
-		mv.setViewName("/portal/financial/investmentInstitution");
-		List<OrgPartnerDetailBo> list = new ArrayList<OrgPartnerDetailBo>();
-		mv.addObject("bo",bo);
-		mv.addObject("recommendCompanyList",list);
-		return mv;
-	}
-}

+ 0 - 107
src/main/java/com/goafanti/portal/controller/PortalInterestApiController.java

@@ -1,107 +0,0 @@
-package com.goafanti.portal.controller;
-
-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.goafanti.common.bo.Result;
-import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.CertifyApiController;
-import com.goafanti.common.enums.DeleteStatus;
-import com.goafanti.common.enums.DemandAuditStatus;
-import com.goafanti.common.enums.DemandReleaseStatus;
-import com.goafanti.common.model.Demand;
-import com.goafanti.common.model.DemandInterest;
-import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.demand.service.DemandInterestService;
-import com.goafanti.demand.service.DemandService;
-
-@RestController
-@RequestMapping(value = "/api/user/portal")
-public class PortalInterestApiController extends CertifyApiController{
-	@Resource
-	private DemandService				demandService;
-	@Resource
-	private DemandInterestService		demandInterestService;
-	
-	/**
-	 * 科技需求"感兴趣列表"
-	 */
-	@RequestMapping(value = "/demandInterestList", method = RequestMethod.GET)
-	public Result demandInterestList(String pageNo, String pageSize){
-		Result res = new Result();
-		Integer pNo = 1;
-		Integer pSize = 10;
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
-		}
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
-		}
-		res.setData(demandInterestService.listDemandInterest(pNo, pSize));
-		return res;
-	}
-
-
-	/**
-	 * 科技需求取消关注
-	 * 
-	 */
-	@RequestMapping(value = "/demandCancelInterest", method = RequestMethod.POST)
-	public Result demandCancelInterest(String id) {
-		Result res = new Result();
-		if (StringUtils.isBlank(id)) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求ID", "需求ID"));
-			return res;
-		}
-		res.setData(demandInterestService.saveCancelDemandInterest(id));
-		return res;
-	}
-
-	/**
-	 * 科技需求关注
-	 */
-	@RequestMapping(value = "/demandInterest", method = RequestMethod.POST)
-	public Result demandInterest(String id) {
-		Result res = new Result();
-		if (StringUtils.isBlank(id)) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求ID", "需求ID"));
-			return res;
-		}
-
-		DemandInterest di = demandInterestService.selectDemandInterestByUidAndDemandId(TokenManager.getUserId(), id);
-		if (null != di) {
-			res.getError().add(buildError("", "当前科技需求已关注!"));
-			return res;
-		}
-		Demand d = demandService.selectByPrimaryKey(id);
-		if (null == d || d.getDeletedSign().equals(DeleteStatus.DELETED.getCode())
-				|| !d.getAuditStatus().equals(DemandAuditStatus.AUDITED.getCode())
-				|| !d.getReleaseStatus().equals(DemandReleaseStatus.RELEASED.getCode())) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "需求ID"));
-			return res;
-		}
-		res.setData(demandInterestService.saveAchievementInterest(id));
-		return res;
-	}
-
-
-
-	/**
-	 * 科技需求详情
-	 */
-	@RequestMapping(value = "/demandDetail", method = RequestMethod.GET)
-	public Result demandDetail(String id) {
-		Result res = new Result();
-		if (StringUtils.isBlank(id)) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到需求ID", "需求ID"));
-			return res;
-		}
-		res.setData(demandService.selectDemandSearchDetail(TokenManager.getUserId(), id));
-		return res;
-	}
-
-}

+ 0 - 43
src/main/java/com/goafanti/portal/controller/PortalMemberController.java

@@ -1,43 +0,0 @@
-package com.goafanti.portal.controller;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-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.JSON;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.controller.BaseApiController;
-import com.goafanti.member.bo.MemberGrade;
-import com.goafanti.member.bo.MemberGradeBO;
-import com.goafanti.member.service.MemberGradeService;
-/**
- * 不用登录查询
- * @author Administrator
- *
- */
-@RestController
-@RequestMapping(value = "/api/portal/member")
-public class PortalMemberController extends BaseApiController {
-	@Autowired
-	private MemberGradeService memberGradeService;
-
-	/**
-	 * 查询等级
-	 * 
-	 * @return
-	 */
-	@RequestMapping(value = "/selectMemberGradeFr", method = RequestMethod.GET)
-	public Result selectMemberGradeFr() {
-		List<MemberGrade> list = memberGradeService.selectMemberGrade();
-		List<MemberGradeBO> result = new ArrayList<>();
-		for (MemberGrade mg : list) {
-			result.add(new MemberGradeBO(mg.getId(), mg.getGradeName(), JSON.parseObject(mg.getBusiness()),
-					JSON.parseObject(mg.getCost()), mg.getMemberRank()));
-		}
-		return res().data(result);
-	}
-}

+ 0 - 181
src/main/java/com/goafanti/portal/controller/PortalNewsController.java

@@ -1,181 +0,0 @@
-package com.goafanti.portal.controller;
-
-import java.util.List;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang3.time.DateFormatUtils;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.servlet.ModelAndView;
-
-import com.goafanti.app.bo.ProjectDetailBo;
-import com.goafanti.banners.enums.BannersType;
-import com.goafanti.banners.service.BannersService;
-import com.goafanti.business.service.BusinessProjectService;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.constant.AFTConstants;
-import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.BaseController;
-import com.goafanti.common.model.Banners;
-import com.goafanti.common.model.News;
-import com.goafanti.common.utils.StringUtils;
-import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.news.bo.NewsPortalList;
-import com.goafanti.news.enums.NewsType;
-import com.goafanti.news.service.NewsService;
-
-@Controller
-public class PortalNewsController extends BaseController {
-	@Resource
-	NewsService				newsService;
-	@Resource
-	private BannersService	bannersService;
-	@Resource
-	private BusinessProjectService	businessProjectService;
-	/**
-	 * 策源地
-	 * 
-	 * @param request
-	 * @param modelview
-	 * @return
-	 */
-	@RequestMapping(value = "/portal/news/newsIndex", method = RequestMethod.GET)
-	public ModelAndView portalNewsNewsIndex(HttpServletRequest request, ModelAndView modelview, String noCache) {
-		modelview.setViewName("/portal/news/newsIndex");
-		if (StringUtils.equals(noCache, "clear")) {
-			newsService.cleanList();
-		}
-		String domainName = request.getServerName();
-		modelview.addObject("kjkx", newsService.findNewsList(0, NewsType.KJZX.getCode(), 2, domainName, false));
-		modelview.addObject("jtdt", newsService.findNewsList(0, NewsType.JTDT.getCode(), 2, domainName, false));
-		modelview.addObject("zfwl", newsService.findNewsList(0, NewsType.ZFWL.getCode(), 3, domainName, false));
-		modelview.addObject("gjzc", newsService.findNewsList(0, NewsType.GJZC.getCode(), 3, domainName, false));
-		modelview.addObject("dfzc", newsService.findNewsList(0, NewsType.DFZC.getCode(), 3, domainName, false));
-		handleBanners(modelview, BannersType.CE_YUAN_DI);
-		return modelview;
-	}
-
-	/**
-	 * 新闻详情
-	 */
-	@RequestMapping(value = "/portal/news/newsDetails", method = RequestMethod.GET)
-	public ModelAndView portalNewsNewsDetails(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/news/newsDetails");
-		return modelview;
-	}
-
-	/**
-	 * 新闻详情APP
-	 */
-	@RequestMapping(value = "/portal/news/newsDetailApp", method = RequestMethod.GET)
-	public ModelAndView portalNewsNewsDetailApp(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/news/newsDetailApp");
-		return modelview;
-	}
-
-	/**
-	 * 新闻详情列表
-	 */
-	@RequestMapping(value = "/portal/news/list", method = RequestMethod.GET)
-	@ResponseBody
-	public Result portalNewsList(Integer type, String pageSize, String pageNo, Integer hot, Integer provinceId,
-			String keyword) {
-		Result res = new Result();
-		Integer pNo = 1, pSize = 4;
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
-		}
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
-		}
-		res.setData(newsService.portalNewsList(pSize, pNo, type, hot, provinceId, keyword));
-		return res;
-	}
-
-	/**
-	 * 新闻详情
-	 */
-	@RequestMapping(value = "/portal/news/detailInfo", method = RequestMethod.GET)
-	@ResponseBody
-	public Result portalNewsDetail(Long id) {
-		Result res = new Result();
-		if (null == id) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "新闻ID"));
-			return res;
-		}
-
-		/* newsService.portalNewsList(6,1, type,hot,provinceId,keyword) */
-
-		res.setData(newsService.findNewsDetail(id));
-		return res;
-	}
-
-	@RequestMapping(value = "/portal/news/newsDetail", method = RequestMethod.GET)
-	public ModelAndView portalHighTechEvaluateIprInfo(HttpServletRequest request, ModelAndView modelview, Long id) {
-		modelview.setViewName("/portal/news/newsDetail");
-		Pagination<NewsPortalList> newsList = newsService.portalNewsList(6, 1, 5, null, null, null);
-		News newsDetail = newsService.findNewsDetail(id);
-		Object news = newsList.getList().get(0);
-		if (null != newsDetail) {
-			newsDetail.setCreateTimeS(newsDetail.getCreateTime() != null
-					? DateFormatUtils.format(newsDetail.getCreateTime(), AFTConstants.MMDDYYYY) : "");
-			String summary = newsDetail.getSummary();
-			modelview.addObject("hasHighTech",
-					summary != null && (summary.indexOf("高新") > -1 || summary.indexOf("高企") > -1));
-			modelview.addObject("hasPatent",
-					summary != null && (summary.indexOf("专利") > -1 || summary.indexOf("知识产权") > -1));
-			modelview.addObject("hasCopyright",
-					summary != null && (summary.indexOf("软著") > -1 || summary.indexOf("知识产权") > -1));
-			modelview.addObject("hasTechProj",
-					summary != null && (summary.indexOf("科技") > -1 || summary.indexOf("项目") > -1));
-		}
-		@SuppressWarnings("unchecked")
-		List<NewsPortalList> la = (List<NewsPortalList>) newsList.getList();
-		for (NewsPortalList n : la) {
-			String createTimeFormattedDate = n.getCreateTimeFormattedDate();
-			n.setDataS(createTimeFormattedDate);
-		}
-		modelview.addObject("newsDetail", newsDetail);
-		modelview.addObject("newsList", newsList.getList());
-		modelview.addObject("news", news);
-		return modelview;
-	}
-
-	private void handleBanners(ModelAndView modelview, BannersType bannersType) {
-		List<Banners> banners = bannersService.findPortalBanners(bannersType.getKey());
-		if (!banners.isEmpty()) {
-			modelview.addObject("banners", banners);
-		}
-	}
-
-	/**
-	 * 高新认定APP
-	 */
-	@RequestMapping(value = "/portal/news/appCognizance", method = RequestMethod.GET)
-	public ModelAndView appCognizance(HttpServletRequest request, ModelAndView modelview,String id) {
-		ProjectDetailBo bo = businessProjectService.orgProject(id);
-		if (StringUtils.isNotBlank(bo.getIntroduce())) 
-			bo.setIntroduce(bo.getIntroduce().replace("\n", "</br>"));
-		if (StringUtils.isNotBlank(bo.getValueEffect())) 
-		bo.setValueEffect(bo.getValueEffect().replace("\n", "</br>"));
-		if (StringUtils.isNotBlank(bo.getClientSize())) 
-		bo.setClientSize(bo.getClientSize().replace("\n", "</br>"));
-		modelview.addObject("bo", bo);
-		modelview.setViewName("/portal/news/appCognizance");
-		return modelview;
-	}
-	
-	/**
-	 * APP注册协议
-	 */
-	@RequestMapping(value = "/portal/news/agreement", method = RequestMethod.GET)
-	public ModelAndView agreement(HttpServletRequest request, ModelAndView modelview) {
-		modelview.setViewName("/portal/news/agreement");
-		return modelview;
-	}
-	
-}

+ 0 - 49
src/main/java/com/goafanti/portal/controller/PortalOrderApiController.java

@@ -1,49 +0,0 @@
-package com.goafanti.portal.controller;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-import com.goafanti.activityUser.service.ActivityUserService;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.CertifyApiController;
-import com.goafanti.common.enums.AttachmentType;
-import com.goafanti.core.shiro.token.TokenManager;
-
-@RestController
-@RequestMapping(value = "/api/user/portal/order")
-public class PortalOrderApiController extends CertifyApiController {
-	
-	@Resource
-	private ActivityUserService			activityUserService;
-
-	@RequestMapping(value = "/activity", method = RequestMethod.GET)
-	public Result getUserActivityList() {
-		return res().data(activityUserService.selectUserActivities());
-	}
-
-
-	/**
-	 * 附件上传
-	 */
-	@RequestMapping(value = "/demandUpload", method = RequestMethod.POST)
-	public Result uploadTextFile(HttpServletRequest req, String sign) {
-		Result res = new Result();
-
-		AttachmentType attachmentType = AttachmentType.getField(sign);
-
-		if (attachmentType == AttachmentType.DEMAND_ORDER_FILE) {
-			res.setData(handleFiles(res, "/demandOrder/", false, req, sign, TokenManager.getUserId()));
-		} else {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
-		}
-		return res;
-	}
-
-
-
-	
-
-}

+ 0 - 113
src/main/java/com/goafanti/portal/controller/PortalSearchController.java

@@ -1,113 +0,0 @@
-package com.goafanti.portal.controller;
-
-import java.math.BigDecimal;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletRequest;
-
-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.goafanti.common.bo.Result;
-import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.BaseController;
-import com.goafanti.common.enums.DemandPortalSearchSignType;
-import com.goafanti.common.enums.UserLevel;
-import com.goafanti.common.enums.UserType;
-import com.goafanti.demand.service.DemandService;
-import com.goafanti.user.service.OrganizationIdentityService;
-import com.goafanti.user.service.UserIdentityService;
-
-@RestController
-@RequestMapping(value = "/portal/search")
-public class PortalSearchController extends BaseController {
-	@Resource
-	private DemandService				demandService;
-	@Resource
-	private UserIdentityService			userIdentityService;
-	@Resource
-	private OrganizationIdentityService	organizationIdentityService;
-
-	
-
-	/**
-	 * 科技需求搜索
-	 */
-	@RequestMapping(value = "/demandList", method = RequestMethod.GET)
-	public Result demandSearchList(HttpServletRequest req,Integer sign, String keyword, Integer industryCategoryA, Integer industryCategoryB,
-			Integer demandType, BigDecimal budgetCostLower, BigDecimal budgetCostUpper, String pageNo,
-			String pageSize,Integer dateSort) {
-		Result res = new Result();
-		String url=req.getServerName();
-		url=url.substring(url.indexOf(".")+1, url.length());
-		Integer pNo = 1;
-		Integer pSize = 10;
-		if (null == sign) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "查询标记"));
-			return res;
-		}
-
-		if (!DemandPortalSearchSignType.ALL.getCode().equals(sign)
-				&& !DemandPortalSearchSignType.NEGOATION.getCode().equals(sign)) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "查询标记"));
-			return res;
-		}
-		if (null==dateSort) {
-			dateSort=0;
-		}
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
-		}
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
-		}
-		res.setData(demandService.listDemandSearchList(url,sign, keyword, industryCategoryA, industryCategoryB, demandType,
-				budgetCostLower, budgetCostUpper, pNo, pSize,dateSort));
-		return res;
-	}
-
-	/**
-	 * 用户搜索
-	 */
-	@RequestMapping(value = "/subscriberList", method = RequestMethod.GET)
-	public Result subscriberSearchList(HttpServletRequest req,String name, Integer level, Integer type, String field, Integer province,
-			Integer city, Integer area,Integer international, String pageNo, String pageSize) {
-		Result res = new Result();
-		String url=req.getServerName();
-		url=url.substring(url.indexOf(".")+1, url.length());
-		if (null == type) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "用户类型"));
-			return res;
-		}
-
-		if (!UserType.PERSONAL.getCode().equals(type) && !UserType.ORGANIZATION.getCode().equals(type)) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "用户类型"));
-			return res;
-		}
-
-		if (null != level && !UserLevel.GENERAL.getCode().equals(level)
-				&& !UserLevel.CERTIFIED.getCode().equals(level)) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "用户认证标记"));
-			return res;
-		}
-		Integer pNo = 1;
-		Integer pSize = 12;
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
-		}
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
-		}
-		if (UserType.PERSONAL.getCode().equals(type)) {
-			res.setData(userIdentityService.listSubscriber(url,name, level, field, province, city, area, international, pNo, pSize));
-		} else {
-			res.setData(organizationIdentityService.listSubscriber(url,name, level, field, province, city, area, pNo, pSize));
-		}
-		return res;
-	}
-	
-	
-	
-}

+ 0 - 135
src/main/java/com/goafanti/portal/controller/PortalServicesController.java

@@ -1,135 +0,0 @@
-package com.goafanti.portal.controller;
-
-
-
-import java.text.ParseException;
-
-import javax.annotation.Resource;
-
-
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.goafanti.business.service.BusinessProjectService;
-import com.goafanti.business.service.BusinessVarietiesService;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.BaseController;
-import com.goafanti.common.utils.StringUtils;
-import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.order.service.OrderService;
-import com.goafanti.user.service.UserIdentityService;
-
-@RestController
-@RequestMapping(value = "/portal/app/services")
-public class PortalServicesController extends BaseController {
-	@Resource
-	BusinessProjectService	businessProjectService;
-	@Resource
-	UserIdentityService	userIdentityService;
-	@Resource
-	BusinessVarietiesService	businessVarietiesService;
-	@Resource
-	OrderService	orderService;
-	
-	
-	
-	
-	
-	/**
-	 * 推荐列表
-	 */
-	@RequestMapping(value = "/recommend", method = RequestMethod.GET)
-	public Result recommendProjectList(Integer pNo,Integer pSize) {
-		Result res = new Result();
-		res.setData(businessProjectService.portalRecommendList( pNo, pSize));
-		return res;
-	}
-	
-	/**
-	 * 一对一
-	 */
-	@RequestMapping(value = "/consultant", method = RequestMethod.GET)
-	public Result consultantList(Integer pNo,Integer pSize) {
-		Result res = new Result();
-		res.setData(userIdentityService.portalConsultantList( pNo, pSize));
-		return res;
-	}
-	
-	/**
-	 * 获取初级品类
-	 */
-	@RequestMapping(value = "/portal/services/varieties", method = RequestMethod.GET)
-	public Result getVarieties() {
-		Result res = new Result();
-		res.setData(businessVarietiesService.portalVarieties());
-		return res;
-	}
-	
-	/**
-	 * 获取品类下的项目
-	 */
-	@RequestMapping(value = "/businessProject", method = RequestMethod.GET)
-	public Result getBusinessProject(String id,Integer pNo,Integer pSize) {
-		Result res = new Result();
-		if (StringUtils.isBlank(id)) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"品类必须指定","品类"));
-			return res;
-		}
-		res.setData(businessProjectService.portalBusinessProject(id,pNo, pSize));
-		return res;
-	}
-	/**
-	 * 项目关注功能
-	 */
-	@RequestMapping(value = "/interest", method = RequestMethod.GET)
-	public Result interest(String objectId,String interest) {
-		Result res = new Result();
-		if (null==objectId) {
-			res.getError().add(buildError( "项目必须指定", "项目必须指定"));
-			return res;
-		}
-		if (null==interest) {
-			res.getError().add(buildError( "关注参数错误", "关注参数错误"));
-			return res;
-		}
-		String uid=null;
-		if (StringUtils.isNotBlank(TokenManager.getUserId())) {
-			uid=TokenManager.getUserId();
-		}
-		//uid="904d1d5a-30f6-4813-b632-1ff07a1ad317";
-		if (StringUtils.isBlank(uid)) {
-			res.getError().add(buildError( "用户未登录", "用户未登录"));
-			return res;
-		}
-		res.setData(businessVarietiesService.saveInterest( uid, objectId,interest));
-		return res;
-	}
-	
-	/**
-	 * 添加意向
-	 * @param orderNo 订单编号
-	 * @param commodityId 商品id
-	 * @param commodityMode 商品型号
-	 * @param commodityQuantity 商品数量
-	 * @param commodityType 商品类型
-	 * @param createTime 创建时间
-	 * @param remarks 备注
-	 * @return
-	 * @throws ParseException 
-	 */
-	@RequestMapping(value = "/addPurpose", method = RequestMethod.GET)
-	public Result addPurpose(String orderNo, String commodityId, String commodityMode, Integer commodityQuantity,Integer commodityType, 
-			String createTime,String remarks) throws ParseException {
-		Result res = new Result();
-		res.setData(orderService.addPurpose( orderNo,  commodityId,  commodityMode,  commodityQuantity, commodityType, 
-				 createTime, remarks));
-		return res;
-	}
-	
-	
-	
-	
-	
-}

+ 0 - 88
src/main/java/com/goafanti/portal/controller/PortalStarController.java

@@ -1,88 +0,0 @@
-package com.goafanti.portal.controller;
-
-import java.util.List;
-
-import javax.annotation.Resource;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.servlet.ModelAndView;
-
-import com.goafanti.banners.enums.BannersType;
-import com.goafanti.banners.service.BannersService;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.controller.BaseController;
-import com.goafanti.common.model.Banners;
-import com.goafanti.common.model.User;
-import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.star.bo.HotStarListBo;
-import com.goafanti.star.service.StarService;
-import com.goafanti.user.service.UserInterestService;
-
-/**
- * 科技明星
- */
-@Controller
-public class PortalStarController extends BaseController {
-	@Resource
-	private StarService					starService;
-	@Resource
-	private UserInterestService			userInterestService;
-
-	@Resource
-	private BannersService				bannersService;
-
-	@RequestMapping(value = "/portal/scienceTechnology/star", method = RequestMethod.GET)
-	public ModelAndView star() {
-		ModelAndView mv = new ModelAndView();
-		List<HotStarListBo> starList = starService
-				.listStarList(TokenManager.getToken() instanceof User ? TokenManager.getUserId() : null);
-		if (null != starList && starList.size() > 0) {
-			for (HotStarListBo bo : starList) {
-				if (StringUtils.isNotBlank(bo.getUid())) {
-					bo.setFansNum(userInterestService.countByToUid(bo.getUid()));
-				}
-				if (StringUtils.isNotBlank(bo.getEngagedField())) {
-					String engagedField = "";
-					String[] arr = bo.getEngagedField().split(",|,");
-					if (null != arr && arr.length > 0) {
-						for (String s : arr) {
-							if (StringUtils.isNumeric(s)) {
-								/*engagedField += engagedFieldGlossoryService.selectByPrimaryKey(Integer.parseInt(s))
-										.getName();*/
-							}
-						}
-					}
-					bo.setEngagedField(engagedField);
-				}
-			}
-			mv.addObject("starList", starList);
-		}
-		handleBanners(mv, BannersType.KE_JI_MING_XING);
-		mv.setViewName("/portal/scienceTechnology/star");
-		return mv;
-	}
-
-	/**
-	 * 当前用户关注"科技明星"页面科技明星状态
-	 */
-	@RequestMapping(value = "/portal/scienceTechnology/star/interestStatus", method = RequestMethod.GET)
-	@ResponseBody
-	public Result interestStatus() {
-		Result res = new Result();
-		if (TokenManager.getToken() instanceof User) {
-			res.setData(starService.findStarInterestStatus(TokenManager.getUserId()));
-		}
-		return res;
-	}
-
-	private void handleBanners(ModelAndView modelview, BannersType bannersType) {
-		List<Banners> banners = bannersService.findPortalBanners(bannersType.getKey());
-		if (!banners.isEmpty()) {
-			modelview.addObject("banners", banners);
-		}
-	}
-}