商品测试
parent
1b40725c29
commit
c9cb5289d6
|
@ -6,10 +6,7 @@ import com.muyu.common.core.web.domain.AjaxResult;
|
||||||
import com.muyu.product.service.MallProductTextService;
|
import com.muyu.product.service.MallProductTextService;
|
||||||
import com.nuyu.product.domain.MallProductText;
|
import com.nuyu.product.domain.MallProductText;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: wangxinyuan
|
* @Author: wangxinyuan
|
||||||
|
@ -32,4 +29,9 @@ public class MallProductTextController {
|
||||||
public Result delete(Long id){
|
public Result delete(Long id){
|
||||||
return Result.success(mallProductTextService.deleteMallProductTextById(id));
|
return Result.success(mallProductTextService.deleteMallProductTextById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
public Result update(@RequestBody MallProductText mallProductText){
|
||||||
|
return Result.success(mallProductTextService.updateMallProductTextUpdate(mallProductText));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,4 +16,6 @@ public interface MallProductTextMapper {
|
||||||
|
|
||||||
|
|
||||||
String deleteMallProductTextById(Long id);
|
String deleteMallProductTextById(Long id);
|
||||||
|
|
||||||
|
Object updateMallProductTextUpdate(MallProductText mallProductText);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,5 +33,10 @@ public class MallProductTextServiceImpl implements MallProductTextService {
|
||||||
return mallProductTextMapper.deleteMallProductTextById(id);
|
return mallProductTextMapper.deleteMallProductTextById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object updateMallProductTextUpdate(MallProductText mallProductText) {
|
||||||
|
return mallProductTextMapper.updateMallProductTextUpdate(mallProductText);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,4 +13,6 @@ public interface MallProductTextService {
|
||||||
|
|
||||||
|
|
||||||
String deleteMallProductTextById(Long id);
|
String deleteMallProductTextById(Long id);
|
||||||
|
|
||||||
|
Object updateMallProductTextUpdate(MallProductText mallProductText);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.muyu.product.mapper.MallProductTextMapper">
|
<mapper namespace="com.muyu.product.mapper.MallProductTextMapper">
|
||||||
|
<update id="updateMallProductTextUpdate">
|
||||||
|
update mall_product_text set name = #{name} WHERE id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
<delete id="deleteMallProductTextById">
|
<delete id="deleteMallProductTextById">
|
||||||
delete from mall_product_text where id = #{id}
|
delete from mall_product_text where id = #{id}
|
||||||
|
|
Loading…
Reference in New Issue