找传奇、传世资源到传世资源站!

java 个人财务管理系统 入门级源码

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

管理日常支出
java 个人财务管理系统 入门级源码 Java-第1张
@RequestMapping(value = "/recordselectBydate")    public String selectByRecorddate(String userId, String time, @RequestParam(defaultValue = "10") Integer pageSize, @RequestParam(defaultValue = "1") Integer pageNo, Model model) {        Integer uId = Integer.parseInt(userId);DateFormatfmt = new SimpleDateFormat("yyyy-MM-dd");        Date date1 = null;        try { date1 = fmt.parse(time);} catch (ParseException e) {e.printStackTrace(); }        List<Record> list = recordservice.selectbyRecorddate(uId, date1, pageSize, ((pageNo - 1) * pageSize));model.addAttribute("recordlist", list);//收入总金额model.addAttribute("income", recordservice.selectincome(uId, date1));//支出总金额model.addAttribute("pay", recordservice.selectpay(uId, date1));        return "record/datarecord";Mapper.xml<select id="queryRecordbydate" resultMap="BaseResultMap">        select * from records where user_id=#{userId}<![CDATA[      and DATE_FORMAT(time, '%Y-%m-%d') =  DATE_FORMAT(#{time}, '%Y-%m-%d')        ]]>  limit #{pageNo},#{pageSize}</select><select id="income" resultType="DOUBLE">        select sum(value) FROM records where user_id=#{userId}<![CDATA[      and DATE_FORMAT(time, '%Y-%m-%d') =  DATE_FORMAT(#{time}, '%Y-%m-%d')        ]]>  AND value&gt;0</select><select id="pay" resultType="DOUBLE">        select sum(value) FROM records where user_id=#{userId}<![CDATA[      and DATE_FORMAT(time, '%Y-%m-%d') =  DATE_FORMAT(#{time}, '%Y-%m-%d')        ]]>  AND value &lt;=0</select>

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复