|
@@ -6,13 +6,10 @@ import com.bofeng.service.ShShopService;
|
|
import com.yvan.Model;
|
|
import com.yvan.Model;
|
|
import com.yvan.ModelOps;
|
|
import com.yvan.ModelOps;
|
|
import com.yvan.mvc.Pd;
|
|
import com.yvan.mvc.Pd;
|
|
-import com.yvan.platform.JsonWapper;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
-import org.springframework.ui.ModelMap;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
-import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
@@ -43,19 +40,19 @@ public class ShopMatController {
|
|
|
|
|
|
|
|
|
|
//商品的新增
|
|
//商品的新增
|
|
- @PostMapping("/shop/shop/addShShopMat")
|
|
|
|
|
|
+ @PostMapping("/shop/mat/addShShopMat")
|
|
public ModelOps addShShopMat(@Pd(name = "userId") Long userId, @Pd(name = "matName") String matName, @Pd(name = "matNum") Integer matNum) throws Exception {
|
|
public ModelOps addShShopMat(@Pd(name = "userId") Long userId, @Pd(name = "matName") String matName, @Pd(name = "matNum") Integer matNum) throws Exception {
|
|
return ModelOps.newSuccess(shShopMatService.addShShopMat(userId, matName, matNum));
|
|
return ModelOps.newSuccess(shShopMatService.addShShopMat(userId, matName, matNum));
|
|
}
|
|
}
|
|
|
|
|
|
//商品的置顶2、下架0修改
|
|
//商品的置顶2、下架0修改
|
|
- @PostMapping("/shop/shop/editShShopMatStatus")
|
|
|
|
|
|
+ @PostMapping("/shop/mat/editShShopMatStatus")
|
|
public ModelOps editShShopMatStatus(@Pd(name = "matId") Long matId, @Pd(name = "status") Integer status) throws Exception {
|
|
public ModelOps editShShopMatStatus(@Pd(name = "matId") Long matId, @Pd(name = "status") Integer status) throws Exception {
|
|
return ModelOps.newSuccess(shShopMatService.editShShopMatStatus(matId, status));
|
|
return ModelOps.newSuccess(shShopMatService.editShShopMatStatus(matId, status));
|
|
}
|
|
}
|
|
|
|
|
|
// //我的商品
|
|
// //我的商品
|
|
- @GetMapping("/shop/shop/queryMyShShopMat")
|
|
|
|
|
|
+ @GetMapping("/shop/mat/queryMyShShopMat")
|
|
public Model<List<ShShopMat>> queryMyShShopMat(@Pd(name = "userId"/*, required = false*/) Long userId) throws Exception {
|
|
public Model<List<ShShopMat>> queryMyShShopMat(@Pd(name = "userId"/*, required = false*/) Long userId) throws Exception {
|
|
return Model.newSuccess(shShopMatService.queryMyShShopMat(userId));
|
|
return Model.newSuccess(shShopMatService.queryMyShShopMat(userId));
|
|
}
|
|
}
|