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