Commit a30451a6 authored by jay's avatar jay

用户登录接口新增信息字段

parent c51aa417
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<sitemesh.version>2.4.2</sitemesh.version> <sitemesh.version>2.4.2</sitemesh.version>
<jackson.version>2.4.4</jackson.version> <jackson.version>2.4.4</jackson.version>
<swagger.version>0.9.4</swagger.version> <swagger.version>0.9.4</swagger.version>
<shiro.version>1.2.2</shiro.version> <shiro.version>1.2.5</shiro.version>
<house365.version>1.0.0-SNAPSHOT</house365.version> <house365.version>1.0.0-SNAPSHOT</house365.version>
<jdk.version>1.8</jdk.version> <jdk.version>1.8</jdk.version>
</properties> </properties>
......
...@@ -93,10 +93,6 @@ public class IndexController extends BaseController { ...@@ -93,10 +93,6 @@ public class IndexController extends BaseController {
request.getSession().setAttribute("deptList", deptList); request.getSession().setAttribute("deptList", deptList);
} }
/* request.getSession().getAttribute(SessionConstants.THREAD_DEPT_KEY);
if (null == request.getSession().getAttribute("city")) {
request.getSession().setAttribute("city", "2");
}*/
DepartmentEntity departmentEntity = (DepartmentEntity) request.getSession().getAttribute( DepartmentEntity departmentEntity = (DepartmentEntity) request.getSession().getAttribute(
SessionConstants.SESSION_CURRNET_DEPT_KEY); SessionConstants.SESSION_CURRNET_DEPT_KEY);
//V3.3.0界面展示元素 //V3.3.0界面展示元素
...@@ -117,8 +113,6 @@ public class IndexController extends BaseController { ...@@ -117,8 +113,6 @@ public class IndexController extends BaseController {
//获取开始时间 //获取开始时间
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
// CustomerListRequest listRequest = new CustomerListRequest();
// listRequest.setSearchParams(summaryParams);
Map<String, Object> returnMap = iCustomer.getNewSummary(summaryParams); Map<String, Object> returnMap = iCustomer.getNewSummary(summaryParams);
long endTime = System.currentTimeMillis(); long endTime = System.currentTimeMillis();
logger.info("------------------------getNewSummary程序运行时间: " + (endTime - startTime) + "ms"); logger.info("------------------------getNewSummary程序运行时间: " + (endTime - startTime) + "ms");
...@@ -129,17 +123,20 @@ public class IndexController extends BaseController { ...@@ -129,17 +123,20 @@ public class IndexController extends BaseController {
House365RestResponse<Map<String, Object>> rest = iCustomer.getSummary(String.valueOf(request.getSession().getAttribute(SessionConstants.THREAD_USERID_KEY))); House365RestResponse<Map<String, Object>> rest = iCustomer.getSummary(String.valueOf(request.getSession().getAttribute(SessionConstants.THREAD_USERID_KEY)));
long endTime1 = System.currentTimeMillis(); long endTime1 = System.currentTimeMillis();
logger.info("------------------------getSummary程序运行时间: " + (endTime1 - endTime) + "ms"); logger.info("------------------------getSummary程序运行时间: " + (endTime1 - endTime) + "ms");
System.out.println("------------------------getSummary程序运行时间: " + (endTime1 - endTime) + "ms");
model.addAttribute("summary", rest.getData().getEntity()); model.addAttribute("summary", rest.getData().getEntity());
//公告 //公告
NoticeListResponse noticeListResponse = notice.getNoticeListForIndexPage(departmentEntity.getCityID()); NoticeListResponse noticeListResponse = notice.getNoticeListForIndexPage(departmentEntity.getCityID());
long endTime2 = System.currentTimeMillis(); long endTime2 = System.currentTimeMillis();
logger.info("------------------------getNoticeListForIndexPage程序运行时间: " + (endTime2 - endTime1) + "ms"); logger.info("------------------------getNoticeListForIndexPage程序运行时间: " + (endTime2 - endTime1) + "ms");
System.out.println("------------------------getNoticeListForIndexPage程序运行时间: " + (endTime2 - endTime1) + "ms");
model.addAttribute("notices", noticeListResponse.getObjectList()); model.addAttribute("notices", noticeListResponse.getObjectList());
//设置概览报表数据 //设置概览报表数据
setIndexReportData(model, departmentEntity); setIndexReportData(model, departmentEntity);
long endTime3 = System.currentTimeMillis(); long endTime3 = System.currentTimeMillis();
logger.info("------------------------setIndexReportData程序运行时间: " + (endTime3 - endTime2) + "ms"); logger.info("------------------------setIndexReportData程序运行时间: " + (endTime3 - endTime2) + "ms");
System.out.println("------------------------setIndexReportData程序运行时间: " + (endTime3 - endTime2) + "ms");
Map<String, Object> map = new HashMap<>(10); Map<String, Object> map = new HashMap<>(10);
return getAutoUrl(); return getAutoUrl();
} }
...@@ -255,8 +252,7 @@ public class IndexController extends BaseController { ...@@ -255,8 +252,7 @@ public class IndexController extends BaseController {
String index = request.getParameter("reportIndex"); String index = request.getParameter("reportIndex");
String value = request.getParameter("reportName"); String value = request.getParameter("reportName");
DepartmentEntity departmentEntity = (DepartmentEntity) request.getSession().getAttribute( DepartmentEntity departmentEntity = (DepartmentEntity) request.getSession().getAttribute(SessionConstants.SESSION_CURRNET_DEPT_KEY);
SessionConstants.SESSION_CURRNET_DEPT_KEY);
StatisticListRequest statisticListRequest = new StatisticListRequest(); StatisticListRequest statisticListRequest = new StatisticListRequest();
Map<String, Object> searchParams = new HashMap<>(10); Map<String, Object> searchParams = new HashMap<>(10);
...@@ -281,10 +277,8 @@ public class IndexController extends BaseController { ...@@ -281,10 +277,8 @@ public class IndexController extends BaseController {
DepartmentEntity department = (DepartmentEntity) request.getSession().getAttribute( DepartmentEntity department = (DepartmentEntity) request.getSession().getAttribute(
SESSION_CURRNET_DEPT_KEY); SESSION_CURRNET_DEPT_KEY);
List<StatisticEntity> statisticEntities = new ArrayList<>();
//fdfs file url //fdfs file url
String fileUrl = FastDFSUtil.uploadFileByStream(multipartFile.getInputStream(), String fileUrl = FastDFSUtil.uploadFileByStream(multipartFile.getInputStream(), multipartFile.getOriginalFilename());
multipartFile.getOriginalFilename());
String fileName = multipartFile.getOriginalFilename(); String fileName = multipartFile.getOriginalFilename();
List<List<Object>> importExcel = ExcelUtil.importExcelSecond(multipartFile.getInputStream()); List<List<Object>> importExcel = ExcelUtil.importExcelSecond(multipartFile.getInputStream());
for (int i = 1; i < importExcel.size(); i++) { for (int i = 1; i < importExcel.size(); i++) {
...@@ -292,15 +286,11 @@ public class IndexController extends BaseController { ...@@ -292,15 +286,11 @@ public class IndexController extends BaseController {
continue; continue;
} }
StatisticEntity statisticEntity = new StatisticEntity(); StatisticEntity statisticEntity = new StatisticEntity();
statisticEntity.setBuyNum(importExcel.get(i).get(1) == null ? 0 : Integer.parseInt( statisticEntity.setBuyNum(importExcel.get(i).get(1) == null ? 0 : Integer.parseInt(String.valueOf(importExcel.get(i).get(1))));
String.valueOf(importExcel.get(i).get(1)))); statisticEntity.setCreater(String.valueOf(request.getSession().getAttribute(SessionConstants.THREAD_USERNAME_KEY)));
statisticEntity.setCreater(
String.valueOf(request.getSession().getAttribute(SessionConstants.THREAD_USERNAME_KEY)));
statisticEntity.setCreateTime(new Date()); statisticEntity.setCreateTime(new Date());
statisticEntity.setGroup(String.valueOf(importExcel.get(i).get(3) == null ? "" : importExcel.get(i).get( statisticEntity.setGroup(String.valueOf(importExcel.get(i).get(3) == null ? "" : importExcel.get(i).get(3)));
3))); statisticEntity.setName(String.valueOf(importExcel.get(i).get(0) == null ? "" : importExcel.get(i).get(0)));
statisticEntity.setName(String.valueOf(importExcel.get(i).get(0) == null ? "" : importExcel.get(i).get(
0)));
if (importExcel.get(i).get(2) == null) { if (importExcel.get(i).get(2) == null) {
statisticEntity.setPerformance(new BigDecimal(0)); statisticEntity.setPerformance(new BigDecimal(0));
...@@ -335,21 +325,4 @@ public class IndexController extends BaseController { ...@@ -335,21 +325,4 @@ public class IndexController extends BaseController {
return null; return null;
} }
/**
* 切换城市
*
* @param session 用户会话
* @param city 城市代码
* @param cityName 城市名称
* @author chengjianfang
* @version [版本号, 2015年5月15日]
*//*
@RequestMapping(value = "changeCity", method = {RequestMethod.POST})
@ResponseBody
@ResponseStatus(HttpStatus.OK)
public void changeCity(HttpSession session, String city, String cityName) {
session.setAttribute(ServiceConstant.CITY_ID, city);
session.setAttribute(ServiceConstant.CITY_NAME, cityName);
session.setAttribute("city", city);
}*/
} }
...@@ -403,8 +403,6 @@ public class MarketingActivityController extends BaseController { ...@@ -403,8 +403,6 @@ public class MarketingActivityController extends BaseController {
vo.getEntity().setFinishTime(DateTimeUtils.getTimeAfterDays(currentDate, vo.getEntity().getCycle())); vo.getEntity().setFinishTime(DateTimeUtils.getTimeAfterDays(currentDate, vo.getEntity().getCycle()));
vo.getEntity().setCreateBy(userEntity.getId()); vo.getEntity().setCreateBy(userEntity.getId());
vo.getEntity().setCreateTime(new Date()); vo.getEntity().setCreateTime(new Date());
// vo.getEntity().setApplyStartTime(currentDate);
// vo.getEntity().setApplyEndTime(DateTimeUtils.getDaysAfter(currentDate, 7));
vo.getEntity().setCreateName(userEntity.getRealName()); vo.getEntity().setCreateName(userEntity.getRealName());
vo.getEntity().setCity(city.getDescripition()); vo.getEntity().setCity(city.getDescripition());
addRequest.setEntity(vo.getEntity()); addRequest.setEntity(vo.getEntity());
......
...@@ -141,7 +141,8 @@ public class CustomRealm extends AuthorizingRealm { ...@@ -141,7 +141,8 @@ public class CustomRealm extends AuthorizingRealm {
return isPermitted(permission, info); return isPermitted(permission, info);
} }
private boolean isPermitted(Permission permission, AuthorizationInfo info) { @Override
protected boolean isPermitted(Permission permission, AuthorizationInfo info) {
Collection<Permission> perms = getPermissions(info); Collection<Permission> perms = getPermissions(info);
if (perms != null && !perms.isEmpty()) { if (perms != null && !perms.isEmpty()) {
for (Permission perm : perms) { for (Permission perm : perms) {
...@@ -153,7 +154,8 @@ public class CustomRealm extends AuthorizingRealm { ...@@ -153,7 +154,8 @@ public class CustomRealm extends AuthorizingRealm {
return false; return false;
} }
private Collection<Permission> getPermissions(AuthorizationInfo info) { @Override
protected Collection<Permission> getPermissions(AuthorizationInfo info) {
Set<Permission> permissions = new HashSet<>(); Set<Permission> permissions = new HashSet<>();
if (info != null) { if (info != null) {
......
...@@ -99,7 +99,7 @@ public class AppHgsLoginImpl implements IAppHgsLogin { ...@@ -99,7 +99,7 @@ public class AppHgsLoginImpl implements IAppHgsLogin {
String loginPassword = getMapValueByKey("loginPassword", map, ""); String loginPassword = getMapValueByKey("loginPassword", map, "");
loginPassword = MD5(loginPassword); loginPassword = MD5(loginPassword);
UserListRequest userListRequest = new UserListRequest(); UserListRequest userListRequest = new UserListRequest();
Map<String, Object> searchMap = new HashMap<>(); Map<String, Object> searchMap = new HashMap<>(10);
searchMap.put("EQ_name", loginName); searchMap.put("EQ_name", loginName);
searchMap.put("EQ_password", loginPassword); searchMap.put("EQ_password", loginPassword);
userListRequest.setSearchParams(searchMap); userListRequest.setSearchParams(searchMap);
...@@ -141,20 +141,19 @@ public class AppHgsLoginImpl implements IAppHgsLogin { ...@@ -141,20 +141,19 @@ public class AppHgsLoginImpl implements IAppHgsLogin {
String cityCode = departmentResponse2.getEntity().getDescripition(); String cityCode = departmentResponse2.getEntity().getDescripition();
accountEntity.setCity(cityCode); accountEntity.setCity(cityCode);
UserEntity cityNameEntity = userService.getCityName(cityCode); UserEntity cityNameEntity = userService.getCityName(cityCode);
if (cityNameEntity != null) if (cityNameEntity != null) {
accountEntity.setCityName(cityNameEntity.getCityName()); accountEntity.setCityName(cityNameEntity.getCityName());
}
//获取头像 //获取头像
List<BaseAttachment> headImg = attachmentService.queryByResourceIdAndResouceType( List<BaseAttachment> headImg = attachmentService.queryByResourceIdAndResouceType(String.valueOf(accountEntity.getId()), "hgs_user_headImg");
String.valueOf(accountEntity.getId()), "hgs_user_headImg");
if (headImg != null && headImg.size() != 0) { if (headImg != null && headImg.size() != 0) {
accountEntity.setHeadImgURL(headImg.get(0).getRemotePath()); accountEntity.setHeadImgURL(headImg.get(0).getRemotePath());
} else { } else {
accountEntity.setHeadImgURL("http://img33.house365.com/M00/1B/86/rBEBp1pu2JyAIp4jAAAGEjOUX2M365.jpg"); accountEntity.setHeadImgURL("http://img33.house365.com/M00/1B/86/rBEBp1pu2JyAIp4jAAAGEjOUX2M365.jpg");
} }
//全身像 //全身像
List<BaseAttachment> fullImg = attachmentService.queryByResourceIdAndResouceType( List<BaseAttachment> fullImg = attachmentService.queryByResourceIdAndResouceType(String.valueOf(accountEntity.getId()), "hgs_user_fullImg");
String.valueOf(accountEntity.getId()), "hgs_user_fullImg");
if (fullImg != null && fullImg.size() != 0) { if (fullImg != null && fullImg.size() != 0) {
accountEntity.setFullImgURL(fullImg.get(0).getRemotePath()); accountEntity.setFullImgURL(fullImg.get(0).getRemotePath());
} else { } else {
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
<result property="wxNumber" column="wx_number"/> <result property="wxNumber" column="wx_number"/>
<result property="wxCodeImgUrl" column="wx_code_imgUrl"/> <result property="wxCodeImgUrl" column="wx_code_imgUrl"/>
<result property="promoteId" column="promote_id"/> <result property="promoteId" column="promote_id"/>
<result property="onlineStatus" column="online_status"/>
</resultMap> </resultMap>
<!-- 用于select查询公用抽取的列 --> <!-- 用于select查询公用抽取的列 -->
...@@ -61,7 +62,7 @@ ...@@ -61,7 +62,7 @@
email, extattr, status, enabled, createUserid, createUsername, createTime, createIp, updateUserid, email, extattr, status, enabled, createUserid, createUsername, createTime, createIp, updateUserid,
updateUsername, updateTime, updateIp, preLoginTime, lastLoginTime, hotlinephone, goodat, updateUsername, updateTime, updateIp, preLoginTime, lastLoginTime, hotlinephone, goodat,
description, headImgURL, fullImgURL,isFreeMan,defaultVisit,accid,identityType,token,limitLogin, description, headImgURL, fullImgURL,isFreeMan,defaultVisit,accid,identityType,token,limitLogin,
wx_number as wxNumber,wx_code_imgUrl as wxCodeImgUrl,promote_id AS promoteId wx_number as wxNumber,wx_code_imgUrl as wxCodeImgUrl,promote_id AS promoteId,online_status AS onlineStatus
]]> ]]>
</sql> </sql>
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
<result property="wxNumber" column="wx_number"/> <result property="wxNumber" column="wx_number"/>
<result property="wxCodeImgUrl" column="wx_code_imgUrl"/> <result property="wxCodeImgUrl" column="wx_code_imgUrl"/>
<result property="promoteId" column="promote_id"/> <result property="promoteId" column="promote_id"/>
<result property="onlineStatus" column="online_status"/>
</resultMap> </resultMap>
<!-- 用于select查询公用抽取的列 --> <!-- 用于select查询公用抽取的列 -->
...@@ -61,7 +62,7 @@ ...@@ -61,7 +62,7 @@
email, extattr, status, enabled, createUserid, createUsername, createTime, createIp, updateUserid, email, extattr, status, enabled, createUserid, createUsername, createTime, createIp, updateUserid,
updateUsername, updateTime, updateIp, preLoginTime, lastLoginTime, hotlinephone, goodat, updateUsername, updateTime, updateIp, preLoginTime, lastLoginTime, hotlinephone, goodat,
description, headImgURL, fullImgURL,isFreeMan,defaultVisit,accid,identityType,token,limitLogin, description, headImgURL, fullImgURL,isFreeMan,defaultVisit,accid,identityType,token,limitLogin,
wx_number as wxNumber,wx_code_imgUrl as wxCodeImgUrl,promote_id AS promoteId wx_number as wxNumber,wx_code_imgUrl as wxCodeImgUrl,promote_id AS promoteId,online_status AS onlineStatus
]]> ]]>
</sql> </sql>
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
<result property="wxNumber" column="wx_number"/> <result property="wxNumber" column="wx_number"/>
<result property="wxCodeImgUrl" column="wx_code_imgUrl"/> <result property="wxCodeImgUrl" column="wx_code_imgUrl"/>
<result property="promoteId" column="promote_id"/> <result property="promoteId" column="promote_id"/>
<result property="onlineStatus" column="online_status"/>
</resultMap> </resultMap>
<!-- 用于select查询公用抽取的列 --> <!-- 用于select查询公用抽取的列 -->
...@@ -61,7 +62,7 @@ ...@@ -61,7 +62,7 @@
email, extattr, status, enabled, createUserid, createUsername, createTime, createIp, updateUserid, email, extattr, status, enabled, createUserid, createUsername, createTime, createIp, updateUserid,
updateUsername, updateTime, updateIp, preLoginTime, lastLoginTime, hotlinephone, goodat, updateUsername, updateTime, updateIp, preLoginTime, lastLoginTime, hotlinephone, goodat,
description, headImgURL, fullImgURL,isFreeMan,defaultVisit,accid,identityType,token,limitLogin, description, headImgURL, fullImgURL,isFreeMan,defaultVisit,accid,identityType,token,limitLogin,
wx_number as wxNumber,wx_code_imgUrl as wxCodeImgUrl,promote_id AS promoteId wx_number as wxNumber,wx_code_imgUrl as wxCodeImgUrl,promote_id AS promoteId,online_status AS onlineStatus
]]> ]]>
</sql> </sql>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment