@ -0,0 +1,51 @@ | |||||
package com.ruoyi.applet.contoller; | |||||
import com.ruoyi.common.core.domain.AjaxResult; | |||||
import com.ruoyi.model.domain.AppletOutDate; | |||||
import com.ruoyi.model.domain.AppletServiceLog; | |||||
import com.ruoyi.model.service.IAppletOutDateService; | |||||
import com.ruoyi.model.service.IAppletServiceLogService; | |||||
import io.swagger.annotations.Api; | |||||
import io.swagger.annotations.ApiOperation; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.web.bind.annotation.*; | |||||
import java.util.List; | |||||
@Api(description = "接单地址-不接单日期相关接口") | |||||
@RestController | |||||
@RequestMapping("/applet/outDate") | |||||
public class ApiAppletOutDateController { | |||||
@Autowired | |||||
private IAppletOutDateService appletOutDateService; | |||||
@ApiOperation("接单地址-不接单日期列表数据查询") | |||||
@GetMapping("/outDateList") | |||||
public AjaxResult outDateList(AppletOutDate appletOutDate){ | |||||
List<AppletOutDate> dateList = appletOutDateService.selectAppletOutDateList(appletOutDate); | |||||
return AjaxResult.success("服务记录列表数据",dateList); | |||||
} | |||||
@ApiOperation("接单地址-不接单日期添加") | |||||
@PostMapping("/insertOutDate") | |||||
public AjaxResult insertOutDate(@RequestBody AppletOutDate appletOutDate){ | |||||
return toAjax(appletOutDateService.insertAppletOutDate(appletOutDate)); | |||||
} | |||||
@ApiOperation("接单地址-不接单日期修改") | |||||
@PostMapping("/udpateOutDate") | |||||
public AjaxResult udpateOutDate(@RequestBody AppletOutDate appletOutDate){ | |||||
return toAjax(appletOutDateService.updateAppletOutDate(appletOutDate)); | |||||
} | |||||
@ApiOperation("接单地址-不接单日期删除") | |||||
@PostMapping("/deleteOutDate") | |||||
public AjaxResult deleteOutDate(long id){ | |||||
return toAjax(appletOutDateService.deleteAppletOutDateById(id)); | |||||
} | |||||
protected AjaxResult toAjax(int rows) { | |||||
return rows > 0 ? AjaxResult.success() : AjaxResult.error(); | |||||
} | |||||
} |
@ -0,0 +1,52 @@ | |||||
package com.ruoyi.applet.contoller; | |||||
import com.ruoyi.common.core.domain.AjaxResult; | |||||
import com.ruoyi.model.domain.AppletServiceLog; | |||||
import com.ruoyi.model.domain.AppletUsersTeacher; | |||||
import com.ruoyi.model.service.IAppUsersService; | |||||
import com.ruoyi.model.service.IAppletServiceLogService; | |||||
import com.ruoyi.model.service.IAppletUsersTeacherService; | |||||
import io.swagger.annotations.Api; | |||||
import io.swagger.annotations.ApiOperation; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.web.bind.annotation.*; | |||||
import java.util.List; | |||||
@Api(description = "伴宠师工作台-服务记录") | |||||
@RestController | |||||
@RequestMapping("/applet/serviceLog") | |||||
public class ApiAppletServiceLogController { | |||||
@Autowired | |||||
private IAppletServiceLogService appletServiceLogService; | |||||
@ApiOperation("伴宠师工作台-服务记录列表数据查询") | |||||
@GetMapping("/serviceLogList") | |||||
public AjaxResult serviceLogList(AppletServiceLog serviceLog){ | |||||
List<AppletServiceLog> logList = appletServiceLogService.selectAppletServiceLogList(serviceLog); | |||||
return AjaxResult.success("服务记录列表数据",logList); | |||||
} | |||||
@ApiOperation("伴宠师工作台-服务记录添加") | |||||
@PostMapping("/insertServiceLog") | |||||
public AjaxResult insertUser(@RequestBody AppletServiceLog serviceLog){ | |||||
return toAjax(appletServiceLogService.insertAppletServiceLog(serviceLog)); | |||||
} | |||||
@ApiOperation("伴宠师工作台-服务记录修改") | |||||
@PostMapping("/udpateServiceLog") | |||||
public AjaxResult udpateUser(@RequestBody AppletServiceLog serviceLog){ | |||||
return toAjax(appletServiceLogService.updateAppletServiceLog(serviceLog)); | |||||
} | |||||
@ApiOperation("伴宠师工作台-服务记录删除") | |||||
@PostMapping("/deleteServiceLog") | |||||
public AjaxResult deleteUser(long id){ | |||||
return toAjax(appletServiceLogService.deleteAppletServiceLogById(id)); | |||||
} | |||||
protected AjaxResult toAjax(int rows) { | |||||
return rows > 0 ? AjaxResult.success() : AjaxResult.error(); | |||||
} | |||||
} |