Showing
9 changed files
with
45 additions
and
15 deletions
| @@ -23,7 +23,6 @@ import com.lframework.xingyun.basedata.service.type.TypeInfoService; | @@ -23,7 +23,6 @@ import com.lframework.xingyun.basedata.service.type.TypeInfoService; | ||
| 23 | import com.lframework.xingyun.basedata.vo.type.CreateTypeInfoVo; | 23 | import com.lframework.xingyun.basedata.vo.type.CreateTypeInfoVo; | 
| 24 | import com.lframework.xingyun.basedata.vo.type.QueryTypeInfoVo; | 24 | import com.lframework.xingyun.basedata.vo.type.QueryTypeInfoVo; | 
| 25 | import com.lframework.xingyun.basedata.vo.type.UpdateTypeInfoVo; | 25 | import com.lframework.xingyun.basedata.vo.type.UpdateTypeInfoVo; | 
| 26 | -import org.springframework.cache.annotation.Cacheable; | ||
| 27 | import org.springframework.stereotype.Service; | 26 | import org.springframework.stereotype.Service; | 
| 28 | import org.springframework.transaction.annotation.Transactional; | 27 | import org.springframework.transaction.annotation.Transactional; | 
| 29 | 28 | ||
| @@ -68,7 +67,6 @@ public class TypeInfoServiceImpl extends BaseMpServiceImpl<TypeInfoMapper, TypeI | @@ -68,7 +67,6 @@ public class TypeInfoServiceImpl extends BaseMpServiceImpl<TypeInfoMapper, TypeI | ||
| 68 | * @param id 主键ID | 67 | * @param id 主键ID | 
| 69 | * @return TypeInfo | 68 | * @return TypeInfo | 
| 70 | */ | 69 | */ | 
| 71 | - @Cacheable(value = TypeInfo.CACHE_NAME, key = "@cacheVariables.tenantId() + #id", unless = "#result == null") | ||
| 72 | @Override | 70 | @Override | 
| 73 | public TypeInfo findById(String id) { | 71 | public TypeInfo findById(String id) { | 
| 74 | return getBaseMapper().selectById(id); | 72 | return getBaseMapper().selectById(id); | 
| 1 | package com.lframework.xingyun.basedata.mappers; | 1 | package com.lframework.xingyun.basedata.mappers; | 
| 2 | 2 | ||
| 3 | +import com.lframework.starter.web.core.annotations.sort.Sort; | ||
| 4 | +import com.lframework.starter.web.core.annotations.sort.Sorts; | ||
| 3 | import com.lframework.xingyun.basedata.entity.Office; | 5 | import com.lframework.xingyun.basedata.entity.Office; | 
| 4 | import com.lframework.starter.web.core.mapper.BaseMapper; | 6 | import com.lframework.starter.web.core.mapper.BaseMapper; | 
| 5 | import com.lframework.xingyun.basedata.vo.office.QueryOfficeVo; | 7 | import com.lframework.xingyun.basedata.vo.office.QueryOfficeVo; | 
| @@ -21,5 +23,11 @@ public interface OfficeMapper extends BaseMapper<Office> { | @@ -21,5 +23,11 @@ public interface OfficeMapper extends BaseMapper<Office> { | ||
| 21 | * @param vo 查询参数 | 23 | * @param vo 查询参数 | 
| 22 | * @return List<Office> | 24 | * @return List<Office> | 
| 23 | */ | 25 | */ | 
| 26 | + @Sorts({ | ||
| 27 | + @Sort(value = "code", autoParse = true), | ||
| 28 | + @Sort(value = "name", autoParse = true), | ||
| 29 | + @Sort(value = "createTime", autoParse = true), | ||
| 30 | + @Sort(value = "updateTime", autoParse = true), | ||
| 31 | + }) | ||
| 24 | List<Office> query(@Param("vo") QueryOfficeVo vo); | 32 | List<Office> query(@Param("vo") QueryOfficeVo vo); | 
| 25 | } | 33 | } | 
| 1 | package com.lframework.xingyun.basedata.mappers; | 1 | package com.lframework.xingyun.basedata.mappers; | 
| 2 | 2 | ||
| 3 | +import com.lframework.starter.web.core.annotations.sort.Sort; | ||
| 4 | +import com.lframework.starter.web.core.annotations.sort.Sorts; | ||
| 3 | import com.lframework.xingyun.basedata.entity.ProductVariety; | 5 | import com.lframework.xingyun.basedata.entity.ProductVariety; | 
| 4 | import com.lframework.starter.web.core.mapper.BaseMapper; | 6 | import com.lframework.starter.web.core.mapper.BaseMapper; | 
| 5 | import com.lframework.xingyun.basedata.vo.product.variety.QueryProductVarietyVo; | 7 | import com.lframework.xingyun.basedata.vo.product.variety.QueryProductVarietyVo; | 
| @@ -17,8 +19,14 @@ public interface ProductVarietyMapper extends BaseMapper<ProductVariety> { | @@ -17,8 +19,14 @@ public interface ProductVarietyMapper extends BaseMapper<ProductVariety> { | ||
| 17 | 19 | ||
| 18 | /** | 20 | /** | 
| 19 | * 查询列表 | 21 | * 查询列表 | 
| 20 | - * @param vo | ||
| 21 | - * @return | 22 | + * @param vo 查询条件 | 
| 23 | + * @return List<ProductVariety> | ||
| 22 | */ | 24 | */ | 
| 25 | + @Sorts({ | ||
| 26 | + @Sort(value = "code", autoParse = true), | ||
| 27 | + @Sort(value = "name", autoParse = true), | ||
| 28 | + @Sort(value = "createTime", autoParse = true), | ||
| 29 | + @Sort(value = "updateTime", autoParse = true), | ||
| 30 | + }) | ||
| 23 | List<ProductVariety> query(@Param("vo") QueryProductVarietyVo vo); | 31 | List<ProductVariety> query(@Param("vo") QueryProductVarietyVo vo); | 
| 24 | } | 32 | } | 
| 1 | package com.lframework.xingyun.basedata.mappers; | 1 | package com.lframework.xingyun.basedata.mappers; | 
| 2 | 2 | ||
| 3 | +import com.lframework.starter.web.core.annotations.sort.Sort; | ||
| 4 | +import com.lframework.starter.web.core.annotations.sort.Sorts; | ||
| 3 | import com.lframework.xingyun.basedata.entity.TypeInfo; | 5 | import com.lframework.xingyun.basedata.entity.TypeInfo; | 
| 4 | import com.lframework.starter.web.core.mapper.BaseMapper; | 6 | import com.lframework.starter.web.core.mapper.BaseMapper; | 
| 5 | import com.lframework.xingyun.basedata.vo.type.QueryTypeInfoVo; | 7 | import com.lframework.xingyun.basedata.vo.type.QueryTypeInfoVo; | 
| @@ -11,14 +13,20 @@ import java.util.List; | @@ -11,14 +13,20 @@ import java.util.List; | ||
| 11 | * <p> | 13 | * <p> | 
| 12 | * 类型信息 Mapper 接口 | 14 | * 类型信息 Mapper 接口 | 
| 13 | * </p> | 15 | * </p> | 
| 14 | - * | ||
| 15 | */ | 16 | */ | 
| 16 | public interface TypeInfoMapper extends BaseMapper<TypeInfo> { | 17 | public interface TypeInfoMapper extends BaseMapper<TypeInfo> { | 
| 17 | 18 | ||
| 18 | /** | 19 | /** | 
| 19 | * 查询列表 | 20 | * 查询列表 | 
| 20 | - * @param vo | ||
| 21 | - * @return | 21 | + * | 
| 22 | + * @param vo 查询条件 | ||
| 23 | + * @return List<TypeInfo> | ||
| 22 | */ | 24 | */ | 
| 25 | + @Sorts({ | ||
| 26 | + @Sort(value = "code", autoParse = true), | ||
| 27 | + @Sort(value = "name", autoParse = true), | ||
| 28 | + @Sort(value = "createTime", autoParse = true), | ||
| 29 | + @Sort(value = "updateTime", autoParse = true), | ||
| 30 | + }) | ||
| 23 | List<TypeInfo> query(@Param("vo") QueryTypeInfoVo vo); | 31 | List<TypeInfo> query(@Param("vo") QueryTypeInfoVo vo); | 
| 24 | } | 32 | } | 
| 1 | package com.lframework.xingyun.basedata.mappers; | 1 | package com.lframework.xingyun.basedata.mappers; | 
| 2 | 2 | ||
| 3 | +import com.lframework.starter.web.core.annotations.sort.Sort; | ||
| 4 | +import com.lframework.starter.web.core.annotations.sort.Sorts; | ||
| 3 | import com.lframework.starter.web.core.mapper.BaseMapper; | 5 | import com.lframework.starter.web.core.mapper.BaseMapper; | 
| 4 | import com.lframework.xingyun.basedata.entity.Workshop; | 6 | import com.lframework.xingyun.basedata.entity.Workshop; | 
| 5 | import com.lframework.xingyun.basedata.vo.workshop.QueryWorkshopVo; | 7 | import com.lframework.xingyun.basedata.vo.workshop.QueryWorkshopVo; | 
| @@ -20,5 +22,11 @@ public interface WorkshopMapper extends BaseMapper<Workshop> { | @@ -20,5 +22,11 @@ public interface WorkshopMapper extends BaseMapper<Workshop> { | ||
| 20 | * @param vo 查询条件 | 22 | * @param vo 查询条件 | 
| 21 | * @return Workshop | 23 | * @return Workshop | 
| 22 | */ | 24 | */ | 
| 25 | + @Sorts({ | ||
| 26 | + @Sort(value = "code", autoParse = true), | ||
| 27 | + @Sort(value = "name", autoParse = true), | ||
| 28 | + @Sort(value = "createTime", autoParse = true), | ||
| 29 | + @Sort(value = "updateTime", autoParse = true), | ||
| 30 | + }) | ||
| 23 | List<Workshop> query(@Param("vo") QueryWorkshopVo vo); | 31 | List<Workshop> query(@Param("vo") QueryWorkshopVo vo); | 
| 24 | } | 32 | } | 
| 1 | package com.lframework.xingyun.basedata.vo.office; | 1 | package com.lframework.xingyun.basedata.vo.office; | 
| 2 | 2 | ||
| 3 | +import com.lframework.starter.web.core.vo.SortPageVo; | ||
| 3 | import lombok.Data; | 4 | import lombok.Data; | 
| 4 | -import com.lframework.starter.web.core.vo.PageVo; | ||
| 5 | import com.lframework.starter.web.core.vo.BaseVo; | 5 | import com.lframework.starter.web.core.vo.BaseVo; | 
| 6 | import io.swagger.annotations.ApiModelProperty; | 6 | import io.swagger.annotations.ApiModelProperty; | 
| 7 | import java.io.Serializable; | 7 | import java.io.Serializable; | 
| 8 | 8 | ||
| 9 | @Data | 9 | @Data | 
| 10 | -public class QueryOfficeVo extends PageVo implements BaseVo, Serializable { | 10 | +public class QueryOfficeVo extends SortPageVo implements BaseVo, Serializable { | 
| 11 | 11 | ||
| 12 | private static final long serialVersionUID = 1L; | 12 | private static final long serialVersionUID = 1L; | 
| 13 | 13 | 
| 1 | package com.lframework.xingyun.basedata.vo.product.variety; | 1 | package com.lframework.xingyun.basedata.vo.product.variety; | 
| 2 | 2 | ||
| 3 | +import com.lframework.starter.web.core.vo.SortPageVo; | ||
| 3 | import lombok.Data; | 4 | import lombok.Data; | 
| 4 | -import com.lframework.starter.web.core.vo.PageVo; | ||
| 5 | import com.lframework.starter.web.core.vo.BaseVo; | 5 | import com.lframework.starter.web.core.vo.BaseVo; | 
| 6 | import io.swagger.annotations.ApiModelProperty; | 6 | import io.swagger.annotations.ApiModelProperty; | 
| 7 | 7 | ||
| 8 | import java.io.Serializable; | 8 | import java.io.Serializable; | 
| 9 | 9 | ||
| 10 | @Data | 10 | @Data | 
| 11 | -public class QueryProductVarietyVo extends PageVo implements BaseVo, Serializable { | 11 | +public class QueryProductVarietyVo extends SortPageVo implements BaseVo, Serializable { | 
| 12 | 12 | ||
| 13 | private static final long serialVersionUID = 1L; | 13 | private static final long serialVersionUID = 1L; | 
| 14 | 14 | 
| 1 | package com.lframework.xingyun.basedata.vo.type; | 1 | package com.lframework.xingyun.basedata.vo.type; | 
| 2 | 2 | ||
| 3 | +import com.lframework.starter.web.core.vo.SortPageVo; | ||
| 3 | import lombok.Data; | 4 | import lombok.Data; | 
| 4 | -import com.lframework.starter.web.core.vo.PageVo; | ||
| 5 | import com.lframework.starter.web.core.vo.BaseVo; | 5 | import com.lframework.starter.web.core.vo.BaseVo; | 
| 6 | import io.swagger.annotations.ApiModelProperty; | 6 | import io.swagger.annotations.ApiModelProperty; | 
| 7 | import java.io.Serializable; | 7 | import java.io.Serializable; | 
| 8 | 8 | ||
| 9 | @Data | 9 | @Data | 
| 10 | -public class QueryTypeInfoVo extends PageVo implements BaseVo, Serializable { | 10 | +public class QueryTypeInfoVo extends SortPageVo implements BaseVo, Serializable { | 
| 11 | 11 | ||
| 12 | private static final long serialVersionUID = 1L; | 12 | private static final long serialVersionUID = 1L; | 
| 13 | 13 | 
| 1 | package com.lframework.xingyun.basedata.vo.workshop; | 1 | package com.lframework.xingyun.basedata.vo.workshop; | 
| 2 | 2 | ||
| 3 | +import com.lframework.starter.web.core.vo.SortPageVo; | ||
| 3 | import com.lframework.xingyun.basedata.enums.WorkshopType; | 4 | import com.lframework.xingyun.basedata.enums.WorkshopType; | 
| 4 | import lombok.Data; | 5 | import lombok.Data; | 
| 5 | import com.lframework.starter.web.core.components.validation.IsEnum; | 6 | import com.lframework.starter.web.core.components.validation.IsEnum; | 
| 6 | -import com.lframework.starter.web.core.vo.PageVo; | ||
| 7 | import com.lframework.starter.web.core.vo.BaseVo; | 7 | import com.lframework.starter.web.core.vo.BaseVo; | 
| 8 | import com.lframework.starter.web.core.components.validation.TypeMismatch; | 8 | import com.lframework.starter.web.core.components.validation.TypeMismatch; | 
| 9 | import io.swagger.annotations.ApiModelProperty; | 9 | import io.swagger.annotations.ApiModelProperty; | 
| 10 | import java.io.Serializable; | 10 | import java.io.Serializable; | 
| 11 | 11 | ||
| 12 | @Data | 12 | @Data | 
| 13 | -public class QueryWorkshopVo extends PageVo implements BaseVo, Serializable { | 13 | +public class QueryWorkshopVo extends SortPageVo implements BaseVo, Serializable { | 
| 14 | 14 | ||
| 15 | private static final long serialVersionUID = 1L; | 15 | private static final long serialVersionUID = 1L; | 
| 16 | 16 |