Browse Source

Merge remote-tracking branch 'origin/master' into test

Michael 8 years ago
parent
commit
1b72fdbc42
47 changed files with 2294 additions and 34 deletions
  1. 45 0
      src/main/java/com/goafanti/achievement/bo/AchievementInterestBo.java
  2. 54 2
      src/main/java/com/goafanti/achievement/bo/AchievementListBo.java
  3. 10 7
      src/main/java/com/goafanti/achievement/bo/AchievementPartnerListBo.java
  4. 42 0
      src/main/java/com/goafanti/achievement/bo/AchievementUserOwnerDetailBo.java
  5. 5 0
      src/main/java/com/goafanti/achievement/service/AchievementService.java
  6. 51 1
      src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java
  7. 46 1
      src/main/java/com/goafanti/admin/bo/AdminListBo.java
  8. 305 0
      src/main/java/com/goafanti/admin/controller/AdminSuperviserApiController.java
  9. 66 0
      src/main/java/com/goafanti/admin/service/NewAdminService.java
  10. 295 0
      src/main/java/com/goafanti/admin/service/impl/NewAdminServiceImpl.java
  11. 146 0
      src/main/java/com/goafanti/app/controller/AppAchievementDemandController.java
  12. 5 0
      src/main/java/com/goafanti/common/dao/AchievementMapper.java
  13. 14 0
      src/main/java/com/goafanti/common/dao/AdminMapper.java
  14. 5 0
      src/main/java/com/goafanti/common/dao/DemandMapper.java
  15. 3 0
      src/main/java/com/goafanti/common/dao/NewsMapper.java
  16. 2 0
      src/main/java/com/goafanti/common/dao/UserCareerMapper.java
  17. 6 0
      src/main/java/com/goafanti/common/dao/UserIdentityMapper.java
  18. 2 0
      src/main/java/com/goafanti/common/dao/UserInterestMapper.java
  19. 7 0
      src/main/java/com/goafanti/common/dao/UserMapper.java
  20. 59 0
      src/main/java/com/goafanti/common/enums/InterestType.java
  21. 23 4
      src/main/java/com/goafanti/common/mapper/AchievementMapper.xml
  22. 155 0
      src/main/java/com/goafanti/common/mapper/AdminMapper.xml
  23. 110 2
      src/main/java/com/goafanti/common/mapper/DemandMapper.xml
  24. 7 0
      src/main/java/com/goafanti/common/mapper/NewsMapper.xml
  25. 1 1
      src/main/java/com/goafanti/common/mapper/OrganizationManagementMapper.xml
  26. 2 0
      src/main/java/com/goafanti/common/mapper/UserCareerMapper.xml
  27. 40 3
      src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml
  28. 11 1
      src/main/java/com/goafanti/common/mapper/UserMapper.xml
  29. 76 1
      src/main/java/com/goafanti/common/model/Admin.java
  30. 19 0
      src/main/java/com/goafanti/common/model/Demand.java
  31. 45 0
      src/main/java/com/goafanti/demand/bo/DemandInterestBo.java
  32. 101 5
      src/main/java/com/goafanti/demand/bo/DemandListBo.java
  33. 7 1
      src/main/java/com/goafanti/demand/service/DemandService.java
  34. 103 2
      src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java
  35. 45 0
      src/main/java/com/goafanti/news/bo/newsInterestBo.java
  36. 7 0
      src/main/java/com/goafanti/portal/bo/BoutiqueListBo.java
  37. 20 0
      src/main/java/com/goafanti/portal/bo/DemandSearchListBo.java
  38. 73 0
      src/main/java/com/goafanti/portal/bo/UserSubscriberListBo.java
  39. 92 0
      src/main/java/com/goafanti/user/bo/UserIdentityBo.java
  40. 60 0
      src/main/java/com/goafanti/user/bo/UserInterestBo.java
  41. 6 0
      src/main/java/com/goafanti/user/service/UserCareerService.java
  42. 4 0
      src/main/java/com/goafanti/user/service/UserIdentityService.java
  43. 6 0
      src/main/java/com/goafanti/user/service/UserInterestService.java
  44. 15 2
      src/main/java/com/goafanti/user/service/impl/UserCareerServiceImpl.java
  45. 65 0
      src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java
  46. 32 0
      src/main/java/com/goafanti/user/service/impl/UserInterestServiceImpl.java
  47. 1 1
      src/test/java/com/goafanti/test/TestValueEvaluation.java

+ 45 - 0
src/main/java/com/goafanti/achievement/bo/AchievementInterestBo.java

@@ -0,0 +1,45 @@
+package com.goafanti.achievement.bo;
+
+import java.util.Date;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import com.goafanti.common.constant.AFTConstants;
+
+public class AchievementInterestBo {
+	private String id;
+	private String name;
+	private Date createTime;
+	private Integer type;
+	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 Date getCreateTime() {
+		return createTime;
+	}
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+	public String getCreateTimeFormattedDate() {
+		if (this.createTime == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDD);
+		}
+	}
+	public Integer getType() {
+		return type;
+	}
+	public void setType(Integer type) {
+		this.type = type;
+	}
+}

+ 54 - 2
src/main/java/com/goafanti/achievement/bo/AchievementListBo.java

