12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- package cn.hmsoft.mr.control.cf;
- import cn.hmsoft.helper.StringHelper;
- import cn.hmsoft.application.web.Ajax;
- import cn.hmsoft.frame.control.FrameControl;
- import cn.hmsoft.mr.data.model.cf.CfMaterialTextAttr;
- import cn.hmsoft.mr.service.cf.CfMaterialTextAttrService;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- /**
- * 控制器.
- *
- * @author: shudonghui
- * @date: 2023-05-23 09:24:51
- * @version: 1.0
- * @email: shudonghui@qmth.com.cn
- * @Company: www.hmsoft.cn
- */
- @RestController
- public class CfMaterialTextAttrControl extends FrameControl {
- @Autowired
- private CfMaterialTextAttrService cfMaterialTextAttrService;
-
- @RequestMapping("cf/material/textattr/page")
- public Ajax page(Integer material_def_id,String query, Integer limit, Integer start, String order, String type) {
- if (StringHelper.isEmpty(order)) {
- //TODO 修改为排序字段
- order = "1";
- }
- return new Ajax(this.cfMaterialTextAttrService.page(material_def_id,query, start, limit, this.getQueryOrder(order, type)));
- }
-
- @RequestMapping("cf/material/textattr/add")
- public Ajax add(CfMaterialTextAttr cfMaterialTextAttr) {
- return this.cfMaterialTextAttrService.add(cfMaterialTextAttr);
- }
-
- @RequestMapping("cf/material/textattr/edit")
- public Ajax edit(CfMaterialTextAttr cfMaterialTextAttr) {
- return this.cfMaterialTextAttrService.edit(cfMaterialTextAttr);
- }
-
- @RequestMapping("cf/material/textattr/delete")
- public Ajax delete(Integer attr_id) {
- return this.cfMaterialTextAttrService.delete(attr_id);
- }
-
- @RequestMapping("cf/material/textattr/get")
- public Ajax get(Integer id) {
- return new Ajax(this.cfMaterialTextAttrService.get(id));
- }
- }
|