update SysTenant, SysTenantPackage 相关类作者名, 修改 Controller doc 描述, 新增修改删除接口加上事务注解 ;

This commit is contained in:
Michelle.Chung 2023-02-05 14:01:52 +08:00
parent 51fe7937aa
commit 4f2c33ee0d
14 changed files with 24 additions and 30 deletions

View File

@ -23,10 +23,9 @@ import com.ruoyi.system.service.ISysTenantService;
import com.ruoyi.common.mybatis.core.page.TableDataInfo; import com.ruoyi.common.mybatis.core.page.TableDataInfo;
/** /**
* 租户 * 租户管理
* *
* @author ruoyi * @author Michelle.Chung
* @date 2023-02-05
*/ */
@Validated @Validated
@RequiredArgsConstructor @RequiredArgsConstructor

View File

@ -23,10 +23,9 @@ import com.ruoyi.system.service.ISysTenantPackageService;
import com.ruoyi.common.mybatis.core.page.TableDataInfo; import com.ruoyi.common.mybatis.core.page.TableDataInfo;
/** /**
* 租户套餐 * 租户套餐管理
* *
* @author ruoyi * @author Michelle.Chung
* @date 2023-02-05
*/ */
@Validated @Validated
@RequiredArgsConstructor @RequiredArgsConstructor

View File

@ -11,8 +11,7 @@ import com.ruoyi.common.mybatis.core.domain.BaseEntity;
/** /**
* 租户对象 sys_tenant * 租户对象 sys_tenant
* *
* @author ruoyi * @author Michelle.Chung
* @date 2023-02-05
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)

View File

@ -10,8 +10,7 @@ import com.ruoyi.common.mybatis.core.domain.BaseEntity;
/** /**
* 租户套餐对象 sys_tenant_package * 租户套餐对象 sys_tenant_package
* *
* @author ruoyi * @author Michelle.Chung
* @date 2023-02-05
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)

View File

@ -13,8 +13,7 @@ import com.ruoyi.common.mybatis.core.domain.BaseEntity;
/** /**
* 租户业务对象 sys_tenant * 租户业务对象 sys_tenant
* *
* @author ruoyi * @author Michelle.Chung
* @date 2023-02-05
*/ */
@Data @Data

View File

@ -11,8 +11,7 @@ import com.ruoyi.common.mybatis.core.domain.BaseEntity;
/** /**
* 租户套餐业务对象 sys_tenant_package * 租户套餐业务对象 sys_tenant_package
* *
* @author ruoyi * @author Michelle.Chung
* @date 2023-02-05
*/ */
@Data @Data

View File

@ -13,8 +13,7 @@ import java.io.Serializable;
/** /**
* 租户套餐视图对象 sys_tenant_package * 租户套餐视图对象 sys_tenant_package
* *
* @author ruoyi * @author Michelle.Chung
* @date 2023-02-05
*/ */
@Data @Data
@ExcelIgnoreUnannotated @ExcelIgnoreUnannotated

View File

@ -14,8 +14,7 @@ import java.io.Serializable;
/** /**
* 租户视图对象 sys_tenant * 租户视图对象 sys_tenant
* *
* @author ruoyi * @author Michelle.Chung
* @date 2023-02-05
*/ */
@Data @Data
@ExcelIgnoreUnannotated @ExcelIgnoreUnannotated

View File