@@ -111,6 +111,10 @@ public class AchievementListBo {
 	
 	private String		field;
 	
+	private String		fieldB;
+	
+	private String		fieldC;
+	
 	private String		maturityS;
 	
 	private String			transferModeS;
@@ -121,6 +125,16 @@ public class AchievementListBo {
 	 */
 	private Integer hot;
 	
+	private String countInterest;
+	/**
+	 * 简介
+	 */
+	private String introduction;
+	/**
+	 * 所有人地址
+	 */
+	private String 	ownerPostalAddress;
+	
 	private Date createTime;
 	
 	public String getOrgId() {
@@ -287,7 +301,7 @@ public class AchievementListBo {
 
 	public Integer getMaturity() {
 		return maturity;
-	}
+	}   
 
 	public void setMaturity(Integer maturity) {
 		this.maturity = maturity;
@@ -309,6 +323,20 @@ public class AchievementListBo {
 		this.fieldAS = fieldAS;
 	}
 
+	public String getFieldB() {
+		return fieldB;
+	}
+
+	public void setFieldB(String fieldB) {
+		this.fieldB = fieldB;
+	}
+	public String getFieldC() {
+		return fieldC;
+	}
+
+	public void setFieldC(String fieldC) {
+		this.fieldC = fieldC;
+	}
 	public String getField() {
 		return field;
 	}
@@ -316,7 +344,6 @@ public class AchievementListBo {
 	public void setField(String field) {
 		this.field = field;
 	}
-
 	public String getMaturityS() {
 		return maturityS;
 	}
@@ -349,6 +376,30 @@ public class AchievementListBo {
 		this.hot = hot;
 	}
 
+
+	public String getCountInterest() {
+		return countInterest;
+	}
+
+	public void setCountInterest(String countInterest) {
+		this.countInterest = countInterest;
+	}
+
+	public String getIntroduction() {
+		return introduction;
+	}
+
+	public void setIntroduction(String introduction) {
+		this.introduction = introduction;
+	}
+
+	public String getOwnerPostalAddress() {
+		return ownerPostalAddress;
+	}
+
+	public void setOwnerPostalAddress(String ownerPostalAddress) {
+		this.ownerPostalAddress = ownerPostalAddress;
+	}
 	public Date getCreateTime() {
 		return createTime;
 	}
@@ -362,5 +413,6 @@ public class AchievementListBo {
 		} else {
 			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDD);
 		}
+
 	}
 }

+ 10 - 7
src/main/java/com/goafanti/achievement/bo/AchievementPartnerListBo.java

@@ -88,6 +88,8 @@ public class AchievementPartnerListBo {
 	 */
 	private String maturityS;
 	
+	private String countInterest;
+	
 	public Integer getFieldA() {
 		return fieldA;
 	}
@@ -233,15 +235,16 @@ public class AchievementPartnerListBo {
 		this.maturityS = maturityS;
 	}
 
-	@Override
-	public String toString() {
-		return "partnerAchievementList [id=" + id + ", serialNumber=" + serialNumber + ", dataCategory="
-				+ dataCategory + ", name=" + name + ", keyword=" + keyword + ", category=" + category + ", ownerType="
-				+ ownerType + ", releaseDate=" + releaseDate + ", fieldA=" + fieldA + ", fieldB=" + fieldB
-				+ ", maturity=" + maturity + ", bargainingMode=" + bargainingMode + ", transferPrice=" + transferPrice
-				+ ", introduction=" + introduction + ", technicalPictureUrl=" + technicalPictureUrl + "]";
+	
+
+	public String getCountInterest() {
+		return countInterest;
 	}
 
+	public void setCountInterest(String countInterest) {
+		this.countInterest = countInterest;
+	}
+	
 	
 	
 }

+ 42 - 0
src/main/java/com/goafanti/achievement/bo/AchievementUserOwnerDetailBo.java

@@ -8,6 +8,38 @@ public class AchievementUserOwnerDetailBo extends AchievementOrgOwnerDetailBo {
 	private Integer city;
 	
 	private Integer area;
+	
+	private Integer CountInterest;
+	
+	private String field1;
+	
+	private String field2;
+	
+	public String getField1() {
+		return field1;
+	}
+
+	public void setField1(String field1) {
+		this.field1 = field1;
+	}
+
+	public String getField2() {
+		return field2;
+	}
+
+	public void setField2(String field2) {
+		this.field2 = field2;
+	}
+
+	public String getField3() {
+		return field3;
+	}
+
+	public void setField3(String field3) {
+		this.field3 = field3;
+	}
+
+	private String field3;
 
 	public Integer getProvince() {
 		return province;
@@ -33,6 +65,16 @@ public class AchievementUserOwnerDetailBo extends AchievementOrgOwnerDetailBo {
 		this.area = area;
 	}
 
+	public Integer getCountInterest() {
+		return CountInterest;
+	}
+
+	public void setCountInterest(Integer countInterest) {
+		CountInterest = countInterest;
+	}
+
+	
+
 
 	
 }

+ 5 - 0
src/main/java/com/goafanti/achievement/service/AchievementService.java

@@ -85,4 +85,9 @@ public interface AchievementService {
     
     /**查询智者的科技成果**/
     public List<AchievementPartnerListBo> findPartnerAchievementList(String uid);
+
+	Pagination<AchievementPartnerListBo> listAppUserAchievement(Integer auditStatus, Integer serialNumber, String name, String keyword,
+			Integer category, Integer ownerType, Integer status, String releaseDateStartDate, String releaseDateEndDate,
+			Integer releaseStatus,String ownerId,Integer fieldA, Integer pNo, Integer pSize);
+	
 }

+ 51 - 1
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -30,6 +30,7 @@ import com.goafanti.common.dao.AchievementDemandMapper;
 import com.goafanti.common.dao.AchievementKeywordMapper;
 import com.goafanti.common.dao.AchievementMapper;
 import com.goafanti.common.dao.DemandKeywordMapper;
+import com.goafanti.common.dao.FieldGlossoryMapper;
 import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.OrganizationIdentityMapper;
 import com.goafanti.common.dao.UserIdentityMapper;
@@ -85,6 +86,8 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 	private UserIdentityMapper				userIdentityMapper;
 	@Autowired
 	private OrganizationIdentityMapper		organizationIdentityMapper;
+	@Autowired
+	private FieldGlossoryMapper 			fieldGlossoryMapper;
 
 	private static final Logger				logger	= LoggerFactory.getLogger(AchievementServiceImpl.class);
 
@@ -397,7 +400,19 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 
 	@Override
 	public AchievementUserOwnerDetailBo selectUserOwnerDetail(String id) {
-		return achievementMapper.selectUserOwnerDetail(id);
+		AchievementUserOwnerDetailBo a=achievementMapper.selectUserOwnerDetail(id);
+		if (null!=a.getFieldA()) {
+			a.setField1(fieldGlossoryMapper.selectByPrimaryKey(a.getFieldA()).getName());
+		}
+		if(null!=a.getFieldB()){
+			a.setField2(fieldGlossoryMapper.selectByPrimaryKey(Integer.valueOf(a.getFieldB())).getName());
+		}
+		if(null!=a.getFieldC()){
+			a.setField3(fieldGlossoryMapper.selectByPrimaryKey(Integer.valueOf(a.getFieldC())).getName());
+		}
+		int i=achievementMapper.countInterest(a.getId());
+		a.setCountInterest(i);
+		return a;
 	}
 
 	@Override
@@ -695,4 +710,39 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		return achievementMapper.findPartnerAchievementListByPage(uid);
 	}
 
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<AchievementPartnerListBo> listAppUserAchievement(Integer auditStatus, Integer serialNumber,
+			String name, String keyword, Integer category, Integer ownerType, Integer status,
+			String releaseDateStartDate, String releaseDateEndDate, Integer releaseStatus,String ownerId,Integer fieldA, Integer pNo, Integer pSize) {
+		if (pNo == null || pNo < 0) {
+			pNo = 1;
+		}
+
+		if (pSize == null || pSize < 0 || pSize > 10) {
+			pSize = 10;
+		}
+		
+		Pagination<AchievementPartnerListBo> p=(Pagination<AchievementPartnerListBo>) findPage("findAchievementListByPage", "findAchievementCount",
+				disposeParams(null, null, ownerId, auditStatus, serialNumber, name, keyword, category,
+						status, releaseDateStartDate, releaseDateEndDate,null, null,  releaseStatus, null, null,null, null),
+				pNo, pSize);
+		List<AchievementListBo> list=(List<AchievementListBo>) p.getList();
+		System.out.println(list);
+		for (AchievementListBo ap : list) {
+			if (null!=ap.getFieldA()) {
+				ap.setField(fieldGlossoryMapper.selectByPrimaryKey(ap.getFieldA()).getName());
+			}
+			if(StringUtils.isNotBlank(ap.getFieldB())){
+				ap.setFieldB(fieldGlossoryMapper.selectByPrimaryKey(Integer.valueOf(ap.getFieldB())).getName());
+			}
+			if(StringUtils.isNotBlank(ap.getFieldC())){
+				ap.setFieldC(fieldGlossoryMapper.selectByPrimaryKey(Integer.valueOf(ap.getFieldC())).getName());
+			}
+			int i=achievementMapper.countInterest(ap.getId());
+			ap.setCountInterest(String.valueOf(i));
+		}
+		return p;
+	}
+
 }

+ 46 - 1
src/main/java/com/goafanti/admin/bo/AdminListBo.java

@@ -1,6 +1,7 @@
 package com.goafanti.admin.bo;
 
 import java.util.Date;
+import java.util.List;
 
 import org.apache.commons.lang3.time.DateFormatUtils;
 
@@ -46,7 +47,7 @@ public class AdminListBo {
 	private String city;
 	
 	/**
-	 * 
+	 * 
 	 */
 	private String	position;
 
@@ -66,6 +67,50 @@ public class AdminListBo {
 	/** 部门名称 **/
 	private String departmentName;
 	
+	/** 用户状态 **/
+	private String status;
+	
+	/** 用户编号 **/
+	private String userNo;
+	
+	/** 职务 **/
+	private String duty;
+	
+	/** 角色 **/
+	private List<String> roles;
+	
+	public List<String> getRoles() {
+		return roles;
+	}
+
+	public void setRoles(List<String> roles) {
+		this.roles = roles;
+	}
+
+	public String getStatus() {
+		return status;
+	}
+
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
+	public String getUserNo() {
+		return userNo;
+	}
+
+	public void setUserNo(String userNo) {
+		this.userNo = userNo;
+	}
+
+	public String getDuty() {
+		return duty;
+	}
+
+	public void setDuty(String duty) {
+		this.duty = duty;
+	}
+
 	public String getSuperiorId() {
 		return superiorId;
 	}

+ 305 - 0
src/main/java/com/goafanti/admin/controller/AdminSuperviserApiController.java

@@ -0,0 +1,305 @@
+package com.goafanti.admin.controller;
+
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.List;
+import java.util.UUID;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.beans.BeanUtils;
+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.RequestParam;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.goafanti.admin.bo.AdminListBo;
+import com.goafanti.admin.bo.AdminLocationBo;
+import com.goafanti.admin.service.AdminLocationService;
+import com.goafanti.admin.service.NewAdminService;
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.common.model.Admin;
+import com.goafanti.common.model.AdminLocation;
+import com.goafanti.common.utils.PasswordUtil;
+import com.goafanti.common.utils.StringUtils;
+import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.user.service.UserService;
+
+@Controller
+@RequestMapping(value = "api/admin/superviser")
+public class AdminSuperviserApiController extends CertifyApiController {
+	@Resource
+	private NewAdminService			newAdminService;
+	@Resource(name = "passwordUtil")
+	private PasswordUtil			passwordUtil;
+	@Resource
+	private AdminLocationService	adminLocationService;
+	@Resource
+	private UserService				userService;
+	/**管理员列表*/
+	@RequestMapping(value = "/adminList", method = RequestMethod.GET)
+	public Result adminList(AdminListBo alb, String rid, 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(newAdminService.listAdmin(alb,rid, pNo, pSize));
+		return res;
+	}
+	
+	/**
+	 * 新增管理员
+	 */
+	@RequestMapping(value = "/insertAdmin", method = RequestMethod.POST)
+	public Result insertAdmin(@RequestParam(value = "roles[]", required = false) String[] roleIds, String data) {
+		Result res = new Result();
+		JSONObject jo = (JSONObject) JSON.parse(data);
+		if (null != jo) {
+			Admin admin = jo.toJavaObject(Admin.class);
+
+			if (StringUtils.isBlank(admin.getMobile())) {
+				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "登录帐号为空", "登录帐号"));
+				return res;
+			}
+
+			if (StringUtils.isBlank(admin.getName())) {
+				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "用户名为空", "用户名"));
+				return res;
+			}
+
+			Admin a = newAdminService.selectByMobile(admin.getMobile().trim());
+			if (null != a) {
+				res.getError().add(buildError(ErrorConstants.USER_ALREADY_EXIST, "当前用户已注册!"));
+				return res;
+			}
+
+			Admin ad = new Admin();
+			BeanUtils.copyProperties(admin, ad);
+			/*ad.setId(UUID.randomUUID().toString());*/
+			Calendar now = Calendar.getInstance();
+			now.set(Calendar.MILLISECOND, 0);
+
+			ad.setCreateTime(now.getTime());
+			if (StringUtils.isBlank(ad.getPassword())) {
+				ad.setPassword(AFTConstants.INITIALPASSWORD);
+			}
+			ad.setPassword(passwordUtil.getEncryptPwd(ad));
+			List<String> roles = new ArrayList<String>();
+			if (roleIds != null && roleIds.length > 0) {
+				for (String role : roleIds) {
+					roles.add(role);
+				}
+			}
+			res.setData(newAdminService.insertNewAdmin(ad,roles));
+		}
+
+		return res;
+	}
+
+	/**
+	 * 修改管理员信息
+	 */
+	@RequestMapping(value = "/updateAdmin", method = RequestMethod.POST)
+	public Result updateAdmin(@RequestParam(value = "roles[]", required = false) String[] roleIds, String data) {
+		Result res = new Result();
+		JSONObject jo = (JSONObject) JSON.parse(data);
+		if (null != jo) {
+			Admin admin = jo.toJavaObject(Admin.class);
+
+			if (null == admin.getId()) {
+				res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "用户id"));
+				return res;
+			}
+
+			if (null == admin.getMobile()) {
+				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "登录帐号为空", "登录帐号"));
+				return res;
+			}
+
+			if (null == admin.getName()) {
+				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "用户名为空", "用户名"));
+				return res;
+			}
+
+			Admin aa = newAdminService.selectByMobile(admin.getMobile().trim());
+			if (null != aa && !admin.getId().equals(aa.getId())) {
+				res.getError().add(buildError(ErrorConstants.USER_ALREADY_EXIST, "当前用户已注册!"));
+				return res;
+			}
+
+			Admin a = newAdminService.selectByPrimaryKey(admin.getId());
+			if (null == a) {	
+				res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "用户id"));				
+				return res;
+				
+			}
+			Admin ad = new Admin();
+			BeanUtils.copyProperties(admin, ad);
+			res = disposeAdminLocationList(res, jo, ad);
+			if (!res.getError().isEmpty()) {
+				return res;
+			}
+		
+			List<String> roles = new ArrayList<String>();
+			if (roleIds != null && roleIds.length > 0) {
+				for (String role : roleIds) {
+					roles.add(role);
+				}
+			}
+			res.setData(newAdminService.updateByPrimaryKeySelective(ad, roles));
+		}
+		return res;
+	}
+
+	/**
+	 * 重置管理员密码
+	 */
+	@RequestMapping(value = "/resetPwd", method = RequestMethod.POST)
+	public Result resetPwd(String id) {
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "用户id"));
+			return res;
+		}
+
+		Admin admin = newAdminService.selectByPrimaryKey(id);
+		if (null == admin) {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "用户id"));
+			return res;
+		}
+		Admin a = new Admin();
+		a.setId(admin.getId());
+		a.setCreateTime(admin.getCreateTime());
+		a.setPassword(AFTConstants.INITIALPASSWORD);
+		a.setPassword(passwordUtil.getEncryptPwd(a));
+		res.setData(newAdminService.updateByPrimaryKey(a));
+		return res;
+	}
+
+	private Result disposeAdminLocationList(Result res, JSONObject jo, Admin ad) {
+		JSONArray locations = jo.getJSONArray("locations");
+		if (null == locations || locations.size()<1){
+			return res;
+		}
+		List<AdminLocation> adminLocationList = new ArrayList<>();
+		AdminLocation al = null;
+		Boolean areaAdminFlag = false;
+		List<Integer> locationList = null;
+		if (TokenManager.hasRole(AFTConstants.AREAADMIN)) {
+			locationList = new ArrayList<>();
+			areaAdminFlag = true;
+		}
+		for (int i = 0; i < locations.size(); i++) {
+			AdminLocationBo alb = locations.getJSONObject(i).toJavaObject(AdminLocationBo.class);
+			Integer province = alb.getProvince();
+			String city = alb.getCity();
+			if (null == province) {
+				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "省份为空", "所在省份"));
+				return res;
+			}
+
+			if (province.intValue() > AFTConstants.PROVINCEMAXNUM) {
+				res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "所在省份"));
+				return res;
+			}
+			if (areaAdminFlag) {
+				locationList.add(province);
+			}
+			if (!StringUtils.isBlank(city)) {
+				String[] arr = city.trim().split(",|,");
+				if (null != arr && arr.length > 0) {
+					for (String s : arr) {
+						Integer c = Integer.valueOf(s);
+						if (c.intValue() > AFTConstants.CITYMAXNUM) {
+							res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "所在市"));
+							return res;
+						}
+						adminLocationList.add(disposeAdminLocation(al, ad, province, c));
+						if (areaAdminFlag) {
+							locationList.add(c);
+						}
+					}
+				}
+			} else {
+				adminLocationList.add(disposeAdminLocation(al, ad, province, null));
+			}
+		}
+		if (areaAdminFlag) {
+			List<Integer> albList = disposeAdminLocationBo();
+			if (!albList.containsAll(locationList)) {
+				res.getError().add(buildError("", "所选所在地区域不在负责区域,无法添加或修改"));
+				return res;
+			}
+		}
+		res.setData(adminLocationList);
+		return res;
+	}
+
+	private AdminLocation disposeAdminLocation(AdminLocation al, Admin ad, Integer province, Integer c) {
+		al = new AdminLocation();
+		al.setId(UUID.randomUUID().toString());
+		al.setAdminId(ad.getId());
+		al.setProvince(province);
+		if (null != c) {
+			al.setCity(c);
+		}
+		return al;
+	}
+
+	private List<Integer> disposeAdminLocationBo() {
+		List<AdminLocationBo> alb = adminLocationService.findLocation(TokenManager.getAdminId());
+		List<Integer> albList = null;
+		if (!alb.isEmpty()) {
+			Integer albProvince = null;
+			albList = new ArrayList<>();
+			for (AdminLocationBo bo : alb) {
+				albProvince = bo.getProvince();
+				albList.add(albProvince);
+				if (!StringUtils.isBlank(bo.getCity())) {
+					String[] albArr = bo.getCity().trim().split(",|,");
+					if (null != albArr && albArr.length > 0) {
+						for (String ss : albArr) {
+							albList.add(Integer.valueOf(ss));
+						}
+					}
+				}
+			}
+		}
+		return albList;
+	}
+	/** 图片上传 **/
+	@RequestMapping(value = "/uploadAdminImg", method = RequestMethod.POST)
+	public Result uploadCustomerImg(HttpServletRequest req,String sign){
+		Result res = new Result();
+		res.setData(handleFile(res, "/customer_sys_file/", false, req, sign));
+		return res;
+	}
+	
+	/**新增获取ID**/
+	@RequestMapping(value = "/newId", method = RequestMethod.POST)
+	public Result newId(){
+		Result res = new Result();		
+		res.setData(UUID.randomUUID().toString());		
+		return res;
+	}
+	/**编辑页面信息获取**/
+	@RequestMapping(value = "/selectAllByid", method = RequestMethod.POST)
+	public Result selectAllByid(String id){
+		Result res = new Result();
+		res.setData(newAdminService.selectAllByid(id));
+		return res;
+	}
+}

