|
@@ -20,7 +20,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
/**
|
|
|
*商品管理
|
|
|
- * @author qzy
|
|
|
+ * @author qzy
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping("/TbGoods/")
|
|
@@ -39,24 +39,24 @@ public class TbGoodsController {
|
|
|
return AjaxJson.getSuccessData(t);
|
|
|
}
|
|
|
|
|
|
- /** 删 */
|
|
|
+ /** 删 */
|
|
|
@RequestMapping("delete")
|
|
|
@SaCheckPermission(TbGoods.PERMISSION_CODE_DEL)
|
|
|
public AjaxJson delete(Long id){
|
|
|
tbGoodsService.delete(id);
|
|
|
return AjaxJson.getSuccess();
|
|
|
}
|
|
|
-
|
|
|
- /** 删 - 根据id列表 */
|
|
|
+
|
|
|
+ /** 删 - 根据id列表 */
|
|
|
@RequestMapping("deleteByIds")
|
|
|
@SaCheckPermission(TbGoods.PERMISSION_CODE_DEL)
|
|
|
public AjaxJson deleteByIds(){
|
|
|
- List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class);
|
|
|
+ List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class);
|
|
|
int line = SP.publicMapper.deleteByIds(TbGoods.TABLE_NAME, ids);
|
|
|
return AjaxJson.getByLine(line);
|
|
|
}
|
|
|
-
|
|
|
- /** 改 */
|
|
|
+
|
|
|
+ /** 改 */
|
|
|
@RequestMapping("update")
|
|
|
@SaCheckPermission(TbGoods.PERMISSION_CODE_EDIT)
|
|
|
public AjaxJson update(TbGoods t){
|
|
@@ -64,7 +64,7 @@ public class TbGoodsController {
|
|
|
return AjaxJson.getSuccess();
|
|
|
}
|
|
|
|
|
|
- /** 查 - 根据id */
|
|
|
+ /** 查 - 根据id */
|
|
|
@RequestMapping("getById")
|
|
|
@SaCheckPermission(TbGoods.PERMISSION_CODE)
|
|
|
public AjaxJson getById(String id){
|
|
@@ -72,18 +72,18 @@ public class TbGoodsController {
|
|
|
return AjaxJson.getSuccessData(t);
|
|
|
}
|
|
|
|
|
|
- /** 查集合 - 根据条件(参数为空时代表忽略指定条件) */
|
|
|
+ /** 查集合 - 根据条件(参数为空时代表忽略指定条件) */
|
|
|
@RequestMapping("getList")
|
|
|
@SaCheckPermission(TbGoods.PERMISSION_CODE)
|
|
|
- public AjaxJson getList() {
|
|
|
+ public AjaxJson getList() {
|
|
|
SoMap so = SoMap.getRequestSoMap();
|
|
|
List<TbGoods> list = tbGoodsService.getList(so.startPage());
|
|
|
return AjaxJson.getPageData(so.getDataCount(), list);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- /** 改 - 状态(0=禁用,1=启用) */
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /** 改 - 状态(0=禁用,1=启用) */
|
|
|
@RequestMapping("updateStatus")
|
|
|
@SaCheckPermission(TbGoods.PERMISSION_CODE_EDIT)
|
|
|
public AjaxJson updateStatus(String id, String value){
|
|
@@ -127,7 +127,7 @@ public class TbGoodsController {
|
|
|
|
|
|
/* --- 正常业务方法 👆👆 rpc远程调用👇👇 ---*/
|
|
|
/** 查 - 根据id */
|
|
|
- @RequestMapping("rpc/getBygoodsId")
|
|
|
+ @RequestMapping("rpc/getByGoodsId")
|
|
|
public GoodsDto getByGoodsId(@RequestParam("goodsId") Long goodsId){
|
|
|
GoodsDto t = tbGoodsService.selectById(goodsId);
|
|
|
return t;
|