这篇文章主要介绍了怎么使用Android快速实现一个财务APP程序的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇怎么使用Android快速实现一个财务APP程序文章都会有所收获,下面我们一起来看看吧。
移动端,采用安卓进行开发,Android它应用于安卓系统软件和程序开发,其由谷歌公司推出,目前在国际市场上有着广泛的应用及开发环境,并不瘦限制研发人员能够通过修改开放的源代码来实现各种使用的 APP软件,开发的软件程序具有界面友好稳定性好等特点,安卓系统架构图具体如下:
后端采用的Java进行开发的,数据库采用的Mysql。
系统的功能架构:
后台:
/** * 小孟v:jishulearn */ @Controller @RequestMapping("/api") public class ApiController { @Autowired private UsersService userService; @Autowired private ShouruService shouruService; @Autowired private ZhichuService zhichuService; @Autowired private GudingzhichuService gudingzhichuService; @Autowired private GudingzhichuleixService gudingzhichuleixService; @Autowired private ShourutypeService shourutypeService; @Autowired private ZhichutypeService zhichutypeService; @Autowired private WenzhangService wenzhangService; @Autowired private GonggaoService gonggaoService; @PostMapping("/userlogin") @ResponseBody public JsonResult login(String username, String password) { if (username == null || username.trim().isEmpty()) return JsonResult.error("请输入账号"); if (password == null || password.trim().isEmpty()) return JsonResult.error("请输入密码"); Users user = userService.getOne(new QueryWrapper<Users>().eq("username", username).eq("password", password)); if (user != null) { return JsonResult.ok("登录成功").setData(user); } else { return JsonResult.error("用户名或密码错误"); } } @PostMapping("/userreg") @ResponseBody public JsonResult reg(String username, String password, String nickname, String dianhua, String youxiang,String image) { if (username == null || username.trim().isEmpty()) return JsonResult.error("请输入账号"); if (password == null || password.trim().isEmpty()) return JsonResult.error("请输入密码"); if (nickname == null || nickname.trim().isEmpty()) return JsonResult.error("请输入真实姓名"); if (dianhua == null || dianhua.trim().isEmpty()) return JsonResult.error("请输入电话"); if (youxiang == null || youxiang.trim().isEmpty()) return JsonResult.error("请输入邮箱"); Users user1 = new Users(); user1.setUsername(username); user1.setNickname(nickname); user1.setPassword(password); user1.setDianhua(dianhua); user1.setYouxiang(youxiang); user1.setImage(image); Users user = userService.getOne(new QueryWrapper<Users>().eq("username", username)); if (user!=null){ return JsonResult.error("用户名已经存在,请重试!"); } if (userService.save(user1)) { return JsonResult.ok("注册成功"); } return JsonResult.error("注册失败"); } @PostMapping("/userupdate") @ResponseBody public JsonResult update(Integer id, String username, String password, String nickname) { if (username == null || username.trim().isEmpty()) return JsonResult.error("请输入账号"); if (password == null || password.trim().isEmpty()) return JsonResult.error("请输入密码"); if (nickname == null || nickname.trim().isEmpty()) return JsonResult.error("请输入真实姓名"); Users userone = userService.getById(id); if (userone == null) { return JsonResult.ok("用户不存在!"); } userone.setUsername(username); userone.setPassword(password); userone.setNickname(nickname); if (userService.updateById(userone)) { return JsonResult.ok("修改成功"); } return JsonResult.error("修改失败"); } @PostMapping("/userupdatePass") @ResponseBody public JsonResult updatePass(Integer id, String username, String password) { if (username == null || username.trim().isEmpty()) return JsonResult.error("请输入账号"); if (password == null || password.trim().isEmpty()) return JsonResult.error("请输入密码"); Users userone = userService.getById(id); if (userone == null) { return JsonResult.ok("用户不存在!"); } userone.setUsername(username); userone.setPassword(password); if (userService.updateById(userone)) { return JsonResult.ok("修改成功"); } return JsonResult.error("修改失败"); } @PostMapping("/userupdateImage") @ResponseBody public JsonResult updateImage(Integer id, String image) { Users userone = userService.getById(id); if (userone == null) { return JsonResult.ok("用户不存在!"); } userone.setImage(image); if (userService.updateById(userone)) { return JsonResult.ok("修改成功"); } return JsonResult.error("修改失败"); } @ResponseBody @RequestMapping("/shouru/list") public JsonResult ShouRuList(String username) { PageParam<Zhichu> pageParam = new PageParam<>(); pageParam.put("username", username); List<Shouru> records = shouruService.listAll(pageParam.getNoPageParam()); return JsonResult.ok().setData(records); } @ResponseBody @RequestMapping("/wenzhang/list") public JsonResult WenZhangList() { PageParam<Wenzhang> pageParam = new PageParam<>(); List<Wenzhang> records = wenzhangService.listAll(pageParam.getNoPageParam()); return JsonResult.ok().setData(records); } @ResponseBody @RequestMapping("/gonggao/list") public JsonResult GongGaoList() { PageParam<Gonggao> pageParam = new PageParam<>(); List<Gonggao> records = gonggaoService.listAll(pageParam.getNoPageParam()); return JsonResult.ok().setData(records); }
/** * 管理 * Created by xiaomeng,vx:jiushulearn */ @Controller @RequestMapping("/caiwu/gonggao") public class GonggaoController extends BaseController { @Autowired private GonggaoService gonggaoService; @RequestMapping() public String view() { return "caiwu/gonggao.html"; } /** * 分页查询 */ @ResponseBody @RequestMapping("/page") public PageResult<Gonggao> page(HttpServletRequest request) { PageParam<Gonggao> pageParam = new PageParam<>(request); return new PageResult<>(gonggaoService.page(pageParam, pageParam.getWrapper()).getRecords(), pageParam.getTotal()); //return gonggaoService.listPage(pageParam); // 使用关联查询 } /** * 查询全部 */ @ResponseBody @RequestMapping("/list") public JsonResult list(HttpServletRequest request) { PageParam<Gonggao> pageParam = new PageParam<>(request); return JsonResult.ok().setData(gonggaoService.list(pageParam.getOrderWrapper())); //List<Gonggao> records = gonggaoService.listAll(pageParam.getNoPageParam()); // 使用关联查询 //return JsonResult.ok().setData(pageParam.sortRecords(records)); } /** * 根据id查询 */ @ResponseBody @RequestMapping("/get") public JsonResult get(Integer id) { return JsonResult.ok().setData(gonggaoService.getById(id)); // 使用关联查询 //PageParam<Gonggao> pageParam = new PageParam<>(); //pageParam.put("id", id); //List<Gonggao> records = gonggaoService.listAll(pageParam.getNoPageParam()); //return JsonResult.ok().setData(pageParam.getOne(records)); } /** * 添加 */ @ResponseBody @RequestMapping("/save") public JsonResult save(Gonggao gonggao) { if (gonggaoService.save(gonggao)) { return JsonResult.ok("添加成功"); } return JsonResult.error("添加失败"); } /** * 修改 */ @ResponseBody @RequestMapping("/update") public JsonResult update(Gonggao gonggao) { if (gonggaoService.updateById(gonggao)) { return JsonResult.ok("修改成功"); } return JsonResult.error("修改失败"); } /** * 删除 */ @ResponseBody @RequestMapping("/remove") public JsonResult remove(Integer id) { if (gonggaoService.removeById(id)) { return JsonResult.ok("删除成功"); } return JsonResult.error("删除失败"); } /** * 批量添加 */ @ResponseBody @RequestMapping("/saveBatch") public JsonResult saveBatch(@RequestBody List<Gonggao> list) { if (gonggaoService.saveBatch(list)) { return JsonResult.ok("添加成功"); } return JsonResult.error("添加失败"); } /** * 批量修改 */ @ResponseBody @RequestMapping("/updateBatch") public JsonResult updateBatch(@RequestBody BatchParam<Gonggao> batchParam) { if (batchParam.update(gonggaoService, "id")) { return JsonResult.ok("修改成功"); } return JsonResult.error("修改失败"); }
@Controller @RequestMapping("/caiwu/gudingzhichu") public class GudingzhichuController extends BaseController { @Autowired private GudingzhichuService gudingzhichuService; @Autowired private GudingzhichuleixService gudingzhichuleixService; private List<String> shijianleixing=new ArrayList<>(); @RequestMapping() public String view(Model model) { model.addAttribute("leixing",gudingzhichuleixService.list()); //每周 每月 每年 一直 shijianleixing.add("每周"); shijianleixing.add("每月"); shijianleixing.add("每年"); shijianleixing.add("一直"); model.addAttribute("shijianleixing", shijianleixing); return "caiwu/gudingzhichu.html"; } /** * 分页查询 */ @ResponseBody @RequestMapping("/page") public PageResult<Gudingzhichu> page(HttpServletRequest request) { PageParam<Gudingzhichu> pageParam = new PageParam<>(request); return new PageResult<>(gudingzhichuService.page(pageParam, pageParam.getWrapper()).getRecords(), pageParam.getTotal()); //return gudingzhichuService.listPage(pageParam); // 使用关联查询 } /** * 查询全部 */ @ResponseBody @RequestMapping("/list") public JsonResult list(HttpServletRequest request) { PageParam<Gudingzhichu> pageParam = new PageParam<>(request); return JsonResult.ok().setData(gudingzhichuService.list(pageParam.getOrderWrapper())); //List<Gudingzhichu> records = gudingzhichuService.listAll(pageParam.getNoPageParam()); // 使用关联查询 //return JsonResult.ok().setData(pageParam.sortRecords(records)); } /** * 根据id查询 */ @ResponseBody @RequestMapping("/get") public JsonResult get(Integer id) { return JsonResult.ok().setData(gudingzhichuService.getById(id)); // 使用关联查询 //PageParam<Gudingzhichu> pageParam = new PageParam<>(); //pageParam.put("id", id); //List<Gudingzhichu> records = gudingzhichuService.listAll(pageParam.getNoPageParam()); //return JsonResult.ok().setData(pageParam.getOne(records)); } /** * 添加 */ @ResponseBody @RequestMapping("/save") public JsonResult save(Gudingzhichu gudingzhichu) { if (gudingzhichuService.save(gudingzhichu)) { return JsonResult.ok("添加成功"); } return JsonResult.error("添加失败"); } /** * 修改 */ @ResponseBody @RequestMapping("/update") public JsonResult update(Gudingzhichu gudingzhichu) { if (gudingzhichuService.updateById(gudingzhichu)) { return JsonResult.ok("修改成功"); } return JsonResult.error("修改失败"); }
关于“怎么使用Android快速实现一个财务APP程序”这篇文章的内容就介绍到这里,感谢各位的阅读!相信大家对“怎么使用Android快速实现一个财务APP程序”知识都有一定的了解,大家如果还想学习更多知识,欢迎关注亿速云行业资讯频道。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。