|
|
@@ -27,16 +27,15 @@ import com.goafanti.user.service.UserChannelService;
|
|
|
@RestController
|
|
|
@RequestMapping(value = "/api/user/channel")
|
|
|
public class UserChannelApiController extends CertifyApiController{
|
|
|
-
|
|
|
+
|
|
|
@Resource
|
|
|
private UserChannelService userChannelService;
|
|
|
@Resource
|
|
|
private AttachmentService attachmentService;
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 新增渠道
|
|
|
- *
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/add", method = RequestMethod.POST)
|
|
|
@@ -44,14 +43,14 @@ public class UserChannelApiController extends CertifyApiController{
|
|
|
Result res = new Result();
|
|
|
if (StringUtils.isBlank(in.getUserName())) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "用户名称"));
|
|
|
+ return res;
|
|
|
}
|
|
|
res.setData(userChannelService.add(in));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 删除渠道
|
|
|
- *
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
|
|
@@ -59,15 +58,15 @@ public class UserChannelApiController extends CertifyApiController{
|
|
|
Result res = new Result();
|
|
|
if (StringUtils.isBlank(ids)) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "编号"));
|
|
|
+ return res;
|
|
|
}
|
|
|
res.setData(userChannelService.delete(ids));
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* Excel批量导入渠道客户
|
|
|
- *
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/import" , method = RequestMethod.POST)
|
|
|
@@ -83,30 +82,29 @@ public class UserChannelApiController extends CertifyApiController{
|
|
|
res.getError().add(buildError("格式不正确","格式不正确"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
- res.data(userChannelService.batchListReceivables(file));
|
|
|
+
|
|
|
+ res.data(userChannelService.batchListReceivables(file));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
- * 已存在渠道客户列表
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
+ * 已存在渠道客户列表
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@RequestMapping(value = "/erorrList" , method = RequestMethod.GET)
|
|
|
public Result erorrList(Integer pageNo,Integer pageSize) {
|
|
|
Result res =new Result();
|
|
|
res.data(userChannelService.getErorrList(pageNo,pageSize));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
- /**
|
|
|
- * 导出已存在渠道客户
|
|
|
- *
|
|
|
- * @param response
|
|
|
- * @return
|
|
|
- */
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出已存在渠道客户
|
|
|
+ * @param response
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@RequestMapping(value = "/export" , method = RequestMethod.GET)
|
|
|
public Result exportReceivables(HttpServletResponse response) {
|
|
|
@SuppressWarnings("unchecked")
|
|
|
@@ -114,9 +112,9 @@ public class UserChannelApiController extends CertifyApiController{
|
|
|
NewExcelUtil<OutUserChannel>excel=new NewExcelUtil<>(OutUserChannel.class);
|
|
|
return excel.exportExcel(list,"未导入渠道客户表",response);
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
- * 下载回款批量导入Excel模板
|
|
|
- *
|
|
|
+ * 下载回款批量导入Excel模板
|
|
|
* @param response
|
|
|
* @return
|
|
|
*/
|
|
|
@@ -140,8 +138,8 @@ public class UserChannelApiController extends CertifyApiController{
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|