商品测试
parent
1976078b52
commit
94643ec29a
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,4 +20,8 @@ public interface MallProductTextMapper {
|
|||
Object updateMallProductTextUpdate(MallProductText mallProductText);
|
||||
|
||||
Object selectMallProductTextById(Long id);
|
||||
|
||||
Object selectById(Long id);
|
||||
|
||||
Object mallTextInsert(MallProductText mallProductText);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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> {
|
||||
}
|
||||
|
|
|
@ -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> {
|
||||
/**
|
||||
* 查询部门管理数据
|
||||
|
|
|
@ -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> {
|
||||
/**
|
||||
* 根据条件分页查询字典数据
|
||||
|
|
|
@ -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> {
|
||||
/**
|
||||
* 根据条件分页查询字典类型
|
||||
|
|
|
@ -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> {
|
||||
/**
|
||||
* 新增系统登录日志
|
||||
|
|
|
@ -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> {
|
||||
/**
|
||||
* 查询系统菜单列表
|
||||
|
|
|
@ -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> {
|
||||
/**
|
||||
* 查询公告信息
|
||||
|
|
|
@ -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> {
|
||||
/**
|
||||
* 新增操作日志
|
||||
|
|
|
@ -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> {
|
||||
/**
|
||||
* 查询岗位数据集合
|
||||
|
|
|
@ -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删除角色和部门关联
|
||||
|
|
|
@ -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> {
|
||||
/**
|
||||
* 根据条件分页查询角色数据
|
||||
|
|
|
@ -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> {
|
||||
/**
|
||||
* 查询菜单使用数量
|
||||
|
|
|
@ -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> {
|
||||
/**
|
||||
* 根据条件分页查询用户列表
|
||||
|
|
|
@ -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删除用户和岗位关联
|
||||
|
|
|
@ -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删除用户和角色关联
|
||||
|
|
Loading…
Reference in New Issue