Compare commits

..

No commits in common. "c173418103daf7a7d503dac9a15ea4a65edd7f81" and "b9ccd13511cb63b91ad6019381ddfd6cf04ec0ac" have entirely different histories.

4 changed files with 30 additions and 21 deletions

View File

@ -31,7 +31,8 @@ import org.springframework.web.multipart.MultipartFile;
*/
@RestController
@RequestMapping("/om/application")
public class OmTeamApplicationController extends BaseController {
public class OmTeamApplicationController extends BaseController
{
@Autowired
private IOmTeamApplicationService omTeamApplicationService;
@ -40,12 +41,13 @@ public class OmTeamApplicationController extends BaseController {
*/
// @PreAuthorize("@ss.hasPermi('om:application:list')")
@GetMapping("/listByOm")
public TableDataInfo listByOm(OmTeamApplication omTeamApplication) {
public TableDataInfo listByOm(OmTeamApplication omTeamApplication)
{
startPage();
if (StringUtils.isEmpty(omTeamApplication.getContacts())) {
if(StringUtils.isEmpty(omTeamApplication.getContacts())){
omTeamApplication.setContacts(IdUtils.fastSimpleUUID());
}
if (StringUtils.isEmpty(omTeamApplication.getTelephone())) {
if(StringUtils.isEmpty(omTeamApplication.getTelephone())){
omTeamApplication.setTelephone(IdUtils.fastSimpleUUID());
}
List<OmTeamApplication> list = omTeamApplicationService.selectOmTeamApplicationList(omTeamApplication);
@ -56,17 +58,18 @@ public class OmTeamApplicationController extends BaseController {
* 校验团队名称唯一
*/
@GetMapping("/uniqueCheck")
public AjaxResult uniqueCheck(OmTeamApplication omTeamApplication) {
public AjaxResult uniqueCheck(OmTeamApplication omTeamApplication)
{
int num = omTeamApplicationService.uniqueCheck(omTeamApplication);
return AjaxResult.success(num > 0);
return AjaxResult.success(num>0);
}
/**
* 查询团队注册申请列表
*/
@PreAuthorize("@ss.hasPermi('om:application:list')")
@GetMapping("/list")
public TableDataInfo list(OmTeamApplication omTeamApplication) {
public TableDataInfo list(OmTeamApplication omTeamApplication)
{
startPage();
List<OmTeamApplication> list = omTeamApplicationService.selectOmTeamApplicationList(omTeamApplication);
return getDataTable(list);
@ -78,7 +81,8 @@ public class OmTeamApplicationController extends BaseController {
@PreAuthorize("@ss.hasPermi('om:application:export')")
@Log(title = "团队注册申请", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, OmTeamApplication omTeamApplication) {
public void export(HttpServletResponse response, OmTeamApplication omTeamApplication)
{
List<OmTeamApplication> list = omTeamApplicationService.selectOmTeamApplicationList(omTeamApplication);
ExcelUtil<OmTeamApplication> util = new ExcelUtil<OmTeamApplication>(OmTeamApplication.class);
util.exportExcel(response, list, "团队注册申请数据");
@ -89,7 +93,8 @@ public class OmTeamApplicationController extends BaseController {
*/
// @PreAuthorize("@ss.hasPermi('om:application:query')")
@GetMapping(value = "/detail/{id}")
public AjaxResult getInfo(@PathVariable("id") String id) {
public AjaxResult getInfo(@PathVariable("id") String id)
{
return success(omTeamApplicationService.selectOmTeamApplicationById(id));
}
@ -99,7 +104,8 @@ public class OmTeamApplicationController extends BaseController {
// @PreAuthorize("@ss.hasPermi('om:application:add')")
// @Log(title = "团队注册申请", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody OmTeamApplication omTeamApplication) {
public AjaxResult add(@RequestBody OmTeamApplication omTeamApplication)
{
return toAjax(omTeamApplicationService.insertOmTeamApplication(omTeamApplication));
}
@ -109,7 +115,8 @@ public class OmTeamApplicationController extends BaseController {
// @PreAuthorize("@ss.hasPermi('om:application:edit')")
// @Log(title = "团队注册申请", businessType = BusinessType.UPDATE)
@PutMapping("/update")
public AjaxResult edit(@RequestBody OmTeamApplication omTeamApplication) {
public AjaxResult edit(@RequestBody OmTeamApplication omTeamApplication)
{
return toAjax(omTeamApplicationService.updateOmTeamApplication(omTeamApplication));
}
@ -118,8 +125,9 @@ public class OmTeamApplicationController extends BaseController {
*/
@PreAuthorize("@ss.hasPermi('om:application:remove')")
@Log(title = "团队注册申请", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids) {
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(omTeamApplicationService.deleteOmTeamApplicationByIds(ids));
}
@ -144,7 +152,8 @@ public class OmTeamApplicationController extends BaseController {
// filename为文件下载后保存的文件名可自行设置但是注意文件名后缀要和原来的保持一致
response.setHeader("Content-Disposition", "attachment; filename=" + name);
response.setHeader("filename", name);
OutputStream out = response.getOutputStream();
OutputStream out = null;
out = response.getOutputStream();
byte[] bytes = omTeamApplicationService.downLoadFile(path, saveName);
// 输出到客户端
if (bytes != null) {

View File

@ -138,7 +138,7 @@
<el-button
type="danger"
plain
icon="el-icon-star-on"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
@ -312,7 +312,7 @@
<el-button
size="mini"
type="text"
icon="el-icon-star-on"
icon="el-icon-star-off"
@click="handleDelete(scope.row)"
v-hasPermi="['order:info:edit']"
>取消收藏</el-button>

View File

@ -324,7 +324,7 @@
v-if="!scope.row.omOrderCollect"
size="mini"
type="text"
icon="el-icon-star-off"
icon="el-icon-star-on"
@click="handleCollect(scope.row)"
v-hasPermi="['order:info:edit']"
>收藏</el-button>
@ -332,7 +332,7 @@
v-if="scope.row.omOrderCollect"
size="mini"
type="text"
icon="el-icon-star-on"
icon="el-icon-star-off"
@click="handleDelCollect(scope.row)"
v-hasPermi="['order:info:edit']"
>取消收藏</el-button>

View File

@ -313,7 +313,7 @@
v-if="!scope.row.omOrderCollect"
size="mini"
type="text"
icon="el-icon-star-off"
icon="el-icon-star-on"
@click="handleCollect(scope.row)"
v-hasPermi="['order:info:edit']"
>收藏</el-button>
@ -321,7 +321,7 @@
v-if="scope.row.omOrderCollect"
size="mini"
type="text"
icon="el-icon-star-on"
icon="el-icon-star-off"
@click="handleDelCollect(scope.row)"
v-hasPermi="['order:info:edit']"
>取消收藏</el-button>