“This is my 25th day of participating in the First Challenge 2022. For more details: First Challenge 2022

Introduction:

With the continuous development of domestic economic situation, Chinese Internet has entered a rare peak development period, which makes Chinese and foreign capitalists turn to the Internet market one after another. However, the unreasonable structure of many management fields, the shortage of personnel and the increase of management demands make more people have the awareness of Internet management.

In today’s highly developed information, information management reform has become a more extensive and comprehensive trend. “Online flower ordering mall” is based on Mysql database, on the basis of Java program design. In order to ensure the sustainable development of China’s economy, the information age is increasingly updated and booming. At the same time, along with the rapid development of information society, order flowers online mall is facing more and more information, so it is difficult to get their demand for efficient information, how to use the convenient and quick way to make inquirers in the vast ocean information query, storage, management and sharing information effectively, to our work and life has important practical significance. Therefore, the technical circles at home and abroad have conducted in-depth and extensive research on this, and a new research field — online flower ordering mall was born.

Functional design:

Development tools: IDEA 2021.3, Navicat for mysql, Postman.

Development language: Java, JDk1.8, mysql5

Hardware environment: Win 10 operating system, Google Browser, etc.

Main technologies: SpringMVC, Mybatis, HTML CSS JSP, mysql, etc

The main function of the flower mall system is designed to realize the administrator; Personal center, system announcement management, user management, flower type management, fresh commodity information management, order evaluation management, fresh forum management, system management, order management, users; Personal center, order evaluation management, my collection management, order management, front page; Home page, product information, forum information, my, jump to the background, shopping cart customer service and other information management functions.

Function screenshots:View the full version

Common user login registration:

Home page main functions: product information, forum information, my, jump to the background, shopping cart customer service and other information management functions

Product details: add to shopping cart, modify quantity, buy and collect goods immediately

Product review communication module

Added a series of forum post functions: ordinary users can publish, can communicate and discuss the post, etc

Post details data view, you can comment at the bottom

In my personal center you can view my posts, my orders, my address changes, my favorites module and my personal information module

Shopping cart module: to select the delivery address information

My order module:

My favorite module:

Background center for common users:

Order information Management:

Main functions of the backend:

User management:

Product Series Management:

Commodity Information Management:

Modification of product details:

Commodity evaluation management:

Forum Management:

Home page Rotation map management:

Order information Management:

Code implementation:


