优化账户/仓库/经手人等模块的排序

This commit is contained in:
季圣华
2022-08-28 00:20:50 +08:00
parent 01e85bd477
commit e9ac176e5f
7 changed files with 15 additions and 13 deletions

View File

@@ -74,10 +74,11 @@ public class AccountService {
} }
public List<Account> getAccount() throws Exception{ public List<Account> getAccount() throws Exception{
AccountExample example = new AccountExample();
example.createCriteria().andEnabledEqualTo(true).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
List<Account> list=null; List<Account> list=null;
try{ try{
AccountExample example = new AccountExample();
example.createCriteria().andEnabledEqualTo(true).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
example.setOrderByClause("sort asc, id desc");
list=accountMapper.selectByExample(example); list=accountMapper.selectByExample(example);
}catch(Exception e){ }catch(Exception e){
JshException.readFail(logger, e); JshException.readFail(logger, e);
@@ -251,7 +252,7 @@ public class AccountService {
public List<Account> findBySelect()throws Exception { public List<Account> findBySelect()throws Exception {
AccountExample example = new AccountExample(); AccountExample example = new AccountExample();
example.createCriteria().andEnabledEqualTo(true).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED); example.createCriteria().andEnabledEqualTo(true).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
example.setOrderByClause("id desc"); example.setOrderByClause("sort asc, id desc");
List<Account> list=null; List<Account> list=null;
try{ try{
list = accountMapper.selectByExample(example); list = accountMapper.selectByExample(example);

View File

@@ -89,7 +89,7 @@ public class DepotService {
public List<Depot> getAllList()throws Exception { public List<Depot> getAllList()throws Exception {
DepotExample example = new DepotExample(); DepotExample example = new DepotExample();
example.createCriteria().andEnabledEqualTo(true).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED); example.createCriteria().andEnabledEqualTo(true).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
example.setOrderByClause("sort"); example.setOrderByClause("sort asc, id desc");
List<Depot> list=null; List<Depot> list=null;
try{ try{
list=depotMapper.selectByExample(example); list=depotMapper.selectByExample(example);
@@ -232,7 +232,7 @@ public class DepotService {
DepotExample example = new DepotExample(); DepotExample example = new DepotExample();
example.createCriteria().andTypeEqualTo(0).andEnabledEqualTo(true) example.createCriteria().andTypeEqualTo(0).andEnabledEqualTo(true)
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED); .andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
example.setOrderByClause("sort"); example.setOrderByClause("sort asc, id desc");
List<Depot> list=null; List<Depot> list=null;
try{ try{
list= depotMapper.selectByExample(example); list= depotMapper.selectByExample(example);

View File

@@ -195,7 +195,7 @@ public class InOutItemService {
example.createCriteria().andTypeEqualTo("支出").andEnabledEqualTo(true) example.createCriteria().andTypeEqualTo("支出").andEnabledEqualTo(true)
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED); .andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
} }
example.setOrderByClause("id desc"); example.setOrderByClause("sort asc, id desc");
List<InOutItem> list = null; List<InOutItem> list = null;
try{ try{
list=inOutItemMapper.selectByExample(example); list=inOutItemMapper.selectByExample(example);

View File

@@ -224,7 +224,7 @@ public class PersonService {
PersonExample example = new PersonExample(); PersonExample example = new PersonExample();
example.createCriteria().andTypeEqualTo(type).andEnabledEqualTo(true) example.createCriteria().andTypeEqualTo(type).andEnabledEqualTo(true)
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED); .andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
example.setOrderByClause("id asc"); example.setOrderByClause("sort asc, id desc");
List<Person> list =null; List<Person> list =null;
try{ try{
list=personMapper.selectByExample(example); list=personMapper.selectByExample(example);

View File

@@ -63,6 +63,7 @@ public class RoleService {
public List<Role> allList()throws Exception { public List<Role> allList()throws Exception {
RoleExample example = new RoleExample(); RoleExample example = new RoleExample();
example.createCriteria().andEnabledEqualTo(true).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED); example.createCriteria().andEnabledEqualTo(true).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
example.setOrderByClause("sort asc, id desc");
List<Role> list=null; List<Role> list=null;
try{ try{
list=roleMapper.selectByExample(example); list=roleMapper.selectByExample(example);

View File

@@ -307,7 +307,7 @@ public class SupplierService {
public List<Supplier> findBySelectCus()throws Exception { public List<Supplier> findBySelectCus()throws Exception {
SupplierExample example = new SupplierExample(); SupplierExample example = new SupplierExample();
example.createCriteria().andTypeLike("客户").andEnabledEqualTo(true).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED); example.createCriteria().andTypeLike("客户").andEnabledEqualTo(true).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
example.setOrderByClause("id desc"); example.setOrderByClause("sort asc, id desc");
List<Supplier> list=null; List<Supplier> list=null;
try{ try{
list = supplierMapper.selectByExample(example); list = supplierMapper.selectByExample(example);
@@ -321,7 +321,7 @@ public class SupplierService {
SupplierExample example = new SupplierExample(); SupplierExample example = new SupplierExample();
example.createCriteria().andTypeLike("供应商").andEnabledEqualTo(true) example.createCriteria().andTypeLike("供应商").andEnabledEqualTo(true)
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED); .andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
example.setOrderByClause("id desc"); example.setOrderByClause("sort asc, id desc");
List<Supplier> list=null; List<Supplier> list=null;
try{ try{
list = supplierMapper.selectByExample(example); list = supplierMapper.selectByExample(example);
@@ -335,7 +335,7 @@ public class SupplierService {
SupplierExample example = new SupplierExample(); SupplierExample example = new SupplierExample();
example.createCriteria().andTypeLike("会员").andEnabledEqualTo(true) example.createCriteria().andTypeLike("会员").andEnabledEqualTo(true)
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED); .andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
example.setOrderByClause("id desc"); example.setOrderByClause("sort asc, id desc");
List<Supplier> list=null; List<Supplier> list=null;
try{ try{
list = supplierMapper.selectByExample(example); list = supplierMapper.selectByExample(example);
@@ -349,7 +349,7 @@ public class SupplierService {
SupplierExample example = new SupplierExample(); SupplierExample example = new SupplierExample();
example.createCriteria().andIdEqualTo(supplierId) example.createCriteria().andIdEqualTo(supplierId)
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED); .andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
example.setOrderByClause("id desc"); example.setOrderByClause("sort asc, id desc");
List<Supplier> list=null; List<Supplier> list=null;
try{ try{
list = supplierMapper.selectByExample(example); list = supplierMapper.selectByExample(example);
@@ -382,7 +382,7 @@ public class SupplierService {
SupplierExample example = new SupplierExample(); SupplierExample example = new SupplierExample();
example.createCriteria().andTypeEqualTo("客户") example.createCriteria().andTypeEqualTo("客户")
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED); .andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
example.setOrderByClause("id desc"); example.setOrderByClause("sort asc, id desc");
List<Supplier> list=null; List<Supplier> list=null;
try{ try{
list = supplierMapper.selectByExample(example); list = supplierMapper.selectByExample(example);

View File

@@ -69,7 +69,7 @@
and telephone like #{bindTelephone} and telephone like #{bindTelephone}
</if> </if>
and ifnull(delete_flag,'0') !='1' and ifnull(delete_flag,'0') !='1'
order by id desc order by sort asc, id desc
</select> </select>
<update id="batchDeleteSupplierByIds"> <update id="batchDeleteSupplierByIds">