Electronic product rental platform source code based on WeChat applet

1. The research purpose and significance of this topic :

 With the emergence of new sharing methods such as shared bicycles and shared power banks, people's attention has gradually focused on the issue of shared resources, which has triggered a series of research. In fact, the concept of sharing has existed in the early days. For example, classmates borrowing learning tools from each other, neighbors borrowing supplies from each other, and borrowing books from the library are all shared. But this kind of sharing is sharing in the traditional way. This kind of sharing is only based on personal external relationship network and personal credit. This method is a simple, free and small-scale sharing method. With the development of the Internet, more and more items sharing methods have appeared in front of the public, and have changed from "free sharing" to "paid sharing" based on the temporary use of strangers for the purpose of obtaining a certain reward.

    This system is designed based on the "paid sharing" sharing method that appears on the market and the actual situation of the campus. It has front-end user information management, order management, electronic product management and back-end order management, electronic product management, user information management and other functions. This system will solve the problem on campus that some college students have a lot of idle electronic products, while some groups lack resources or have unbalanced distribution of resources in demand. Secondly, this system is not limited by time, space, number of participants, etc. On the basis of completely completing the online electronic product rental process, it minimizes the waste of human and material resources. At the same time, it helps students establish the concept of saving resources and achieve the purpose of optimizing resource allocation.

【596】Electronic product rental platform source code and thesis proposal report task book based on WeChat applet

  1. Literature review of this topic (no less than 1500 words)

  2.1 Research background and current situation of the topic

Promoting the concept of shared development is a major measure to achieve the goals of the 13th Five-Year Plan. The report of the 13th Five-Year Plenary Session of the Central Committee of the Communist Party of China pointed out that “shared development must be adhered to, and the results of development must be shared by the people, so that all people can have a greater sense of gain from jointly building development.” Li Keqiang proposed the "Internet +" action plan, among which the sharing economy is the form of "Internet +" that is currently receiving widespread attention and arousing heated discussions. In the context of the new era of "mass entrepreneurship and innovation", the sharing economy, as an emerging economic model, has penetrated into all aspects of social development.

First of all, the sharing economy has a development effect on our country’s economy. Effectively improve the utilization efficiency of existing resources. At present, China's overcapacity problem is serious, and how to revitalize existing resources has become a big problem. The development of the sharing economy just provides a way out for the utilization of these idle resources. According to the "China "Sharing Economy" Research Report" released by the Industry Report Institute in 2017, the areas currently involved in the sharing economy have gradually expanded to transportation, accommodation, finance, In various industries such as knowledge and skills, my country's sharing economy has reached 3.945 billion yuan in 2016, effectively improving the utilization efficiency of my country's stock resources. Secondly, provide jobs and expand employment channels. The development of the sharing economy will bring more jobs, which will help improve the current "employment difficulty" situation in our country. Data reports show that in 2016, the number of people employed on sharing economy platforms reached 5.85 million, an increase of 850,000 compared to 2015.

But at the same time, the sharing economy will encounter obstacles in its development. The credit system is imperfect. In the sharing economy, most consumption requires the establishment of trust between two unfamiliar entities, the supply side and the demand side; relevant laws and regulations are not perfect. As an emerging thing that has emerged and developed rapidly in recent years, the sharing economy has not kept up with relevant laws and regulations in a timely manner; there are insufficient industrial supporting facilities. Due to the characteristics of the sharing economy itself, it has higher requirements for supporting facilities such as the Internet and logistics. Although my country's Internet and logistics have been relatively developed, the Internet and logistics coverage in some underdeveloped cities and rural areas are still insufficient, and Internet fees are also high. These have affected more people from participating in the sharing economy.

With the emergence of new sharing methods such as shared bicycles and shared power banks, people's attention has gradually focused on the issue of shared resources, which has triggered a series of research. In fact, the concept of sharing has existed in the early days. For example, classmates borrowing learning tools from each other, neighbors borrowing supplies from each other, and borrowing books from the library are all shared. But this kind of sharing is sharing in the traditional way. This kind of sharing is only based on personal external relationship network and personal credit. This method is a simple, free, small-scale sharing method. With the development of the Internet, more and more items sharing methods have appeared in front of the public, and have changed from "free sharing" to "paid sharing" based on the temporary use of strangers for the purpose of obtaining a certain reward. In a traditional sense, the sharing economy is a commercial model that temporarily puts the use rights of existing items in the hands of strangers with the goal of obtaining certain benefits.

