解决各类表查数据能查出已删除数据的bug
This commit is contained in:
@@ -64,6 +64,7 @@ public class AccountService {
|
||||
|
||||
public List<Account> getAccount() {
|
||||
AccountExample example = new AccountExample();
|
||||
example.createCriteria().andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
return accountMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
@@ -132,6 +133,7 @@ public class AccountService {
|
||||
|
||||
public List<Account> findBySelect() {
|
||||
AccountExample example = new AccountExample();
|
||||
example.createCriteria().andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
example.setOrderByClause("id desc");
|
||||
return accountMapper.selectByExample(example);
|
||||
}
|
||||
@@ -152,13 +154,15 @@ public class AccountService {
|
||||
Date mTime = StringUtil.getDateByString(timeStr + "-01 00:00:00", null);
|
||||
if (type.equals("month")) {
|
||||
example.createCriteria().andAccountidEqualTo(id).andPaytypeNotEqualTo("预付款")
|
||||
.andOpertimeGreaterThanOrEqualTo(bTime).andOpertimeLessThanOrEqualTo(eTime);
|
||||
.andOpertimeGreaterThanOrEqualTo(bTime).andOpertimeLessThanOrEqualTo(eTime)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
} else if (type.equals("date")) {
|
||||
example.createCriteria().andAccountidEqualTo(id).andPaytypeNotEqualTo("预付款")
|
||||
.andOpertimeLessThanOrEqualTo(mTime);
|
||||
.andOpertimeLessThanOrEqualTo(mTime).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
}
|
||||
} else {
|
||||
example.createCriteria().andAccountidEqualTo(id).andPaytypeNotEqualTo("预付款");
|
||||
example.createCriteria().andAccountidEqualTo(id).andPaytypeNotEqualTo("预付款")
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
}
|
||||
List<DepotHead> dataList = depotHeadMapper.selectByExample(example);
|
||||
if (dataList != null) {
|
||||
@@ -190,13 +194,16 @@ public class AccountService {
|
||||
Date mTime = StringUtil.getDateByString(timeStr + "-01 00:00:00", null);
|
||||
if (type.equals("month")) {
|
||||
example.createCriteria().andAccountidEqualTo(id)
|
||||
.andBilltimeGreaterThanOrEqualTo(bTime).andBilltimeLessThanOrEqualTo(eTime);
|
||||
.andBilltimeGreaterThanOrEqualTo(bTime).andBilltimeLessThanOrEqualTo(eTime)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
} else if (type.equals("date")) {
|
||||
example.createCriteria().andAccountidEqualTo(id)
|
||||
.andBilltimeLessThanOrEqualTo(mTime);
|
||||
.andBilltimeLessThanOrEqualTo(mTime)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
}
|
||||
} else {
|
||||
example.createCriteria().andAccountidEqualTo(id);
|
||||
example.createCriteria().andAccountidEqualTo(id)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
}
|
||||
List<AccountHead> dataList = accountHeadMapper.selectByExample(example);
|
||||
if (dataList != null) {
|
||||
@@ -227,9 +234,11 @@ public class AccountService {
|
||||
Date eTime = StringUtil.getDateByString(timeStr + "-31 00:00:00", null);
|
||||
Date mTime = StringUtil.getDateByString(timeStr + "-01 00:00:00", null);
|
||||
if (type.equals("month")) {
|
||||
example.createCriteria().andBilltimeGreaterThanOrEqualTo(bTime).andBilltimeLessThanOrEqualTo(eTime);
|
||||
example.createCriteria().andBilltimeGreaterThanOrEqualTo(bTime).andBilltimeLessThanOrEqualTo(eTime)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
} else if (type.equals("date")) {
|
||||
example.createCriteria().andBilltimeLessThanOrEqualTo(mTime);
|
||||
example.createCriteria().andBilltimeLessThanOrEqualTo(mTime)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
}
|
||||
}
|
||||
List<AccountHead> dataList = accountHeadMapper.selectByExample(example);
|
||||
@@ -245,9 +254,11 @@ public class AccountService {
|
||||
AccountItemExample exampleAi = new AccountItemExample();
|
||||
if (!ids.equals("")) {
|
||||
List<Long> idList = StringUtil.strToLongList(ids);
|
||||
exampleAi.createCriteria().andAccountidEqualTo(id).andHeaderidIn(idList);
|
||||
exampleAi.createCriteria().andAccountidEqualTo(id).andHeaderidIn(idList)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
} else {
|
||||
exampleAi.createCriteria().andAccountidEqualTo(id);
|
||||
exampleAi.createCriteria().andAccountidEqualTo(id)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
}
|
||||
List<AccountItem> dataListOne = accountItemMapper.selectByExample(exampleAi);
|
||||
if (dataListOne != null) {
|
||||
@@ -282,13 +293,16 @@ public class AccountService {
|
||||
Date mTime = StringUtil.getDateByString(timeStr + "-01 00:00:00", null);
|
||||
if (type.equals("month")) {
|
||||
example.createCriteria().andAccountidlistLike("%" +id.toString() + "%")
|
||||
.andOpertimeGreaterThanOrEqualTo(bTime).andOpertimeLessThanOrEqualTo(eTime);
|
||||
.andOpertimeGreaterThanOrEqualTo(bTime).andOpertimeLessThanOrEqualTo(eTime)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
} else if (type.equals("date")) {
|
||||
example.createCriteria().andAccountidlistLike("%" +id.toString() + "%")
|
||||
.andOpertimeLessThanOrEqualTo(mTime);
|
||||
.andOpertimeLessThanOrEqualTo(mTime)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
}
|
||||
} else {
|
||||
example.createCriteria().andAccountidlistLike("%" +id.toString() + "%");
|
||||
example.createCriteria().andAccountidlistLike("%" +id.toString() + "%")
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
}
|
||||
List<DepotHead> dataList = depotHeadMapper.selectByExample(example);
|
||||
if (dataList != null) {
|
||||
|
||||
@@ -49,6 +49,7 @@ public class AccountItemService {
|
||||
|
||||
public List<AccountItem> getAccountItem() {
|
||||
AccountItemExample example = new AccountItemExample();
|
||||
example.createCriteria().andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
return accountItemMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public class AppService {
|
||||
|
||||
public List<App> findDock(){
|
||||
AppExample example = new AppExample();
|
||||
example.createCriteria().andZlEqualTo("dock").andEnabledEqualTo(true);
|
||||
example.createCriteria().andZlEqualTo("dock").andEnabledEqualTo(true).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
example.setOrderByClause("Sort");
|
||||
List<App> list = appMapper.selectByExample(example);
|
||||
return list;
|
||||
@@ -57,7 +57,7 @@ public class AppService {
|
||||
*/
|
||||
public List<App> findDesk(){
|
||||
AppExample example = new AppExample();
|
||||
example.createCriteria().andZlEqualTo("desk").andEnabledEqualTo(true);
|
||||
example.createCriteria().andZlEqualTo("desk").andEnabledEqualTo(true).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
example.setOrderByClause("Sort");
|
||||
List<App> list = appMapper.selectByExample(example);
|
||||
return list;
|
||||
@@ -69,6 +69,7 @@ public class AppService {
|
||||
|
||||
public List<App> getApp() {
|
||||
AppExample example = new AppExample();
|
||||
example.createCriteria().andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
return appMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
@@ -108,7 +109,7 @@ public class AppService {
|
||||
|
||||
public List<App> findRoleAPP(){
|
||||
AppExample example = new AppExample();
|
||||
example.createCriteria().andEnabledEqualTo(true);
|
||||
example.createCriteria().andEnabledEqualTo(true).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
example.setOrderByClause("Sort");
|
||||
List<App> list = appMapper.selectByExample(example);
|
||||
return list;
|
||||
@@ -117,7 +118,8 @@ public class AppService {
|
||||
public List<App> findAppInIds(String ids, String type){
|
||||
List<Long> idList = StringUtil.strToLongList(ids);
|
||||
AppExample example = new AppExample();
|
||||
example.createCriteria().andZlEqualTo(type).andEnabledEqualTo(true).andIdIn(idList);
|
||||
example.createCriteria().andZlEqualTo(type).andEnabledEqualTo(true).andIdIn(idList)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
example.setOrderByClause("Sort");
|
||||
List<App> list = appMapper.selectByExample(example);
|
||||
return list;
|
||||
|
||||
@@ -47,11 +47,13 @@ public class DepotService {
|
||||
|
||||
public List<Depot> getDepot() {
|
||||
DepotExample example = new DepotExample();
|
||||
example.createCriteria().andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
return depotMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public List<Depot> getAllList() {
|
||||
DepotExample example = new DepotExample();
|
||||
example.createCriteria().andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
example.setOrderByClause("sort");
|
||||
return depotMapper.selectByExample(example);
|
||||
}
|
||||
@@ -99,7 +101,7 @@ public class DepotService {
|
||||
|
||||
public List<Depot> findUserDepot(){
|
||||
DepotExample example = new DepotExample();
|
||||
example.createCriteria().andTypeEqualTo(0);
|
||||
example.createCriteria().andTypeEqualTo(0).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
example.setOrderByClause("Sort");
|
||||
List<Depot> list = depotMapper.selectByExample(example);
|
||||
return list;
|
||||
|
||||
@@ -64,6 +64,7 @@ public class DepotHeadService {
|
||||
|
||||
public List<DepotHead> getDepotHead() {
|
||||
DepotHeadExample example = new DepotHeadExample();
|
||||
example.createCriteria().andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
return depotHeadMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
@@ -191,7 +192,7 @@ public class DepotHeadService {
|
||||
DepotHeadExample example = new DepotHeadExample();
|
||||
monthTime = monthTime + "-31 23:59:59";
|
||||
Date month = StringUtil.getDateByString(monthTime, null);
|
||||
example.createCriteria().andOpertimeLessThanOrEqualTo(month);
|
||||
example.createCriteria().andOpertimeLessThanOrEqualTo(month).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
return depotHeadMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ public class DepotItemService {
|
||||
|
||||
public List<DepotItem> getDepotItem() {
|
||||
DepotItemExample example = new DepotItemExample();
|
||||
example.createCriteria().andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
return depotItemMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ public class FunctionsService {
|
||||
|
||||
public List<Functions> getFunctions() {
|
||||
FunctionsExample example = new FunctionsExample();
|
||||
example.createCriteria().andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
return functionsMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
@@ -88,7 +89,8 @@ public class FunctionsService {
|
||||
|
||||
public List<Functions> getRoleFunctions(String pNumber) {
|
||||
FunctionsExample example = new FunctionsExample();
|
||||
example.createCriteria().andEnabledEqualTo(true).andPnumberEqualTo(pNumber);
|
||||
example.createCriteria().andEnabledEqualTo(true).andPnumberEqualTo(pNumber)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
example.setOrderByClause("Sort");
|
||||
List<Functions> list = functionsMapper.selectByExample(example);
|
||||
return list;
|
||||
@@ -96,7 +98,8 @@ public class FunctionsService {
|
||||
|
||||
public List<Functions> findRoleFunctions(String pnumber){
|
||||
FunctionsExample example = new FunctionsExample();
|
||||
example.createCriteria().andEnabledEqualTo(true).andPnumberEqualTo(pnumber);
|
||||
example.createCriteria().andEnabledEqualTo(true).andPnumberEqualTo(pnumber)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
example.setOrderByClause("Sort");
|
||||
List<Functions> list = functionsMapper.selectByExample(example);
|
||||
return list;
|
||||
@@ -105,11 +108,13 @@ public class FunctionsService {
|
||||
public List<Functions> findByIds(String functionsIds){
|
||||
List<Long> idList = StringUtil.strToLongList(functionsIds);
|
||||
FunctionsExample example = new FunctionsExample();
|
||||
example.createCriteria().andEnabledEqualTo(true).andIdIn(idList);
|
||||
example.createCriteria().andEnabledEqualTo(true).andIdIn(idList)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
example.setOrderByClause("Sort asc");
|
||||
List<Functions> list = functionsMapper.selectByExample(example);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||
public int batchDeleteFunctionsByIds(String ids) {
|
||||
logService.insertLog(BusinessConstants.LOG_INTERFACE_NAME_FUNCTIONS,
|
||||
|
||||
@@ -49,6 +49,7 @@ public class InOutItemService {
|
||||
|
||||
public List<InOutItem> getInOutItem() {
|
||||
InOutItemExample example = new InOutItemExample();
|
||||
example.createCriteria().andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
return inOutItemMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
@@ -96,9 +97,9 @@ public class InOutItemService {
|
||||
public List<InOutItem> findBySelect(String type) {
|
||||
InOutItemExample example = new InOutItemExample();
|
||||
if (type.equals("in")) {
|
||||
example.createCriteria().andTypeEqualTo("收入");
|
||||
example.createCriteria().andTypeEqualTo("收入").andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
} else if (type.equals("out")) {
|
||||
example.createCriteria().andTypeEqualTo("支出");
|
||||
example.createCriteria().andTypeEqualTo("支出").andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
}
|
||||
example.setOrderByClause("id desc");
|
||||
return inOutItemMapper.selectByExample(example);
|
||||
|
||||
@@ -45,6 +45,7 @@ public class MaterialService {
|
||||
|
||||
public List<Material> getMaterial() {
|
||||
MaterialExample example = new MaterialExample();
|
||||
example.createCriteria().andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
return materialMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
@@ -175,6 +176,7 @@ public class MaterialService {
|
||||
|
||||
public List<Material> findByOrder(){
|
||||
MaterialExample example = new MaterialExample();
|
||||
example.createCriteria().andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
example.setOrderByClause("Name,Model asc");
|
||||
return materialMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
@@ -42,8 +42,10 @@ public class MaterialPropertyService {
|
||||
|
||||
public List<MaterialProperty> getMaterialProperty() {
|
||||
MaterialPropertyExample example = new MaterialPropertyExample();
|
||||
example.createCriteria().andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
return materialPropertyMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public List<MaterialProperty> select(String name, int offset, int rows) {
|
||||
return materialPropertyMapperEx.selectByConditionMaterialProperty(name, offset, rows);
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ public class PersonService {
|
||||
|
||||
public List<Person> getPerson() {
|
||||
PersonExample example = new PersonExample();
|
||||
example.createCriteria().andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
return personMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
@@ -96,7 +97,7 @@ public class PersonService {
|
||||
public String getPersonByIds(String personIDs) {
|
||||
List<Long> ids = StringUtil.strToLongList(personIDs);
|
||||
PersonExample example = new PersonExample();
|
||||
example.createCriteria().andIdIn(ids);
|
||||
example.createCriteria().andIdIn(ids).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
example.setOrderByClause("Id asc");
|
||||
List<Person> list = personMapper.selectByExample(example);
|
||||
StringBuffer sb = new StringBuffer();
|
||||
@@ -110,7 +111,7 @@ public class PersonService {
|
||||
|
||||
public List<Person> getPersonByType(String type) {
|
||||
PersonExample example = new PersonExample();
|
||||
example.createCriteria().andTypeEqualTo(type);
|
||||
example.createCriteria().andTypeEqualTo(type).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
example.setOrderByClause("Id asc");
|
||||
return personMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ public class RoleService {
|
||||
|
||||
public List<Role> getRole() {
|
||||
RoleExample example = new RoleExample();
|
||||
example.createCriteria().andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
return roleMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ public class SupplierService {
|
||||
|
||||
public List<Supplier> getSupplier() {
|
||||
SupplierExample example = new SupplierExample();
|
||||
example.createCriteria().andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
return supplierMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
@@ -114,28 +115,31 @@ public class SupplierService {
|
||||
|
||||
public List<Supplier> findBySelectCus() {
|
||||
SupplierExample example = new SupplierExample();
|
||||
example.createCriteria().andTypeLike("客户").andEnabledEqualTo(true);
|
||||
example.createCriteria().andTypeLike("客户").andEnabledEqualTo(true).andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
example.setOrderByClause("id desc");
|
||||
return supplierMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public List<Supplier> findBySelectSup() {
|
||||
SupplierExample example = new SupplierExample();
|
||||
example.createCriteria().andTypeLike("供应商").andEnabledEqualTo(true);
|
||||
example.createCriteria().andTypeLike("供应商").andEnabledEqualTo(true)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
example.setOrderByClause("id desc");
|
||||
return supplierMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public List<Supplier> findBySelectRetail() {
|
||||
SupplierExample example = new SupplierExample();
|
||||
example.createCriteria().andTypeLike("会员").andEnabledEqualTo(true);
|
||||
example.createCriteria().andTypeLike("会员").andEnabledEqualTo(true)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
example.setOrderByClause("id desc");
|
||||
return supplierMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public List<Supplier> findById(Long supplierId) {
|
||||
SupplierExample example = new SupplierExample();
|
||||
example.createCriteria().andIdEqualTo(supplierId);
|
||||
example.createCriteria().andIdEqualTo(supplierId)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
example.setOrderByClause("id desc");
|
||||
return supplierMapper.selectByExample(example);
|
||||
}
|
||||
@@ -155,7 +159,8 @@ public class SupplierService {
|
||||
|
||||
public List<Supplier> findUserCustomer(){
|
||||
SupplierExample example = new SupplierExample();
|
||||
example.createCriteria().andTypeEqualTo("客户");
|
||||
example.createCriteria().andTypeEqualTo("客户")
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
example.setOrderByClause("id desc");
|
||||
List<Supplier> list = supplierMapper.selectByExample(example);
|
||||
return list;
|
||||
|
||||
@@ -42,6 +42,7 @@ public class SystemConfigService {
|
||||
|
||||
public List<SystemConfig> getSystemConfig() {
|
||||
SystemConfigExample example = new SystemConfigExample();
|
||||
example.createCriteria().andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
return systemConfigMapper.selectByExample(example);
|
||||
}
|
||||
public List<SystemConfig> select(String companyName, int offset, int rows) {
|
||||
@@ -84,6 +85,7 @@ public class SystemConfigService {
|
||||
List<SystemConfig> list = systemConfigMapper.selectByExample(example);
|
||||
return list.size();
|
||||
}
|
||||
|
||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||
public int batchDeleteSystemConfigByIds(String ids) {
|
||||
logService.insertLog(BusinessConstants.LOG_INTERFACE_NAME_SYSTEM_CONFIG,
|
||||
|
||||
@@ -49,6 +49,7 @@ public class UnitService {
|
||||
|
||||
public List<Unit> getUnit() {
|
||||
UnitExample example = new UnitExample();
|
||||
example.createCriteria().andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
return unitMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ public class UserBusinessService {
|
||||
|
||||
public List<UserBusiness> getUserBusiness() {
|
||||
UserBusinessExample example = new UserBusinessExample();
|
||||
example.createCriteria().andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
return userBusinessMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
@@ -104,14 +105,16 @@ public class UserBusinessService {
|
||||
|
||||
public List<UserBusiness> getBasicData(String keyId, String type){
|
||||
UserBusinessExample example = new UserBusinessExample();
|
||||
example.createCriteria().andKeyidEqualTo(keyId).andTypeEqualTo(type);
|
||||
example.createCriteria().andKeyidEqualTo(keyId).andTypeEqualTo(type)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
List<UserBusiness> list = userBusinessMapper.selectByExample(example);
|
||||
return list;
|
||||
}
|
||||
|
||||
public Long checkIsValueExist(String type, String keyId) {
|
||||
UserBusinessExample example = new UserBusinessExample();
|
||||
example.createCriteria().andTypeEqualTo(type).andKeyidEqualTo(keyId);
|
||||
example.createCriteria().andTypeEqualTo(type).andKeyidEqualTo(keyId)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
List<UserBusiness> list = userBusinessMapper.selectByExample(example);
|
||||
Long id = null;
|
||||
if(list.size() > 0) {
|
||||
@@ -124,9 +127,11 @@ public class UserBusinessService {
|
||||
UserBusinessExample example = new UserBusinessExample();
|
||||
String newVaule = "%" + UBValue + "%";
|
||||
if(TypeVale !=null && KeyIdValue !=null) {
|
||||
example.createCriteria().andTypeEqualTo(TypeVale).andKeyidEqualTo(KeyIdValue).andValueLike(newVaule);
|
||||
example.createCriteria().andTypeEqualTo(TypeVale).andKeyidEqualTo(KeyIdValue).andValueLike(newVaule)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
} else {
|
||||
example.createCriteria().andValueLike(newVaule);
|
||||
example.createCriteria().andValueLike(newVaule)
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
}
|
||||
List<UserBusiness> list = userBusinessMapper.selectByExample(example);
|
||||
if(list.size() > 0) {
|
||||
@@ -150,7 +155,8 @@ public class UserBusinessService {
|
||||
|
||||
public List<UserBusiness> findRoleByUserId(String userId){
|
||||
UserBusinessExample example = new UserBusinessExample();
|
||||
example.createCriteria().andKeyidEqualTo(userId).andTypeEqualTo("UserRole");
|
||||
example.createCriteria().andKeyidEqualTo(userId).andTypeEqualTo("UserRole")
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
List<UserBusiness> list = userBusinessMapper.selectByExample(example);
|
||||
return list;
|
||||
}
|
||||
@@ -158,10 +164,12 @@ public class UserBusinessService {
|
||||
public List<UserBusiness> findAppByRoles(String roles){
|
||||
List<String> rolesList = StringUtil.strToStringList(roles);
|
||||
UserBusinessExample example = new UserBusinessExample();
|
||||
example.createCriteria().andKeyidIn(rolesList).andTypeEqualTo("RoleAPP");
|
||||
example.createCriteria().andKeyidIn(rolesList).andTypeEqualTo("RoleAPP")
|
||||
.andDeleteFlagNotEqualTo(BusinessConstants.DELETE_FLAG_DELETED);
|
||||
List<UserBusiness> list = userBusinessMapper.selectByExample(example);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||
public int batchDeleteUserBusinessByIds(String ids) {
|
||||
logService.insertLog(BusinessConstants.LOG_INTERFACE_NAME_USER_BUSINESS,
|
||||
|
||||
Reference in New Issue
Block a user