Commit d17fa4b4 authored by gary's avatar gary

1、后端权限由数据库中查询

2、任何角色变更时,都会将对应的用户权限缓存清除
3、role的curd都在缓存上进行
parent 7f32ff64
......@@ -49,7 +49,8 @@ public enum OperationModule {
OrganizationReturnRate(37),
OrganizationApprovedLevyInfo(38),
OrganizationTaxOfficer(39),
OrganizationTaxRule(40);
OrganizationTaxRule(40),
Equity(41);
private int value;
......
......@@ -16,6 +16,13 @@ public class LogMessage {
public static final String AddOrganization = "AddOrganization";
public static final String UpdateOrganization = "UpdateOrganization";
public static final String AddOrganizationEquity = "AddOrganizationEquity";
public static final String UpdateOrganizationEquity = "UpdateOrganizationEquity";
public static final String DeleteOrganizationEquity = "DeleteOrganizationEquity";
public static final String ChangeOrganizationEquity = "ChangeOrganizationEquity";
public static final String CancelChangeUpdateOrganizationEquity = "CancelChangeUpdateOrganizationEquity";
public static final String AddOrganizationInvoice = "AddOrganizationInvoice";
public static final String UpdateOrganizationInvoice = "UpdateOrganizationInvoice";
public static final String DeleteOrganizationInvoice = "DeleteOrganizationInvoice";
......
package pwc.taxtech.atms.data;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.cache.annotation.Caching;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dao.RoleMapper;
import pwc.taxtech.atms.dto.role.RoleDto;
import pwc.taxtech.atms.entity.Role;
import java.util.ArrayList;
import java.util.List;
import pwc.taxtech.atms.entity.RoleExample;
import javax.annotation.Resource;
/**
* @Auther: Gary J Li
* @Date: 11/01/2019 14:53
* @Description:将Role存入ehcache,提高查询效率
*/
@Service
public class RoleData {
private static final Logger logger = LoggerFactory.getLogger(RoleData.class);
@Resource
private RoleMapper roleMapper;
/**
* 11/01/2019 16:15
* 根据serviceTypeId查询,存入ehcache
* [serviceTypeId]
* @author Gary J Li
* @return List<Role> roleList
*/
@Cacheable(value = "roleByServiceTypeIdCache", key = "#serviceTypeId")
public List<Role> selectByServiceTypeId(String serviceTypeId){
List<Role> roleList = new ArrayList<>();
try{
RoleExample roleExample = new RoleExample();
if(StringUtils.isNotBlank(serviceTypeId)){
roleExample.createCriteria().andServiceTypeIdEqualTo(serviceTypeId);
}
roleList = roleMapper.selectByExample(roleExample);
}catch (Exception e){
logger.error(String.format("Error selectByServiceTypeId: %s",e.getMessage()));
}
return roleList;
}
/**
* 11/01/2019 16:16
* 根据id查询,存入ehcache
* [id]
* @author Gary J Li
* @return Role role
*/
@Cacheable(value = "roleByIdCache", key = "#id")
public Role selectByPrimaryKey(String id){
Role role = new Role();
try{
role = roleMapper.selectByPrimaryKey(id);
}catch (Exception e){
logger.error(String.format("Error role selectByPrimaryKey: %s",e.getMessage()));
}
return role;
}
/**
* 11/01/2019 16:17
* 根据主键id删除,并把ehcache里的role都删掉
* [roleDto]
* @author Gary J Li
* @return int res
*/
@Caching(evict= {@CacheEvict(value = "roleByServiceTypeIdCache", key = "#role.getServiceTypeId()"),@CacheEvict(value = "roleByIdCache", key = "#role.getId()")} )
public int deleteByPrimaryKey(RoleDto roleDto){
int res = 0;
try{
res = roleMapper.deleteByPrimaryKey(roleDto.getId());
}catch (Exception e){
logger.error(String.format("Error role delete: %s",e.getMessage()));
}
return res;
}
/**
* 11/01/2019 16:20
* role写入,并在缓存里写入两个Hash(ServiceTypeId,Id)里
* [role]
* @author Gary J Li
* @return Role role
*/
@Caching(put= {@CachePut(value = "roleByServiceTypeIdCache", key = "#role.getServiceTypeId()"),@CachePut(value = "roleByIdCache", key = "#role.getId()")} )
public Role insert(Role role){
try{
roleMapper.insert(role);
}catch (Exception e){
logger.error(String.format("Error role insert: %s",e.getMessage()));
}
return role;
}
/**
* 11/01/2019 16:22
* role更新,并在缓存里更新两个Hash(ServiceTypeId,Id)里
* [role]
* @author Gary J Li
* @return Role role
*/
@Caching(put= {@CachePut(value = "roleByServiceTypeIdCache", key = "#role.getServiceTypeId()"),@CachePut(value = "roleByIdCache", key = "#role.getId()")} )
public Role updateByPrimaryKey(Role role){
try{
roleMapper.updateByPrimaryKey(role);
}catch (Exception e){
logger.error(String.format("Error role updateByPrimaryKey : %s",e.getMessage()));
}
return role;
}
}
package pwc.taxtech.atms.data;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dao.RolePermissionMapper;
import pwc.taxtech.atms.entity.RolePermission;
import javax.annotation.Resource;
import java.util.List;
/**
* @Auther: Gary J Li
* @Date: 11/01/2019 14:53
* @Description:
*/
@Service
public class RolePermissionData {
private static final Logger logger = LoggerFactory.getLogger(RolePermissionData.class);
@Resource
private RolePermissionMapper rolePermissionMapper;
@Cacheable(value = "role", key = "#roleId+ '_' +#serviceTypeId")
public List<RolePermission> selectByRoleIdAndServiceTypeId(String roleId,String serviceTypeId){
return rolePermissionMapper.selectByRoleAndServiceTypeWithAssociation(roleId, serviceTypeId);
}
}
......@@ -5,8 +5,15 @@ import org.slf4j.LoggerFactory;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dao.PermissionMapper;
import pwc.taxtech.atms.dao.RolePermissionMapper;
import pwc.taxtech.atms.dao.UserRoleMapper;
import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.service.impl.RoleServiceImpl;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
......@@ -16,18 +23,55 @@ public class JwtAuthenticationService {
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
@Resource
private UserRoleMapper userRoleMapper;
@Resource
private RolePermissionMapper rolePermissionMapper;
@Resource
private PermissionMapper permissionMapper;
/**
* 27/12/2018 11:05
* 用户第一个需鉴权的操作时,从UPM获取用户操作权限存入EhCache,至下一次登陆前从EhCache获取权限进行操作鉴权。
*
* 用户第一个需鉴权的操作时,从UPM(目前从数据库中查询)获取用户操作权限存入EhCache,至下一次登陆前从EhCache获取权限进行操作鉴权。
* // todo upm return response
* [userName]
* @author Gary J Li
* @return List<String>
*/
@Cacheable(value = "apiAuthCache", key = "'userName'")
public List<String> getApiAuthList(String userName) {
@Cacheable(value = "apiAuthCache", key = "#userid")
public List<String> getApiAuthList(String userid) {
List<String> apiAuthList = new ArrayList<>();
apiAuthList.add("user:add");
// todo 1、修改角色的权限时,查询角色下的用户,刷新缓存
UserRoleExample userRoleExample = new UserRoleExample();
userRoleExample.createCriteria().andUserIdEqualTo(userid);
List<UserRole> userRoles = userRoleMapper.selectByExample(userRoleExample);
List<String> roleIds = new ArrayList<>();
userRoles.forEach( ur ->{
roleIds.add(ur.getRoleId());
});
RolePermissionExample rolePermissionExample = new RolePermissionExample();
rolePermissionExample.createCriteria().andRoleIdIn(roleIds);
List<RolePermission> rolePermissions = rolePermissionMapper.selectByExample(rolePermissionExample);
List<String> permissionIds = new ArrayList<>();
rolePermissions.forEach( rp ->{
permissionIds.add(rp.getPermissionId());
});
PermissionExample permissionExample= new PermissionExample();
permissionExample.createCriteria().andIdIn(permissionIds);
List<Permission> permissions = permissionMapper.selectByExample(permissionExample);
permissions.forEach(permission -> {
apiAuthList.addAll(Arrays.asList(permission.getOperationPermList().split("\\|")));
});
/*apiAuthList.add("user:add");
apiAuthList.add("cit:apply");
apiAuthList.add("user:edit");
apiAuthList.add("userRole:add");
apiAuthList.add("userRole:edit");
......@@ -36,9 +80,9 @@ public class JwtAuthenticationService {
apiAuthList.add("roleCategory:add");
apiAuthList.add("roleCategory:edit");
apiAuthList.add("vatApproval:commit");
apiAuthList.add("vatApproval:check");
// todo upm return response
logger.debug("get Cache from upm :"+"apiAuthCache-"+"key :"+userName + " value :"+String.join(",",apiAuthList));
apiAuthList.add("vatApproval:check");*/
logger.debug("get Cache from upm :"+"apiAuthCache-"+"key :"+userid + " value :"+String.join(",",apiAuthList));
return apiAuthList;
}
......@@ -49,9 +93,9 @@ public class JwtAuthenticationService {
* @author Gary J Li
*
*/
@CacheEvict(value = "apiAuthCache", key = "'#userName'")
public void removeApiAuthList(String userName) {
logger.debug("remove Cache :"+"apiAuthCache"+"key :"+userName);
@CacheEvict(value = "apiAuthCache", key = "#userid")
public void removeApiAuthList(String userid) {
logger.debug("remove Cache :"+"apiAuthCache"+"key :"+userid);
}
}
......@@ -61,7 +61,7 @@ public class JwtUtil implements InitializingBean {
String username = String.valueOf(defaultClaims.get("username"));
String userid = String.valueOf(defaultClaims.get("userid"));
// 原版 UserDetails return new JwtUser(userid, username, databaseUsername, defaultClaims, getAuthorities());
return new JwtUser(userid, username, databaseUsername, defaultClaims, getAuthorities(username));
return new JwtUser(userid, username, databaseUsername, defaultClaims, getAuthorities(userid));
}
private List<SimpleGrantedAuthority> getAuthorities() {
......@@ -71,11 +71,11 @@ public class JwtUtil implements InitializingBean {
return list;
}
private List<SimpleGrantedAuthority> getAuthorities(String userName) {
private List<SimpleGrantedAuthority> getAuthorities(String userid) {
List<SimpleGrantedAuthority> list = new ArrayList<>();
list.add(new SimpleGrantedAuthority("ROLE_USER"));
list.add(new SimpleGrantedAuthority("ROLE_JWT_USER"));
List<String> ecApiAuthList = jwtAuthenticationService.getApiAuthList(userName);
List<String> ecApiAuthList = jwtAuthenticationService.getApiAuthList(userid);
for(String ecApiAuth : ecApiAuthList){
list.add(new SimpleGrantedAuthority(ecApiAuth));
}
......
......@@ -419,8 +419,8 @@ public class DimensionServiceImpl extends AbstractService {
Dimension entity = new Dimension();
CommonUtils.copyProperties(model, entity);
entity.setId(CommonUtils.getUUID());
Short orderIndex = dimensionMapper.selectByExample(null).stream().map(Dimension::getOrderIndex)
.filter(Objects::nonNull).max(Comparator.naturalOrder()).orElse(Short.valueOf("0"));
Integer orderIndex = dimensionMapper.selectByExample(null).stream().map(Dimension::getOrderIndex)
.filter(Objects::nonNull).max(Comparator.naturalOrder()).orElse(Integer.valueOf("0"));
entity.setOrderIndex(orderIndex);
entity.setIsSystemDimension(false);
......
......@@ -19,6 +19,7 @@ import pwc.taxtech.atms.entity.EquityInformationExample;
import pwc.taxtech.atms.entity.OperationLogBasicData;
import pwc.taxtech.atms.exception.ApplicationException;
import javax.annotation.Resource;
import java.util.*;
import static pwc.taxtech.atms.common.CommonConstants.CommonFail;
......@@ -30,9 +31,9 @@ public class EquityServiceImpl extends BaseService{
@Autowired
private OperationLogServiceImpl operationLogServiceImpl;
@Autowired
@Resource
private EquityInformationMapper equityInformationMapper;
@Autowired
@Resource
private EquityInformationHistoryMapper equityInformationHistoryMapper;
public List<EquityInfoDto> getEquityListByOrgId(String orgId) {
......@@ -67,10 +68,11 @@ public class EquityServiceImpl extends BaseService{
BeanUtils.copyProperties(equityInfoDto,equityInformation);
equityInformationMapper.insert(equityInformation);
}
// todo 加日志
AddOrgEquityLog(OperationAction.New.value(),LogMessage.AddOrganizationEquity,equityInfoDtos.get(0).getOrganizationId(),OperationModule.Equity.value());
return new OperationResultDto(true);
}catch (Exception e){
return new OperationResultDto(false, CommonFail + e.getMessage());
logger.error(String.format("写入全部股东信息异常:%s", e.getMessage()));
return new OperationResultDto(false, CommonFail + SystemError);
}
}
......@@ -81,10 +83,11 @@ public class EquityServiceImpl extends BaseService{
EquityInformationExample example = new EquityInformationExample();
example.createCriteria().andIdEqualTo(equityInformation.getId()).andENumEqualTo(equityInformation.geteNum());
equityInformationMapper.updateByExampleSelective(equityInformation,example);
// todo 加日志
AddOrgEquityLog(OperationAction.Update.value(),LogMessage.UpdateOrganizationEquity,equityInfoDto.getOrganizationId(),OperationModule.Equity.value());
return new OperationResultDto(true);
}catch (Exception e){
return new OperationResultDto(false, CommonFail + e.getMessage());
logger.error(String.format("更新股东信息异常:%s", e.getMessage()));
return new OperationResultDto(false, CommonFail + SystemError);
}
}
......@@ -99,9 +102,10 @@ public class EquityServiceImpl extends BaseService{
if (delRes > 0) {
refreshEquityList(id);
}
// todo 加日志
AddOrgEquityLog(OperationAction.Delete.value(),LogMessage.DeleteOrganizationEquity,String.valueOf(id),OperationModule.Equity.value());
return new OperationResultDto(true);
} catch (Exception e) {
logger.error(String.format("删除股东信息异常:%s", e.getMessage()));
return new OperationResultDto(false, CommonFail + e.getMessage());
}
}
......@@ -156,7 +160,6 @@ public class EquityServiceImpl extends BaseService{
* @author Gary J Li
* @return OperationResultDto<Object>
*/
@Transactional
public OperationResultDto<Object> change(String orgName, String comment, List<EquityInfoDto> equityInfoDtos) {
EquityInformationExample exampleForOldData = new EquityInformationExample();
......@@ -224,6 +227,7 @@ public class EquityServiceImpl extends BaseService{
opLog.setLogType(OperateLogType.OperationLogEquity.value());
opLog.setEquityLog(true);
operationLogService.addOperationLog(opLog);
AddOrgEquityLog(OperationAction.Update.value(),LogMessage.ChangeOrganizationEquity,orgName,OperationModule.Equity.value());
return new OperationResultDto(true, "变更成功!", oldId);
}
......@@ -257,50 +261,44 @@ public class EquityServiceImpl extends BaseService{
* @author Gary J Li
* @return OperationResultDto<Object>
*/
@Transactional
public OperationResultDto<Object> cancelChange(Long oldId, Long newId) {
try{
if (null != oldId) {
// 1、根据oldId历史数据查出来equityInfomations equity_infomation_history
EquityInformationExample exampleForOldData = new EquityInformationExample();
exampleForOldData.createCriteria().andIdEqualTo(oldId);
List<EquityInformation> equityInformations = equityInformationHistoryMapper.selectByExample(exampleForOldData);
// 2、equityInfomations存入新表 equity_infomation
int insRes = 0;
for(EquityInformation equityInformation : equityInformations) {
insRes += equityInformationMapper.insert(equityInformation);
}
if (insRes < 1) {
logger.warn(String.format("撤销变更-2 表equity_infomation 存入新表数据异常.id: [ %s ]", newId));
throw new ApplicationException("撤销变更-2 存入新表数据异常");
}
if (null != oldId) {
// 1、根据oldId历史数据查出来equityInfomations equity_infomation_history
EquityInformationExample exampleForOldData = new EquityInformationExample();
exampleForOldData.createCriteria().andIdEqualTo(oldId);
List<EquityInformation> equityInformations = equityInformationHistoryMapper.selectByExample(exampleForOldData);
// 2、equityInfomations存入新表 equity_infomation
int insRes = 0;
for (EquityInformation equityInformation : equityInformations) {
insRes += equityInformationMapper.insert(equityInformation);
}
// 3、根据newId删除 equity_infomation
EquityInformationExample exampleDeleteOld = new EquityInformationExample();
exampleDeleteOld.createCriteria().andIdEqualTo(newId);
if (equityInformationMapper.deleteByExample(exampleDeleteOld) < 1) {
logger.warn(String.format("撤销变更-3 表equity_infomation 删除股权数据异常.id: [ %s ]", newId));
throw new ApplicationException("撤销变更-3 删除股权数据异常");
if (insRes < 1) {
logger.warn(String.format("撤销变更-2 表equity_infomation 存入新表数据异常.id: [ %s ]", newId));
throw new ApplicationException("撤销变更-2 存入新表数据异常");
}
if (null != oldId) {
}
// 3、根据newId删除 equity_infomation
EquityInformationExample exampleDeleteOld = new EquityInformationExample();
exampleDeleteOld.createCriteria().andIdEqualTo(newId);
if (equityInformationMapper.deleteByExample(exampleDeleteOld) < 1) {
logger.warn(String.format("撤销变更-3 表equity_infomation 删除股权数据异常.id: [ %s ]", newId));
throw new ApplicationException("撤销变更-3 删除股权数据异常");
}
if (null != oldId) {
// 4、根据oldId删除历史数据 equity_infomation_history
EquityInformationExample exampleDeleteNew = new EquityInformationExample();
exampleDeleteNew.createCriteria().andIdEqualTo(oldId);
if (equityInformationHistoryMapper.deleteByExample(exampleDeleteNew) < 1) {
logger.warn(String.format("撤销变更-3 表equity_infomation_history 删除股权数据异常.id: [ %s ]", oldId));
throw new ApplicationException("撤销变更-4 删除历史数据异常");
}
EquityInformationExample exampleDeleteNew = new EquityInformationExample();
exampleDeleteNew.createCriteria().andIdEqualTo(oldId);
if (equityInformationHistoryMapper.deleteByExample(exampleDeleteNew) < 1) {
logger.warn(String.format("撤销变更-3 表equity_infomation_history 删除股权数据异常.id: [ %s ]", oldId));
throw new ApplicationException("撤销变更-4 删除历史数据异常");
}
}
// 5、根据oldId删除操作日志 operation_log_equity
if (operationLogServiceImpl.deleteById(newId) < 1) {
logger.warn(String.format("撤销变更-3 表operation_log_equity 删除操作日志异常.id: [ %s ]", oldId));
throw new ApplicationException("撤销变更-5 删除操作日志异常");
}
}catch (Exception e){
logger.error(String.format("%s",e.getMessage()));
if (operationLogServiceImpl.deleteById(newId) < 1) {
logger.warn(String.format("撤销变更-3 表operation_log_equity 删除操作日志异常.id: [ %s ]", oldId));
throw new ApplicationException("撤销变更-5 删除操作日志异常");
}
AddOrgEquityLog(OperationAction.Update.value(),LogMessage.CancelChangeUpdateOrganizationEquity,String.valueOf(newId),OperationModule.Equity.value());
return new OperationResultDto(true);
}
......@@ -343,4 +341,25 @@ public class EquityServiceImpl extends BaseService{
}
return equityInfoDtos;
}
/**
* 25/01/2019 14:39
* [增删改查,操作描述,操作对象,操作模块] 更新、删除需补充oldData、newData
* [actionValue, content, object, module]
* @author Gary J Li
* @return
*/
private void AddOrgEquityLog(int actionValue,String content,String object,Integer module) {
OperationLogDto opLog = new OperationLogDto();
opLog.setAction(actionValue);
opLog.setOperationContent(content);
opLog.setOperationObject(object);
opLog.setOriginalState("");
opLog.setUpdateState("");
opLog.setIp("");
opLog.setModule(module);
opLog.setComment("");
opLog.setLogType(OperateLogType.OperationLogOrganization.value());
operationLogService.addOperationLog(opLog);
}
}
......@@ -296,7 +296,7 @@ public class OrganizationExtraServiceImpl extends BaseService{
/**
* 24/01/2019 10:41
* [增删改查,操作描述,操作对象,操作模块]
* [增删改查,操作描述,操作对象,操作模块] 更新、删除需补充oldData、newData
* [actionValue, content, object, module]
* @author Gary J Li
* @return
......
......@@ -12,6 +12,7 @@ import pwc.taxtech.atms.common.*;
import pwc.taxtech.atms.common.message.UserMessage;
import pwc.taxtech.atms.dao.UserHistoricalPasswordMapper;
import pwc.taxtech.atms.dao.UserMapper;
import pwc.taxtech.atms.data.RoleData;
import pwc.taxtech.atms.dto.ForgetPasswordDto;
import pwc.taxtech.atms.dto.LoginOutputDto;
import pwc.taxtech.atms.dto.MailMto;
......@@ -20,7 +21,6 @@ import pwc.taxtech.atms.dto.UpdateLogParams;
import pwc.taxtech.atms.dto.user.UserAndUserRoleSaveDto;
import pwc.taxtech.atms.dto.user.UserPasswordDto;
import pwc.taxtech.atms.entity.Role;
import pwc.taxtech.atms.entity.RoleExample;
import pwc.taxtech.atms.entity.User;
import pwc.taxtech.atms.entity.UserHistoricalPassword;
import pwc.taxtech.atms.entity.UserHistoricalPasswordExample;
......@@ -58,6 +58,8 @@ public class UserAccountServiceImpl extends AbstractService {
private AuthUserHelper authUserHelper;
@Autowired
private AtmsApiSettings atmsApiSettings;
@Autowired
private RoleData roleData;
public OperationResultDto<LoginOutputDto> changeExternalUserPassword(UserPasswordDto userPasswordDto) {
logger.debug("修改密码 Start");
......@@ -313,7 +315,8 @@ public class UserAccountServiceImpl extends AbstractService {
logger.debug("Start to insert new user [ {} ]", user.getId());
userMapper.insert(user);
List<String> arrRoles = userAndUserRoleSaveDto.getRoleIds();
List<Role> roleQuery = roleMapper.selectByExample(new RoleExample());
// List<Role> roleQuery = roleMapper.selectByExample(new RoleExample());
List<Role> roleQuery = roleData.selectByServiceTypeId(null);
if (arrRoles != null && !arrRoles.isEmpty()) {
for (String role : arrRoles) {
UserRole userRole = new UserRole();
......
......@@ -17,6 +17,7 @@ import pwc.taxtech.atms.common.message.LogMessage;
import pwc.taxtech.atms.common.message.UserMessage;
import pwc.taxtech.atms.constant.DimensionConstant;
import pwc.taxtech.atms.constant.UserConstant;
import pwc.taxtech.atms.data.RoleData;
import pwc.taxtech.atms.dpo.DimensionValueOrgDto;
import pwc.taxtech.atms.dpo.OrganizationDto;
import pwc.taxtech.atms.dpo.RoleInfo;
......@@ -64,6 +65,9 @@ public class UserRoleServiceImpl extends AbstractService {
@Autowired
private UserServiceImpl userService;
@Autowired
private RoleData roleData;
public OrgRoleDtoList getUserRoleByUserId(String userId) {
logger.debug("UserRoleServiceImpl getUserRoleByUserId [ userId: {} ]", userId);
OrgRoleDtoList result = new OrgRoleDtoList();
......@@ -1241,7 +1245,8 @@ public class UserRoleServiceImpl extends AbstractService {
}
// 添加日志
for (UserDimensionValueRole r : target) {
Role role = roleMapper.selectByPrimaryKey(r.getRoleId());
// Role role = roleMapper.selectByPrimaryKey(r.getRoleId());
Role role = roleData.selectByPrimaryKey(r.getRoleId());
String roleName = role == null ? "" : role.getName();
addOrDeleteDataAddLog(
dimensionName + CommonConstants.DashSignSeparator + dimensionValueName
......@@ -1291,7 +1296,8 @@ public class UserRoleServiceImpl extends AbstractService {
}
private RoleDto getRoleDtoById(String roleId) {
Role query = roleMapper.selectByPrimaryKey(roleId);
// Role query = roleMapper.selectByPrimaryKey(roleId);
Role query = roleData.selectByPrimaryKey(roleId);
return query == null ? new RoleDto() : CommonUtils.copyProperties(query, new RoleDto());
}
......@@ -1328,7 +1334,8 @@ public class UserRoleServiceImpl extends AbstractService {
userOrganizationRoleMapper.deleteByPrimaryKey(r.getId());
// 添加日志
Role role = roleMapper.selectByPrimaryKey(r.getRoleId());
// Role role = roleMapper.selectByPrimaryKey(r.getRoleId());
Role role = roleData.selectByPrimaryKey(r.getRoleId());
String roleName = role == null ? "" : role.getName();
addOrDeleteDataAddLog(orgName + CommonConstants.DashSignSeparator + roleName, operateUserName,
OperationModule.UserOrganizationRole.value(), OperationAction.Delete.value(), "");
......@@ -1373,7 +1380,8 @@ public class UserRoleServiceImpl extends AbstractService {
userRole.getRoleId());
userOrganizationRoleMapper.insert(userRole);
// 添加日志
Role roleObject = roleMapper.selectByPrimaryKey(item.getRoleId());
// Role roleObject = roleMapper.selectByPrimaryKey(item.getRoleId());
Role roleObject = roleData.selectByPrimaryKey(item.getRoleId());
String roleName = roleObject == null ? "" : roleObject.getName();
addOrDeleteDataAddLog(orgName + CommonConstants.DashSignSeparator + roleName, operateUserName,
OperationModule.UserOrganizationRole.value(), OperationAction.New.value(), "");
......
......@@ -28,6 +28,7 @@ import pwc.taxtech.atms.dao.RolePermissionMapper;
import pwc.taxtech.atms.dao.UserMapper;
import pwc.taxtech.atms.dao.UserOrganizationMapper;
import pwc.taxtech.atms.dao.UserRoleMapper;
import pwc.taxtech.atms.data.RoleData;
import pwc.taxtech.atms.dpo.RoleInfo;
import pwc.taxtech.atms.dpo.UserDto;
import pwc.taxtech.atms.dpo.UserRoleInfo;
......@@ -102,6 +103,8 @@ public class UserServiceImpl extends AbstractService {
@Autowired
private UserRoleServiceImpl userRoleService;
@Autowired
private RoleData roleData;
@Autowired
private JwtAuthenticationService jwtAuthenticationService;
@Value("${api.url}")
......@@ -374,7 +377,7 @@ public class UserServiceImpl extends AbstractService {
final String inputLoginName = input.getEmail();
Assert.hasText(inputLoginName, "empty email");
Assert.hasText(input.getPassword(), "empty password");
logger.debug("ready to call userMapper.selectByUserNameIgnoreCase");
logger.debug("ready to call userMapper.selectByserNameIgnoreCase");
// 查找用户时需要忽略大小写
User tempUser = userMapper.selectByUserNameIgnoreCase(inputLoginName);
logger.debug("print tempUser is null?:{}", tempUser == null);
......@@ -460,8 +463,8 @@ public class UserServiceImpl extends AbstractService {
// 参照C#代码设置password
userDto.setPassword(input.getPassword());
userDto.setHasValidPeriod(false);
// todo 登陆成功后清除缓存中的用户权限
jwtAuthenticationService.removeApiAuthList(tempUser.getUserName());
// 登陆成功后清除缓存中的用户后台权限
jwtAuthenticationService.removeApiAuthList(tempUser.getId());
} else {
logger.error("状态异常");
}
......@@ -711,7 +714,8 @@ public class UserServiceImpl extends AbstractService {
logger.debug("Start to delete userRole [ {} ]", userRole.getId());
userRoleMapper.deleteByPrimaryKey(userRole.getId());
}
List<Role> roleQuery = roleMapper.selectByExample(new RoleExample());
// List<Role> roleQuery = roleMapper.selectByExample(new RoleExample());
List<Role> roleQuery = roleData.selectByServiceTypeId(null);
for (String role : userDto.getRoleIds()) {
if (oldUserRoleList.stream().anyMatch(sa -> Objects.equals(sa.getRoleId(), role))) {
continue;
......@@ -907,7 +911,8 @@ public class UserServiceImpl extends AbstractService {
logger.debug("Start to delete UserOrganizationRole [ {} ]", oneTarget.getId());
userOrganizationRoleMapper.deleteByPrimaryKey(oneTarget.getId());
// 添加日志
Role role = roleMapper.selectByPrimaryKey(oneTarget.getRoleId());
// Role role = roleMapper.selectByPrimaryKey(oneTarget.getRoleId());
Role role = roleData.selectByPrimaryKey(oneTarget.getRoleId());
String roleName = role == null ? "" : role.getName();
operationLogService
.addOrDeleteDataAddLog(generateUpdateLogParams(OperateLogType.OperationLogUser.value(),
......
......@@ -44,6 +44,26 @@
overflowToDisk="false"
diskPersistent="false"/>
<!-- roleByServiceTypeIdCache缓存 -->
<cache name="roleByServiceTypeIdCache"
maxElementsOnDisk="10000"
maxElementsInMemory="10000"
timeToIdleSeconds="86400"
timeToLiveSeconds="86400"
eternal="true"
overflowToDisk="false"
diskPersistent="false"/>
<!-- roleByIdCache缓存 -->
<cache name="roleByIdCache"
maxElementsOnDisk="10000"
maxElementsInMemory="10000"
timeToIdleSeconds="86400"
timeToLiveSeconds="86400"
eternal="true"
overflowToDisk="false"
diskPersistent="false"/>
</ehcache>
<!--
<diskStore>==========当内存缓存中对象数量超过maxElementsInMemory时,将缓存对象写到磁盘缓存中(需对象实现序列化接口)
......
......@@ -479,7 +479,7 @@ public class DataMigration extends CommonIT {
taxRuleSetting.setGroupName(MapUtils.getString(item, "GroupName"));
taxRuleSetting.setName(MapUtils.getString(item, "Name"));
taxRuleSetting.setIsDefault(MapUtils.getBoolean(item, "IsDefault"));
taxRuleSetting.setTaxRate(new BigDecimal(MapUtils.getFloat(item, "TaxRate")));
taxRuleSetting.setTaxRate(MapUtils.getFloat(item, "TaxRate"));
taxRuleSetting.setCreateBy(StringUtils.EMPTY);
taxRuleSetting.setUpdateBy(StringUtils.EMPTY);
taxRuleSettingMapper.insert(taxRuleSetting);
......
......@@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.dpo.OrganizationDto;
import pwc.taxtech.atms.entity.BusinessUnit;
import pwc.taxtech.atms.entity.BusinessUnitExample;
......
......@@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.dpo.OrganizationDto;
import pwc.taxtech.atms.entity.Dimension;
import pwc.taxtech.atms.entity.DimensionExample;
......
......@@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.dpo.DimensionValueJoinDimensionDto;
import pwc.taxtech.atms.entity.DimensionValue;
import pwc.taxtech.atms.entity.DimensionValueExample;
......
......@@ -5,6 +5,8 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.dpo.DimensionParamDto;
import pwc.taxtech.atms.dpo.UnionDimensionValueOrg;
import pwc.taxtech.atms.entity.DimensionValueOrg;
import pwc.taxtech.atms.entity.DimensionValueOrgExample;
......
......@@ -7,6 +7,7 @@ import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.entity.Industry;
import pwc.taxtech.atms.entity.IndustryExample;
import pwc.taxtech.atms.entity.TemplateGroup;
@Mapper
public interface IndustryMapper extends MyMapper {
......
......@@ -3,8 +3,13 @@ package pwc.taxtech.atms.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyMapper;
import pwc.taxtech.atms.dpo.DimensionValueOrgDto;
import pwc.taxtech.atms.dpo.OrgBasicDto;
import pwc.taxtech.atms.dpo.OrgGeneralInfoMiddleDto;
import pwc.taxtech.atms.dpo.OrganizationDto;
import pwc.taxtech.atms.entity.Organization;
import pwc.taxtech.atms.entity.OrganizationExample;
......
......@@ -73,4 +73,20 @@ public interface OrganizationTaxRuleMapper extends MyMapper {
* @mbg.generated
*/
int updateByExample(@Param("record") OrganizationTaxRule record, @Param("example") OrganizationTaxRuleExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table organization_tax_rule
*
* @mbg.generated
*/
int updateByPrimaryKeySelective(OrganizationTaxRule record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table organization_tax_rule
*
* @mbg.generated
*/
int updateByPrimaryKey(OrganizationTaxRule record);
}
\ No newline at end of file
......@@ -91,6 +91,8 @@ public class OrganizationDto {
private String businessScope;
private Boolean isOversea;
public List<EnterpriseAccountSetOrgDto> enterpriseAccountSetOrgList;
public List<OrganizationServiceTemplateGroupDto> organizationServiceTemplateGroupList;
public List<DimensionValueOrgDto> dimensionValueOrgList;
......@@ -595,6 +597,14 @@ public class OrganizationDto {
this.taxControlDiskList = taxControlDiskList;
}
public Boolean getOversea() {
return isOversea;
}
public void setOversea(Boolean oversea) {
isOversea = oversea;
}
@Override
public int hashCode() {
final int prime = 31;
......
......@@ -45,7 +45,7 @@ public class CellTemplateConfig extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
private Long dataSourceType;
private Integer dataSourceType;
/**
*
......@@ -279,7 +279,7 @@ public class CellTemplateConfig extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public Long getDataSourceType() {
public Integer getDataSourceType() {
return dataSourceType;
}
......@@ -291,7 +291,7 @@ public class CellTemplateConfig extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public void setDataSourceType(Long dataSourceType) {
public void setDataSourceType(Integer dataSourceType) {
this.dataSourceType = dataSourceType;
}
......
......@@ -385,52 +385,52 @@ public class CellTemplateConfigExample {
return (Criteria) this;
}
public Criteria andDataSourceTypeEqualTo(Long value) {
public Criteria andDataSourceTypeEqualTo(Integer value) {
addCriterion("data_source_type =", value, "dataSourceType");
return (Criteria) this;
}
public Criteria andDataSourceTypeNotEqualTo(Long value) {
public Criteria andDataSourceTypeNotEqualTo(Integer value) {
addCriterion("data_source_type <>", value, "dataSourceType");
return (Criteria) this;
}
public Criteria andDataSourceTypeGreaterThan(Long value) {
public Criteria andDataSourceTypeGreaterThan(Integer value) {
addCriterion("data_source_type >", value, "dataSourceType");
return (Criteria) this;
}
public Criteria andDataSourceTypeGreaterThanOrEqualTo(Long value) {
public Criteria andDataSourceTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("data_source_type >=", value, "dataSourceType");
return (Criteria) this;
}
public Criteria andDataSourceTypeLessThan(Long value) {
public Criteria andDataSourceTypeLessThan(Integer value) {
addCriterion("data_source_type <", value, "dataSourceType");
return (Criteria) this;
}
public Criteria andDataSourceTypeLessThanOrEqualTo(Long value) {
public Criteria andDataSourceTypeLessThanOrEqualTo(Integer value) {
addCriterion("data_source_type <=", value, "dataSourceType");
return (Criteria) this;
}
public Criteria andDataSourceTypeIn(List<Long> values) {
public Criteria andDataSourceTypeIn(List<Integer> values) {
addCriterion("data_source_type in", values, "dataSourceType");
return (Criteria) this;
}
public Criteria andDataSourceTypeNotIn(List<Long> values) {
public Criteria andDataSourceTypeNotIn(List<Integer> values) {
addCriterion("data_source_type not in", values, "dataSourceType");
return (Criteria) this;
}
public Criteria andDataSourceTypeBetween(Long value1, Long value2) {
public Criteria andDataSourceTypeBetween(Integer value1, Integer value2) {
addCriterion("data_source_type between", value1, value2, "dataSourceType");
return (Criteria) this;
}
public Criteria andDataSourceTypeNotBetween(Long value1, Long value2) {
public Criteria andDataSourceTypeNotBetween(Integer value1, Integer value2) {
addCriterion("data_source_type not between", value1, value2, "dataSourceType");
return (Criteria) this;
}
......
......@@ -56,6 +56,8 @@ public class EnterpriseAccountSetOrg extends BaseEntity implements Serializable
*/
private Date expiredDate;
private Organization organization;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table enterprise_account_set_org
......@@ -184,6 +186,14 @@ public class EnterpriseAccountSetOrg extends BaseEntity implements Serializable
this.expiredDate = expiredDate;
}
public Organization getOrganization() {
return organization;
}
public void setOrganization(Organization organization) {
this.organization = organization;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table enterprise_account_set_org
......
......@@ -63,7 +63,7 @@ public class TaxRuleSetting extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
private Byte taxRate;
private Float taxRate;
/**
*
......@@ -237,7 +237,7 @@ public class TaxRuleSetting extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public Byte getTaxRate() {
public Float getTaxRate() {
return taxRate;
}
......@@ -249,7 +249,7 @@ public class TaxRuleSetting extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public void setTaxRate(Byte taxRate) {
public void setTaxRate(Float taxRate) {
this.taxRate = taxRate;
}
......
......@@ -535,52 +535,52 @@ public class TaxRuleSettingExample {
return (Criteria) this;
}
public Criteria andTaxRateEqualTo(Byte value) {
public Criteria andTaxRateEqualTo(Float value) {
addCriterion("tax_rate =", value, "taxRate");
return (Criteria) this;
}
public Criteria andTaxRateNotEqualTo(Byte value) {
public Criteria andTaxRateNotEqualTo(Float value) {
addCriterion("tax_rate <>", value, "taxRate");
return (Criteria) this;
}
public Criteria andTaxRateGreaterThan(Byte value) {
public Criteria andTaxRateGreaterThan(Float value) {
addCriterion("tax_rate >", value, "taxRate");
return (Criteria) this;
}
public Criteria andTaxRateGreaterThanOrEqualTo(Byte value) {
public Criteria andTaxRateGreaterThanOrEqualTo(Float value) {
addCriterion("tax_rate >=", value, "taxRate");
return (Criteria) this;
}
public Criteria andTaxRateLessThan(Byte value) {
public Criteria andTaxRateLessThan(Float value) {
addCriterion("tax_rate <", value, "taxRate");
return (Criteria) this;
}
public Criteria andTaxRateLessThanOrEqualTo(Byte value) {
public Criteria andTaxRateLessThanOrEqualTo(Float value) {
addCriterion("tax_rate <=", value, "taxRate");
return (Criteria) this;
}
public Criteria andTaxRateIn(List<Byte> values) {
public Criteria andTaxRateIn(List<Float> values) {
addCriterion("tax_rate in", values, "taxRate");
return (Criteria) this;
}
public Criteria andTaxRateNotIn(List<Byte> values) {
public Criteria andTaxRateNotIn(List<Float> values) {
addCriterion("tax_rate not in", values, "taxRate");
return (Criteria) this;
}
public Criteria andTaxRateBetween(Byte value1, Byte value2) {
public Criteria andTaxRateBetween(Float value1, Float value2) {
addCriterion("tax_rate between", value1, value2, "taxRate");
return (Criteria) this;
}
public Criteria andTaxRateNotBetween(Byte value1, Byte value2) {
public Criteria andTaxRateNotBetween(Float value1, Float value2) {
addCriterion("tax_rate not between", value1, value2, "taxRate");
return (Criteria) this;
}
......
......@@ -9,7 +9,7 @@
<id column="id" jdbcType="BIGINT" property="id" />
<result column="cell_template_id" jdbcType="BIGINT" property="cellTemplateId" />
<result column="report_template_id" jdbcType="BIGINT" property="reportTemplateId" />
<result column="data_source_type" jdbcType="BIGINT" property="dataSourceType" />
<result column="data_source_type" jdbcType="INTEGER" property="dataSourceType" />
<result column="formula" jdbcType="VARCHAR" property="formula" />
<result column="formula_description" jdbcType="VARCHAR" property="formulaDescription" />
<result column="account_codes" jdbcType="VARCHAR" property="accountCodes" />
......@@ -162,7 +162,7 @@
invoice_category, formula_data_source, validation,
validation_description, voucher_keyword)
values (#{id,jdbcType=BIGINT}, #{cellTemplateId,jdbcType=BIGINT}, #{reportTemplateId,jdbcType=BIGINT},
#{dataSourceType,jdbcType=BIGINT}, #{formula,jdbcType=VARCHAR}, #{formulaDescription,jdbcType=VARCHAR},
#{dataSourceType,jdbcType=INTEGER}, #{formula,jdbcType=VARCHAR}, #{formulaDescription,jdbcType=VARCHAR},
#{accountCodes,jdbcType=VARCHAR}, #{invoiceType,jdbcType=INTEGER}, #{taxRate,jdbcType=VARCHAR},
#{invoiceAmountType,jdbcType=INTEGER}, #{modelIds,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
......@@ -248,7 +248,7 @@
#{reportTemplateId,jdbcType=BIGINT},
</if>
<if test="dataSourceType != null">
#{dataSourceType,jdbcType=BIGINT},
#{dataSourceType,jdbcType=INTEGER},
</if>
<if test="formula != null">
#{formula,jdbcType=VARCHAR},
......@@ -327,7 +327,7 @@
report_template_id = #{record.reportTemplateId,jdbcType=BIGINT},
</if>
<if test="record.dataSourceType != null">
data_source_type = #{record.dataSourceType,jdbcType=BIGINT},
data_source_type = #{record.dataSourceType,jdbcType=INTEGER},
</if>
<if test="record.formula != null">
formula = #{record.formula,jdbcType=VARCHAR},
......@@ -391,7 +391,7 @@
set id = #{record.id,jdbcType=BIGINT},
cell_template_id = #{record.cellTemplateId,jdbcType=BIGINT},
report_template_id = #{record.reportTemplateId,jdbcType=BIGINT},
data_source_type = #{record.dataSourceType,jdbcType=BIGINT},
data_source_type = #{record.dataSourceType,jdbcType=INTEGER},
formula = #{record.formula,jdbcType=VARCHAR},
formula_description = #{record.formulaDescription,jdbcType=VARCHAR},
account_codes = #{record.accountCodes,jdbcType=VARCHAR},
......@@ -426,7 +426,7 @@
report_template_id = #{reportTemplateId,jdbcType=BIGINT},
</if>
<if test="dataSourceType != null">
data_source_type = #{dataSourceType,jdbcType=BIGINT},
data_source_type = #{dataSourceType,jdbcType=INTEGER},
</if>
<if test="formula != null">
formula = #{formula,jdbcType=VARCHAR},
......@@ -487,7 +487,7 @@
update cell_template_config
set cell_template_id = #{cellTemplateId,jdbcType=BIGINT},
report_template_id = #{reportTemplateId,jdbcType=BIGINT},
data_source_type = #{dataSourceType,jdbcType=BIGINT},
data_source_type = #{dataSourceType,jdbcType=INTEGER},
formula = #{formula,jdbcType=VARCHAR},
formula_description = #{formulaDescription,jdbcType=VARCHAR},
account_codes = #{accountCodes,jdbcType=VARCHAR},
......
......@@ -11,7 +11,7 @@
<result column="is_default" jdbcType="BIT" property="isDefault" />
<result column="group_name" jdbcType="VARCHAR" property="groupName" />
<result column="tax_base" jdbcType="VARCHAR" property="taxBase" />
<result column="tax_rate" jdbcType="TINYINT" property="taxRate" />
<result column="tax_rate" jdbcType="REAL" property="taxRate" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
......@@ -147,7 +147,7 @@
create_time, update_time, create_by,
update_by)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{isDefault,jdbcType=BIT},
#{groupName,jdbcType=VARCHAR}, #{taxBase,jdbcType=VARCHAR}, #{taxRate,jdbcType=TINYINT},
#{groupName,jdbcType=VARCHAR}, #{taxBase,jdbcType=VARCHAR}, #{taxRate,jdbcType=REAL},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR},
#{updateBy,jdbcType=VARCHAR})
</insert>
......@@ -206,7 +206,7 @@
#{taxBase,jdbcType=VARCHAR},
</if>
<if test="taxRate != null">
#{taxRate,jdbcType=TINYINT},
#{taxRate,jdbcType=REAL},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
......@@ -255,7 +255,7 @@
tax_base = #{record.taxBase,jdbcType=VARCHAR},
</if>
<if test="record.taxRate != null">
tax_rate = #{record.taxRate,jdbcType=TINYINT},
tax_rate = #{record.taxRate,jdbcType=REAL},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
......@@ -285,7 +285,7 @@
is_default = #{record.isDefault,jdbcType=BIT},
group_name = #{record.groupName,jdbcType=VARCHAR},
tax_base = #{record.taxBase,jdbcType=VARCHAR},
tax_rate = #{record.taxRate,jdbcType=TINYINT},
tax_rate = #{record.taxRate,jdbcType=REAL},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
create_by = #{record.createBy,jdbcType=VARCHAR},
......@@ -314,7 +314,7 @@
tax_base = #{taxBase,jdbcType=VARCHAR},
</if>
<if test="taxRate != null">
tax_rate = #{taxRate,jdbcType=TINYINT},
tax_rate = #{taxRate,jdbcType=REAL},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
......@@ -341,7 +341,7 @@
is_default = #{isDefault,jdbcType=BIT},
group_name = #{groupName,jdbcType=VARCHAR},
tax_base = #{taxBase,jdbcType=VARCHAR},
tax_rate = #{taxRate,jdbcType=TINYINT},
tax_rate = #{taxRate,jdbcType=REAL},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
create_by = #{createBy,jdbcType=VARCHAR},
......
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