+ 66 - 0
src/main/java/com/goafanti/admin/service/NewAdminService.java

@@ -0,0 +1,66 @@
+package com.goafanti.admin.service;
+
+import java.util.List;
+import java.util.Map;
+
+import com.goafanti.admin.bo.AdminDetail;
+import com.goafanti.admin.bo.AdminListBo;
+import com.goafanti.common.model.Admin;
+import com.goafanti.core.mybatis.page.Pagination;
+
+public interface NewAdminService {
+	Pagination<AdminListBo> listAdmin(AdminListBo alb,String rid,Integer pageNo, Integer pageSize);
+	
+	List<Admin> selectAllAdmin();
+
+	Admin selectByMobile(String username);
+
+	Admin selectByPrimaryKey(String key);
+
+	int insert(Admin ad);
+
+	int updateByPrimaryKeySelective(Admin ad, List<String> roleIds);
+
+	int updateByPrimaryKey(Admin a);
+
+	AdminDetail selectAdminDetail(String id);
+
+	List<Admin> selectCognizanceConsultant();
+
+	List<Admin> selectPatentAuthor();
+
+	List<Admin> selectPatentPrincipal();
+
+	List<Admin> selectCopyrightConsultant();
+
+	List<Admin> selectCognizancePrincipal();
+
+	List<Admin> selectCopyrightPrincipal();
+
+	List<Admin> selectTechprojectConsultant();
+
+	List<Admin> selectTechprojectPrincipal();
+
+	List<String> selectRoleByPrimaryKey(String aid);
+
+	List<String> listAuditor();
+
+	Map<String, String> selectAccoutManager();
+
+	Map<String, String> selectTechnician();
+
+	Map<String, String> selectSalesman();
+
+	Map<String, String> selectContractManager();
+
+	Map<String, String> selectTechBroder();
+
+	int insertNewAdmin(Admin ad, List<String> roleIds);
+
+	Map<String, String> listAdminSelect();
+
+	List<Admin> listAdminByName(String name);
+	
+	Admin selectAllByid(String id);	
+	
+}

+ 295 - 0
src/main/java/com/goafanti/admin/service/impl/NewAdminServiceImpl.java

@@ -0,0 +1,295 @@
+package com.goafanti.admin.service.impl;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.goafanti.admin.bo.AdminDetail;
+import com.goafanti.admin.bo.AdminListBo;
+import com.goafanti.admin.service.NewAdminService;
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.dao.AdminLocationMapper;
+import com.goafanti.common.dao.AdminMapper;
+import com.goafanti.common.dao.UserRoleMapper;
+import com.goafanti.common.model.Admin;
+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 NewAdminServiceImpl extends BaseMybatisDao<AdminMapper> implements NewAdminService {
+	@Autowired
+	private AdminMapper			adminMapper;
+	@Autowired
+	private UserRoleMapper		userRoleMapper;
+	@Autowired
+	private AdminLocationMapper	adminLocationMapper;
+	
+	@Override
+	public Pagination<AdminListBo> listAdmin(AdminListBo alb, String rid, Integer pageNo, Integer pageSize) {
+		Map<String,Object> params = new HashMap<String, Object>();
+		if(StringUtils.isNotBlank(alb.getName())) params.put("name", alb.getName());
+		if(StringUtils.isNotBlank(alb.getDepartmentId())) params.put("departmentId", alb.getDepartmentId());
+		if(StringUtils.isNotBlank(rid)) params.put("rid", rid);
+		if(StringUtils.isNotBlank(alb.getDuty())) params.put("duty",alb.getDuty());
+		if(StringUtils.isNotBlank(alb.getPosition())) params.put("position", alb.getPosition());
+		if(StringUtils.isNotBlank(alb.getStatus())) params.put("status", alb.getStatus());
+		if(StringUtils.isNotBlank(alb.getMobile())) params.put("mobile", alb.getMobile());
+		if(StringUtils.isNotBlank(alb.getSuperiorId())) params.put("superiorId", alb.getSuperiorId());		
+		@SuppressWarnings("unchecked")
+		Pagination<AdminListBo> p=(Pagination<AdminListBo>)findPage("selectAdminListByPage","selectAdminCount",params,pageNo,pageSize);
+		@SuppressWarnings("unchecked")
+		List<AdminListBo> list=(List<AdminListBo>)p.getList();
+		for(AdminListBo i:list){
+			i.setRoles(adminMapper.selectRolesByUid(i.getId()));
+		}
+		return p;
+	}
+	
+	@Override
+	public List<Admin> selectAllAdmin() {
+		return adminMapper.selectAllAdmin();
+	}
+
+	@Override
+	public Admin selectByMobile(String mobile) {
+		return adminMapper.selectByMobile(mobile);
+	}
+
+	@Override
+	public Admin selectByPrimaryKey(String key) {
+		return adminMapper.selectByPrimaryKey(key);
+	}
+
+	@Override
+	public int insert(Admin ad) {
+		return adminMapper.insert(ad);
+	}
+
+	@Override
+	public int updateByPrimaryKeySelective(Admin ad, List<String> roleIds) {
+		Map<String, Object> params = new HashMap<>();
+		params.put("uid", ad.getId());
+		params.put("roles", roleIds);
+
+		if (ad.getId() != "1") {
+			userRoleMapper.deleteByUserId(ad.getId());
+			if (!roleIds.isEmpty()) {
+				userRoleMapper.insertBatch(params);
+			}
+			TokenManager.clearUserAuthByUserId(ad.getId());
+		}
+		String sdepNo=adminMapper.selectUserNoBySuperiorId(ad.getSuperiorId());
+		int Count=adminMapper.selectCountBySuperiorId(ad.getSuperiorId());
+		if(Count<10){
+			String dep=sdepNo+"0"+Count;
+			String sid=adminMapper.selectIdByUserNo(dep);
+			while(sid!=null){
+				Count=Count+1;				
+				if(Count>=10){
+					dep=sdepNo+Count;	
+				}else{
+					dep=sdepNo+"0"+Count;
+				}
+				sid=adminMapper.selectIdByUserNo(dep);				
+			}
+			ad.setUserNo(dep);
+		}
+		if(Count>=10){
+			String dep=sdepNo+Count;
+			String sid=adminMapper.selectIdByUserNo(dep);
+			while(sid!=null){
+				Count=Count+1;				
+				dep=sdepNo+Count;
+				sid=adminMapper.selectIdByUserNo(dep);				
+			}
+			ad.setUserNo(dep);
+		}	
+		int count=adminMapper.updateByPrimaryKeySelective(ad);
+		return count;
+	}
+
+	@Override
+	public int updateByPrimaryKey(Admin a) {
+		return adminMapper.updateByPrimaryKeySelective(a);
+	}
+
+	@Override
+	public AdminDetail selectAdminDetail(String id) {
+		Admin a = adminMapper.selectByPrimaryKey(id);
+		if (null == a) {
+			return null;
+		}
+
+		AdminDetail ad = new AdminDetail();
+		BeanUtils.copyProperties(a, ad);
+		ad.setRoles(adminMapper.selectRolesByPrimaryKey(id));
+		return null;
+	}
+
+	@Override
+	public List<Admin> selectCognizanceConsultant() {
+		return adminMapper.selectCognizanceConsultant();
+	}
+
+	@Override
+	public List<Admin> selectPatentAuthor() {
+		return adminMapper.selectPatentAuthor();
+	}
+
+	@Override
+	public List<Admin> selectPatentPrincipal() {
+		return adminMapper.selectPatentPrincipal();
+	}
+
+	@Override
+	public List<Admin> selectCopyrightConsultant() {
+		return adminMapper.selectCopyrightConsultant();
+	}
+
+	@Override
+	public List<Admin> selectCognizancePrincipal() {
+		return adminMapper.selectCognizancePrincipal();
+	}
+
+	@Override
+	public List<Admin> selectCopyrightPrincipal() {
+		return adminMapper.selectCopyrightPrincipal();
+	}
+
+	@Override
+	public List<Admin> selectTechprojectConsultant() {
+		return adminMapper.selectTechprojectConsultant();
+	}
+
+	@Override
+	public List<Admin> selectTechprojectPrincipal() {
+		return adminMapper.selectTechprojectPrincipal();
+	}
+
+	@Override
+	public List<String> selectRoleByPrimaryKey(String uid) {
+		return adminMapper.selectRoleByPrimaryKey(uid);
+	}
+
+	@Override
+	public List<String> listAuditor() {
+		return userRoleMapper.listAuditor();
+	}
+
+	@Override
+	public Map<String, String> selectAccoutManager() {
+		return disposeAdminList(adminMapper.selectAccoutManager());
+	}
+
+	@Override
+	public Map<String, String> selectTechnician() {
+		return disposeAdminList(adminMapper.selectTechnician());
+	}
+
+	@Override
+	public Map<String, String> selectSalesman() {
+		return disposeAdminList(adminMapper.selectSalesman());
+	}
+
+	@Override
+	public Map<String, String> selectContractManager() {
+		return disposeAdminList(adminMapper.selectContractManager());
+	}
+
+	@Override
+	public Map<String, String> selectTechBroder() {
+		return disposeAdminList(adminMapper.selectTechBroder());
+	}
+
+	@Override
+	public int insertNewAdmin(Admin ad ,List<String> roleIds) {
+		ad.setStatus("正常");		
+		String sdepNo=adminMapper.selectUserNoBySuperiorId(ad.getSuperiorId());
+		int Count=adminMapper.selectCountBySuperiorId(ad.getSuperiorId());
+		if(Count<10){
+			String dep=sdepNo+"0"+Count;
+			String sid=adminMapper.selectIdByUserNo(dep);
+			while(sid!=null){
+				Count=Count+1;				
+				if(Count>=10){
+					dep=sdepNo+Count;	
+				}else{
+					dep=sdepNo+"0"+Count;
+				}
+				sid=adminMapper.selectIdByUserNo(dep);				
+			}
+			ad.setUserNo(dep);
+		}
+		if(Count>=10){
+			String dep=sdepNo+Count;
+			String sid=adminMapper.selectIdByUserNo(dep);
+			while(sid!=null){
+				Count=Count+1;				
+				dep=sdepNo+Count;
+				sid=adminMapper.selectIdByUserNo(dep);				
+			}
+			ad.setUserNo(dep);
+		}		
+		Map<String, Object> params = new HashMap<>();
+		params.put("uid", ad.getId());
+		params.put("roles", roleIds);
+
+		if (ad.getId() != "1") {
+			userRoleMapper.deleteByUserId(ad.getId());
+			if (!roleIds.isEmpty()) {
+				userRoleMapper.insertBatch(params);
+			}
+			TokenManager.clearUserAuthByUserId(ad.getId());
+		}
+		return adminMapper.insertn(ad);
+	}
+
+	@Override
+	public Map<String, String> listAdminSelect() {
+		if (TokenManager.hasRole(AFTConstants.SUPERADMIN)) {
+			return disposeAdminList(adminMapper.listAdminSelectBySuperAdmin());
+		} else if (TokenManager.hasRole(AFTConstants.AREAADMIN)) {
+			List<Integer> provinceList = adminLocationMapper
+					.selectProvinceWhereCityIsNullByAdminId(TokenManager.getAdminId());
+			List<Integer> cityList = adminLocationMapper.selectCityByAdminId(TokenManager.getAdminId());
+			provinceList.addAll(cityList);
+			return disposeAdminList(adminMapper.listAdminSelectByAreaAdmin(provinceList, cityList));
+		}
+		return null;
+	}
+
+	private Map<String, String> disposeAdminList(List<Admin> list) {
+		Map<String, String> map = new TreeMap<String, String>();
+		for (Admin o : list) {
+			map.put(o.getId(), o.getName() + " " + (StringUtils.isBlank(o.getPosition()) ? "" : o.getPosition()));
+		}
+		return map;
+	}
+
+	@Override
+	public List<Admin> listAdminByName(String name) {
+		
+		return adminMapper.listAdminByName(name);
+	}
+
+	@Override
+	public Admin selectAllByid(String id) {
+		Admin admin=adminMapper.selectAllByid(id);
+		admin.setSuperior(adminMapper.selectNameByid(admin.getSuperiorId()));
+		if(admin.getDistrict()==null){
+			admin.setDistrict(" ");
+		}
+		if(admin.getHeadPortraitUrl()==null){
+			admin.setHeadPortraitUrl("0");
+		}
+		return admin;
+	}
+
+}

