|
|
@@ -45,6 +45,7 @@ import com.ylx.massage.domain.MaTechnician;
|
|
|
import com.ylx.massage.service.IMaTechnicianService;
|
|
|
import com.ylx.common.utils.poi.ExcelUtil;
|
|
|
import com.ylx.common.core.page.TableDataInfo;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
/**
|
|
|
* 技师Controller
|
|
|
@@ -310,6 +311,48 @@ public class MaTechnicianController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 后台编辑商户
|
|
|
+ *
|
|
|
+ * @param id 商户ID
|
|
|
+ * @param dto 商户编辑DTO
|
|
|
+ * @return AjaxResult 结果
|
|
|
+ */
|
|
|
+ @ApiOperation("后台编辑商户")
|
|
|
+ @PreAuthorize("@ss.hasPermi('technician:technician:edit')")
|
|
|
+ @Log(title = "商户", businessType = BusinessType.UPDATE)
|
|
|
+ @PutMapping("/merchant/{id}")
|
|
|
+ public AjaxResult editMerchant(@PathVariable("id") Long id, @RequestBody MaTechnicianMerchantAddDTO dto) {
|
|
|
+ try {
|
|
|
+ LoginUser loginUser = getLoginUser();
|
|
|
+ return toAjax(maTechnicianService.updateMerchant(id, dto, loginUser));
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 后台上传商户合同文件
|
|
|
+ *
|
|
|
+ * @param id 商户ID
|
|
|
+ * @param file 合同文件
|
|
|
+ * @return AjaxResult 上传结果
|
|
|
+ */
|
|
|
+ @ApiOperation("后台上传商户合同文件")
|
|
|
+ @PreAuthorize("@ss.hasPermi('technician:technician:edit')")
|
|
|
+ @Log(title = "商户合同", businessType = BusinessType.UPDATE)
|
|
|
+ @PostMapping("/merchant/{id}/contract")
|
|
|
+ public AjaxResult uploadMerchantContract(@PathVariable("id") Integer id, @RequestParam("file") MultipartFile file) {
|
|
|
+ try {
|
|
|
+ LoginUser loginUser = getLoginUser();
|
|
|
+ return maTechnicianService.uploadMerchantContract(id, file, loginUser);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 查询商户列表
|
|
|
*
|