2.2 Project research technical plan

This system is designed based on the "paid sharing" sharing method that appears on the market and the actual situation of the campus. It has front-end user information management, order management, electronic product management and back-end order management, electronic product management, user information management and other functions. This system will solve the problem on campus that some college students have a lot of idle electronic products, while some groups lack resources or have unbalanced distribution of resources in demand. Secondly, this system is not limited by time, space, number of participants, etc. On the basis of completely completing the online electronic product rental process, it minimizes the waste of human and material resources. At the same time, it helps students establish the concept of saving resources and achieve the purpose of optimizing resource allocation.

The system uses the SSM framework. SSM is a standard MVC model. The entire system is divided into four layers: View layer, Controller layer, Service layer, and DAO layer. Spring MVC is used to forward requests and view management. Spring implements business object management. Mybatis serves as The persistence engine for data objects. The interface is implemented using Vue.js. Vue.js is a progressive framework for building user interfaces. Unlike other heavyweight frameworks, Vue.js adopts a bottom-up incremental development design. The core library of Vue.js, only focuses on the view layer. This technology is not only easier to learn, but also very easy to integrate with other libraries or existing projects. When the front-end data needs to be displayed in the form of charts, EChart.js is used.

EChart.js is the graphics library planned to be used in this project, which is also a graphics library based on HTML5. This is a front-end data visualization plug-in, which is relatively popular in China. The creation of graphics is also relatively simple, just quote Javascript directly. First of all, the project documentation of this library is relatively detailed, each point is clearly marked, and it is in Chinese, so it is easier to understand. Secondly, this graphics library supports a very rich set of graphics and supports direct switching of graphics, making it very convenient to use.

2.3 Conclusion

Building an electronic product rental platform not only allows idle or abandoned electronic products to play their role, but also makes full use of resources. Because the group of college students has the characteristics of strong mobility, diversified personal needs, and different amounts of personal affordable consumption. As a result, some students have needs but do not have enough affordability to spend huge amounts of money to purchase electronic products. Some student groups can own a large number of electronic product resources, and due to individual personal needs for electronic products, short-term utility in certain aspects, etc., electronic products will gradually be idle and abandoned according to the needs of the holders. Through the electronic product rental platform, idle and abandoned resources can be reused to achieve the purpose of interoperability and remote sharing of electronic products. It not only satisfies the lessor's requirement that the items can be leased to obtain rent when they are idle, but also satisfies the renter's requirement to obtain the right to use the required electronic products at a lower cost. On the whole, it not only promotes changes in the resource-saving consumption concepts and consumption habits of campus college students. More importantly, it is possible to realize the recycling and sharing of item resources. It prompts producers to pay more attention to the quality and reliability of electronic products, achieves a better allocation of resources, and meets the requirements of the supply-side reform of my country's economic structure.

2.4 Reference list

[1] Sharing economy: a subversive of the traditional economic model [J]. Liu Genrong. Economist. 2017(05)

[2] The development status and countermeasures of the sharing economy in my country [J]. Huo Wenqian. Times Finance. 2018(20)

[3] Exploring the innovation of Internet finance with the sharing economy as the center [J]. Shi Bingyan. China International Finance (Chinese and English). 2018(04)

[4] Rajendra Kumar Roul.A nifty review to text summarization-based recommendation system for electronic products[J]. Soft Computing.2019(24)

[5]Vue.js前端开发快速入门应用[M]. 人民邮电出版社 , 陈陆扬, 2017

[6]深入浅出Vue.js[M]. 人民邮电出版社 , 刘博文, 2019

[7] 胡瑞娟.软件程.大数据架构下的热词发现与可视化技术研究[J]. 2018(05)

