|
|
@@ -1,7 +1,9 @@
|
|
|
package com.mokamrp.privates.controller.pangu;
|
|
|
|
|
|
+import com.mokamrp.privates.constant.Constants;
|
|
|
import com.mokamrp.privates.constant.HttpMsg;
|
|
|
import com.mokamrp.privates.constant.HttpStatus;
|
|
|
+import com.mokamrp.privates.entity.AddHandle;
|
|
|
import com.mokamrp.privates.entity.PostBasePageHandle;
|
|
|
import com.mokamrp.privates.entity.VoltaHandle;
|
|
|
import com.mokamrp.privates.help.AjaxResult;
|
|
|
@@ -39,7 +41,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
*/
|
|
|
@RestController
|
|
|
@Api(tags = "站点支出")
|
|
|
-@RequestMapping("/fosterwxStationPay")
|
|
|
+@RequestMapping("/pangu/fosterwxStationPay")
|
|
|
public class FosterwxStationPayController extends BaseController<FosterwxStationPay> {
|
|
|
|
|
|
@Autowired
|
|
|
@@ -60,6 +62,21 @@ public class FosterwxStationPayController extends BaseController<FosterwxStation
|
|
|
return AjaxResult.success(res);
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("/addPro")
|
|
|
+ public Object addPro(@Valid @RequestBody AddHandle<FosterwxStationPay> addHandle, BindingResult bindingResult,@AuthUser User authUser) {
|
|
|
+ if (bindingResult.hasErrors()) {
|
|
|
+ return AjaxResult.error(HttpStatus.ERROR, bindingResult.getFieldError().getDefaultMessage());
|
|
|
+ }
|
|
|
+ this.onInsert(addHandle.getRaw());
|
|
|
+ addHandle.getRaw().setCreateUid(authUser.getId());
|
|
|
+ Boolean res = service.save(addHandle.getRaw());
|
|
|
+ if (res) {
|
|
|
+ return AjaxResult.success(Constants.SUCCESS, res);
|
|
|
+ } else {
|
|
|
+ return AjaxResult.error("新增失败", res);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@PostMapping("/import")
|
|
|
public Object uploadFile(@RequestBody MultipartFile file, @AuthUser User authUser) {
|
|
|
Map<String, Object> map = new HashMap<>(16);
|