All Downloads are FREE. Search and download functionalities are using the official Maven repository.

oghurt.generator.1.0.0.source-code.Controller.vm Maven / Gradle / Ivy

package ${modulePackage}.controller;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import com.df.core.controller.BaseController;
import com.df.core.controller.form.QueryHandle;
import com.df.core.result.HttpResultEntity;
import com.df.core.result.QueryResult;
import ${importPackage}.domain.${className};
import ${importPackage}.service.${className}Service;
import org.springframework.web.bind.annotation.RequestMethod;
import com.df.core.annotations.LogContent;

/**
 * ${codeName}控制器
 *
 */
@RestController
@LogContent(module = "${moduleName}")
@RequestMapping("/${lowerName}")
public class ${className}Controller extends BaseController {


	/**
	 * ${codeName}服务类
	 */
	@Resource
	private ${className}Service ${lowerName}Service;
//
//	/**
//	 * 列出${codeName}
//	 */
//	@LogContent("查询${codeName}")
//	@RequestMapping(value = "/list",method=RequestMethod.GET)
//	public QueryResult<${className}> list(${className} ${lowerName} ,QueryAssistor queryHandle) throws Exception {
//        return ${lowerName}Service.getData(${lowerName},queryHandle.configPage().addOrderBy("createDateTime",
//				"desc"));
//
//	}
//
//
//	/**
//	 * 添加${codeName}
//	 */
//	@LogContent("添加${codeName}")
//	@RequestMapping(method=RequestMethod.POST)
//	public HttpResultEntity add(@RequestBody ${className} ${lowerName}) throws Exception {
//		${lowerName}Service.save(${lowerName});
//        return getSuccessResult();
//	}
//
//	/**
//	 * 编辑${codeName}
//	 */
//	@LogContent("编辑${codeName}")
//	@RequestMapping(method=RequestMethod.PUT)
//	public HttpResultEntity edit(@RequestBody ${className} ${lowerName}) throws Exception {
//		${lowerName}Service.updateForSelective(${lowerName});
//        return getSuccessResult();
//	}
//
//	/**
//	 * 删除单个${codeName}
//	 */
//	@LogContent("删除${codeName}")
//	@RequestMapping(value = "/{${prikey}}",method=RequestMethod.DELETE)
//	public HttpResultEntity delete(@PathVariable String ${prikey})  throws Exception{
//		${lowerName}Service.delete(${prikey});
//		return getSuccessResult();
//	}
//
//    /**
//     * 查询单个${codeName}
//	 */
//	 @LogContent("查询单个${codeName}")
//	 @RequestMapping(value = "/{${prikey}}",method=RequestMethod.GET)
//	 public HttpResultEntity get(@PathVariable String $prikey)  throws Exception{
//		 return getSuccessResult(${lowerName}Service.find($prikey));
//	 }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy