Commit 0734b057 authored by 季圣华's avatar 季圣华
Browse files

更新Mapper的文件结构

parent 1151add2
...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.Log; import com.jsh.erp.datasource.entities.Log;
import com.jsh.erp.datasource.entities.LogExample; import com.jsh.erp.datasource.entities.LogExample;
import com.jsh.erp.datasource.mappers.LogMapper; import com.jsh.erp.datasource.mappers.LogMapper;
import com.jsh.erp.datasource.mappers.LogMapperEx;
import com.jsh.erp.datasource.vo.LogVo4List; import com.jsh.erp.datasource.vo.LogVo4List;
import com.jsh.erp.utils.ExceptionCodeConstants; import com.jsh.erp.utils.ExceptionCodeConstants;
import com.jsh.erp.utils.JshException; import com.jsh.erp.utils.JshException;
...@@ -25,6 +26,9 @@ public class LogService { ...@@ -25,6 +26,9 @@ public class LogService {
@Resource @Resource
private LogMapper logMapper; private LogMapper logMapper;
@Resource
private LogMapperEx logMapperEx;
public Log getLog(long id) { public Log getLog(long id) {
return logMapper.selectByPrimaryKey(id); return logMapper.selectByPrimaryKey(id);
} }
...@@ -36,13 +40,13 @@ public class LogService { ...@@ -36,13 +40,13 @@ public class LogService {
public List<LogVo4List> select(String operation, Integer usernameID, String clientIp, Integer status, String beginTime, String endTime, public List<LogVo4List> select(String operation, Integer usernameID, String clientIp, Integer status, String beginTime, String endTime,
String contentdetails, int offset, int rows) { String contentdetails, int offset, int rows) {
return logMapper.selectByConditionLog(operation, usernameID, clientIp, status, beginTime, endTime, return logMapperEx.selectByConditionLog(operation, usernameID, clientIp, status, beginTime, endTime,
contentdetails, offset, rows); contentdetails, offset, rows);
} }
public int countLog(String operation, Integer usernameID, String clientIp, Integer status, String beginTime, String endTime, public int countLog(String operation, Integer usernameID, String clientIp, Integer status, String beginTime, String endTime,
String contentdetails) { String contentdetails) {
return logMapper.countsByLog(operation, usernameID, clientIp, status, beginTime, endTime, contentdetails); return logMapperEx.countsByLog(operation, usernameID, clientIp, status, beginTime, endTime, contentdetails);
} }
@Transactional(value = "transactionManager", rollbackFor = Exception.class) @Transactional(value = "transactionManager", rollbackFor = Exception.class)
......
...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.MaterialProperty; import com.jsh.erp.datasource.entities.MaterialProperty;
import com.jsh.erp.datasource.entities.MaterialPropertyExample; import com.jsh.erp.datasource.entities.MaterialPropertyExample;
import com.jsh.erp.datasource.mappers.MaterialPropertyMapper; import com.jsh.erp.datasource.mappers.MaterialPropertyMapper;
import com.jsh.erp.datasource.mappers.MaterialPropertyMapperEx;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -21,6 +22,9 @@ public class MaterialPropertyService { ...@@ -21,6 +22,9 @@ public class MaterialPropertyService {
@Resource @Resource
private MaterialPropertyMapper materialPropertyMapper; private MaterialPropertyMapper materialPropertyMapper;
@Resource
private MaterialPropertyMapperEx materialPropertyMapperEx;
public MaterialProperty getMaterialProperty(long id) { public MaterialProperty getMaterialProperty(long id) {
return materialPropertyMapper.selectByPrimaryKey(id); return materialPropertyMapper.selectByPrimaryKey(id);
} }
...@@ -30,11 +34,11 @@ public class MaterialPropertyService { ...@@ -30,11 +34,11 @@ public class MaterialPropertyService {
return materialPropertyMapper.selectByExample(example); return materialPropertyMapper.selectByExample(example);
} }
public List<MaterialProperty> select(String name, int offset, int rows) { public List<MaterialProperty> select(String name, int offset, int rows) {
return materialPropertyMapper.selectByConditionMaterialProperty(name, offset, rows); return materialPropertyMapperEx.selectByConditionMaterialProperty(name, offset, rows);
} }
public int countMaterialProperty(String name) { public int countMaterialProperty(String name) {
return materialPropertyMapper.countsByMaterialProperty(name); return materialPropertyMapperEx.countsByMaterialProperty(name);
} }
@Transactional(value = "transactionManager", rollbackFor = Exception.class) @Transactional(value = "transactionManager", rollbackFor = Exception.class)
......
...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.Person; import com.jsh.erp.datasource.entities.Person;
import com.jsh.erp.datasource.entities.PersonExample; import com.jsh.erp.datasource.entities.PersonExample;
import com.jsh.erp.datasource.mappers.PersonMapper; import com.jsh.erp.datasource.mappers.PersonMapper;
import com.jsh.erp.datasource.mappers.PersonMapperEx;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -21,6 +22,9 @@ public class PersonService { ...@@ -21,6 +22,9 @@ public class PersonService {
@Resource @Resource
private PersonMapper personMapper; private PersonMapper personMapper;
@Resource
private PersonMapperEx personMapperEx;
public Person getPerson(long id) { public Person getPerson(long id) {
return personMapper.selectByPrimaryKey(id); return personMapper.selectByPrimaryKey(id);
} }
...@@ -31,11 +35,11 @@ public class PersonService { ...@@ -31,11 +35,11 @@ public class PersonService {
} }
public List<Person> select(String name, String type, int offset, int rows) { public List<Person> select(String name, String type, int offset, int rows) {
return personMapper.selectByConditionPerson(name, type, offset, rows); return personMapperEx.selectByConditionPerson(name, type, offset, rows);
} }
public int countPerson(String name, String type) { public int countPerson(String name, String type) {
return personMapper.countsByPerson(name, type); return personMapperEx.countsByPerson(name, type);
} }
@Transactional(value = "transactionManager", rollbackFor = Exception.class) @Transactional(value = "transactionManager", rollbackFor = Exception.class)
......
...@@ -6,6 +6,7 @@ import com.jsh.erp.datasource.entities.RoleExample; ...@@ -6,6 +6,7 @@ import com.jsh.erp.datasource.entities.RoleExample;
import com.jsh.erp.datasource.entities.User; import com.jsh.erp.datasource.entities.User;
import com.jsh.erp.datasource.entities.UserExample; import com.jsh.erp.datasource.entities.UserExample;
import com.jsh.erp.datasource.mappers.RoleMapper; import com.jsh.erp.datasource.mappers.RoleMapper;
import com.jsh.erp.datasource.mappers.RoleMapperEx;
import com.jsh.erp.datasource.mappers.UserMapper; import com.jsh.erp.datasource.mappers.UserMapper;
import com.jsh.erp.utils.QueryUtils; import com.jsh.erp.utils.QueryUtils;
import com.jsh.erp.utils.RegExpTools; import com.jsh.erp.utils.RegExpTools;
...@@ -23,6 +24,9 @@ public class RoleService { ...@@ -23,6 +24,9 @@ public class RoleService {
@Resource @Resource
private RoleMapper roleMapper; private RoleMapper roleMapper;
@Resource
private RoleMapperEx roleMapperEx;
public Role getRole(long id) { public Role getRole(long id) {
return roleMapper.selectByPrimaryKey(id); return roleMapper.selectByPrimaryKey(id);
} }
...@@ -33,11 +37,11 @@ public class RoleService { ...@@ -33,11 +37,11 @@ public class RoleService {
} }
public List<Role> select(String name, int offset, int rows) { public List<Role> select(String name, int offset, int rows) {
return roleMapper.selectByConditionRole(name, offset, rows); return roleMapperEx.selectByConditionRole(name, offset, rows);
} }
public int countRole(String name) { public int countRole(String name) {
return roleMapper.countsByRole(name); return roleMapperEx.countsByRole(name);
} }
@Transactional(value = "transactionManager", rollbackFor = Exception.class) @Transactional(value = "transactionManager", rollbackFor = Exception.class)
......
...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.Supplier; import com.jsh.erp.datasource.entities.Supplier;
import com.jsh.erp.datasource.entities.SupplierExample; import com.jsh.erp.datasource.entities.SupplierExample;
import com.jsh.erp.datasource.mappers.SupplierMapper; import com.jsh.erp.datasource.mappers.SupplierMapper;
import com.jsh.erp.datasource.mappers.SupplierMapperEx;
import com.jsh.erp.utils.BaseResponseInfo; import com.jsh.erp.utils.BaseResponseInfo;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
import org.slf4j.Logger; import org.slf4j.Logger;
...@@ -25,6 +26,9 @@ public class SupplierService { ...@@ -25,6 +26,9 @@ public class SupplierService {
@Resource @Resource
private SupplierMapper supplierMapper; private SupplierMapper supplierMapper;
@Resource
private SupplierMapperEx supplierMapperEx;
public Supplier getSupplier(long id) { public Supplier getSupplier(long id) {
return supplierMapper.selectByPrimaryKey(id); return supplierMapper.selectByPrimaryKey(id);
} }
...@@ -35,11 +39,11 @@ public class SupplierService { ...@@ -35,11 +39,11 @@ public class SupplierService {
} }
public List<Supplier> select(String supplier, String type, String phonenum, String telephone, String description, int offset, int rows) { public List<Supplier> select(String supplier, String type, String phonenum, String telephone, String description, int offset, int rows) {
return supplierMapper.selectByConditionSupplier(supplier, type, phonenum, telephone, description, offset, rows); return supplierMapperEx.selectByConditionSupplier(supplier, type, phonenum, telephone, description, offset, rows);
} }
public int countSupplier(String supplier, String type, String phonenum, String telephone, String description) { public int countSupplier(String supplier, String type, String phonenum, String telephone, String description) {
return supplierMapper.countsBySupplier(supplier, type, phonenum, telephone, description); return supplierMapperEx.countsBySupplier(supplier, type, phonenum, telephone, description);
} }
@Transactional(value = "transactionManager", rollbackFor = Exception.class) @Transactional(value = "transactionManager", rollbackFor = Exception.class)
...@@ -134,7 +138,7 @@ public class SupplierService { ...@@ -134,7 +138,7 @@ public class SupplierService {
} }
public List<Supplier> findByAll(String supplier, String type, String phonenum, String telephone, String description) { public List<Supplier> findByAll(String supplier, String type, String phonenum, String telephone, String description) {
return supplierMapper.findByAll(supplier, type, phonenum, telephone, description); return supplierMapperEx.findByAll(supplier, type, phonenum, telephone, description);
} }
public BaseResponseInfo importExcel(List<Supplier> mList) throws Exception { public BaseResponseInfo importExcel(List<Supplier> mList) throws Exception {
......
...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.SystemConfig; import com.jsh.erp.datasource.entities.SystemConfig;
import com.jsh.erp.datasource.entities.SystemConfigExample; import com.jsh.erp.datasource.entities.SystemConfigExample;
import com.jsh.erp.datasource.mappers.SystemConfigMapper; import com.jsh.erp.datasource.mappers.SystemConfigMapper;
import com.jsh.erp.datasource.mappers.SystemConfigMapperEx;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -21,6 +22,9 @@ public class SystemConfigService { ...@@ -21,6 +22,9 @@ public class SystemConfigService {
@Resource @Resource
private SystemConfigMapper systemConfigMapper; private SystemConfigMapper systemConfigMapper;
@Resource
private SystemConfigMapperEx systemConfigMapperEx;
public SystemConfig getSystemConfig(long id) { public SystemConfig getSystemConfig(long id) {
return systemConfigMapper.selectByPrimaryKey(id); return systemConfigMapper.selectByPrimaryKey(id);
} }
...@@ -30,11 +34,11 @@ public class SystemConfigService { ...@@ -30,11 +34,11 @@ public class SystemConfigService {
return systemConfigMapper.selectByExample(example); return systemConfigMapper.selectByExample(example);
} }
public List<SystemConfig> select(int offset, int rows) { public List<SystemConfig> select(int offset, int rows) {
return systemConfigMapper.selectByConditionSystemConfig(offset, rows); return systemConfigMapperEx.selectByConditionSystemConfig(offset, rows);
} }
public int countSystemConfig() { public int countSystemConfig() {
return systemConfigMapper.countsBySystemConfig(); return systemConfigMapperEx.countsBySystemConfig();
} }
@Transactional(value = "transactionManager", rollbackFor = Exception.class) @Transactional(value = "transactionManager", rollbackFor = Exception.class)
......
...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.Unit; import com.jsh.erp.datasource.entities.Unit;
import com.jsh.erp.datasource.entities.UnitExample; import com.jsh.erp.datasource.entities.UnitExample;
import com.jsh.erp.datasource.mappers.UnitMapper; import com.jsh.erp.datasource.mappers.UnitMapper;
import com.jsh.erp.datasource.mappers.UnitMapperEx;
import com.jsh.erp.utils.StringUtil; import com.jsh.erp.utils.StringUtil;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -21,6 +22,9 @@ public class UnitService { ...@@ -21,6 +22,9 @@ public class UnitService {
@Resource @Resource
private UnitMapper unitMapper; private UnitMapper unitMapper;
@Resource
private UnitMapperEx unitMapperEx;
public Unit getUnit(long id) { public Unit getUnit(long id) {
return unitMapper.selectByPrimaryKey(id); return unitMapper.selectByPrimaryKey(id);
} }
...@@ -31,11 +35,11 @@ public class UnitService { ...@@ -31,11 +35,11 @@ public class UnitService {
} }
public List<Unit> select(String name, int offset, int rows) { public List<Unit> select(String name, int offset, int rows) {
return unitMapper.selectByConditionUnit(name, offset, rows); return unitMapperEx.selectByConditionUnit(name, offset, rows);
} }
public int countUnit(String name) { public int countUnit(String name) {
return unitMapper.countsByUnit(name); return unitMapperEx.countsByUnit(name);
} }
@Transactional(value = "transactionManager", rollbackFor = Exception.class) @Transactional(value = "transactionManager", rollbackFor = Exception.class)
......
...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.jsh.erp.datasource.entities.User; import com.jsh.erp.datasource.entities.User;
import com.jsh.erp.datasource.entities.UserExample; import com.jsh.erp.datasource.entities.UserExample;
import com.jsh.erp.datasource.mappers.UserMapper; import com.jsh.erp.datasource.mappers.UserMapper;
import com.jsh.erp.datasource.mappers.UserMapperEx;
import com.jsh.erp.utils.*; import com.jsh.erp.utils.*;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -26,6 +27,9 @@ public class UserService { ...@@ -26,6 +27,9 @@ public class UserService {
@Resource @Resource
private UserMapper userMapper; private UserMapper userMapper;
@Resource
private UserMapperEx userMapperEx;
public User getUser(long id) { public User getUser(long id) {
return userMapper.selectByPrimaryKey(id); return userMapper.selectByPrimaryKey(id);
} }
...@@ -36,11 +40,11 @@ public class UserService { ...@@ -36,11 +40,11 @@ public class UserService {
} }
public List<User> select(String userName, String loginName, int offset, int rows) { public List<User> select(String userName, String loginName, int offset, int rows) {
return userMapper.selectByConditionUser(userName, loginName, offset, rows); return userMapperEx.selectByConditionUser(userName, loginName, offset, rows);
} }
public int countUser(String userName, String loginName) { public int countUser(String userName, String loginName) {
return userMapper.countsByUser(userName, loginName); return userMapperEx.countsByUser(userName, loginName);
} }
/** /**
* create by: cjl * create by: cjl
......
Supports Markdown
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