+ 146 - 0
src/main/java/com/goafanti/app/controller/AppAchievementDemandController.java

@@ -0,0 +1,146 @@
+package com.goafanti.app.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.achievement.service.AchievementService;
+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;
+
+import com.goafanti.common.utils.StringUtils;
+import com.goafanti.demand.service.DemandService;
+import com.goafanti.news.service.NewsService;
+import com.goafanti.user.service.UserCareerService;
+import com.goafanti.user.service.UserIdentityService;
+import com.goafanti.user.service.UserInterestService;
+
+@RestController
+@RequestMapping(path = "/open/api/open/achievementDemand", method = RequestMethod.GET)
+public class AppAchievementDemandController extends BaseApiController {
+	@Resource
+	private BannersService		bannersService;
+	@Resource
+	private ActivityService		activityService;
+	@Resource
+	private NewsService			newsService;
+	@Resource
+	private AchievementService	achievementService;
+	@Resource
+	private DemandService		demandService;
+	@Resource
+	private UserCareerService		userCareerService;
+	@Resource
+	private UserInterestService userInterestService; 
+	@Resource
+	private UserIdentityService	userIdentityService;
+	
+	/**
+	 * 成果列表
+	 */
+	@RequestMapping(value = "/achievementList", method = RequestMethod.GET)
+	private Result achievementList(Integer auditStatus, Integer serialNumber, String name, String keyword, Integer category,
+			Integer ownerType,Integer fieldA, Integer status, String releaseDateStartDate, String releaseDateEndDate,
+			Integer releaseStatus,String ownerId,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(achievementService.listAppUserAchievement(auditStatus, serialNumber, name, keyword, category,
+				ownerType,  status, releaseDateStartDate, releaseDateEndDate, releaseStatus,ownerId, fieldA, pNo, pSize));
+		return res;
+	}
+	/**
+	 * 成果详情
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "/achievementDetail", method = RequestMethod.GET)
+	private Result userDetail(String id) {
+		Result res = new Result();
+		if (StringUtils.isBlank(id)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到成果ID", "成果ID"));
+			return res;
+		}
+		res.setData(achievementService.selectUserOwnerDetail(id));
+		return res;
+	}
+	/**
+	 * 需求列表
+	 */
+	@RequestMapping(value = "/demandList", method = RequestMethod.GET)
+	public Result demandList(Integer auditStatus, Integer serialNumber, String name, String keyword, Integer demandType,
+			String validityPeriodStartDate, String validityPeriodEndDate, Integer status, Integer releaseStatus,
+			String releaseDateStartDate, String releaseDateEndDate, 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(demandService.listAppDemand(auditStatus, serialNumber, name, keyword, demandType,
+				validityPeriodStartDate, validityPeriodEndDate, status, releaseStatus, releaseDateStartDate,
+				releaseDateEndDate, pNo, pSize));
+		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.selectDemandDetail(id));
+		return res;
+	}
+	/**
+	 * 关注列表
+	 */
+	@RequestMapping(value = "/interestList", method = RequestMethod.GET)
+	public Result interestList(String uid,Integer type) {
+		Result res = new Result();
+		if (StringUtils.isBlank(uid)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到ID", "ID"));
+			return res;
+		}
+		res.setData(demandService.selectinterest(uid,type));
+		return res;
+	}
+	/**
+	 * 专家列表
+	 */
+	@RequestMapping(value = "/expertsList", method = RequestMethod.GET)
+	public Result expertsList(String industry, Integer pNo, Integer pSize) {
+		Result res = new Result();
+		res.setData(userIdentityService.expertsList(industry,  pNo,  pSize));
+		return res;
+	}
+	/**
+	 * 专家详情
+	 */
+	@RequestMapping(value = "/expertsDetail", method = RequestMethod.GET)
+	public Result expertsDetail(String uid) {
+		Result res = new Result();
+		res.setData(userIdentityService.expertsDetail(uid));
+		return res;
+	}
+	
+}

+ 5 - 0
src/main/java/com/goafanti/common/dao/AchievementMapper.java

@@ -4,6 +4,7 @@ import java.util.List;
 
 import org.apache.ibatis.annotations.Param;
 
+import com.goafanti.achievement.bo.AchievementInterestBo;
 import com.goafanti.achievement.bo.AchievementListBo;
 import com.goafanti.achievement.bo.AchievementOrgOwnerDetailBo;
 import com.goafanti.achievement.bo.AchievementPartnerListBo;
@@ -77,4 +78,8 @@ public interface AchievementMapper {
     /**	查询智者的科技成果**/
 	List<AchievementPartnerListBo>findPartnerAchievementListByPage(String uid);
 	
+	Integer countInterest(String achievementId);
+
+	List<AchievementInterestBo> achievementInterest(String uid);
+	
 }

+ 14 - 0
src/main/java/com/goafanti/common/dao/AdminMapper.java

@@ -59,5 +59,19 @@ public interface AdminMapper {
 	List<Admin> listAdminSelectByAreaAdmin(@Param("provinceList")List<Integer> provinceList, @Param("cityList")List<Integer> cityList);
 	
 	List<Admin> listAdminByName(@Param("name")String name);
+	
+	int insertn(Admin record);
+	
+	String selectUserNoBySuperiorId(String superiorId);
+	
+	int selectCountBySuperiorId(String superiorId);
+	
+	String selectIdByUserNo(String userNo);
+	
+	Admin selectAllByid(String id);
+	
+	String selectNameByid(String id);
+	
+	List<String>selectRolesByUid(String id);
 
 }

+ 5 - 0
src/main/java/com/goafanti/common/dao/DemandMapper.java

@@ -6,6 +6,7 @@ import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
 import com.goafanti.common.model.Demand;
+import com.goafanti.demand.bo.DemandInterestBo;
 import com.goafanti.demand.bo.DemandListBo;
 import com.goafanti.demand.bo.DemandManageDetailBo;
 import com.goafanti.portal.bo.DemandPortalDetailBo;
@@ -51,4 +52,8 @@ public interface DemandMapper {
 	ArrayList<DemandListBo> selectDemandList (Integer boutique);
 	
 	List<DemandListBo> selectCsutomerLike(String uid);
+		
+	int countInterest(String demandId);
+
+	List<DemandInterestBo> demandInterest(String uid);
 }

+ 3 - 0
src/main/java/com/goafanti/common/dao/NewsMapper.java

@@ -6,6 +6,7 @@ import java.util.Map;
 import com.goafanti.common.model.News;
 import com.goafanti.news.bo.NewsPortalList;
 import com.goafanti.news.bo.NewsSummary;
