|
@@ -8,6 +8,8 @@ import java.util.Map;
|
|
|
import java.util.UUID;
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
import org.apache.commons.beanutils.BeanUtils;
|
|
import org.apache.commons.beanutils.BeanUtils;
|
|
|
|
|
+import org.apache.shiro.SecurityUtils;
|
|
|
|
|
+import org.apache.shiro.subject.Subject;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
@@ -122,7 +124,11 @@ public class CustomerServiceImpl extends BaseMybatisDao<CustomerMapper> implemen
|
|
|
if(pageSize == null || pageSize < 0) pageSize = 10;
|
|
if(pageSize == null || pageSize < 0) pageSize = 10;
|
|
|
if(pageNumber == null || pageNumber <0 ) pageNumber = 1;
|
|
if(pageNumber == null || pageNumber <0 ) pageNumber = 1;
|
|
|
Pagination<CustomerOut> list = (Pagination<CustomerOut>)findPage("selectCustomer","selectCustomerCount",params, pageNumber, pageSize);
|
|
Pagination<CustomerOut> list = (Pagination<CustomerOut>)findPage("selectCustomer","selectCustomerCount",params, pageNumber, pageSize);
|
|
|
|
|
+ Subject subject = SecurityUtils.getSubject();
|
|
|
list.setList(setResult((List<CustomerOut>)list.getList()));
|
|
list.setList(setResult((List<CustomerOut>)list.getList()));
|
|
|
|
|
+ if(!subject.isPermitted("customer_view_all")||!subject.isPermitted(AFTConstants.SUPERADMIN)) {
|
|
|
|
|
+ list.setList(descResult((List<CustomerOut>)list.getList()));
|
|
|
|
|
+ }
|
|
|
return list;
|
|
return list;
|
|
|
}
|
|
}
|
|
|
|
|
|