基于java+sql+servlet的金融借贷管理系统mysql数据源

news2025/7/19 4:21:52

基于java+sql+servlet的金融借贷管理系统

一套基于基于JavaWeb实现的金融借贷系统 或 P2P金融管理系统 或 小额贷款系统,详细介绍了金融借贷系统的实现,包括:1.项目介绍2.环境搭建3.系统功能4.技术实现5.项目运行6.功能演示以通俗易懂的方式,手把手的带你从零开始运行本套金融借贷系统,该项目附带全部源码可作为毕设使用。

系统功能​ 系统分为前台主页和后台管理:前台主页

融资产品查询、产品详情、申请贷款、每日新闻查询、新闻详情

后台管理登陆、贷款申请查询、贷款申请详情、融资产品管理、产品类型管理、贷款周期管理、新闻管理、企业管理、修改密码、注销等

包含源程序,数据库脚本。代码和数据库脚本都有详细注释。

课题设计仅供参考学习使用,可以在此基础上进行扩展完善

二、技术实现
1.后台框架:Servlet、JDBC、FileUpload

2.UI界面:BootStrap、jQuery、Ajax、artTemplate

3.数据库:MySQL运行环境:JDK 8
Eclipse
Tomcat 7.0
MySQL 5.5


开发环境:
Eclipse ,MYSQL,JDK1.8,Tomcat 8.5
涉及技术点:
MVC模式、HTML、log4j、druid、Bootstrap、
Semantic UI、Thymeleaf、JavaScript、CSS、JQUERY、Ajax等
适合学习J2EE的一段时间的熟手,代码思路清晰,注解详细,数据库用的是mysql5.1,服务器用的tomcat8.5,JDK版本1.8. 编程软件Eclispe J2EE版本。是典型MVC架构,
主要功能:发布贷款信息


申请名单


我的借贷


我的理财


修改资料


修改密码


借贷平台


申请贷款

package com.example.huochai.activity;

import java.util.Timer;
import java.util.TimerTask;

import com.example.huochai.R;
import com.example.huochai.fixedvalue.SString;
import com.example.huochai.music.Music;
import com.example.huochai.record.Set;
import com.example.huochai.view.ExView;
import com.example.huochai.view.NumberSeekBar;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.ActivityInfo;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.util.Log;
import android.view.GestureDetector;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.view.animation.Animation;
import android.view.animation.AnimationSet;
import android.view.animation.ScaleAnimation;
import android.view.animation.Animation.AnimationListener;
import android.widget.Button;
import android.widget.TextView;

public class MatchActivity extends Activity {

    public static int width = 0;
     Music music;
    static boolean destory;
    boolean isPause;
    private NumberSeekBar pb;
    private GestureDetector gestureScanner;
    Button resert,pause,home;
    ExView exView;
    private SharedPreferences mPref;
    int max=1000;
    int max1;
    int count=0;
    int stopCount=0;
    TextView hint;
    int SoundInt=0;
     @SuppressLint("HandlerLeak")
        Handler handler = new Handler() {
            @Override
            public void handleMessage(Message msg) {
                switch (msg.what) {
                    case 0:
                    startActivity(new Intent(MatchActivity.this,EndActivity.class));
                    handler.removeMessages(msg.what);
                    finish();
                    break;
                    case 1:
                        if(pb.getProgress()<pb.getMax()&&destory==false){
                        pb.setProgress(pb.getProgress()+1);
                        System.out.print(destory);
                        System.out.println("66666");
                        }
                    //    mpref.edit().putInt("time", pb.getProgress()).commit();
                        break;
                    case 2:
                        System.out.print(destory);
                        System.out.println(pb.getProgress());
                        //pb.setProgress(pb.getProgress());
                        break;
                }
            }
        };

    
        
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
        requestWindowFeature(Window.FEATURE_LEFT_ICON);
        WindowManager manager = getWindowManager();
        width = manager.getDefaultDisplay().getWidth();
        setContentView(R.layout.activity_main);
        
        isPause = false;
        destory = false;

        
        
        pb=(NumberSeekBar)findViewById(R.id.bar0);
        mPref=getSharedPreferences("settime", MODE_PRIVATE);
        String num=mPref.getString("settime", "");
        if(TextUtils.isEmpty(num))
        {
            pb.setMax(max);
        }
        else
        {
        max1=Integer.parseInt(num);
        pb.setMax(max1);
        }
        init();
        start();
        
        exView = (ExView)this.findViewById(R.id.exView);
        this.hint = (TextView)this.findViewById(R.id.textView);
        hint.setText(SString.getString(exView.getFigure().getIndex()));
        exView.setHint(hint);
        
        resert=(Button) findViewById(R.id.reset);
        resert.setOnClickListener(new OnClickListener() {
            
            @Override
            public void onClick(View v) {
                AnimationSet animationSet=new AnimationSet(true);
                ScaleAnimation scaleAnimation=new ScaleAnimation(0.8f,0.8f,0.8f,0.8f,
                        Animation.RELATIVE_TO_SELF,0.6f,
                        Animation.RELATIVE_TO_SELF,0.6f);
                
                 scaleAnimation.setAnimationListener(new AnimationListener() {
                        
                        @Override
                        public void onAnimationStart(Animation animation) {
                            // TODO Auto-generated method stub
                            }        
                        
                        @Override
                        public void onAnimationRepeat(Animation animation) {
                            // TODO Auto-generated method stub
                            
                        }
                        
                        @Override
                        public void onAnimationEnd(Animation animation) {
                            // TODO Auto-generated method stub
                            exView.reset();
                        }
                    });
                    
                //AssetsLoad.playSound(getApplicationContext(), AssetsLoad.dropSoundId);
                animationSet.addAnimation(scaleAnimation);
                animationSet.setFillBefore(true);
                animationSet.setDuration(100);
                resert.startAnimation(animationSet);
                
            }
        });
        
        
        pause=(Button) findViewById(R.id.stop);
        pause.setOnClickListener(new OnClickListener() {
            
            @Override
            public void onClick(View arg0) {
                // TODO Auto-generated method stub
                // TODO Auto-generated method stub
                 AnimationSet animationSet=new AnimationSet(true);
                    ScaleAnimation scaleAnimation=new ScaleAnimation(0.9f,0.9f,0.9f,0.9f,
                            Animation.RELATIVE_TO_SELF,0.6f,
                            Animation.RELATIVE_TO_SELF,0.6f);
                    
                    animationSet.addAnimation(scaleAnimation);
                    animationSet.setFillBefore(true);
                    animationSet.setDuration(100);
                    pause.startAnimation(animationSet);
                    if(stopCount%2==0)
                    {
                        pause.setBackgroundResource(R.drawable.play);
                        destory=true;
                        hint.setVisibility(View.INVISIBLE);
                        exView.setVisibility(View.INVISIBLE);
                    }
                    else{
                        pause.setBackgroundResource(R.drawable.pause);
                        destory=false;
                        hint.setVisibility(View.VISIBLE);
                        exView.setVisibility(View.VISIBLE);
                    }
                    stopCount++;
            }
        });
        
        
        home=(Button) findViewById(R.id.home);
        // 设置音乐
                music = new Music(this);
                if (Set.isMusic()) {
                    Music.play();
                    home.setBackgroundResource(R.drawable.sopen);
                    home.setOnClickListener(new OnClickListener() {
                        
                        @Override
                        public void onClick(View arg0) {
                            AnimationSet animationSet=new AnimationSet(true);
                            ScaleAnimation scaleAnimation=new ScaleAnimation(0.9f,0.9f,0.9f,0.9f,
                                    Animation.RELATIVE_TO_SELF,0.6f,
                                    Animation.RELATIVE_TO_SELF,0.6f);
                            
                            animationSet.addAnimation(scaleAnimation);
                            animationSet.setFillBefore(true);
                            animationSet.setDuration(100);
                            home.startAnimation(animationSet);
                            
                            Set.setnewMusic();
                            
                            
                            //声音的开启与关闭
                            if(SoundInt%2==0)
                            {
                                home.setBackgroundResource(R.drawable.sclose);
                                     //关闭音乐  
                                Music.pause();
                                Set.disMusic();
                            }
                            
                            else
                            {
                                home.setBackgroundResource(R.drawable.sopen);
                                    //开启音乐
                                Music.play();
                                Set.setnewMusic();
                            }
                            SoundInt++;
                        }
                    });
                }
                else
                {
                    //Music.pause();
                     home.setBackgroundResource(R.drawable.sclose);home.setOnClickListener(new OnClickListener() {
                            
                            @Override
                            public void onClick(View arg0) {
                                AnimationSet animationSet=new AnimationSet(true);
                                ScaleAnimation scaleAnimation=new ScaleAnimation(0.9f,0.9f,0.9f,0.9f,
                                        Animation.RELATIVE_TO_SELF,0.6f,
                                        Animation.RELATIVE_TO_SELF,0.6f);
                                
                                animationSet.addAnimation(scaleAnimation);
                                animationSet.setFillBefore(true);
                                animationSet.setDuration(100);
                                home.startAnimation(animationSet);
                                Set.isMusic();
                                Set.setnewMusic();
                                Music.play();
                                
                                //声音的开启与关闭
                                if(SoundInt%2==0)
                                {
                                    home.setBackgroundResource(R.drawable.sopen);
                                    //开启音乐
                                Music.play();
                                Set.setnewMusic();
                                }
                                
                                else
                                {
                                    home.setBackgroundResource(R.drawable.sclose);
                                     //关闭音乐  
                                Music.pause();
                                Set.disMusic();
                                    
                                }
                                SoundInt++;
                            }
                        });
                }
        
    }
    
    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        // TODO Auto-generated method stub
        if(keyCode==KeyEvent.KEYCODE_BACK)
        {
            destory=true;
            Music.pause();
            new AlertDialog.Builder(this)
            .setTitle("退出游戏")
            .setMessage("当前退出,游戏以失败结束...")
            // .setIcon(R.drawable.quit)
            .setPositiveButton("放弃",
                    new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog,
                                int whichButton) {
                            //System.out.println(handler.sendEmptyMessage(2));
                            startActivity(new Intent(MatchActivity.this,EndActivity.class));
                            MatchActivity.this.finish();
                        }
                    })
            .setNegativeButton("取消", new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int whichButton) {
                    // 取消按钮事件
                    destory=false;
                    Music.play();
                }
            }).show();
        }
        return super.onKeyDown(keyCode, event);
    }
    
    private void start() {
           pb.setTextSize(30);// 设置字体大小
            pb.setTextColor(Color.WHITE);// 颜色
            pb.setMyPadding(10, 10, 10, 10);// 设置padding 调用setpadding会无效
            pb.setImagePadding(0, 1);// 可以不设置
            pb.setTextPadding(0, 0);// 可以不设置
    }

    private void init() {
         TimerTask tt = new TimerTask() {
                @Override
                public void run() {
                //if(destory==false)
               // {
                   if(pb.getProgress()==max&&destory==false)
                    {
                        handler.sendEmptyMessage(0);
                        max=max+2;
                    }
                   
                    else if(pb.getProgress()<max &&destory==false)
                    {
                    handler.sendEmptyMessage(1);
                    }
               
                   else if(destory==true)
                    {
                    handler.sendEmptyMessage(2);
                    }
                  
                }
            };
            Timer timer = new Timer();
            timer.schedule(tt, 1000, 1000);
    }
    public void next(View v) {
        //exView.
        exView.next();
    }

    public void reset(View v) {
        exView.reset();
    }

    public void answer(View v) {
        exView.showAnswer();
    }
    
    
    
    
    protected void onDestroy() {
        // TODO Auto-generated method stub
        super.onDestroy();
        // 关闭音乐
        if (Set.isMusic() && music.isPlaying() && destory) {
            Music.stop();
        }

    }

    @Override
    public void onPause() {
        // TODO Auto-generated method stub
        Log.i("tag", "onPause");
        super.onPause();

        // 暂停音乐
        if (Set.isMusic() && (!destory) && music.isPlaying()) {
            Music.pause();
        }

        // 转到暂停界面
        if ((!isPause) && (!destory)) {
            Intent intent = new Intent();
        }

    }

    @Override
    protected void onResume() {
        // TODO Auto-generated method stub
        Log.i("tag", "onResume");
        super.onResume();
        isPause = false;
        // 重启音乐
        if (Set.isMusic() && (!music.isPlaying())) {
            Music.play();
        }
        }
}

 代码已经上传github,下载地址https://github.com/21503882/credit
————————————————
版权声明:本文为CSDN博主「qq346127357」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/QQ346127357/article/details/102522251基于SpringBoot+Redis的金融借贷管理系统mysql数据源

1.包含源程序,数据库脚本。代码和数据库脚本都有详细注释。
2.课题设计仅供参考学习使用,可以在此基础上进行扩展完善

 代码已经上传github,下载地址https://github.com/21503882/credit
开发环境:
Eclipse ,MYSQL,JDK1.8,Tomcat 8.5
涉及技术点:
MVC模式、SpringBoot、Mybatis、Redis、HTML、log4j、druid、Bootstrap、
Semantic UI、Thymeleaf、JavaScript、CSS、JQUERY、Ajax等
适合学习J2EE的一段时间的熟手,代码思路清晰,注解详细,数据库用的是mysql5.1,服务器用的tomcat8.5,JDK版本1.8. 编程软件Eclispe J2EE版本。是典型MVC架构,并且前后台分离
主要功能:发布贷款信息


申请名单


我的借贷


我的理财


修改资料


修改密码


借贷平台


申请贷款

package com.example.huochai.activity;

import java.util.Timer;
import java.util.TimerTask;

import com.example.huochai.R;
import com.example.huochai.fixedvalue.SString;
import com.example.huochai.music.Music;
import com.example.huochai.record.Set;
import com.example.huochai.view.ExView;
import com.example.huochai.view.NumberSeekBar;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.ActivityInfo;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.util.Log;
import android.view.GestureDetector;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.view.animation.Animation;
import android.view.animation.AnimationSet;
import android.view.animation.ScaleAnimation;
import android.view.animation.Animation.AnimationListener;
import android.widget.Button;
import android.widget.TextView;

public class MatchActivity extends Activity {

    public static int width = 0;
     Music music;
    static boolean destory;
    boolean isPause;
    private NumberSeekBar pb;
    private GestureDetector gestureScanner;
    Button resert,pause,home;
    ExView exView;
    private SharedPreferences mPref;
    int max=1000;
    int max1;
    int count=0;
    int stopCount=0;
    TextView hint;
    int SoundInt=0;
     @SuppressLint("HandlerLeak")
        Handler handler = new Handler() {
            @Override
            public void handleMessage(Message msg) {
                switch (msg.what) {
                    case 0:
                    startActivity(new Intent(MatchActivity.this,EndActivity.class));
                    handler.removeMessages(msg.what);
                    finish();
                    break;
                    case 1:
                        if(pb.getProgress()<pb.getMax()&&destory==false){
                        pb.setProgress(pb.getProgress()+1);
                        System.out.print(destory);
                        System.out.println("66666");
                        }
                    //    mpref.edit().putInt("time", pb.getProgress()).commit();
                        break;
                    case 2:
                        System.out.print(destory);
                        System.out.println(pb.getProgress());
                        //pb.setProgress(pb.getProgress());
                        break;
                }
            }
        };

    
        
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
        requestWindowFeature(Window.FEATURE_LEFT_ICON);
        WindowManager manager = getWindowManager();
        width = manager.getDefaultDisplay().getWidth();
        setContentView(R.layout.activity_main);
        
        isPause = false;
        destory = false;

        
        
        pb=(NumberSeekBar)findViewById(R.id.bar0);
        mPref=getSharedPreferences("settime", MODE_PRIVATE);
        String num=mPref.getString("settime", "");
        if(TextUtils.isEmpty(num))
        {
            pb.setMax(max);
        }
        else
        {
        max1=Integer.parseInt(num);
        pb.setMax(max1);
        }
        init();
        start();
        
        exView = (ExView)this.findViewById(R.id.exView);
        this.hint = (TextView)this.findViewById(R.id.textView);
        hint.setText(SString.getString(exView.getFigure().getIndex()));
        exView.setHint(hint);
        
        resert=(Button) findViewById(R.id.reset);
        resert.setOnClickListener(new OnClickListener() {
            
            @Override
            public void onClick(View v) {
                AnimationSet animationSet=new AnimationSet(true);
                ScaleAnimation scaleAnimation=new ScaleAnimation(0.8f,0.8f,0.8f,0.8f,
                        Animation.RELATIVE_TO_SELF,0.6f,
                        Animation.RELATIVE_TO_SELF,0.6f);
                
                 scaleAnimation.setAnimationListener(new AnimationListener() {
                        
                        @Override
                        public void onAnimationStart(Animation animation) {
                            // TODO Auto-generated method stub
                            }        
                        
                        @Override
                        public void onAnimationRepeat(Animation animation) {
                            // TODO Auto-generated method stub
                            
                        }
                        
                        @Override
                        public void onAnimationEnd(Animation animation) {
                            // TODO Auto-generated method stub
                            exView.reset();
                        }
                    });
                    
                //AssetsLoad.playSound(getApplicationContext(), AssetsLoad.dropSoundId);
                animationSet.addAnimation(scaleAnimation);
                animationSet.setFillBefore(true);
                animationSet.setDuration(100);
                resert.startAnimation(animationSet);
                
            }
        });
        
        
        pause=(Button) findViewById(R.id.stop);
        pause.setOnClickListener(new OnClickListener() {
            
            @Override
            public void onClick(View arg0) {
                // TODO Auto-generated method stub
                // TODO Auto-generated method stub
                 AnimationSet animationSet=new AnimationSet(true);
                    ScaleAnimation scaleAnimation=new ScaleAnimation(0.9f,0.9f,0.9f,0.9f,
                            Animation.RELATIVE_TO_SELF,0.6f,
                            Animation.RELATIVE_TO_SELF,0.6f);
                    
                    animationSet.addAnimation(scaleAnimation);
                    animationSet.setFillBefore(true);
                    animationSet.setDuration(100);
                    pause.startAnimation(animationSet);
                    if(stopCount%2==0)
                    {
                        pause.setBackgroundResource(R.drawable.play);
                        destory=true;
                        hint.setVisibility(View.INVISIBLE);
                        exView.setVisibility(View.INVISIBLE);
                    }
                    else{
                        pause.setBackgroundResource(R.drawable.pause);
                        destory=false;
                        hint.setVisibility(View.VISIBLE);
                        exView.setVisibility(View.VISIBLE);
                    }
                    stopCount++;
            }
        });
        
        
        home=(Button) findViewById(R.id.home);
        // 设置音乐
                music = new Music(this);
                if (Set.isMusic()) {
                    Music.play();
                    home.setBackgroundResource(R.drawable.sopen);
                    home.setOnClickListener(new OnClickListener() {
                        
                        @Override
                        public void onClick(View arg0) {
                            AnimationSet animationSet=new AnimationSet(true);
                            ScaleAnimation scaleAnimation=new ScaleAnimation(0.9f,0.9f,0.9f,0.9f,
                                    Animation.RELATIVE_TO_SELF,0.6f,
                                    Animation.RELATIVE_TO_SELF,0.6f);
                            
                            animationSet.addAnimation(scaleAnimation);
                            animationSet.setFillBefore(true);
                            animationSet.setDuration(100);
                            home.startAnimation(animationSet);
                            
                            Set.setnewMusic();
                            
                            
                            //声音的开启与关闭
                            if(SoundInt%2==0)
                            {
                                home.setBackgroundResource(R.drawable.sclose);
                                     //关闭音乐  
                                Music.pause();
                                Set.disMusic();
                            }
                            
                            else
                            {
                                home.setBackgroundResource(R.drawable.sopen);
                                    //开启音乐
                                Music.play();
                                Set.setnewMusic();
                            }
                            SoundInt++;
                        }
                    });
                }
                else
                {
                    //Music.pause();
                     home.setBackgroundResource(R.drawable.sclose);home.setOnClickListener(new OnClickListener() {
                            
                            @Override
                            public void onClick(View arg0) {
                                AnimationSet animationSet=new AnimationSet(true);
                                ScaleAnimation scaleAnimation=new ScaleAnimation(0.9f,0.9f,0.9f,0.9f,
                                        Animation.RELATIVE_TO_SELF,0.6f,
                                        Animation.RELATIVE_TO_SELF,0.6f);
                                
                                animationSet.addAnimation(scaleAnimation);
                                animationSet.setFillBefore(true);
                                animationSet.setDuration(100);
                                home.startAnimation(animationSet);
                                Set.isMusic();
                                Set.setnewMusic();
                                Music.play();
                                
                                //声音的开启与关闭
                                if(SoundInt%2==0)
                                {
                                    home.setBackgroundResource(R.drawable.sopen);
                                    //开启音乐
                                Music.play();
                                Set.setnewMusic();
                                }
                                
                                else
                                {
                                    home.setBackgroundResource(R.drawable.sclose);
                                     //关闭音乐  
                                Music.pause();
                                Set.disMusic();
                                    
                                }
                                SoundInt++;
                            }
                        });
                }
        
    }
    
    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        // TODO Auto-generated method stub
        if(keyCode==KeyEvent.KEYCODE_BACK)
        {
            destory=true;
            Music.pause();
            new AlertDialog.Builder(this)
            .setTitle("退出游戏")
            .setMessage("当前退出,游戏以失败结束...")
            // .setIcon(R.drawable.quit)
            .setPositiveButton("放弃",
                    new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog,
                                int whichButton) {
                            //System.out.println(handler.sendEmptyMessage(2));
                            startActivity(new Intent(MatchActivity.this,EndActivity.class));
                            MatchActivity.this.finish();
                        }
                    })
            .setNegativeButton("取消", new DialogInterface.OnClickListener() {
                public void onClick(DialogInterface dialog, int whichButton) {
                    // 取消按钮事件
                    destory=false;
                    Music.play();
                }
            }).show();
        }
        return super.onKeyDown(keyCode, event);
    }
    
    private void start() {
           pb.setTextSize(30);// 设置字体大小
            pb.setTextColor(Color.WHITE);// 颜色
            pb.setMyPadding(10, 10, 10, 10);// 设置padding 调用setpadding会无效
            pb.setImagePadding(0, 1);// 可以不设置
            pb.setTextPadding(0, 0);// 可以不设置
    }

    private void init() {
         TimerTask tt = new TimerTask() {
                @Override
                public void run() {
                //if(destory==false)
               // {
                   if(pb.getProgress()==max&&destory==false)
                    {
                        handler.sendEmptyMessage(0);
                        max=max+2;
                    }
                   
                    else if(pb.getProgress()<max &&destory==false)
                    {
                    handler.sendEmptyMessage(1);
                    }
               
                   else if(destory==true)
                    {
                    handler.sendEmptyMessage(2);
                    }
                  
                }
            };
            Timer timer = new Timer();
            timer.schedule(tt, 1000, 1000);
    }
    public void next(View v) {
        //exView.
        exView.next();
    }

    public void reset(View v) {
        exView.reset();
    }

    public void answer(View v) {
        exView.showAnswer();
    }
    
    
    
    
    protected void onDestroy() {
        // TODO Auto-generated method stub
        super.onDestroy();
        // 关闭音乐
        if (Set.isMusic() && music.isPlaying() && destory) {
            Music.stop();
        }

    }

    @Override
    public void onPause() {
        // TODO Auto-generated method stub
        Log.i("tag", "onPause");
        super.onPause();

        // 暂停音乐
        if (Set.isMusic() && (!destory) && music.isPlaying()) {
            Music.pause();
        }

        // 转到暂停界面
        if ((!isPause) && (!destory)) {
            Intent intent = new Intent();
        }

    }

    @Override
    protected void onResume() {
        // TODO Auto-generated method stub
        Log.i("tag", "onResume");
        super.onResume();
        isPause = false;
        // 重启音乐
        if (Set.isMusic() && (!music.isPlaying())) {
            Music.play();
        }
        }
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/369012.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

浏览器自动化框架沦为攻击者的工具

5月27日消息&#xff0c;安全公司Team Cymru的研究人员表示&#xff0c;越来越多的威胁参与者正在使用免费的浏览器自动化框架作为其攻击活动的一部分。 研究人员表示&#xff0c;该框架的技术准入门槛故意保持在较低水平&#xff0c;以创建一个由内容开发者和贡献者组成的活跃…

算法训练营 day55 动态规划 买卖股票问题系列3

算法训练营 day55 动态规划 买卖股票问题系列3 最佳买卖股票时机含冷冻期 309. 最佳买卖股票时机含冷冻期 - 力扣&#xff08;LeetCode&#xff09; 给定一个整数数组prices&#xff0c;其中第 prices[i] 表示第 i 天的股票价格 。 设计一个算法计算出最大利润。在满足以下…

JavaScript高级 Proxy Reflect

1. Proxy 1. 监听对象的变化 有一个对象&#xff0c;我们希望监听这个对象中的属性被设置或获取的过程 我们可以通过 Object.defineProperty 来实现 const obj {name: "why",age: 18,height: 1.88 }// 需求: 监听对象属性的所有操作 // 监听属性的操作 // 1.针对…

MySQL中的一些非常实用的函数、语法

前言我最近几年用MYSQL数据库挺多的&#xff0c;发现了一些非常有用的小玩意&#xff0c;今天拿出来分享到大家&#xff0c;希望对你会有所帮助。1.group_concat在我们平常的工作中&#xff0c;使用group by进行分组的场景&#xff0c;是非常多的。比如想统计出用户表中&#x…

Qt图片定时滚动

目录参考结构PicturePlay.promain.cpppictureplay.hpictureplay.cpppictureplay.ui效果参考 Qt图片浏览器 QT制作一个图片播放器 Qt中自适应的labelpixmap充满窗口后&#xff0c;无法缩小只能放大 可以显示jpg、jpeg、png、bmp。可以从电脑上拖动图到窗口并显示出来或者打开文件…

LDO 芯片烫手,问题出在哪里?

设计失误的一个电路&#xff0c;该电路是数字电路的电源&#xff0c;为图方便对12V直接通过线性电源芯片降压到5V&#xff1a; 图1&#xff1a;线性电源降压12V转5V 几块电路板打样好后&#xff0c;测试均发现AMS1117-5.0芯片烫手&#xff0c;负载电流100mA多&#xff0c;也满…

vim命令快捷键

1.概述vim在linux系统下代码补全、编译及错误跳转等方便编程的功能丰富&#xff0c;被广泛使用。简单的来说&#xff0c; vi 是老式的字处理器&#xff0c;不过功能已经很齐全了&#xff0c;但是还是有可以进步的地方。 vim 则可以说是程序开发者的一项很好用的工具。vim 是一个…

从零开始的机械臂yolov5抓取gazebo仿真(环境搭建篇中)

yolov5运行环境搭建 本篇主要讲如何搭建yolov5运行环境&#xff0c;以及一些需要注意避坑的重要知识点。anaconda与显卡驱动先装后装是没有什么影响的&#xff0c;关键在于&#xff0c;不能将显卡驱动以及cuda装在虚拟环境中。这里介绍一下博主的电脑环境为i7九代ubuntu18.04r…

移动办公时代,数智化平台如何赋能企业管理升级?

在传统的办公模式下&#xff0c;企业组织办公不仅时效低&#xff0c;周期长、成本高&#xff0c;且各办公系统相互独立。随着社会经济的发展&#xff0c;人们的工作生活变得多样化&#xff0c;对于办公的需求也越来越多&#xff0c;存在明显弊端的传统办公模式已不能满足企业对…

基于Mirai框架的Chatgpt_qq机器人搭建

参考项目&#xff1a;https://github.com/lss233/chatgpt-mirai-qq-bot by&#xff1a;雪月三十 采用docker方式搭建 方便快捷 不建议放在云服务器上 本地要有代理才行&#xff08;也可以自行配置代理&#xff09; 以下操作均是在有代理的情况下进行的 克隆项目 git clone ht…

狐狸优化算法(Matlab代码实现)

&#x1f468;‍&#x1f393;个人主页&#xff1a;研学社的博客&#x1f4a5;&#x1f4a5;&#x1f49e;&#x1f49e;欢迎来到本博客❤️❤️&#x1f4a5;&#x1f4a5;&#x1f3c6;博主优势&#xff1a;&#x1f31e;&#x1f31e;&#x1f31e;博客内容尽量做到思维缜密…

K8S篇-搭建kubenetes集群

安装环境 这里使用pve虚拟机搭建三台centos机器&#xff0c;搭建过程参考: Centos篇-Centos Minimal安装 此次安装硬件配置 CPU&#xff1a;2C 内存&#xff1a;2G 存储&#xff1a;64G 环境说明 操作系统&#xff1a;Centos 7.9 内核版本&#xff1a;6.2.0-1.el7.elrepo…

4面美团软件测试工程师,却忽略了这一点,直接让我前功尽弃

说一下我面试别人时候的思路 反过来理解&#xff0c;就是面试时候应该注意哪些东西&#xff1b;用加粗部分标注了 一般面试分为这么几个部分&#xff1a; 一、自我介绍 这部分一般人喜欢讲很多&#xff0c;其实没必要。大约5分钟内说清楚自己的职业经历&#xff0c;自己的核…

论坛项目小程序和h5登录

项目中安装uview出现npm安装uview 直接报错&#xff1a;创建一个package.json配置文件在进行安装。cmd到项目。初始化一个package.json文件&#xff08;vue项目的配置文件&#xff09; npm init --yes 安装uview项目点击关注进入管页面&#xff0c;需要验证用户是否登录查用户是…

Python编程自动化办公案例(3)

作者简介&#xff1a;一名在校计算机学生、每天分享Python的学习经验、和学习笔记。 座右铭&#xff1a;低头赶路&#xff0c;敬事如仪 个人主页&#xff1a;网络豆的主页​​​​​​ 目录 前言 一.前几章代码 1.获取到第一题的选项单元格 2.实现批量获取文件 二. 批…

Linux——UDP协议与相关套接字编程

一.概念在网络通信中&#xff0c;传输层中最常用的通信协议有两个&#xff1a;TCP协议与UDP协议。这两种协议虽然都可以用于网络通信&#xff0c;但是通信方式不同决定了应用场景的不同。与TCP协议相比&#xff0c;UDP协议最具特色的不同点有两个&#xff1a;无连接与面向数据报…

kubernetes集群pod中的pause容器作用

kubernetes集群pod中的pause容器作用 我们搭建完集群了以后&#xff0c;可以使用最简单的方式创建一个pod&#xff0c;随意你建立什么pod&#xff0c;去访问相应node上执行docker ps 就会看到有一种pause容器&#xff0c;但是你可能从来没有启用 etrics-scraper_dashboard-me…

C++中的内存管理

文章目录前言1.C中内存空间的划分2.C内存管理方式1.对内置类型的处理2.对自定义类型的处理3.new和delete实现原理4.定位new3.总结1. malloc/free和new/delete的区别2. 内存泄漏前言 C中的内存空间划分和C语言是很像的&#xff0c;基本上区别不大。但是因C中&#xff0c;引入了…

【华为OD机试模拟题】用 C++ 实现 - 找字符(2023.Q1)

最近更新的博客 【华为OD机试模拟题】用 C++ 实现 - 货币单位换算(2023.Q1) 【华为OD机试模拟题】用 C++ 实现 - 选座位(2023.Q1) 【华为OD机试模拟题】用 C++ 实现 - 停车场最大距离(2023.Q1) 【华为OD机试模拟题】用 C++ 实现 - 重组字符串(2023.Q1) 【华为OD机试模…

MyBatis-常用SQL操作

一、动态SQL 1.概述】 1.1动态SQL&#xff1a; 是 MyBatis 的强大特性之一&#xff0c;解决拼接动态SQL时候的难题&#xff0c;提高开发效 1.2分类&#xff1a; if choose(when,otherwise) trim(where,set) foreach 2.if 2.1 做 where 语句后面条件查询的,if 语句是可以…