+import com.goafanti.news.bo.newsInterestBo;
 
 public interface NewsMapper {
 	int deleteByPrimaryKey(Long id);
@@ -37,4 +38,6 @@ public interface NewsMapper {
 	List<NewsPortalList> portalNewsQuestion();
 	
 	List<NewsSummary> findIndexNewsLists(Map<String, Object> params);
+
+	List<newsInterestBo> newsInterest(String uid);
 }

+ 2 - 0
src/main/java/com/goafanti/common/dao/UserCareerMapper.java

@@ -18,4 +18,6 @@ public interface UserCareerMapper {
     
 
 	UserCareer selectUserCareerByUserId(String userId);
+
+	
 }

+ 6 - 0
src/main/java/com/goafanti/common/dao/UserIdentityMapper.java

@@ -2,7 +2,9 @@ package com.goafanti.common.dao;
 
 import com.goafanti.common.model.UserIdentity;
 import com.goafanti.common.model.UserIdentityExample;
+import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.user.bo.AuditorUserIdentityDetailBo;
+
 import com.goafanti.user.bo.UserIdentityBo;
 import com.goafanti.user.bo.UserNames;
 
@@ -89,5 +91,9 @@ public interface UserIdentityMapper {
     List<UserNames> selectManagerAchievementUserOwner(@Param("aid")String aid, @Param("name")String name);
 
 	List<UserNames> selectAchievementUserOwner(@Param("aid")String aid, @Param("name")String name);
+
+	Pagination<UserIdentityBo> expertsList(String industry, Integer pNo, Integer pSize);
+
+	UserIdentityBo selectUserIdentityByUid(String uid);
     
 }

+ 2 - 0
src/main/java/com/goafanti/common/dao/UserInterestMapper.java

@@ -20,4 +20,6 @@ public interface UserInterestMapper {
 	UserInterest findByFromUidAndToUid(@Param("fromUid")String fromUid, @Param("toUid")String toUid);
 
 	Integer countByToUid(String toUid);
+
+	
 }

+ 7 - 0
src/main/java/com/goafanti/common/dao/UserMapper.java

@@ -10,6 +10,7 @@ import com.goafanti.common.model.User;
 import com.goafanti.common.model.UserBusiness;
 import com.goafanti.user.bo.OrgPartnerDetailBo;
 import com.goafanti.user.bo.UserDownLoadBo;
+import com.goafanti.user.bo.UserInterestBo;
 import com.goafanti.user.bo.UserPageHomeBo;
 import com.goafanti.user.bo.UserPartnerDetailBo;
 import com.goafanti.common.model.UserExample;
@@ -178,10 +179,16 @@ public interface UserMapper {
 	 */
 	List<User> checkUser(@Param("id")String id,@Param("identifyName")String identifyName, @Param("mobile")String mobile,@Param("type")Integer type);
 
+
+	List<UserInterestBo> userInterest(String uid);
+
+
 	/**
 	 * 查询用户基本信息
 	 * @param id
 	 * @return
 	 */
 	User selectBaseInfo(@Param("id")String id);
+	
+
 }

+ 59 - 0
src/main/java/com/goafanti/common/enums/InterestType.java

@@ -0,0 +1,59 @@
+package com.goafanti.common.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+
+public enum InterestType {
+	ACHIEVEMENT(0, "成果"),
+	DEMAND(1, "需求"),
+	EXPERTS(2, "专家"),
+	POLICY(3,"政策"),
+	UNAUDITED(4,"活动"),
+	OTHER(5, "其他");
+
+	private InterestType(Integer code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	private static Map<Integer, InterestType> status = new HashMap<Integer, InterestType>();
+
+	static {
+		for (InterestType value : InterestType.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+
+	public static InterestType getStatus(Integer code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return OTHER;
+	}
+
+	public static InterestType getStatus(String code) {
+		if (StringUtils.isNumeric(code)) {
+			return getStatus(Integer.parseInt(code));
+		}
+		return OTHER;
+	}
+
+	public static boolean containsType(Integer code) {
+		return status.containsKey(code);
+	}
+
+	private Integer	code;
+	private String	desc;
+
+	public Integer getCode() {
+		return code;
+	}
+
+	public String getDesc() {
+		return desc;
+	}
+
+}
+

+ 23 - 4
src/main/java/com/goafanti/common/mapper/AchievementMapper.xml

@@ -1027,11 +1027,14 @@
    <select id="findAchievementListByPage" parameterType="String" resultType="com.goafanti.achievement.bo.AchievementListBo">
   	select 
   		id, serial_number as serialNumber, data_category as dataCategory, 
-  		name, keyword, category, 
-  		owner_name as ownerName, owner_type as ownerType, owner_mobile as ownerMobile,
+  		name, keyword, category, introduction,owner_postal_address as ownerPostalAddress,
+  		owner_name as ownerName, owner_type as ownerType, owner_mobile as ownerMobile,field_a as fieldA,field_b as fieldB,field_c as fieldC,
   		status, release_date as releaseDate, audit_status as auditStatus
   	from achievement
-  	where deleted_sign = 0 and owner_id = #{ownerId,jdbcType=VARCHAR}
+  	where deleted_sign = 0 
+  	<if test="ownerId != null">
+  	and owner_id = #{ownerId,jdbcType=VARCHAR}
+  	</if>
   	<if test="serialNumber != null">
 		and  serial_number = #{serialNumber,jdbcType=INTEGER}
 	</if>
@@ -1073,7 +1076,10 @@
   	select 
   		count(1)
   	from achievement
-  	where deleted_sign = 0 and owner_id = #{ownerId,jdbcType=VARCHAR}
+  	where deleted_sign = 0 
+  	  	<if test="ownerId != null">
+  	and owner_id = #{ownerId,jdbcType=VARCHAR}
+  	</if>
   	<if test="serialNumber != null">
 		and  serial_number = #{serialNumber,jdbcType=INTEGER}
 	</if>
@@ -1665,4 +1671,17 @@
   	    order by a.release_date desc limit 0,4
   </select>
   
+  <select id="countInterest" resultType="Integer">
+  	select count(0)
+  	from achievement_interest 
+  	where achievement_id=#{achievementId,jdbcType=VARCHAR}
+  	</select>
+  	
+  	<select id="achievementInterest" resultType="com.goafanti.achievement.bo.AchievementInterestBo">
+  	select
+		a.id,a.name,a.create_time as createTime
+	from achievement_interest ai
+	LEFT  join achievement a on ai.achievement_id=a.id
+	where uid=#{uid,jdbcType=VARCHAR}
+  	</select>
 </mapper>

+ 155 - 0
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -154,6 +154,21 @@
       <if test="departmentId != null">
      	department_id = #{departmentId,jdbcType=VARCHAR},
       </if>
+      <if test="status != null">
+     	status = #{status,jdbcType=VARCHAR},
+      </if>
+      <if test="userNo != null">
+     	user_no = #{userNo,jdbcType=VARCHAR},
+      </if>
+      <if test="duty != null">
+     	duty = #{duty,jdbcType=VARCHAR},
+      </if>
+      <if test="district != null">
+     	district = #{district,jdbcType=VARCHAR},
+      </if>
+      <if test="headPortraitUrl != null">
+     	head_portrait_url = #{headPortraitUrl,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -370,4 +385,144 @@
   <select id="listAdminByName" parameterType="java.lang.String" resultMap="BaseResultMap">
 	select id,name from admin where name like concat('%',#{name},'%')  
   </select>
+  <!--*************************************************************************-->
+  <select id= "selectAdminListByPage" parameterType="java.lang.String" resultType="com.goafanti.admin.bo.AdminListBo" >
+  	select 
+   		 a.user_no as userNo, a.mobile, a.name, 
+   		 a.position, a.email, a.id,
+   		 a.province,
+   		 a.city,
+   		 a.create_time as createTime, 
+   		 aa.name as superior, 
+   		 a.superior_id as superiorId,
+   		 a.department_id as departmentId,
+   		 dm.name as departmentName,
+   		 a.duty,a.status
+    from admin a 
+    left join admin_location al on a.id = al.admin_id
+    left join admin aa on aa.id = a.superior_id
+    left join department_management dm on a.department_id = dm.id
+    left join user_role ur on a.id=ur.uid
+    where a.id <![CDATA[ <> ]]> '1'
+    and (a.status !='注销' or a.status is null)
+    <if test = "name != null"> 
+    	and a.name = #{name,jdbcType=VARCHAR}
+    </if>
+    <if test = "departmentId != null">
+    	and a.department_id = #{departmentId,jdbcType=VARCHAR}
+    </if>
+    <if test = "rid != null">
+    	and ur.rid = #{rid,jdbcType=VARCHAR}
+    </if>
+    <if test = "duty != null">
+    	and a.duty = #{duty,jdbcType=VARCHAR}
+    </if>
+    <if test = "position != null">
+    	and a.position = #{position,jdbcType=VARCHAR}
+    </if>
+    <if test = "status != null">
+    	and a.status = #{status,jdbcType=VARCHAR}
+    </if>
+    <if test = "mobile != null"> 
+   		and a.mobile = #{mobile,jdbcType=VARCHAR}
+    </if>
+    <if test = "superiorId != null"> 
+   		and a.superior_id = #{superiorId,jdbcType=VARCHAR}
+    </if>
+    group by a.id
+    order by a.number 
+    <if test="page_sql!=null">
+			${page_sql}
+	</if>
+  </select>
+  <select id = "selectAdminCount" parameterType="java.lang.String" resultType="java.lang.Integer">
+   	select count(t.counts) 
+   	from(select id,count(*) counts from admin a
+   	left join user_role ur on a.id=ur.uid
+    where id <![CDATA[ <> ]]> '1'
+    and (a.status != '注销' or a.status is null)
+    <if test = "name != null"> 
+    	and a.name = #{name,jdbcType=VARCHAR}
+    </if>
+    <if test = "departmentId != null">
+    	and a.department_id = #{departmentId,jdbcType=VARCHAR}
+    </if>
+    <if test = "rid != null">
+    	and ur.rid = #{rid,jdbcType=VARCHAR}
+    </if>
+    <if test = "duty != null">
+    	and a.duty = #{duty,jdbcType=VARCHAR}
+    </if>
+    <if test = "position != null">
+    	and a.position = #{position,jdbcType=VARCHAR}
+    </if>
+    <if test = "status != null">
+    	and a.status = #{status,jdbcType=VARCHAR}
+    </if>
+    <if test = "mobile != null"> 
+   		and a.mobile = #{mobile,jdbcType=VARCHAR}
+    </if>
+    <if test = "superiorId != null"> 
+   		and a.superior_id = #{superiorId,jdbcType=VARCHAR}
+    </if>
+    group by a.mobile)t
+  </select>
+  <insert id="insertn" parameterType="com.goafanti.common.model.Admin" >
+    insert into admin (id, mobile, name, 
+      password, email, create_time, 
+      number, province, position, superior_id, city,department_id,status,user_no,duty,district,head_portrait_url)
+    values (#{id,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
+      #{password,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{number,jdbcType=INTEGER}, #{province,jdbcType=INTEGER}, #{position,jdbcType=VARCHAR},
+      #{superiorId,jdbcType=VARCHAR}, #{city,jdbcType=INTEGER},#{departmentId,jdbcType=VARCHAR},
+      #{status,jdbcType=VARCHAR},#{userNo,jdbcType=VARCHAR},#{duty,jdbcType=VARCHAR},#{district,jdbcType=VARCHAR},#{headPortraitUrl,jdbcType=VARCHAR}
+      )
+  </insert>
+  <select id="selectUserNoBySuperiorId" parameterType="java.lang.String" resultType="java.lang.String">
+  	select 
+   		user_no as userNo
+    from admin 
+    where
+    	id=#{superiorId,jdbcType=VARCHAR}
+  </select>
+  <select id="selectCountBySuperiorId" parameterType="java.lang.String" resultType="java.lang.Integer">
+  	select 
+   		count(1)
+    from admin 
+    where
+    	superior_id=#{superiorId,jdbcType=VARCHAR}
+  </select>
+  <select id="selectIdByUserNo" parameterType="java.lang.String" resultType="java.lang.String">
+  		select
+  		id
+  		from admin
+  		where
+  		user_no=#{UserNo,jdbcType=VARCHAR}
+  </select>
+  <select id= "selectAllByid" parameterType="java.lang.String" resultType="com.goafanti.common.model.Admin" >
+  	select 
+   	  id, mobile, name, 
+      password, email, create_time as createTime, 
+      province, position, 
+      superior_id as superiorId,department_id as departmentId,
+      status,user_no as userNo,duty,district,head_portrait_url as headPortraitUrl
+    from admin 
+    where 
+    id=#{id,jdbcType=VARCHAR}
+  </select>
+  <select id= "selectNameByid" parameterType="java.lang.String" resultType="java.lang.String" >
+  	select 
+   	  name
+    from admin 
+    where 
+    id=#{id,jdbcType=VARCHAR}
+  </select>
+  <select id= "selectRolesByUid" parameterType="java.lang.String" resultType="java.lang.String">
+  	select
+  	  r.role_name as roles
+  	from user_role ur
+  	left join role r on r.id = ur.rid
+  	where
+  	uid=#{id,jdbcType=VARCHAR}
+  </select>
 </mapper>

+ 110 - 2
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -41,6 +41,8 @@
     <result column="tech_broker_id" property="techBrokerId" jdbcType="VARCHAR" />
     <result column="boutique" property="boutique" jdbcType="INTEGER" />
     <result column="uid" property="uid" jdbcType="VARCHAR" />
+    <result column="urgent_days" property="urgentDays" jdbcType="INTEGER" />
+    <result column="urgent_money" property="urgentMoney" jdbcType="DECIMAL" />
   </resultMap>
   <sql id="Base_Column_List" >
     id, serial_number, data_category, name, keyword, info_sources, industry_category_a, 
@@ -49,13 +51,14 @@
     fixed_scheme, cost_escrow, budget_cost, validity_period, employer_id, employer_name, 
     employer_address, employer_contacts, employer_contacts_mobile, employer_contacts_mailbox, 
     contacts, status, release_status, release_date, create_time, principal_id, deleted_sign,
-    audit_status, tech_broker_id,boutique
+    audit_status, tech_broker_id,boutique,urgent_money,urgent_days
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
     select 
     <include refid="Base_Column_List" />
     from demand
     where id = #{id,jdbcType=VARCHAR}
+    
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
     delete from demand
@@ -1420,5 +1423,110 @@
 		interest.uid = #{uid,jdbcType=INTEGER}
 		limit 0,4
 	</select>
-	
+	<select id="countInterest" resultType="Integer">
+	select count(0)
+	from demand_interest
+	where demand_id = #{demandId,jdbcType=VARCHAR}
+	</select> 
+	<select id="findAppDemandListByPage" parameterType="String" resultType="com.goafanti.demand.bo.DemandListBo">
+  		select 
+	  d.id, d.serial_number as serialNumber, d.data_category as dataCategory, 
+	  d.name, d.keyword, d.demand_type as demandType, d.industry_category_a as industryCategoryA, d.industry_category_b as industryCategoryB, d.industry_category_c as industryCategoryC,
+	  d.validity_period as validityPeriod, d.status, d.release_status as releaseStatus, 
+	  d.release_date as releaseDate, d.employer_id as employerId, d.audit_status as auditStatus,
+	  d.urgent_money as urgentMoney,d.urgent_days as  urgentDays,d.employer_address as employerAddress,d.problem_des as problemDes
+	from  demand d 
+	where d.deleted_sign = 0 
+	<if test="employerId != null">
+	and d.employer_id = #{employerId, jdbcType=VARCHAR}
+	</if>
+	<if test="serialNumber != null">
+		and  d.serial_number = #{serialNumber,jdbcType=INTEGER}
+	</if>
+	<if test="auditStatus != null">
+		and  d.audit_status = #{auditStatus,jdbcType=INTEGER}
+	</if>
+	<if test="name != null">
+		and  d.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+	</if>
+	<if test="keyword != null">
+		and  d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
+	</if>
+	<if test="demandType != null">
+		and  d.demand_type = #{demandType,jdbcType=INTEGER}
+	</if>
+	<if test="status != null">
+		and  d.status = #{status,jdbcType=VARCHAR}
+	</if>
+	<if test="releaseStatus != null">
+		and  d.release_status = #{releaseStatus,jdbcType=VARCHAR}
+	</if>
+	<if test="vStart != null">
+	   and d.validity_period <![CDATA[ >= ]]> #{vStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="vEnd != null">
+	   and d.validity_period <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="rStart != null">
+       and	d.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="rEnd != null">
+	   and d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
+	</if>
+  	order by d.serial_number desc
+  	<if test="page_sql!=null">
+		${page_sql}
+	</if>
+  </select>
+  
+  <select id="findAppDemandCount" parameterType="String" resultType="java.lang.Integer">
+  		select count(1)
+	from  demand d 
+	where d.deleted_sign = 0 
+	<if test="employerId != null">
+	and d.employer_id = #{employerId, jdbcType=VARCHAR}
+	</if>
+	<if test="serialNumber != null">
+		and  d.serial_number = #{serialNumber,jdbcType=INTEGER}
+	</if>
+	<if test="auditStatus != null">
+		and  d.audit_status = #{auditStatus,jdbcType=INTEGER}
+	</if>
+	<if test="name != null">
+		and  d.name like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
+	</if>
+	<if test="keyword != null">
+		and  d.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
+	</if>
+	<if test="demandType != null">
+		and  d.demand_type = #{demandType,jdbcType=INTEGER}
+	</if>
+	<if test="status != null">
+		and  d.status = #{status,jdbcType=VARCHAR}
+	</if>
+	<if test="releaseStatus != null">
+		and  d.release_status = #{releaseStatus,jdbcType=VARCHAR}
+	</if>
+	<if test="vStart != null">
+	   and d.validity_period <![CDATA[ >= ]]> #{vStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="vEnd != null">
+	   and d.validity_period <![CDATA[ < ]]> #{vEnd,jdbcType=TIMESTAMP}
+	</if>
+	<if test="rStart != null">
+       and	d.release_date <![CDATA[ >= ]]> #{rStart,jdbcType=TIMESTAMP}
+	</if>
+	<if test="rEnd != null">
+	   and  d.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
+	</if>
+  </select>
+  
+  <select id="demandInterest" resultType="com.goafanti.demand.bo.DemandInterestBo">
+  	select
+		d.id,d.name,di.create_time as createTime
+	from demand_interest di
+	LEFT  join demand d on di.demand_id=d.id
+	where uid=#{uid,jdbcType=VARCHAR}
+  </select>
+  
 </mapper>

+ 7 - 0
src/main/java/com/goafanti/common/mapper/NewsMapper.xml

@@ -316,5 +316,12 @@
 		a.type =2
 		order by create_time desc
 	</select>
+	<select id="newsInterest" resultType="com.goafanti.news.bo.newsInterestBo">
+		select
+		n.id,n.title ,n.create_time as createTime
+	from news_interest ni
+	LEFT  join news n on ni.new_id=n.id
+	where uid=#{uid,jdbcType=VARCHAR}
+	</select>
 	
 </mapper>

+ 1 - 1
src/main/java/com/goafanti/common/mapper/OrganizationManagementMapper.xml

@@ -478,7 +478,7 @@
 	</select>
 	<select id="selectName" resultType="com.goafanti.admin.bo.AdminListBo">
 		select
-		name
+		name,id
 		from admin
 		where
 		name  like concat('%',#{name,jdbcType=VARCHAR},'%')

+ 2 - 0
src/main/java/com/goafanti/common/mapper/UserCareerMapper.xml

@@ -206,4 +206,6 @@
     from user_career
     where uid = #{uid,jdbcType=VARCHAR}
   </select>
+  
+  
 </mapper>

+ 40 - 3
src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml

@@ -834,8 +834,10 @@
   	select 
   		   t.id, t.uid, t.username, t.sex, t.date_of_birth_year as dateOfBirthYear,
   		   t.date_of_birth_month as dateOfBirthMonth, t.id_number as idNumber, t.audit_status as auditStatus,
-		   u.mobile, u.number from user u left JOIN user_identity t
-	on t.uid = u.id where t.uid=#{uid,jdbcType=VARCHAR}
+		   u.mobile, u.number 
+		   from user u left JOIN user_identity t
+	on t.uid = u.id 
+	where t.uid=#{uid,jdbcType=VARCHAR}
   </select>
   
   <select id="selectAuditorUserIdentityByUserId" parameterType="java.lang.String" resultType="com.goafanti.user.bo.AuditorUserIdentityDetailBo">
@@ -1015,6 +1017,41 @@
 		<!-- and b.international_flag and b.audit_status = 5 and b.expert = 1 -->
 		order by 
 			a.create_time desc 
-		limit 0,6	 
+		limit 0,6	
+	</select> 
+	 <select id="selectUserIdentityByUid" resultType="com.goafanti.user.bo.UserIdentityBo">
+	 	select 	t.id ,t.uid,t.username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,t.industry,t.city,u.introduction,u.head_portrait_url as headPortraitUrl
+	from user_identity t left JOIN user u
+	on t.uid = u.id
+	where t.uid=#{uid,jdbcType=VARCHAR}
 	 </select>
+	 
+	 <select id="findUserIdentityListByPage" parameterType="String" resultType="com.goafanti.user.bo.UserIdentityBo">
+  	select 	t.id ,t.uid,t.username,t.work_unit as workUnit,t.province,t.area,t.professional_title as professionalTitle,t.industry,t.city,u.introduction,u.head_portrait_url as headPortraitUrl
+	from user_identity t left JOIN user u
+	on t.uid = u.id
+	where 1=1
+    <if test="industry != null">
+        and t.industry = #{industry,jdbcType=VARCHAR}
+    </if>
+    <if test="page_sql!=null">
+        ${page_sql}
+    </if>
+  </select>
+  
+  <select id="findUserIdentityCount" parameterType="String" resultType="java.lang.Integer">
+  	select count(0) 
+   from user u left JOIN user_identity t
+	on t.uid = u.id
+	where 1=1
+    <if test="industry != null">
+        and t.industry = #{industry,jdbcType=VARCHAR}
+    </if>
+  </select>
+  
+  <select id="countInterest"  resultType="java.lang.Integer">
+  select count(0)
+  	from user_interest 
+  	where to_uid=#{uid,jdbcType=VARCHAR}
+  </select>
 </mapper>

+ 11 - 1
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -1410,7 +1410,16 @@
 			and type = #{type,jdbcType=INTEGER}
 		</if>
 	</select>
-	
+
+	<select id="userInterest" resultType="com.goafanti.user.bo.UserInterestBo">
+		select
+		t.to_uid as id,y.username as name,y.work_unit as workUnit,y.professional_title as professionalTitle,t.create_time as createTime
+		from user_interest t
+		LEFT  join user_identity y on t.to_uid=y.uid
+		LEFT  join user u on t.to_uid=u.id
+		where t.from_uid=#{uid,jdbcType=VARCHAR}
+
+	</select>
 	<select id="selectBaseInfo" parameterType="java.lang.String" resultMap="BaseResultMap">
 		select
 			id, mobile, nickname, email, number, type, 
@@ -1418,5 +1427,6 @@
    			identify_name, is_member
    		from user where 
    			id = #{id,jdbcType=VARCHAR}
+
 	</select>
 </mapper>

+ 76 - 1
src/main/java/com/goafanti/common/model/Admin.java

@@ -47,7 +47,7 @@ public class Admin extends BaseModel implements AftUser {
 	 */
 	private Integer				province;
 	/**
-	 * 
+	 * 
 	 */
 	private String				position;
 
@@ -55,6 +55,11 @@ public class Admin extends BaseModel implements AftUser {
 	 * 上级管理用户ID
 	 */
 	private String				superiorId;
+	
+	/**
+	 * 上级管理用户名称
+	 */
+	private String	superior;
 
 	/**
 	 * 所在市
@@ -65,7 +70,77 @@ public class Admin extends BaseModel implements AftUser {
 	 * 部门管理
 	 */
 	private String 				departmentId;
+	/**
+	 * 用户状态
+	 */
+	private String 				status;
+	/**
+	 * 用户编号
+	 */
+	private String 				userNo;
+	/**
+	 * 职务
+	 */
+	private String 				duty;
+	
+	/**
+	 * 地区
+	 */
+	private String 				district;
+	
+	/**
+	 * 用户头像
+	 */
+	private String 				headPortraitUrl;	
 	
+	public String getSuperior() {
+		return superior;
+	}
+
+	public void setSuperior(String superior) {
+		this.superior = superior;
+	}
+
+	public String getHeadPortraitUrl() {
+		return headPortraitUrl;
+	}
+
+	public void setHeadPortraitUrl(String headPortraitUrl) {
+		this.headPortraitUrl = headPortraitUrl;
+	}
+
+	public String getDistrict() {
+		return district;
+	}
+
+	public void setDistrict(String district) {
+		this.district = district;
+	}
+
+	public String getStatus() {
+		return status;
+	}
+
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
+	public String getUserNo() {
+		return userNo;
+	}
+
+	public void setUserNo(String userNo) {
+		this.userNo = userNo;
+	}
+
+	public String getDuty() {
+		return duty;
+	}
+
+	public void setDuty(String duty) {
+		this.duty = duty;
+	}
+
 	public String getSuperiorId() {
 		return superiorId;
 	}

+ 19 - 0
src/main/java/com/goafanti/common/model/Demand.java

@@ -204,6 +204,9 @@ public class Demand {
      * 备注
      */
     private String remark;
+    
+    private Integer  urgentDays;
+	private Integer urgentMoney;
 
     public String getRemark() {
 		return remark;
@@ -560,4 +563,20 @@ public class Demand {
 	public void setTextFileUrlDownloadFileName(String textFileDownloadFileName) {
 
 	}
+
+	public Integer getUrgentDays() {
+		return urgentDays;
+	}
+
+	public void setUrgentDays(Integer urgentDays) {
+		this.urgentDays = urgentDays;
+	}
+
+	public Integer getUrgentMoney() {
+		return urgentMoney;
+	}
+
+	public void setUrgentMoney(Integer urgentMoney) {
+		this.urgentMoney = urgentMoney;
+	}
 }

+ 45 - 0
src/main/java/com/goafanti/demand/bo/DemandInterestBo.java

@@ -0,0 +1,45 @@
+package com.goafanti.demand.bo;
+
+import java.util.Date;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import com.goafanti.common.constant.AFTConstants;
+
+public class DemandInterestBo {
+	private String id;
+	private String name;
+	private Date createTime;
+	private Integer type;
+	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 Date getCreateTime() {
+		return createTime;
+	}
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+	public String getCreateTimeFormattedDate() {
+		if (this.createTime == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDD);
+		}
+	}
+	public Integer getType() {
+		return type;
+	}
+	public void setType(Integer type) {
+		this.type = type;
+	}
+}

+ 101 - 5
src/main/java/com/goafanti/demand/bo/DemandListBo.java

@@ -51,9 +51,42 @@ public class DemandListBo {
 	
 	private Integer		industryCategoryA;
 
-	private String		industryCategoryAS;
+	private Integer		industryCategoryB;
+	
+	private Integer		industryCategoryC;
+	
+	private String      problemDes;
 
 	private String		pictureUrl;
+	private String		IndustryCategory1;
+	
+	private String		IndustryCategory2;
+	
+	public String getIndustryCategory1() {
+		return IndustryCategory1;
+	}
+
+	public void setIndustryCategory1(String industryCategory1) {
+		IndustryCategory1 = industryCategory1;
+	}
+
+	public String getIndustryCategory2() {
+		return IndustryCategory2;
+	}
+
+	public void setIndustryCategory2(String industryCategory2) {
+		IndustryCategory2 = industryCategory2;
+	}
+
+	public String getIndustryCategory3() {
+		return IndustryCategory3;
+	}
+
+	public void setIndustryCategory3(String industryCategory3) {
+		IndustryCategory3 = industryCategory3;
+	}
+
+	private String		IndustryCategory3;
 	
 	/**
 	 * 是否发布(0-未发布,1-发布)
@@ -61,16 +94,30 @@ public class DemandListBo {
 	private Integer	releaseStatus;
 
 	private String	employerId;
+	
+	private String  employerAddress;
 
 	/**
 	 * 审核状态
 	 */
 	private Integer	auditStatus;
+
+	/**
+	 * 关注数量
+	 */
+	private String countInterest;
+	/**
+	 *  
+	 */
+	private Integer  urgentDays;
+	private Integer urgentMoney;
+
 	
 	private Date createTime;
 	
 	private String remark;
 
+
 	@JsonFormat(shape = Shape.STRING)
 	public Integer getAuditStatus() {
 		return auditStatus;
@@ -211,12 +258,12 @@ public class DemandListBo {
 		this.industryCategoryA = industryCategoryA;
 	}
 
-	public String getIndustryCategoryAS() {
-		return industryCategoryAS;
+	public Integer getIndustryCategoryB() {
+		return industryCategoryB;
 	}
 
-	public void setIndustryCategoryAS(String industryCategoryAS) {
-		this.industryCategoryAS = industryCategoryAS;
+	public void setIndustryCategoryB(Integer industryCategoryB) {
+		this.industryCategoryB = industryCategoryB;
 	}
 
 	public String getPictureUrl() {
@@ -235,6 +282,54 @@ public class DemandListBo {
 		this.demandTypeS = demandTypeS;
 	}
 
+
+	public String getCountInterest() {
+		return countInterest;
+	}
+
+	public void setCountInterest(String countInterest) {
+		this.countInterest = countInterest;
+	}
+
+	public Integer getUrgentDays() {
+		return urgentDays;
+	}
+
+	public void setUrgentDays(Integer urgentDays) {
+		this.urgentDays = urgentDays;
+	}
+
+	public Integer getUrgentMoney() {
+		return urgentMoney;
+	}
+
+	public void setUrgentMoney(Integer urgentMoney) {
+		this.urgentMoney = urgentMoney;
+	}
+
+	public String getEmployerAddress() {
+		return employerAddress;
+	}
+
+	public void setEmployerAddress(String employerAddress) {
+		this.employerAddress = employerAddress;
+	}
+
+	public String getProblemDes() {
+		return problemDes;
+	}
+
+	public void setProblemDes(String problemDes) {
+		this.problemDes = problemDes;
+	}
+
+	public Integer getIndustryCategoryC() {
+		return industryCategoryC;
+	}
+
+	public void setIndustryCategoryC(Integer industryCategoryC) {
+		this.industryCategoryC = industryCategoryC;
+	}
 	public Date getCreateTime() {
 		return createTime;
 	}
@@ -256,6 +351,7 @@ public class DemandListBo {
 
 	public void setRemark(String remark) {
 		this.remark = remark;
+
 	}
 
 	

+ 7 - 1
src/main/java/com/goafanti/demand/service/DemandService.java

@@ -74,7 +74,7 @@ public interface DemandService {
 
 	int updateByPrimaryKeySelective(Demand d);
 
-	Demand selectDemandDetail(String id);
+	DemandListBo selectDemandDetail(String id);
 
 	/** 精品需求 **/
 	Pagination<BoutiqueListBo> boutiqueSearchList(Integer industryCategoryA,Integer pNo, Integer pSize);
@@ -84,4 +84,10 @@ public interface DemandService {
 	
 	/**猜你喜欢**/
 	List<DemandListBo> selectCsutomerLike();
+
+	Pagination<DemandSearchListBo> listAppDemand(Integer auditStatus, Integer serialNumber, String name, String keyword, Integer demandType,
+			String validityPeriodStartDate, String validityPeriodEndDate, Integer status, Integer releaseStatus,
+			String releaseDateStartDate, String releaseDateEndDate, Integer pNo, Integer pSize);
+
+	List<?> selectinterest(String uid,Integer type);
 }

+ 103 - 2
src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java

@@ -4,6 +4,7 @@ import java.math.BigDecimal;
 import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.Calendar;
+import java.util.Collection;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -16,12 +17,17 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import com.goafanti.achievement.bo.AchievementDemandListBo;
+import com.goafanti.achievement.bo.AchievementInterestBo;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.AchievementDemandCountMapper;
 import com.goafanti.common.dao.AchievementDemandMapper;
 import com.goafanti.common.dao.AchievementKeywordMapper;
+import com.goafanti.common.dao.AchievementMapper;
 import com.goafanti.common.dao.DemandKeywordMapper;
 import com.goafanti.common.dao.DemandMapper;
+import com.goafanti.common.dao.FieldGlossoryMapper;
+import com.goafanti.common.dao.IndustryCategoryMapper;
+import com.goafanti.common.dao.NewsMapper;
 import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.OrganizationIdentityMapper;
 import com.goafanti.common.dao.UserIdentityMapper;
@@ -34,6 +40,7 @@ import com.goafanti.common.enums.DemandPortalSearchSignType;
 import com.goafanti.common.enums.DemandReleaseStatus;
 import com.goafanti.common.enums.DemandStatus;
 import com.goafanti.common.enums.DemandSwitchSign;
+import com.goafanti.common.enums.InterestType;
 import com.goafanti.common.enums.NoticeReadStatus;
 import com.goafanti.common.enums.NoticeStatus;
 import com.goafanti.common.enums.UserType;
@@ -50,16 +57,19 @@ import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.demand.bo.DemandImportBo;
+import com.goafanti.demand.bo.DemandInterestBo;
 import com.goafanti.demand.bo.DemandListBo;
 import com.goafanti.demand.bo.DemandManageDetailBo;
 import com.goafanti.demand.bo.DemandManageListBo;
 import com.goafanti.demand.bo.DemandPartnerListBo;
 import com.goafanti.demand.service.DemandService;
+import com.goafanti.news.bo.newsInterestBo;
 import com.goafanti.portal.bo.BoutiqueListBo;
 import com.goafanti.portal.bo.DemandPortalDetailBo;
 import com.goafanti.portal.bo.DemandPortalSimilarListBo;
 import com.goafanti.portal.bo.DemandSearchDetailBo;
 import com.goafanti.portal.bo.DemandSearchListBo;
+import com.goafanti.user.bo.UserInterestBo;
 
 @Service
 public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements DemandService {
@@ -68,6 +78,8 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	@Autowired
 	private UserMapper						userMapper;
 	@Autowired
+	private NewsMapper 						newsMapper;
+	@Autowired
 	private UserRoleMapper					userRoleMapper;
 	@Autowired
 	private NoticeMapper					noticeMapper;
@@ -83,6 +95,10 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	private UserIdentityMapper				userIdentityMapper;
 	@Autowired
 	private OrganizationIdentityMapper		organizationIdentityMapper;
+	@Autowired
+	AchievementMapper					 	achievementMapper;
+	@Autowired
+	FieldGlossoryMapper 					fieldGlossoryMapper;
 
 	@SuppressWarnings("unchecked")
 	@Override
@@ -759,8 +775,20 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 	}
 
 	@Override
-	public Demand selectDemandDetail(String id) {
-		return demandMapper.selectByPrimaryKey(id);
+	public DemandListBo selectDemandDetail(String id) {
+		Demand d1=demandMapper.selectByPrimaryKey(id);
+		DemandListBo d=new DemandListBo();
+		BeanUtils.copyProperties(d1, d);
+		if (null!=d.getIndustryCategoryA()) {
+			d.setIndustryCategory1(fieldGlossoryMapper.selectByPrimaryKey(d.getIndustryCategoryA()).getName());
+		}
+		if (null!=d.getIndustryCategoryB()) {
+			d.setIndustryCategory2(String.valueOf(fieldGlossoryMapper.selectByPrimaryKey(d.getIndustryCategoryB()).getName()));
+		}
+		if (null!=d.getIndustryCategoryC()) {
+			d.setIndustryCategory3(String.valueOf(fieldGlossoryMapper.selectByPrimaryKey(d.getIndustryCategoryB()).getName()));
+		}
+		return d;
 	}
 
 	@SuppressWarnings("unchecked")
@@ -782,4 +810,77 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 		return demandMapper.selectCsutomerLike(TokenManager.getUserId());
 	}
 
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<DemandSearchListBo> listAppDemand(Integer auditStatus, Integer serialNumber, String name,
+			String keyword, Integer demandType, String validityPeriodStartDate, String validityPeriodEndDate,
+			Integer status, Integer releaseStatus, String releaseDateStartDate, String releaseDateEndDate, Integer pNo,
+			Integer pSize) {
+		Map<String, Object> params = disposeParams(auditStatus, null, serialNumber, name, keyword, null, demandType,
+				validityPeriodStartDate, validityPeriodEndDate, null, status, releaseStatus, releaseDateStartDate,
+				releaseDateEndDate,null,null, null, null);
+
+		params.put("employerId", TokenManager.getUserId());
+
+		if (pNo == null || pNo < 0) {
+			pNo = 1;
+		}
+
+		if (pSize == null || pSize < 0) {
+			pSize = 10;
+			
+		}
+		Pagination<DemandSearchListBo> p=(Pagination<DemandSearchListBo>) findPage("findAppDemandListByPage", "findAppDemandCount", params, pNo, pSize);
+			List<DemandListBo> list=(List<DemandListBo>) p.getList();
+			for (DemandListBo d : list) {
+				if (null!=d.getIndustryCategoryA()) {
+					d.setIndustryCategory1(fieldGlossoryMapper.selectByPrimaryKey(d.getIndustryCategoryA()).getName());
+				}
+				if (null!=d.getIndustryCategoryB()) {
+					d.setIndustryCategory2(String.valueOf(fieldGlossoryMapper.selectByPrimaryKey(d.getIndustryCategoryB()).getName()));
+				}
+				if (null!=d.getIndustryCategoryC()) {
+					d.setIndustryCategory3(String.valueOf(fieldGlossoryMapper.selectByPrimaryKey(d.getIndustryCategoryB()).getName()));
+				}
+				int i=demandMapper.countInterest(d.getId());
+				d.setCountInterest(String.valueOf(i));
+			}
+		return p;
+	}
+
+	@Override
+	public List<Object> selectinterest(String uid,Integer type) {
+		List<Object> list=new ArrayList<>();
+		if (null==type||type==InterestType.POLICY.getCode()) {
+			List<newsInterestBo>nm=newsMapper.newsInterest(uid);
+			for (newsInterestBo n : nm) {
+				n.setType(InterestType.POLICY.getCode());
+				list.add(n);
+			}
+		}
+		if (null==type||type==InterestType.EXPERTS.getCode()) {
+			List<UserInterestBo>um=userMapper.userInterest(uid);
+			for (UserInterestBo u : um) {
+				u.setType(InterestType.EXPERTS.getCode());
+				list.add(u);
+			}
+		}
+		if (null==type||type==InterestType.DEMAND.getCode()) {
+			List<DemandInterestBo> dm=demandMapper.demandInterest(uid);
+			for (DemandInterestBo d : dm) {
+				d.setType(InterestType.DEMAND.getCode());
+				list.add(d);
+			}
+		}
+		if (null==type||type==InterestType.ACHIEVEMENT.getCode()) {
+			List<AchievementInterestBo> am=achievementMapper.achievementInterest(uid);
+			for (AchievementInterestBo a : am) {
+				a.setType(InterestType.ACHIEVEMENT.getCode());
+				list.add(a);
+			}
+		}
+		return list; 
+	}
+		
+	
 }

+ 45 - 0
src/main/java/com/goafanti/news/bo/newsInterestBo.java

@@ -0,0 +1,45 @@
+package com.goafanti.news.bo;
+
+import java.util.Date;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import com.goafanti.common.constant.AFTConstants;
+
+public class newsInterestBo {
+	private String id;
+	private String title;
+	private Date createTime;
+	private Integer type;
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public String getTitle() {
+		return title;
+	}
+	public void setTitle(String title) {
+		this.title = title;
+	}
+	public Date getCreateTime() {
+		return createTime;
+	}
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+	public String getCreateTimeFormattedDate() {
+		if (this.createTime == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDD);
+		}
+	}
+	public Integer getType() {
+		return type;
+	}
+	public void setType(Integer type) {
+		this.type = type;
+	}
+}

+ 7 - 0
src/main/java/com/goafanti/portal/bo/BoutiqueListBo.java

@@ -14,6 +14,7 @@ public class BoutiqueListBo {
 	private String pictureUrl;
 	private String technicalpictureurl;
 	private Integer boutiqueFlag;
+	private String employerAddress;
 	/** 拥有者类别 0 - 个人, 1 - 组织 **/
 	private Integer ownerType;
 	
@@ -83,5 +84,11 @@ public class BoutiqueListBo {
 	public void setBoutiqueFlag(Integer boutiqueFlag) {
 		this.boutiqueFlag = boutiqueFlag;
 	}
+	public String getEmployerAddress() {
+		return employerAddress;
+	}
+	public void setEmployerAddress(String employerAddress) {
+		this.employerAddress = employerAddress;
+	}
 
 }

+ 20 - 0
src/main/java/com/goafanti/portal/bo/DemandSearchListBo.java

@@ -81,6 +81,10 @@ public class DemandSearchListBo {
 	 */
 	private Integer 	boutique;
 	
+	private Integer  urgentDays;
+	
+	private Integer urgentMoney;
+	
 	public String getEmployerName() {
 		return employerName;
 	}
@@ -217,5 +221,21 @@ public class DemandSearchListBo {
 		this.boutique = boutique;
 	}
 
+	public Integer getUrgentDays() {
+		return urgentDays;
+	}
+
+	public void setUrgentDays(Integer urgentDays) {
+		this.urgentDays = urgentDays;
+	}
+
+	public Integer getUrgentMoney() {
+		return urgentMoney;
+	}
+
+	public void setUrgentMoney(Integer urgentMoney) {
+		this.urgentMoney = urgentMoney;
+	}
+
 	
 }

+ 73 - 0
src/main/java/com/goafanti/portal/bo/UserSubscriberListBo.java

@@ -22,6 +22,71 @@ public class UserSubscriberListBo {
 	private String	position;
 	/**国际化*/
 	private String	international;
+	
+	private String  professionalTitle;
+	public String getIntroduction() {
+		return introduction;
+	}
+
+	public void setIntroduction(String introduction) {
+		this.introduction = introduction;
+	}
+
+	public String getHeadPortraitUrl() {
+		return headPortraitUrl;
+	}
+
+	public void setHeadPortraitUrl(String headPortraitUrl) {
+		this.headPortraitUrl = headPortraitUrl;
+	}
+
+	public String getProvince0() {
+		return province0;
+	}
+
+	public void setProvince0(String province0) {
+		this.province0 = province0;
+	}
+
+	public String getCity0() {
+		return city0;
+	}
+
+	public void setCity0(String city0) {
+		this.city0 = city0;
+	}
+
+	public String getArea0() {
+		return area0;
+	}
+
+	public void setArea0(String area0) {
+		this.area0 = area0;
+	}
+
+	public String getIndustry0() {
+		return industry0;
+	}
+
+	public void setIndustry0(String industry0) {
+		this.industry0 = industry0;
+	}
+
+	public String getCountInterest() {
+		return countInterest;
+	}
+
+	public void setCountInterest(String countInterest) {
+		this.countInterest = countInterest;
+	}
+
+	private String introduction;
+	private String headPortraitUrl;
+	private String province0;
+	private String city0;
+	private String area0;
+	private String industry0;
+	private String countInterest;
 
 	public String getInternational() {
 		return international;
@@ -111,4 +176,12 @@ public class UserSubscriberListBo {
 		this.province = province;
 	}
 
+	public String getProfessionalTitle() {
+		return professionalTitle;
+	}
+
+	public void setProfessionalTitle(String professionalTitle) {
+		this.professionalTitle = professionalTitle;
+	}
+
 }

+ 92 - 0
src/main/java/com/goafanti/user/bo/UserIdentityBo.java

@@ -5,6 +5,73 @@ import com.goafanti.common.model.UserIdentity;
 public class UserIdentityBo extends UserIdentity {
 	private Long	number;
 	private String	mobile;
+	private String  workUnit;
+	private String  professionalTitle;
+	private String introduction;
+	private String headPortraitUrl;
+	private String province0;
+	private String city0;
+	private String area0;
+	private String industry0;
+	private String countInterest;
+	public String getProvince0() {
+		return province0;
+	}
+
+	public void setProvince0(String province0) {
+		this.province0 = province0;
+	}
+
+	public String getCity0() {
+		return city0;
+	}
+
+	public void setCity0(String city0) {
+		this.city0 = city0;
+	}
+
+	public String getArea0() {
+		return area0;
+	}
+
+	public void setArea0(String area0) {
+		this.area0 = area0;
+	}
+
+	public String getIndustry0() {
+		return industry0;
+	}
+
+	public void setIndustry0(String industry0) {
+		this.industry0 = industry0;
+	}
+
+	public String getWorkUnit() {
+		return workUnit;
+	}
+
+	public void setWorkUnit(String workUnit) {
+		this.workUnit = workUnit;
+	}
+
+	public String getProfessionalTitle() {
+		return professionalTitle;
+	}
+
+	public void setProfessionalTitle(String professionalTitle) {
+		this.professionalTitle = professionalTitle;
+	}
+
+	
+
+	
+	public String getIntroduction() {
+		return introduction;
+	}
+
+	public void setIntroduction(String introduction) {
+		this.introduction = introduction;
+	}
 
 	public Long getNumber() {
 		return number;
@@ -22,4 +89,29 @@ public class UserIdentityBo extends UserIdentity {
 		this.mobile = mobile;
 	}
 
+	public String getHeadPortraitUrl() {
+		return headPortraitUrl;
+	}
+
+	public void setHeadPortraitUrl(String headPortraitUrl) {
+		this.headPortraitUrl = headPortraitUrl;
+	}
+
+	public String getCountInterest() {
+		return countInterest;
+	}
+
+	public void setCountInterest(String countInterest) {
+		this.countInterest = countInterest;
+	}
+
+	@Override
+	public String toString() {
+		return "UserIdentityBo [number=" + number + ", mobile=" + mobile + ", workUnit=" + workUnit
+				+ ", professionalTitle=" + professionalTitle + ", introduction=" + introduction + ", headPortraitUrl="
+				+ headPortraitUrl + ", province0=" + province0 + ", city0=" + city0 + ", area0=" + area0
+				+ ", industry0=" + industry0 + ", countInterest=" + countInterest + "]";
+	}
+	
+
 }

+ 60 - 0
src/main/java/com/goafanti/user/bo/UserInterestBo.java

@@ -0,0 +1,60 @@
+package com.goafanti.user.bo;
+
+import java.util.Date;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import com.goafanti.common.constant.AFTConstants;
+
+public class UserInterestBo {
+	
+	private String id;
+	private String name;
+	private String workUnit;
+	private String professionalTitle;
+	private Date createTime;
+	private Integer type;
+	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 Date getCreateTime() {
+		return createTime;
+	}
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+	public String getCreateTimeFormattedDate() {
+		if (this.createTime == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDD);
+		}
+	}
+	public Integer getType() {
+		return type;
+	}
+	public void setType(Integer type) {
+		this.type = type;
+	}
+	public String getWorkUnit() {
+		return workUnit;
+	}
+	public void setWorkUnit(String workUnit) {
+		this.workUnit = workUnit;
+	}
+	public String getProfessionalTitle() {
+		return professionalTitle;
+	}
+	public void setProfessionalTitle(String professionalTitle) {
+		this.professionalTitle = professionalTitle;
+	}
+}

+ 6 - 0
src/main/java/com/goafanti/user/service/UserCareerService.java

@@ -1,6 +1,8 @@
 package com.goafanti.user.service;
 
 import com.goafanti.common.model.UserCareer;
+import com.goafanti.core.mybatis.page.Pagination;
+
 
 public interface UserCareerService {
 
@@ -10,4 +12,8 @@ public interface UserCareerService {
 
 	int updateByPrimaryKeySelective(UserCareer userCareer);
 
+	
+
+	
+
 }

+ 4 - 0
src/main/java/com/goafanti/user/service/UserIdentityService.java

@@ -37,4 +37,8 @@ public interface UserIdentityService {
 			Integer area,Integer international, Integer pNo, Integer pSize);
 
 	UserIdentityDetailAdminBo selectUserIdentityByUserIdAdmin(String uid);
+	
+	UserIdentityBo expertsDetail(String id);
+
+	Pagination<UserIdentityBo> expertsList(String industry, Integer pNo, Integer pSize);
 }

+ 6 - 0
src/main/java/com/goafanti/user/service/UserInterestService.java

@@ -4,6 +4,9 @@ import com.goafanti.common.model.UserInterest;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.user.bo.InterestUserListBo;
 
+import com.goafanti.user.bo.UserIdentityBo;
+
+
 public interface UserInterestService {
 
 	UserInterest findByFromUidAndToUid(String fromUid, String toUid);
@@ -17,5 +20,8 @@ public interface UserInterestService {
 	Pagination<InterestUserListBo> listInterestUser(Integer pNo, Integer pSize, Integer userType);
 
 	Integer countByToUid(String uid);
+	
+	Pagination<UserIdentityBo> expertsList(String industry, Integer pNo, Integer pSize);
+	
 
 }

+ 15 - 2
src/main/java/com/goafanti/user/service/impl/UserCareerServiceImpl.java

@@ -1,13 +1,21 @@
 package com.goafanti.user.service.impl;
 
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-
 import com.goafanti.common.dao.UserCareerMapper;
 import com.goafanti.common.model.UserCareer;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.demand.bo.DemandListBo;
+
 import com.goafanti.user.service.UserCareerService;
 @Service
-public class UserCareerServiceImpl implements UserCareerService{
+public class UserCareerServiceImpl extends BaseMybatisDao<UserCareerMapper> implements UserCareerService{
     @Autowired
     UserCareerMapper userCareerMapper;
     
@@ -27,4 +35,9 @@ public class UserCareerServiceImpl implements UserCareerService{
 		return userCareerMapper.updateByPrimaryKeySelective(userCareer);
 	}
 
+	
+
+	
+
+	
 }

+ 65 - 0
src/main/java/com/goafanti/user/service/impl/UserIdentityServiceImpl.java

@@ -17,8 +17,11 @@ import org.springframework.stereotype.Service;
 
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.dao.DistrictGlossoryMapper;
+import com.goafanti.common.dao.IndustryCategoryMapper;
 import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.UserIdentityMapper;
+import com.goafanti.common.dao.UserInterestMapper;
 import com.goafanti.common.dao.UserMapper;
 import com.goafanti.common.dao.UserRoleMapper;
 import com.goafanti.common.enums.CertifySubmitType;
@@ -49,6 +52,12 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 	private UserRoleMapper		userRoleMapper;
 	@Autowired
 	private NoticeMapper		noticeMapper;
+	@Autowired
+	DistrictGlossoryMapper districtGlossoryMapper;
+	@Autowired
+	IndustryCategoryMapper industryCategoryMapper;
+	@Autowired
+	UserInterestMapper	userInterestMapper;
 
 	private static final Logger	logger	= LoggerFactory.getLogger(UserIdentityServiceImpl.class);
 
@@ -290,4 +299,60 @@ public class UserIdentityServiceImpl extends BaseMybatisDao<UserIdentityMapper>
 		LoggerUtils.debug(logger, "清除国际专家列表");
 	}
 
+	@Override
+	public UserIdentityBo expertsDetail(String uid) {
+		UserIdentityBo u=userIdentityMapper.selectUserIdentityByUid(uid);
+		if (null!=u.getProvince()) {
+			u.setProvince0(districtGlossoryMapper.selectByPrimaryKey(u.getProvince()).getName());
+		}
+		if (null!=u.getCity()) {
+			u.setCity0(String.valueOf(districtGlossoryMapper.selectByPrimaryKey(u.getCity()).getName()));
+		}
+		if (null!=u.getArea()) {
+			u.setArea0(String.valueOf(districtGlossoryMapper.selectByPrimaryKey(u.getArea()).getName()));
+		}
+		if (null!=u.getIndustry()) {
+			u.setIndustry0(String.valueOf(industryCategoryMapper.selectByPrimaryKey(u.getIndustry()).getName()));
+		}
+		if (null!=u.getUid()) {
+			u.setCountInterest(String.valueOf(userInterestMapper.countByToUid(u.getUid())));
+		}
+		return u;
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<UserIdentityBo> expertsList(String industry, Integer pNo, Integer pSize) {
+		Map<String, Object> params = new HashMap<>();
+		if (StringUtils.isNotBlank(industry)) {
+			params.put("industry", industry);
+		}
+		if (pNo == null || pNo < 0) {
+			pNo = 1;
+		}
+
+		if (pSize == null || pSize < 0 || pSize > 12) {
+			pSize = 10;
+		}
+		Pagination<UserIdentityBo> p=(Pagination<UserIdentityBo>) findPage("findUserIdentityListByPage",
+				"findUserIdentityCount", params, pNo, pSize);
+		List<UserIdentityBo> l=(List<UserIdentityBo>) p.getList();
+		for (UserIdentityBo u : l) {
+			if (null!=u.getProvince()) {
+				u.setProvince0(districtGlossoryMapper.selectByPrimaryKey(u.getProvince()).getName());
+			}
+			if (null!=u.getCity()) {
+				u.setCity0(String.valueOf(districtGlossoryMapper.selectByPrimaryKey(u.getCity()).getName()));
+			}
+			if (null!=u.getArea()) {
+				u.setArea0(String.valueOf(districtGlossoryMapper.selectByPrimaryKey(u.getArea()).getName()));
+			}
+			if (null!=u.getIndustry()) {
+				u.setIndustry0(String.valueOf(industryCategoryMapper.selectByPrimaryKey(u.getIndustry()).getName()));
+			}
+		}
+		
+		return p;
+	}
+
 }

+ 32 - 0
src/main/java/com/goafanti/user/service/impl/UserInterestServiceImpl.java

@@ -2,9 +2,11 @@ package com.goafanti.user.service.impl;
 
 import java.util.Calendar;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -14,6 +16,8 @@ import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.user.bo.InterestUserListBo;
+
+import com.goafanti.user.bo.UserIdentityBo;
 import com.goafanti.user.service.UserInterestService;
 
 @Service
@@ -74,4 +78,32 @@ public class UserInterestServiceImpl extends BaseMybatisDao<UserInterestMapper>
 	public Integer countByToUid(String toUid) {
 		return userInterestMapper.countByToUid(toUid);
 	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<UserIdentityBo> expertsList(String industry, Integer pNo, Integer pSize) {
+		System.out.println(industry);
+		if (pNo == null || pNo < 0) {
+			pNo = 1;
+		}
+
+		if (pSize == null || pSize < 0 || pSize > 10) {
+			pSize = 10;
+		}
+		Map<String, Object> params =new HashMap<String, Object>();
+		if (StringUtils.isNotBlank( industry)) {
+			params.put("industry",industry); 
+		}
+		Pagination<UserIdentityBo> p=(Pagination<UserIdentityBo>) findPage("findUserCareerListByPage",
+				"findUserCareerCount",params,
+				pNo, pSize);
+		List<UserIdentityBo> list=(List<UserIdentityBo>) p.getList();
+		for (UserIdentityBo d : list) {
+			int i=userInterestMapper.countByToUid(d.getUid());
+			d.setCountInterest(String.valueOf(i));
+		}
+		return p;
+	}
+
+	
 }

+ 1 - 1
src/test/java/com/goafanti/test/TestValueEvaluation.java

@@ -14,7 +14,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 import org.springframework.transaction.annotation.Transactional;
 
 import com.goafanti.admin.service.AdminVarietiesService;
-import com.goafanti.common.constant.AFTConstants;
+
 import com.goafanti.common.model.ValueEvaluation;
 import com.goafanti.evaluation.service.ValueEvaluationService;