@ -7,8 +7,7 @@ import com.ruoyi.common.mybatis.core.mapper.BaseMapperPlus;
/** /**
* 租户Mapper接口 * 租户Mapper接口
* *
* @author ruoyi * @author Michelle.Chung
* @date 2023-02-05
*/ */
public interface SysTenantMapper extends BaseMapperPlus<SysTenantMapper, SysTenant, SysTenantVo> { public interface SysTenantMapper extends BaseMapperPlus<SysTenantMapper, SysTenant, SysTenantVo> {

View File

@ -7,8 +7,7 @@ import com.ruoyi.common.mybatis.core.mapper.BaseMapperPlus;
/** /**
* 租户套餐Mapper接口 * 租户套餐Mapper接口
* *
* @author ruoyi * @author Michelle.Chung
* @date 2023-02-05
*/ */
public interface SysTenantPackageMapper extends BaseMapperPlus<SysTenantPackageMapper, SysTenantPackage, SysTenantPackageVo> { public interface SysTenantPackageMapper extends BaseMapperPlus<SysTenantPackageMapper, SysTenantPackage, SysTenantPackageVo> {

View File

@ -11,8 +11,7 @@ import java.util.List;
/** /**
* 租户套餐Service接口 * 租户套餐Service接口
* *
* @author ruoyi * @author Michelle.Chung
* @date 2023-02-05
*/ */
public interface ISysTenantPackageService { public interface ISysTenantPackageService {

View File

@ -11,8 +11,7 @@ import java.util.List;
/** /**
* 租户Service接口 * 租户Service接口
* *
* @author ruoyi * @author Michelle.Chung
* @date 2023-02-05
*/ */
public interface ISysTenantService { public interface ISysTenantService {

View File

@ -14,6 +14,7 @@ import com.ruoyi.system.domain.vo.SysTenantPackageVo;
import com.ruoyi.system.domain.SysTenantPackage; import com.ruoyi.system.domain.SysTenantPackage;
import com.ruoyi.system.mapper.SysTenantPackageMapper; import com.ruoyi.system.mapper.SysTenantPackageMapper;
import com.ruoyi.system.service.ISysTenantPackageService; import com.ruoyi.system.service.ISysTenantPackageService;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -22,8 +23,7 @@ import java.util.Collection;
/** /**
* 租户套餐Service业务层处理 * 租户套餐Service业务层处理
* *
* @author ruoyi * @author Michelle.Chung
* @date 2023-02-05
*/ */
@RequiredArgsConstructor @RequiredArgsConstructor
@Service @Service
@ -70,6 +70,7 @@ public class SysTenantPackageServiceImpl implements ISysTenantPackageService {
* 新增租户套餐 * 新增租户套餐
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public Boolean insertByBo(SysTenantPackageBo bo) { public Boolean insertByBo(SysTenantPackageBo bo) {
SysTenantPackage add = BeanUtil.toBean(bo, SysTenantPackage.class); SysTenantPackage add = BeanUtil.toBean(bo, SysTenantPackage.class);
validEntityBeforeSave(add); validEntityBeforeSave(add);
@ -84,6 +85,7 @@ public class SysTenantPackageServiceImpl implements ISysTenantPackageService {
* 修改租户套餐 * 修改租户套餐
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public Boolean updateByBo(SysTenantPackageBo bo) { public Boolean updateByBo(SysTenantPackageBo bo) {
SysTenantPackage update = BeanUtil.toBean(bo, SysTenantPackage.class); SysTenantPackage update = BeanUtil.toBean(bo, SysTenantPackage.class);
validEntityBeforeSave(update); validEntityBeforeSave(update);
@ -113,6 +115,7 @@ public class SysTenantPackageServiceImpl implements ISysTenantPackageService {
* 批量删除租户套餐 * 批量删除租户套餐
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
if(isValid){ if(isValid){
//TODO 做一些业务上的校验,判断是否需要校验 //TODO 做一些业务上的校验,判断是否需要校验

View File

@ -14,6 +14,7 @@ import com.ruoyi.system.domain.vo.SysTenantVo;
import com.ruoyi.system.domain.SysTenant; import com.ruoyi.system.domain.SysTenant;
import com.ruoyi.system.mapper.SysTenantMapper; import com.ruoyi.system.mapper.SysTenantMapper;
import com.ruoyi.system.service.ISysTenantService; import com.ruoyi.system.service.ISysTenantService;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -22,8 +23,7 @@ import java.util.Collection;
/** /**
* 租户Service业务层处理 * 租户Service业务层处理
* *
* @author ruoyi * @author Michelle.Chung
* @date 2023-02-05
*/ */
@RequiredArgsConstructor @RequiredArgsConstructor
@Service @Service
@ -79,6 +79,7 @@ public class SysTenantServiceImpl implements ISysTenantService {
* 新增租户 * 新增租户
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public Boolean insertByBo(SysTenantBo bo) { public Boolean insertByBo(SysTenantBo bo) {
SysTenant add = BeanUtil.toBean(bo, SysTenant.class); SysTenant add = BeanUtil.toBean(bo, SysTenant.class);
validEntityBeforeSave(add); validEntityBeforeSave(add);
@ -93,6 +94,7 @@ public class SysTenantServiceImpl implements ISysTenantService {
* 修改租户 * 修改租户
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public Boolean updateByBo(SysTenantBo bo) { public Boolean updateByBo(SysTenantBo bo) {
SysTenant update = BeanUtil.toBean(bo, SysTenant.class); SysTenant update = BeanUtil.toBean(bo, SysTenant.class);
validEntityBeforeSave(update); validEntityBeforeSave(update);
@ -122,6 +124,7 @@ public class SysTenantServiceImpl implements ISysTenantService {
* 批量删除租户 * 批量删除租户
*/ */
@Override @Override
@Transactional(rollbackFor = Exception.class)
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
if(isValid){ if(isValid){
//TODO 做一些业务上的校验,判断是否需要校验 //TODO 做一些业务上的校验,判断是否需要校验