Commit 77d54cfd authored by 廖旭伟's avatar 廖旭伟

客户作品列表倒序,客户最后登录时间bug修改

parent a037b37f
package com.mortals.xhx.module.customer.service.impl; package com.mortals.xhx.module.customer.service.impl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo; import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result; import com.mortals.framework.model.Result;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.util.DateUtils; import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.SecurityUtil; import com.mortals.framework.util.SecurityUtil;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.module.customer.dao.CustomerDao;
import com.mortals.xhx.module.customer.model.CustomerEntity;
import com.mortals.xhx.module.customer.model.CustomerEntityExt; import com.mortals.xhx.module.customer.model.CustomerEntityExt;
import com.mortals.xhx.module.customer.model.CustomerQuery; import com.mortals.xhx.module.customer.model.CustomerQuery;
import com.mortals.xhx.module.customer.service.CustomerService;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.checkerframework.checker.units.qual.C;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.module.customer.dao.CustomerDao;
import com.mortals.xhx.module.customer.model.CustomerEntity;
import com.mortals.xhx.module.customer.service.CustomerService;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
...@@ -92,7 +93,11 @@ public class CustomerServiceImpl extends AbstractCRUDServiceImpl<CustomerDao, Cu ...@@ -92,7 +93,11 @@ public class CustomerServiceImpl extends AbstractCRUDServiceImpl<CustomerDao, Cu
} catch (Exception e) { } catch (Exception e) {
throw new AppException("密码验认出错!", e); throw new AppException("密码验认出错!", e);
} }
CustomerEntity update = new CustomerEntity();
update.setId(user.getId());
update.setLastLoginAddress(loginIp);
update.setLastLoginTime(new Date());
this.update(update);
return user; return user;
} }
......
...@@ -74,6 +74,9 @@ public class CustomerWorkDesignController extends BaseCRUDJsonBodyMappingControl ...@@ -74,6 +74,9 @@ public class CustomerWorkDesignController extends BaseCRUDJsonBodyMappingControl
throw new AppException("非法用户,不可访问"); throw new AppException("非法用户,不可访问");
} }
query.setCustomerId(this.getCurUser().getId()); query.setCustomerId(this.getCurUser().getId());
Map<String,String> orderCols = new HashMap<>();
orderCols.put("createTime","DESC");
query.setOrderCols(orderCols);
} }
@Override @Override
......
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