Commit f746bcde authored by hanfeng's avatar hanfeng

Merge branch 'master-customer-management' into dev

parents 2e7077ba fc9239d7
......@@ -13,6 +13,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;
import tk.mybatis.mapper.weekend.WeekendSqls;
import java.util.Date;
import java.util.List;
......@@ -28,9 +29,9 @@ public class AppStaffUserBiz extends BaseBiz<AppStaffUserMapper, AppStaffUser> {
private final AppUserLoginBiz appUserLoginBiz;
public List<AppStaffUser> getAll(Integer id) {
public List<AppStaffUser> getAll(Integer id, String username) {
Example example = new Example(AppStaffUser.class);
example.createCriteria().andEqualTo("suId", id).andEqualTo("isDel", 0);
example.createCriteria().andEqualTo("suId", id).orEqualTo("phone",username).andEqualTo("isDel", 0);
example.orderBy("crtTime").desc();
return selectByExample(example);
}
......
......@@ -48,7 +48,7 @@ public class AppStaffUserController extends BaseController<AppStaffUserBiz, AppS
public ObjectRestResponse<List<AppStaffUser>> getAll() throws Exception {
AppUserDTO userDTO = (AppUserDTO) publicController.userDetailByToken(authConfig.getToken(request)).getData();
if (POSITION_ID.equals(userDTO.getPositionId())) {
return ObjectRestResponse.succ(baseBiz.getAll(userDTO.getUserid())) ;
return ObjectRestResponse.succ(baseBiz.getAll(userDTO.getUserid(),userDTO.getUsername())) ;
}
return ObjectRestResponse.succ();
}
......
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