/** * Order module * back-end interface *@author  admin
 * @email  [email protected]
 * @dateThe 2022-02-07 14:37:22 * /
@RestController
@RequestMapping("/orders")
public class OrdersController {
    @Autowired
    private OrdersService ordersService;
    


    /** * Back-end list */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,OrdersEntity orders, HttpServletRequest request){
    	if(! request.getSession().getAttribute("role").toString().equals("Administrator")) {
    		orders.setUserid((Long)request.getSession().getAttribute("userId"));
    	}

        EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();
    	PageUtils page = ordersService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, orders), params), params));
		request.setAttribute("data", page);
        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,OrdersEntity orders, HttpServletRequest request){
        EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();
    	PageUtils page = ordersService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, orders), params), params));
		request.setAttribute("data", page);
        return R.ok().put("data", page);
    }

	/** * list */
    @RequestMapping("/lists")
    public R list( OrdersEntity orders){
       	EntityWrapper<OrdersEntity> ew = new EntityWrapper<OrdersEntity>();
      	ew.allEq(MPUtil.allEQMapPre( orders, "orders")); 
        return R.ok().put("data", ordersService.selectListView(ew));
    }

	 /** * query */
    @RequestMapping("/query")
    public R query(OrdersEntity orders){
        EntityWrapper< OrdersEntity> ew = new EntityWrapper< OrdersEntity>();
 		ew.allEq(MPUtil.allEQMapPre( orders, "orders")); 
		OrdersView ordersView =  ordersService.selectView(ew);
		return R.ok("Order query succeeded").put("data", ordersView);
    }
	
    /** ** */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        OrdersEntity orders = ordersService.selectById(id);
        return R.ok().put("data", orders);
    }

    /** * Front-end details */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        OrdersEntity orders = ordersService.selectById(id);
        return R.ok().put("data", orders);
    }
    



    /** * The backend saves */
    @RequestMapping("/save")
    public R save(@RequestBody OrdersEntity orders, HttpServletRequest request){
    	orders.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(orders);
    	orders.setUserid((Long)request.getSession().getAttribute("userId"));

        ordersService.insert(orders);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody OrdersEntity orders, HttpServletRequest request){
    	orders.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(orders);

        ordersService.insert(orders);
        return R.ok();
    }

    /** * modify */
    @RequestMapping("/update")
    public R update(@RequestBody OrdersEntity orders, HttpServletRequest request){
        //ValidatorUtils.validateEntity(orders);
        ordersService.updateById(orders);// All updates
        return R.ok();
    }
    

    /** * delete */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        ordersService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /** * remind interface */
	@RequestMapping("/remind/{columnName}/{type}")
	public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		map.put("column", columnName);
		map.put("type", type);
		
		if(type.equals("2")) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Calendar c = Calendar.getInstance();
			Date remindStartDate = null;
			Date remindEndDate = null;
			if(map.get("remindstart")! =null) {
				Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
				c.setTime(new Date()); 
				c.add(Calendar.DAY_OF_MONTH,remindStart);
				remindStartDate = c.getTime();
				map.put("remindstart", sdf.format(remindStartDate));
			}
			if(map.get("remindend")! =null) {
				Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
				c.setTime(new Date());
				c.add(Calendar.DAY_OF_MONTH,remindEnd);
				remindEndDate = c.getTime();
				map.put("remindend", sdf.format(remindEndDate));
			}
		}
		
		Wrapper<OrdersEntity> wrapper = new EntityWrapper<OrdersEntity>();
		if(map.get("remindstart")! =null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")! =null) {
			wrapper.le(columnName, map.get("remindend"));
		}
		if(! request.getSession().getAttribute("role").toString().equals("Administrator")) {
    		wrapper.eq("userid", (Long)request.getSession().getAttribute("userId"));
    	}


		int count = ordersService.selectCount(wrapper);
		return R.ok().put("count", count); }}Copy the code

@Service("ordersService")
public class OrdersServiceImpl extends ServiceImpl<OrdersDao.OrdersEntity> implements OrdersService {


    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<OrdersEntity> page = this.selectPage(
                new Query<OrdersEntity>(params).getPage(),
                new EntityWrapper<OrdersEntity>()
        );
        return new PageUtils(page);
    }
    
    @Override
	public PageUtils queryPage(Map<String, Object> params, Wrapper<OrdersEntity> wrapper) {
		  Page<OrdersView> page =new Query<OrdersView>(params).getPage();
	        page.setRecords(baseMapper.selectListView(page,wrapper));
	    	PageUtils pageUtil = new PageUtils(page);
	    	return pageUtil;
 	}
    
    @Override
	public List<OrdersVO> selectListVO(Wrapper<OrdersEntity> wrapper) {
 		return baseMapper.selectListVO(wrapper);
	}
	
	@Override
	public OrdersVO selectVO(Wrapper<OrdersEntity> wrapper) {
 		return baseMapper.selectVO(wrapper);
	}
	
	@Override
	public List<OrdersView> selectListView(Wrapper<OrdersEntity> wrapper) {
		return baseMapper.selectListView(wrapper);
	}

	@Override
	public OrdersView selectView(Wrapper<OrdersEntity> wrapper) {
		returnbaseMapper.selectView(wrapper); }}Copy the code

Thesis Report:

Get the source code:

Clocked articles updated 201/365 days

You can like, collect, pay attention to, comment on me, there is a need to complete the source and I contact yo ~!