77 lines
2.3 KiB
Plaintext
Raw Normal View History

2024-02-25 11:18:52 +08:00
package ${packageName}.controller.meeting;
2024-01-23 16:42:27 +08:00
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
2024-02-25 11:18:52 +08:00
import com.ics.common.core.domain.R;
import com.ics.common.core.controller.BaseController;
import ${packageName}.domain.meeting.${ClassName};
import ${packageName}.service.meeting.I${ClassName}Service;
2024-01-23 16:42:27 +08:00
import org.wf.jwtp.annotation.RequiresPermissions;
/**
* ${functionName} 提供者
*
* @author ${author}
* @date ${datetime}
*/
@RestController
@RequestMapping("${businessName}")
public class ${ClassName}Controller extends BaseController {
@Autowired
private I${ClassName}Service ${className}Service;
/**
* 查询${functionName}
*/
@GetMapping("get/{${pkColumn.javaField}}")
public ${ClassName} get(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField}) {
return ${className}Service.select${ClassName}ById(${pkColumn.javaField});
}
/**
* 查询${functionName}列表
*/
@RequiresPermissions("${permissionPrefix}:list")
@GetMapping("list")
public R list(${ClassName} ${className}) {
startPage();
return result(${className}Service.select${ClassName}List(${className}));
}
/**
* 新增保存${functionName}
*/
@RequiresPermissions("${permissionPrefix}:add")
@PostMapping("save")
public R addSave(@RequestBody ${ClassName} ${className}) {
return toAjax(${className}Service.insert${ClassName}(${className}));
}
/**
* 修改保存${functionName}
*/
@RequiresPermissions("${permissionPrefix}:edit")
@PostMapping("update")
public R editSave(@RequestBody ${ClassName} ${className}) {
return toAjax(${className}Service.update${ClassName}(${className}));
}
/**
* 删除${functionName}
*/
@RequiresPermissions("${permissionPrefix}:remove")
@PostMapping("remove")
public R remove(String ids) {
return toAjax(${className}Service.delete${ClassName}ByIds(ids));
}
}