Can AI Prompts Supercharge Your Backend, Frontend, and Big Data Projects?
This article showcases a series of real‑world development cases—from implementing a guided inventory task in a Java backend and generating Vue rule code, to writing unit tests, analyzing report data, converting SQL to Hive, debugging startup errors, publishing Maven APIs, optimizing slow SQL queries, and resolving MySQL deadlocks—demonstrating how AI‑driven prompts can accelerate coding, testing, and troubleshooting across multiple domains.
The author reflects on the rapid diffusion of large language models like ChatGPT and DeepSeek into everyday development, noting that AI tools can both enrich knowledge and boost productivity.
Case 1: Backend Function – Guided Replenishment Task
Using the existing CountTaskController#drawGuidedCountTask as a reference, the task is to create a similar method drawGuidedReplenishTask in ReplenishTaskController. The new method requires new request/response DTOs ( GuidedReplenishDrawRequest, GuidedReplenishDrawResponse), a service method in ReplenishTaskAppService, and mapper conversions between DTOs and domain objects. Detailed constraints include matching @MenuPermission codes, handling task status checks, and adding repository methods for querying task details and refreshing user information.
Case 2: Vue Frontend – Auto‑Generate Rule for Inspection Days
The prompt asks for a Vue component that adds a checkbox labeled “超过待检天数” when the product level starts with 3. Selecting the checkbox should remove the required constraint on the “保质期状态” field and store the boolean inspectionDaysRestrictEnabled as true or false on save.
Case 3: Unit Test Generation
A simple unit‑test scaffold is requested for the newly created backend method, ensuring proper handling of request validation and service interaction.
Case 4: Report Analysis
The AI is prompted to extract duplicate ProductID values from a large XML stock report and count their occurrences, demonstrating data‑driven analysis capabilities.
Case 5: Big Data Script Generation
A Hive query is required to retrieve yesterday’s partitioned data from fdm_wms_stock_st_stock__new using dt = sysdate(-1). The AI converts the original MySQL‑style query into a Hive‑compatible statement.
Case 6: Project Startup Error Diagnosis
The startup failure of ApiProviderApplication#main is traced to a java.lang.ExceptionInInitializerError caused by an unknown TypeTag. The analysis suggests checking JDK compatibility, annotation processing, and classpath conflicts.
Case 7: Maven API Publication
Instructions are provided to package and deploy the wms-stock-api using mvn package and mvn deploy, including repository configuration and artifact signing.
Case 8: Slow SQL Analysis and Optimization
The provided slow‑query plan is examined; recommendations include adding indexes on warehouse_no, filtering early on deleted, reducing the use of JSON extraction in the WHERE clause, and rewriting the GROUP BY to avoid full table scans.
Case 9: MySQL Deadlock Investigation
The latest deadlock log shows two competing transactions updating the same primary key in st_stock. The solution advises using row‑level locking order, reducing lock scope, and employing optimistic concurrency (e.g., version columns) to prevent repeatable deadlocks.
Case 10: Bug Fix Illustration
Additional screenshots demonstrate a typical bug‑fix workflow, though the specific code changes are omitted for brevity.
Future Outlook
The author notes the growing maturity of AI products in daily life and predicts continued integration of AI assistants into software engineering, encouraging readers to explore open‑source tools like JoyCode Agent ( https://github.com/jd-opensource/joycode-agent).
JD Tech
Official JD technology sharing platform. All the cutting‑edge JD tech, innovative insights, and open‑source solutions you’re looking for, all in one place.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