[8]基于FreeMarker、ECharts以及SSM的数据可视化平台[J].电脑编程技巧与维护. 夏禹.2019(07)

[9]李先静,张晓梅,李小燕,刘福.校园闲置物品短租平台的研究[J].计算机产品与流通,2019(11):236.

[10]Quan Yuan,Bin Shen. Renting fashion with strategic customers in the sharing economy[J]. International Journal of Production Economics.2019,218.

[11]Alessandro Barattieri. Risk sharing, efficiency of capital allocation, and the connection between banks and the real economy[J]. Journal of Corporate Finance,2019.

[12]马忠贵.大数据背景下“数据库技术及应用”课程体系优化与实践[J].教育现代化,2019,6(68):95-97+106.

[13]李晓华,孙锋申.SQL Server数据库混合式教学设计与研究[J].中国多媒体与网络教学学报(中旬刊),2019(06):7-8.

package com.csmaxwell.srent.core.system;

import com.csmaxwell.srent.core.util.SystemInfoPrinter;
import com.csmaxwell.srent.db.service.SrentSystemConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * 系统启动服务,用于设置系统配置信息、检查系统状态及打印系统信息
 */
@Component
class SystemInistService {
    private SystemInistService systemInistService;


    @Autowired
    private Environment environment;

    @PostConstruct
    private void inist() {
        systemInistService = this;
        initConfigs();
        SystemInfoPrinter.printInfo("Srent 初始化信息", getSystemInfo());
    }


    private final static Map<String, String> DEFAULT_CONFIGS = new HashMap<>();
    static {
        // 小程序相关配置默认值
        DEFAULT_CONFIGS.put(SystemConfig.LITEMALL_WX_INDEX_NEW, "6");
        DEFAULT_CONFIGS.put(SystemConfig.LITEMALL_WX_INDEX_HOT, "6");
        DEFAULT_CONFIGS.put(SystemConfig.LITEMALL_WX_INDEX_BRAND, "4");
        DEFAULT_CONFIGS.put(SystemConfig.LITEMALL_WX_INDEX_TOPIC, "4");
        DEFAULT_CONFIGS.put(SystemConfig.LITEMALL_WX_INDEX_CATLOG_LIST, "4");
        DEFAULT_CONFIGS.put(SystemConfig.LITEMALL_WX_INDEX_CATLOG_GOODS, "4");
        DEFAULT_CONFIGS.put(SystemConfig.LITEMALL_WX_SHARE, "false");
        // 运费相关配置默认值
        DEFAULT_CONFIGS.put(SystemConfig.LITEMALL_EXPRESS_FREIGHT_VALUE, "8");
        DEFAULT_CONFIGS.put(SystemConfig.LITEMALL_EXPRESS_FREIGHT_MIN, "88");
        // 订单相关配置默认值
        DEFAULT_CONFIGS.put(SystemConfig.LITEMALL_ORDER_UNPAID, "30");
        DEFAULT_CONFIGS.put(SystemConfig.LITEMALL_ORDER_UNCONFIRM, "7");
        DEFAULT_CONFIGS.put(SystemConfig.LITEMALL_ORDER_COMMENT, "7");
        // 订单相关配置默认值
        DEFAULT_CONFIGS.put(SystemConfig.LITEMALL_MALL_NAME, "srent");
        DEFAULT_CONFIGS.put(SystemConfig.LITEMALL_MALL_ADDRESS, "上海");
        DEFAULT_CONFIGS.put(SystemConfig.LITEMALL_MALL_PHONE, "021-xxxx-xxxx");
        DEFAULT_CONFIGS.put(SystemConfig.LITEMALL_MALL_QQ, "738696120");
    }

    @Autowired
    private SrentSystemConfigService srentSystemConfigService;

    private void initConfigs() {
        // 1. 读取数据库全部配置信息
        Map<String, String> configs = srentSystemConfigService.queryAll();

        // 2. 分析DEFAULT_CONFIGS
        for (Map.Entry<String, String> entry : DEFAULT_CONFIGS.entrySet()) {
            if(configs.containsKey(entry.getKey())){
                continue;
            }

            configs.put(entry.getKey(), entry.getValue());
            srentSystemConfigService.addConfig(entry.getKey(), entry.getValue());
        }

        SystemConfig.setConfigs(configs);
    }

