Commit a30451a6 authored by jay's avatar jay

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

parent c51aa417
......@@ -15,7 +15,7 @@
<sitemesh.version>2.4.2</sitemesh.version>
<jackson.version>2.4.4</jackson.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>
<jdk.version>1.8</jdk.version>
</properties>
......
......@@ -93,10 +93,6 @@ public class IndexController extends BaseController {
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(
SessionConstants.SESSION_CURRNET_DEPT_KEY);
//V3.3.0界面展示元素
......@@ -117,8 +113,6 @@ public class IndexController extends BaseController {
//获取开始时间
long startTime = System.currentTimeMillis();
// CustomerListRequest listRequest = new CustomerListRequest();
// listRequest.setSearchParams(summaryParams);
Map<String, Object> returnMap = iCustomer.getNewSummary(summaryParams);
long endTime = System.currentTimeMillis();
logger.info("------------------------getNewSummary程序运行时间: " + (endTime - startTime) + "ms");
......@@ -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)));
long endTime1 = System.currentTimeMillis();
logger.info("------------------------getSummary程序运行时间: " + (endTime1 - endTime) + "ms");
System.out.println("------------------------getSummary程序运行时间: " + (endTime1 - endTime) + "ms");
model.addAttribute("summary", rest.getData().getEntity());
//公告
NoticeListResponse noticeListResponse = notice.getNoticeListForIndexPage(departmentEntity.getCityID());
long endTime2 = System.currentTimeMillis();
logger.info("------------------------getNoticeListForIndexPage程序运行时间: " + (endTime2 - endTime1) + "ms");
System.out.println("------------------------getNoticeListForIndexPage程序运行时间: " + (endTime2 - endTime1) + "ms");
model.addAttribute("notices", noticeListResponse.getObjectList());
//设置概览报表数据
setIndexReportData(model, departmentEntity);
long endTime3 = System.currentTimeMillis();
logger.info("------------------------setIndexReportData程序运行时间: " + (endTime3 - endTime2) + "ms");
System.out.println("------------------------setIndexReportData程序运行时间: " + (endTime3 - endTime2) + "ms");
Map<String, Object> map = new HashMap<>(10);
return getAutoUrl();
}
......@@ -255,8 +252,7 @@ public class IndexController extends BaseController {
String index = request.getParameter("reportIndex");
String value = request.getParameter("reportName");
DepartmentEntity departmentEntity = (DepartmentEntity) request.getSession().getAttribute(
SessionConstants.SESSION_CURRNET_DEPT_KEY);
DepartmentEntity departmentEntity = (DepartmentEntity) request.getSession().getAttribute(SessionConstants.SESSION_CURRNET_DEPT_KEY);
StatisticListRequest statisticListRequest = new StatisticListRequest();
Map<String, Object> searchParams = new HashMap<>(10);
......@@ -281,10 +277,8 @@ public class IndexController extends BaseController {
DepartmentEntity department = (DepartmentEntity) request.getSession().getAttribute(
SESSION_CURRNET_DEPT_KEY);
List<StatisticEntity> statisticEntities = new ArrayList<>();
//fdfs file url
String fileUrl = FastDFSUtil.uploadFileByStream(multipartFile.getInputStream(),
multipartFile.getOriginalFilename());
String fileUrl = FastDFSUtil.uploadFileByStream(multipartFile.getInputStream(), multipartFile.getOriginalFilename());
String fileName = multipartFile.getOriginalFilename();
List<List<Object>> importExcel = ExcelUtil.importExcelSecond(multipartFile.getInputStream());
for (int i = 1; i < importExcel.size(); i++) {
......@@ -292,15 +286,11 @@ public class IndexController extends BaseController {
continue;
}
StatisticEntity statisticEntity = new StatisticEntity();
statisticEntity.setBuyNum(importExcel.get(i).get(1) == null ? 0 : Integer.parseInt(
String.valueOf(importExcel.get(i).get(1))));
statisticEntity.setCreater(
String.valueOf(request.getSession().getAttribute(SessionConstants.THREAD_USERNAME_KEY)));
statisticEntity.setBuyNum(importExcel.get(i).get(1) == null ? 0 : Integer.parseInt(String.valueOf(importExcel.get(i).get(1))));
statisticEntity.setCreater(String.valueOf(request.getSession().getAttribute(SessionConstants.THREAD_USERNAME_KEY)));
statisticEntity.setCreateTime(new Date());
statisticEntity.setGroup(String.valueOf(importExcel.get(i).get(3) == null ? "" : importExcel.get(i).get(
3)));
statisticEntity.setName(String.valueOf(importExcel.get(i).get(0) == null ? "" : importExcel.get(i).get(
0)));
statisticEntity.setGroup(String.valueOf(importExcel.get(i).get(3) == null ? "" : importExcel.get(i).get(3)));
statisticEntity.setName(String.valueOf(importExcel.get(i).get(0) == null ? "" : importExcel.get(i).get(0)));
if (importExcel.get(i).get(2) == null) {
statisticEntity.setPerformance(new BigDecimal(0));
......@@ -335,21 +325,4 @@ public class IndexController extends BaseController {
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 {
vo.getEntity().setFinishTime(DateTimeUtils.getTimeAfterDays(currentDate, vo.getEntity().getCycle()));
vo.getEntity().setCreateBy(userEntity.getId());
vo.getEntity().setCreateTime(new Date());
// vo.getEntity().setApplyStartTime(currentDate);
// vo.getEntity().setApplyEndTime(DateTimeUtils.getDaysAfter(currentDate, 7));
vo.getEntity().setCreateName(userEntity.getRealName());
vo.getEntity().setCity(city.getDescripition());
addRequest.setEntity(vo.getEntity());
......
......@@ -141,7 +141,8 @@ public class CustomRealm extends AuthorizingRealm {
return isPermitted(permission, info);
}
private boolean isPermitted(Permission permission, AuthorizationInfo info) {
@Override
protected boolean isPermitted(Permission permission, AuthorizationInfo info) {
Collection<Permission> perms = getPermissions(info);
if (perms != null && !perms.isEmpty()) {
for (Permission perm : perms) {
......@@ -153,7 +154,8 @@ public class CustomRealm extends AuthorizingRealm {
return false;
}
private Collection<Permission> getPermissions(AuthorizationInfo info) {
@Override
protected Collection<Permission> getPermissions(AuthorizationInfo info) {
Set<Permission> permissions = new HashSet<>();
if (info != null) {
......
......@@ -99,7 +99,7 @@ public class AppHgsLoginImpl implements IAppHgsLogin {
String loginPassword = getMapValueByKey("loginPassword", map, "");
loginPassword = MD5(loginPassword);
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_password", loginPassword);
userListRequest.setSearchParams(searchMap);
......@@ -141,20 +141,19 @@ public class AppHgsLoginImpl implements IAppHgsLogin {
String cityCode = departmentResponse2.getEntity().getDescripition();
accountEntity.setCity(cityCode);
UserEntity cityNameEntity = userService.getCityName(cityCode);
if (cityNameEntity != null)
if (cityNameEntity != null) {
accountEntity.setCityName(cityNameEntity.getCityName());
}
//获取头像
List<BaseAttachment> headImg = attachmentService.queryByResourceIdAndResouceType(
String.valueOf(accountEntity.getId()), "hgs_user_headImg");
List<BaseAttachment> headImg = attachmentService.queryByResourceIdAndResouceType(String.valueOf(accountEntity.getId()), "hgs_user_headImg");
if (headImg != null && headImg.size() != 0) {
accountEntity.setHeadImgURL(headImg.get(0).getRemotePath());
} else {
accountEntity.setHeadImgURL("http://img33.house365.com/M00/1B/86/rBEBp1pu2JyAIp4jAAAGEjOUX2M365.jpg");
}
//全身像
List<BaseAttachment> fullImg = attachmentService.queryByResourceIdAndResouceType(
String.valueOf(accountEntity.getId()), "hgs_user_fullImg");
List<BaseAttachment> fullImg = attachmentService.queryByResourceIdAndResouceType(String.valueOf(accountEntity.getId()), "hgs_user_fullImg");
if (fullImg != null && fullImg.size() != 0) {
accountEntity.setFullImgURL(fullImg.get(0).getRemotePath());
} else {
......
......@@ -52,6 +52,7 @@
<result property="wxNumber" column="wx_number"/>
<result property="wxCodeImgUrl" column="wx_code_imgUrl"/>
<result property="promoteId" column="promote_id"/>
<result property="onlineStatus" column="online_status"/>
</resultMap>
<!-- 用于select查询公用抽取的列 -->
......@@ -61,7 +62,7 @@
email, extattr, status, enabled, createUserid, createUsername, createTime, createIp, updateUserid,
updateUsername, updateTime, updateIp, preLoginTime, lastLoginTime, hotlinephone, goodat,
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>
......
......@@ -52,6 +52,7 @@
<result property="wxNumber" column="wx_number"/>
<result property="wxCodeImgUrl" column="wx_code_imgUrl"/>
<result property="promoteId" column="promote_id"/>
<result property="onlineStatus" column="online_status"/>
</resultMap>
<!-- 用于select查询公用抽取的列 -->
......@@ -61,7 +62,7 @@
email, extattr, status, enabled, createUserid, createUsername, createTime, createIp, updateUserid,
updateUsername, updateTime, updateIp, preLoginTime, lastLoginTime, hotlinephone, goodat,
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>
......
......@@ -52,6 +52,7 @@
<result property="wxNumber" column="wx_number"/>
<result property="wxCodeImgUrl" column="wx_code_imgUrl"/>
<result property="promoteId" column="promote_id"/>
<result property="onlineStatus" column="online_status"/>
</resultMap>
<!-- 用于select查询公用抽取的列 -->
......@@ -61,7 +62,7 @@
email, extattr, status, enabled, createUserid, createUsername, createTime, createIp, updateUserid,
updateUsername, updateTime, updateIp, preLoginTime, lastLoginTime, hotlinephone, goodat,
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>
......
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