修复不能设置账户默认值的bug
This commit is contained in:
@@ -6,12 +6,10 @@ import com.jsh.erp.datasource.entities.Account;
|
||||
import com.jsh.erp.datasource.vo.AccountVo4InOutList;
|
||||
import com.jsh.erp.service.account.AccountService;
|
||||
import com.jsh.erp.utils.BaseResponseInfo;
|
||||
import com.jsh.erp.utils.ErpInfo;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -19,6 +17,8 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.jsh.erp.utils.ResponseJsonUtil.returnJson;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value = "/account")
|
||||
public class AccountController {
|
||||
@@ -121,4 +121,18 @@ public class AccountController {
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@PostMapping(value = "/updateAmountIsDefault")
|
||||
public String updateAmountIsDefault(@RequestParam("isDefault") Boolean isDefault,
|
||||
@RequestParam("accountId") Long accountId,
|
||||
HttpServletRequest request) {
|
||||
Map<String, Object> objectMap = new HashMap<String, Object>();
|
||||
int res = accountService.updateAmountIsDefault(isDefault, accountId);
|
||||
if(res > 0) {
|
||||
return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
|
||||
} else {
|
||||
return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user