|
|
@@ -3,6 +3,7 @@ package com.goafanti.expenseAccount.controller;
|
|
|
import com.goafanti.common.bo.Result;
|
|
|
import com.goafanti.common.constant.ErrorConstants;
|
|
|
import com.goafanti.common.controller.CertifyApiController;
|
|
|
+import com.goafanti.common.model.ExpenseAccountPrivate;
|
|
|
import com.goafanti.common.utils.ParamUtils;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
import com.goafanti.expenseAccount.bo.InputExpenseAccountPrivate;
|
|
|
@@ -51,6 +52,10 @@ public class ExpenseAccountController extends CertifyApiController {
|
|
|
@RequestMapping(value = "/update",method = RequestMethod.POST)
|
|
|
public Result update(@Validated InputExpenseAccountPrivate in , BindingResult bindingResult){
|
|
|
Result res =new Result();
|
|
|
+ if (in.getId()==null){
|
|
|
+ res.getError().add(buildErrorMessageParams(ErrorConstants.PARAM_EMPTY_ERROR,"我的报销帐号编号"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
res.getError().add(buildErrorByMsg(bindingResult.getFieldError().getDefaultMessage(),
|
|
|
ParamUtils.getParamName(in,bindingResult.getFieldError().getField())));
|
|
|
@@ -64,12 +69,21 @@ public class ExpenseAccountController extends CertifyApiController {
|
|
|
res.setData(expenseAccountPrivateService.update(in));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
/**
|
|
|
* 私有报销帐号列表
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/selectList",method = RequestMethod.POST)
|
|
|
+ public Result updateStatus(ExpenseAccountPrivate in){
|
|
|
+ Result res =new Result();
|
|
|
+ res.setData(expenseAccountPrivateService.updateStatus(in));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 私有报销帐号列表
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/selectList",method = RequestMethod.GET)
|
|
|
public Result selectList(Integer pageSize,Integer pageNo){
|
|
|
Result res =new Result();
|
|
|
res.setData(expenseAccountPrivateService.selectList(pageSize,pageNo));
|