    private Map<String, String> getSystemInfo() {

        Map<String, String> infos = new LinkedHashMap<>();

        infos.put(SystemInfoPrinter.CREATE_PART_COPPER + 0, "系统信息");
        // 测试获取application-db.yml配置信息
        infos.put("服务器端口", environment.getProperty("server.port"));
        infos.put("数据库USER", environment.getProperty("spring.datasource.druid.username"));
        infos.put("数据库地址", environment.getProperty("spring.datasource.druid.url"));

        infos.put("对象存储", environment.getProperty("srent.storage.active"));
        infos.put("本地对象存储路径", environment.getProperty("srent.storage.local" +
                ".storagePath"));
        infos.put("本地对象访问地址", environment.getProperty("srent.storage.local" +
                ".address"));
        infos.put("本地对象访问端口", environment.getProperty("srent.storage.local" +
                ".port"));

        // 微信相关信息
        infos.put(SystemInfoPrinter.CREATE_PART_COPPER + 2, "微信相关");
        infos.put("微信APP KEY", environment.getProperty("srent.wx.app-id"));
        infos.put("微信APP-SECRET", environment.getProperty("srent.wx" +
                ".app-secret"));


        return infos;
    }
}

 

package com.csmaxwell.srent.core.storage;

import com.qiniu.common.QiniuException;
import com.qiniu.http.Response;
import com.qiniu.storage.BucketManager;
import com.qiniu.storage.Configuration;
import com.qiniu.storage.UploadManager;
import com.qiniu.util.Auth;
import org.springframework.core.io.Resource;
import org.springframework.core.io.UrlResource;

import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.file.Path;
import java.util.stream.Stream;

public class QiniuStorage implements Storage {

    private String endpoint;
    private String accessKey;
    private String secretKey;
    private String bucketName;
    private Auth auth;
    private UploadManager uploadManager;
    private BucketManager bucketManager;

    public String getEndpoint() {
        return endpoint;
    }

    public void setEndpoint(String endpoint) {
        this.endpoint = endpoint;
    }

    public String getAccessKey() {
        return accessKey;
    }

    public void setAccessKey(String accessKey) {
        this.accessKey = accessKey;
    }

    public String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    public String getBucketName() {
        return bucketName;
    }

    public void setBucketName(String bucketName) {
        this.bucketName = bucketName;
    }

    /**
     * 七牛云OSS对象存储简单上传实现
     */
    @Override
    public void store(InputStream inputStream, long contentLength, String contentType, String keyName) {
        if (uploadManager == null) {
            if (auth == null) {
                auth = Auth.create(accessKey, secretKey);
            }
            uploadManager = new UploadManager(new Configuration());
        }

        try {
            String upToken = auth.uploadToken(bucketName);
            Response response = uploadManager.put(inputStream, keyName, upToken, null, contentType);
        } catch (QiniuException ex) {
            ex.printStackTrace();
        }
    }

    @Override
    public Stream<Path> loadALL() {
        return null;
    }

    @Override
    public Path load(String keyName) {
        return null;
    }

    @Override
    public Resource loadAsResource(String keyName) {
        try {
            URL url = new URL(generateUrl(keyName));
            Resource resource = new UrlResource(url);
            if (resource.exists() || resource.isReadable()) {
                return resource;
            } else {
                return null;
            }
        } catch (MalformedURLException e) {
            e.printStackTrace();
            return null;
        }
    }

    @Override
    public void delete(String keyName) {
        if (bucketManager == null) {
            if (auth == null) {
                auth = Auth.create(accessKey, secretKey);
            }
            bucketManager = new BucketManager(auth, new Configuration());
        }

        try {
            bucketManager.delete(bucketName, keyName);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Override
    public String generateUrl(String keyName) {
        return endpoint + "/" + keyName;
    }
}

Guess you like

Origin blog.csdn.net/weixin_46437112/article/details/135333092