商品测试
parent
ae673f38d9
commit
2de2e966c3
|
@ -47,6 +47,7 @@ public class ProductTypeAttrValue extends BaseEntity
|
||||||
@Excel(name = "是否删除 0-是 1-否")
|
@Excel(name = "是否删除 0-是 1-否")
|
||||||
private Long idDelete;
|
private Long idDelete;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
|
|
@ -1,5 +1,15 @@
|
||||||
package com.muyu.product.controller;
|
package com.muyu.product.controller;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.muyu.common.core.web.domain.AjaxResult;
|
||||||
|
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||||
|
import com.muyu.product.service.ProductTypeAttrValueService;
|
||||||
|
import com.nuyu.product.domain.MallProductTypeInfo;
|
||||||
|
import com.nuyu.product.domain.ProductTypeAttrValue;
|
||||||
|
import com.nuyu.product.req.BookReq;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@ -8,6 +18,19 @@ import org.springframework.web.bind.annotation.RestController;
|
||||||
* @Date: 2024/5/8 下午7:13
|
* @Date: 2024/5/8 下午7:13
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/txt")
|
@RequestMapping("/text")
|
||||||
public class ProductTypeAttrValueController {
|
public class ProductTypeAttrValueController {
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ProductTypeAttrValueService productTypeAttrValueService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/list")
|
||||||
|
public AjaxResult list(ProductTypeAttrValue productTypeAttrValue){
|
||||||
|
PageInfo<ProductTypeAttrValue> info=productTypeAttrValueService.list(productTypeAttrValue);
|
||||||
|
return AjaxResult.success(info);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package com.muyu.product.mapper;
|
package com.muyu.product.mapper;
|
||||||
|
|
||||||
|
import com.nuyu.product.domain.ProductTypeAttrValue;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: wangxinyuan
|
* @Author: wangxinyuan
|
||||||
|
@ -9,4 +11,5 @@ import org.apache.ibatis.annotations.Mapper;
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface ProductTypeAttrValueMapper {
|
public interface ProductTypeAttrValueMapper {
|
||||||
|
|
||||||
|
List<ProductTypeAttrValue> list(ProductTypeAttrValue productTypeAttrValue);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,30 @@
|
||||||
package com.muyu.product.service.Impl;
|
package com.muyu.product.service.Impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.muyu.product.mapper.ProductTypeAttrValueMapper;
|
||||||
import com.muyu.product.service.ProductTypeAttrValueService;
|
import com.muyu.product.service.ProductTypeAttrValueService;
|
||||||
|
import com.nuyu.product.domain.MallProductTypeInfo;
|
||||||
|
import com.nuyu.product.domain.ProductTypeAttrValue;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: wangxinyuan
|
* @Author: wangxinyuan
|
||||||
* @Date: 2024/5/8 下午7:14
|
* @Date: 2024/5/8 下午7:14
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class ProductTypeAttrValueServiceImpl implements ProductTypeAttrValueService {
|
public class ProductTypeAttrValueServiceImpl implements ProductTypeAttrValueService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ProductTypeAttrValueMapper productTypeAttrValueMapper;
|
||||||
|
@Override
|
||||||
|
public PageInfo<ProductTypeAttrValue> list(ProductTypeAttrValue productTypeAttrValue) {
|
||||||
|
PageHelper.startPage(productTypeAttrValue.getPageNum(),productTypeAttrValue.getPageSize());
|
||||||
|
List<ProductTypeAttrValue> products = productTypeAttrValueMapper.list(productTypeAttrValue);
|
||||||
|
PageInfo<ProductTypeAttrValue> pageInfo = new PageInfo<>(products);
|
||||||
|
return pageInfo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,18 @@
|
||||||
package com.muyu.product.service;
|
package com.muyu.product.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.muyu.product.controller.ProductTypeAttrValueController;
|
||||||
|
import com.nuyu.product.domain.MallProductTypeInfo;
|
||||||
|
import com.nuyu.product.domain.ProductTypeAttrValue;
|
||||||
|
import com.nuyu.product.req.BookReq;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: wangxinyuan
|
* @Author: wangxinyuan
|
||||||
* @Date: 2024/5/8 下午7:14
|
* @Date: 2024/5/8 下午7:14
|
||||||
*/
|
*/
|
||||||
public interface ProductTypeAttrValueService {
|
public interface ProductTypeAttrValueService {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
PageInfo<ProductTypeAttrValue> list(ProductTypeAttrValue productTypeAttrValue);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,4 +18,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select id, type_attr_value, input_method, create_time, update_time, id_delete, create_by from mall_product_info
|
select id, type_attr_value, input_method, create_time, update_time, id_delete, create_by from mall_product_info
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
<select id="list" resultType="com.nuyu.product.domain.ProductTypeAttrValue">
|
||||||
|
<include refid="selectMallProductInfoVo"/>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue