商品测试

dev798
wxy 2024-05-12 14:56:20 +08:00
parent 1976078b52
commit 94643ec29a
21 changed files with 68 additions and 5 deletions

View File

@ -1,15 +1,11 @@
package com.muyu.product.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.github.pagehelper.PageInfo;
import com.muyu.common.core.web.domain.AjaxResult;
import com.muyu.product.service.MallProductSkuInfoService;
import com.nuyu.product.domain.MallProductSkuInfo;
import com.nuyu.product.domain.MallProductTypeInfo;
import com.nuyu.product.req.BookReq;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -26,7 +22,7 @@ import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.core.web.page.TableDataInfo;
/**
* SKUController

View File

@ -39,4 +39,14 @@ public class MallProductTextController {
public Result selectById(Long id){
return Result.success(mallProductTextService.selectMallProductTextById(id));
}
@GetMapping(value = "/{id}")
public Result getInfo(@PathVariable("id") Long id){
return Result.success(mallProductTextService.selectById(id));
}
@PostMapping("/insert")
public Result insert(@RequestBody MallProductText mallProductText){
return Result.success(mallProductTextService.mallTextInsert(mallProductText));
}
}

View File

@ -20,4 +20,8 @@ public interface MallProductTextMapper {
Object updateMallProductTextUpdate(MallProductText mallProductText);
Object selectMallProductTextById(Long id);
Object selectById(Long id);
Object mallTextInsert(MallProductText mallProductText);
}

View File

@ -43,5 +43,15 @@ public class MallProductTextServiceImpl implements MallProductTextService {
return mallProductTextMapper.selectMallProductTextById(id);
}
@Override
public Object selectById(Long id) {
return mallProductTextMapper.selectById(id);
}
@Override
public Object mallTextInsert(MallProductText mallProductText) {
return mallProductTextMapper.mallTextInsert(mallProductText);
}
}

View File

@ -9,6 +9,8 @@ import com.nuyu.product.domain.MallProductText;
*/
public interface MallProductTextService {
PageInfo<MallProductText> list(MallProductText mallProductText);
@ -17,4 +19,8 @@ public interface MallProductTextService {
Object updateMallProductTextUpdate(MallProductText mallProductText);
Object selectMallProductTextById(Long id);
Object selectById(Long id);
Object mallTextInsert(MallProductText mallProductText);
}

View File

@ -3,6 +3,9 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.MallProductTextMapper">
<insert id="mallTextInsert">
insert into mall_product_text(name) values(#{name})
</insert>
<update id="updateMallProductTextUpdate">
update mall_product_text set name = #{name} WHERE id = #{id}
</update>
@ -18,4 +21,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select * from mall_product_text where id = #{id}
</select>
<select id="selectById" resultType="java.lang.Object">
select * from mall_product_text where id = #{id}
</select>
</mapper>

View File

@ -2,11 +2,13 @@ package com.muyu.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.system.domain.SysConfig;
import org.apache.ibatis.annotations.Mapper;
/**
* @author DongZl
* @description: mybatis
* @Date 2023-11-13 10:05
*/
@Mapper
public interface SysConfigMapper extends BaseMapper<SysConfig> {
}

View File

@ -2,6 +2,7 @@ package com.muyu.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.common.system.domain.SysDept;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -11,6 +12,7 @@ import java.util.List;
*
* @author muyu
*/
@Mapper
public interface SysDeptMapper extends BaseMapper<SysDept> {
/**
*

View File

@ -2,6 +2,7 @@ package com.muyu.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.common.system.domain.SysDictData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -11,6 +12,7 @@ import java.util.List;
*
* @author muyu
*/
@Mapper
public interface SysDictDataMapper extends BaseMapper<SysDictData> {
/**
*

View File

@ -2,6 +2,7 @@ package com.muyu.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.common.system.domain.SysDictType;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@ -10,6 +11,7 @@ import java.util.List;
*
* @author muyu
*/
@Mapper
public interface SysDictTypeMapper extends BaseMapper<SysDictType> {
/**
*

View File

@ -2,6 +2,7 @@ package com.muyu.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.common.system.domain.SysLogininfor;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@ -10,6 +11,7 @@ import java.util.List;
*
* @author muyu
*/
@Mapper
public interface SysLogininforMapper extends BaseMapper<SysLogininfor> {
/**
*

View File

@ -2,6 +2,7 @@ package com.muyu.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.system.domain.SysMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -11,6 +12,7 @@ import java.util.List;
*
* @author muyu
*/
@Mapper
public interface SysMenuMapper extends BaseMapper<SysMenu> {
/**
*

View File

@ -2,6 +2,7 @@ package com.muyu.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.system.domain.SysNotice;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@ -10,6 +11,7 @@ import java.util.List;
*
* @author muyu
*/
@Mapper
public interface SysNoticeMapper extends BaseMapper<SysNotice> {
/**
*

View File

@ -2,6 +2,7 @@ package com.muyu.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.common.system.domain.SysOperLog;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@ -10,6 +11,7 @@ import java.util.List;
*
* @author muyu
*/
@Mapper
public interface SysOperLogMapper extends BaseMapper<SysOperLog> {
/**
*

View File

@ -2,6 +2,7 @@ package com.muyu.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.system.domain.SysPost;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@ -10,6 +11,7 @@ import java.util.List;
*
* @author muyu
*/
@Mapper
public interface SysPostMapper extends BaseMapper<SysPost> {
/**
*

View File

@ -3,6 +3,7 @@ package com.muyu.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.system.domain.SysRoleDept;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@ -11,6 +12,7 @@ import java.util.List;
*
* @author muyu
*/
@Mapper
public interface SysRoleDeptMapper extends BaseMapper<SysRoleDept> {
/**
* ID

View File

@ -2,6 +2,7 @@ package com.muyu.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.common.system.domain.SysRole;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@ -10,6 +11,7 @@ import java.util.List;
*
* @author muyu
*/
@Mapper
public interface SysRoleMapper extends BaseMapper<SysRole> {
/**
*

View File

@ -3,6 +3,7 @@ package com.muyu.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.system.domain.SysRoleMenu;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@ -11,6 +12,7 @@ import java.util.List;
*
* @author muyu
*/
@Mapper
public interface SysRoleMenuMapper extends BaseMapper<SysRoleMenu> {
/**
* 使

View File

@ -2,6 +2,7 @@ package com.muyu.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.common.system.domain.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -11,6 +12,7 @@ import java.util.List;
*
* @author muyu
*/
@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {
/**
*

View File

@ -2,6 +2,7 @@ package com.muyu.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.system.domain.SysUserPost;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@ -10,6 +11,7 @@ import java.util.List;
*
* @author muyu
*/
@Mapper
public interface SysUserPostMapper extends BaseMapper<SysUserPost> {
/**
* ID

View File

@ -2,6 +2,7 @@ package com.muyu.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.system.domain.SysUserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -11,6 +12,7 @@ import java.util.List;
*
* @author muyu
*/
@Mapper
public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
/**
* ID