xiao547607 4 лет назад
Родитель
Сommit
047961b23d
18 измененных файлов с 1489 добавлено и 0 удалено
  1. 18 0
      common/src/main/java/com/jpsoft/bus/modules/merchant/dao/AccountInfoDAO.java
  2. 18 0
      common/src/main/java/com/jpsoft/bus/modules/merchant/dao/CapitalInfoDAO.java
  3. 18 0
      common/src/main/java/com/jpsoft/bus/modules/merchant/dao/WithdrawalRecordDAO.java
  4. 53 0
      common/src/main/java/com/jpsoft/bus/modules/merchant/entity/AccountInfo.java
  5. 43 0
      common/src/main/java/com/jpsoft/bus/modules/merchant/entity/CapitalInfo.java
  6. 55 0
      common/src/main/java/com/jpsoft/bus/modules/merchant/entity/WithdrawalRecord.java
  7. 17 0
      common/src/main/java/com/jpsoft/bus/modules/merchant/service/AccountInfoService.java
  8. 17 0
      common/src/main/java/com/jpsoft/bus/modules/merchant/service/CapitalInfoService.java
  9. 17 0
      common/src/main/java/com/jpsoft/bus/modules/merchant/service/WithdrawalRecordService.java
  10. 70 0
      common/src/main/java/com/jpsoft/bus/modules/merchant/service/impl/AccountInfoServiceImpl.java
  11. 70 0
      common/src/main/java/com/jpsoft/bus/modules/merchant/service/impl/CapitalInfoServiceImpl.java
  12. 70 0
      common/src/main/java/com/jpsoft/bus/modules/merchant/service/impl/WithdrawalRecordServiceImpl.java
  13. 126 0
      common/src/main/resources/mapper/merchant/AccountInfo.xml
  14. 101 0
      common/src/main/resources/mapper/merchant/CapitalInfo.xml
  15. 121 0
      common/src/main/resources/mapper/merchant/WithdrawalRecord.xml
  16. 225 0
      web/src/main/java/com/jpsoft/bus/modules/merchant/controller/AccountInfoController.java
  17. 225 0
      web/src/main/java/com/jpsoft/bus/modules/merchant/controller/CapitalInfoController.java
  18. 225 0
      web/src/main/java/com/jpsoft/bus/modules/merchant/controller/WithdrawalRecordController.java

+ 18 - 0
common/src/main/java/com/jpsoft/bus/modules/merchant/dao/AccountInfoDAO.java

@@ -0,0 +1,18 @@
+package com.jpsoft.bus.modules.merchant.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.bus.modules.merchant.entity.AccountInfo;
+import java.util.Map;
+import com.jpsoft.bus.modules.common.dto.Sort;
+
+@Repository
+public interface AccountInfoDAO {
+	int insert(AccountInfo entity);
+	int update(AccountInfo entity);
+	int exist(String id);
+	AccountInfo get(String id);
+	int delete(String id);
+	List<AccountInfo> list();
+	List<AccountInfo> search(Map<String,Object> searchParams,List<Sort> sortList);
+}

+ 18 - 0
common/src/main/java/com/jpsoft/bus/modules/merchant/dao/CapitalInfoDAO.java

@@ -0,0 +1,18 @@
+package com.jpsoft.bus.modules.merchant.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.bus.modules.merchant.entity.CapitalInfo;
+import java.util.Map;
+import com.jpsoft.bus.modules.common.dto.Sort;
+
+@Repository
+public interface CapitalInfoDAO {
+	int insert(CapitalInfo entity);
+	int update(CapitalInfo entity);
+	int exist(String id);
+	CapitalInfo get(String id);
+	int delete(String id);
+	List<CapitalInfo> list();
+	List<CapitalInfo> search(Map<String,Object> searchParams,List<Sort> sortList);
+}

+ 18 - 0
common/src/main/java/com/jpsoft/bus/modules/merchant/dao/WithdrawalRecordDAO.java

@@ -0,0 +1,18 @@
+package com.jpsoft.bus.modules.merchant.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.bus.modules.merchant.entity.WithdrawalRecord;
+import java.util.Map;
+import com.jpsoft.bus.modules.common.dto.Sort;
+
+@Repository
+public interface WithdrawalRecordDAO {
+	int insert(WithdrawalRecord entity);
+	int update(WithdrawalRecord entity);
+	int exist(String id);
+	WithdrawalRecord get(String id);
+	int delete(String id);
+	List<WithdrawalRecord> list();
+	List<WithdrawalRecord> search(Map<String,Object> searchParams,List<Sort> sortList);
+}

+ 53 - 0
common/src/main/java/com/jpsoft/bus/modules/merchant/entity/AccountInfo.java

@@ -0,0 +1,53 @@
+package com.jpsoft.bus.modules.merchant.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.math.BigDecimal;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+/**
+  描述:merchant_account_info的实体类
+ */
+@Data
+@ApiModel(value = "merchant_account_info的实体类")
+public class AccountInfo {
+        @ApiModelProperty(value = "")
+    private String id;
+        @ApiModelProperty(value = "商户名称")
+    private String name;
+        @ApiModelProperty(value = "关联的公司车队")
+    private String companyId;
+        @ApiModelProperty(value = "微信openId")
+    private String openId;
+        @ApiModelProperty(value = "手机号")
+    private String phone;
+        @ApiModelProperty(value = "提现许可(0:不可提现,1:可提现)")
+    private Boolean withdrawAllow;
+        @ApiModelProperty(value = "商户冻结(0:未冻结,1:已冻结)")
+    private Boolean frozen;
+        @ApiModelProperty(value = "头像")
+    private String imageUrl;
+        @ApiModelProperty(value = "银行名称")
+    private String bankName;
+        @ApiModelProperty(value = "银行卡账号")
+    private String bankNumber;
+        @ApiModelProperty(value = "创建人")
+    private String createBy;
+        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+        @ApiModelProperty(value = "更新人")
+    private String updateBy;
+        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+        @ApiModelProperty(value = "是否删除")
+    private Boolean delFlag;
+}

+ 43 - 0
common/src/main/java/com/jpsoft/bus/modules/merchant/entity/CapitalInfo.java

@@ -0,0 +1,43 @@
+package com.jpsoft.bus.modules.merchant.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.math.BigDecimal;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+/**
+  描述:merchant_capital_info的实体类
+ */
+@Data
+@ApiModel(value = "merchant_capital_info的实体类")
+public class CapitalInfo {
+        @ApiModelProperty(value = "")
+    private String id;
+        @ApiModelProperty(value = "商户id")
+    private String merchantId;
+        @ApiModelProperty(value = "可提现金额(线上)")
+    private BigDecimal withdrawalAmount;
+        @ApiModelProperty(value = "已提现金额(线上)")
+    private BigDecimal alreadyWithdrawalAmount;
+        @ApiModelProperty(value = "总收益(线上,不包含当天)")
+    private BigDecimal totalRevenue;
+        @ApiModelProperty(value = "创建人")
+    private String createBy;
+        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+        @ApiModelProperty(value = "更新人")
+    private String updateBy;
+        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+        @ApiModelProperty(value = "是否删除")
+    private Boolean delFlag;
+}

+ 55 - 0
common/src/main/java/com/jpsoft/bus/modules/merchant/entity/WithdrawalRecord.java

@@ -0,0 +1,55 @@
+package com.jpsoft.bus.modules.merchant.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.math.BigDecimal;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+/**
+  描述:merchant_withdrawal_record的实体类
+ */
+@Data
+@ApiModel(value = "merchant_withdrawal_record的实体类")
+public class WithdrawalRecord {
+        @ApiModelProperty(value = "")
+    private String id;
+        @ApiModelProperty(value = "商户id")
+    private String merchantId;
+        @ApiModelProperty(value = "申请提现金额")
+    private BigDecimal applyWithdrawalAmount;
+        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	    @ApiModelProperty(value = "申请时间")
+    private Date applyTime;
+        @ApiModelProperty(value = "状态(0:申请中,1:同意,2:拒绝)")
+    private String status;
+        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	    @ApiModelProperty(value = "审核时间")
+    private Date examineTime;
+        @ApiModelProperty(value = "审核人")
+    private String examineBy;
+        @ApiModelProperty(value = "备注")
+    private String remark;
+        @ApiModelProperty(value = "提现编号")
+    private String withdrawalNo;
+        @ApiModelProperty(value = "创建人")
+    private String createBy;
+        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+        @ApiModelProperty(value = "更新人")
+    private String updateBy;
+        @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+        @ApiModelProperty(value = "是否删除")
+    private Boolean delFlag;
+}

+ 17 - 0
common/src/main/java/com/jpsoft/bus/modules/merchant/service/AccountInfoService.java

@@ -0,0 +1,17 @@
+package com.jpsoft.bus.modules.merchant.service;
+
+import java.util.List;
+import java.util.Map;
+import com.jpsoft.bus.modules.merchant.entity.AccountInfo;
+import com.github.pagehelper.Page;
+import com.jpsoft.bus.modules.common.dto.Sort;
+
+public interface AccountInfoService {
+	AccountInfo get(String id);
+	boolean exist(String id);
+	int insert(AccountInfo model);
+	int update(AccountInfo model);
+	int delete(String id);
+	List<AccountInfo> list();
+	Page<AccountInfo> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,boolean count,List<Sort> sortList);
+}

+ 17 - 0
common/src/main/java/com/jpsoft/bus/modules/merchant/service/CapitalInfoService.java

@@ -0,0 +1,17 @@
+package com.jpsoft.bus.modules.merchant.service;
+
+import java.util.List;
+import java.util.Map;
+import com.jpsoft.bus.modules.merchant.entity.CapitalInfo;
+import com.github.pagehelper.Page;
+import com.jpsoft.bus.modules.common.dto.Sort;
+
+public interface CapitalInfoService {
+	CapitalInfo get(String id);
+	boolean exist(String id);
+	int insert(CapitalInfo model);
+	int update(CapitalInfo model);
+	int delete(String id);
+	List<CapitalInfo> list();
+	Page<CapitalInfo> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,boolean count,List<Sort> sortList);
+}

+ 17 - 0
common/src/main/java/com/jpsoft/bus/modules/merchant/service/WithdrawalRecordService.java

@@ -0,0 +1,17 @@
+package com.jpsoft.bus.modules.merchant.service;
+
+import java.util.List;
+import java.util.Map;
+import com.jpsoft.bus.modules.merchant.entity.WithdrawalRecord;
+import com.github.pagehelper.Page;
+import com.jpsoft.bus.modules.common.dto.Sort;
+
+public interface WithdrawalRecordService {
+	WithdrawalRecord get(String id);
+	boolean exist(String id);
+	int insert(WithdrawalRecord model);
+	int update(WithdrawalRecord model);
+	int delete(String id);
+	List<WithdrawalRecord> list();
+	Page<WithdrawalRecord> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,boolean count,List<Sort> sortList);
+}

+ 70 - 0
common/src/main/java/com/jpsoft/bus/modules/merchant/service/impl/AccountInfoServiceImpl.java

@@ -0,0 +1,70 @@
+package com.jpsoft.bus.modules.merchant.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.bus.modules.merchant.dao.AccountInfoDAO;
+import com.jpsoft.bus.modules.merchant.entity.AccountInfo;
+import com.jpsoft.bus.modules.merchant.service.AccountInfoService;
+import com.github.pagehelper.Page;
+import com.jpsoft.bus.modules.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="accountInfoService")
+public class AccountInfoServiceImpl implements AccountInfoService {
+	@Resource(name="accountInfoDAO")
+	private AccountInfoDAO accountInfoDAO;
+
+	@Override
+	public AccountInfo get(String id) {
+		// TODO Auto-generated method stub
+		return accountInfoDAO.get(id);
+	}
+
+	@Override
+	public int insert(AccountInfo model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return accountInfoDAO.insert(model);
+	}
+
+	@Override
+	public int update(AccountInfo model) {
+		// TODO Auto-generated method stub
+		return accountInfoDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return accountInfoDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = accountInfoDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<AccountInfo> list() {
+		// TODO Auto-generated method stub
+		return accountInfoDAO.list();
+	}
+		
+	@Override
+	public Page<AccountInfo> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,boolean count,List<Sort> sortList) {
+        Page<AccountInfo> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+            accountInfoDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+}

+ 70 - 0
common/src/main/java/com/jpsoft/bus/modules/merchant/service/impl/CapitalInfoServiceImpl.java

@@ -0,0 +1,70 @@
+package com.jpsoft.bus.modules.merchant.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.bus.modules.merchant.dao.CapitalInfoDAO;
+import com.jpsoft.bus.modules.merchant.entity.CapitalInfo;
+import com.jpsoft.bus.modules.merchant.service.CapitalInfoService;
+import com.github.pagehelper.Page;
+import com.jpsoft.bus.modules.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="capitalInfoService")
+public class CapitalInfoServiceImpl implements CapitalInfoService {
+	@Resource(name="capitalInfoDAO")
+	private CapitalInfoDAO capitalInfoDAO;
+
+	@Override
+	public CapitalInfo get(String id) {
+		// TODO Auto-generated method stub
+		return capitalInfoDAO.get(id);
+	}
+
+	@Override
+	public int insert(CapitalInfo model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return capitalInfoDAO.insert(model);
+	}
+
+	@Override
+	public int update(CapitalInfo model) {
+		// TODO Auto-generated method stub
+		return capitalInfoDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return capitalInfoDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = capitalInfoDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<CapitalInfo> list() {
+		// TODO Auto-generated method stub
+		return capitalInfoDAO.list();
+	}
+		
+	@Override
+	public Page<CapitalInfo> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,boolean count,List<Sort> sortList) {
+        Page<CapitalInfo> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+            capitalInfoDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+}

+ 70 - 0
common/src/main/java/com/jpsoft/bus/modules/merchant/service/impl/WithdrawalRecordServiceImpl.java

@@ -0,0 +1,70 @@
+package com.jpsoft.bus.modules.merchant.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.bus.modules.merchant.dao.WithdrawalRecordDAO;
+import com.jpsoft.bus.modules.merchant.entity.WithdrawalRecord;
+import com.jpsoft.bus.modules.merchant.service.WithdrawalRecordService;
+import com.github.pagehelper.Page;
+import com.jpsoft.bus.modules.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="withdrawalRecordService")
+public class WithdrawalRecordServiceImpl implements WithdrawalRecordService {
+	@Resource(name="withdrawalRecordDAO")
+	private WithdrawalRecordDAO withdrawalRecordDAO;
+
+	@Override
+	public WithdrawalRecord get(String id) {
+		// TODO Auto-generated method stub
+		return withdrawalRecordDAO.get(id);
+	}
+
+	@Override
+	public int insert(WithdrawalRecord model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return withdrawalRecordDAO.insert(model);
+	}
+
+	@Override
+	public int update(WithdrawalRecord model) {
+		// TODO Auto-generated method stub
+		return withdrawalRecordDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return withdrawalRecordDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = withdrawalRecordDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<WithdrawalRecord> list() {
+		// TODO Auto-generated method stub
+		return withdrawalRecordDAO.list();
+	}
+		
+	@Override
+	public Page<WithdrawalRecord> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,boolean count,List<Sort> sortList) {
+        Page<WithdrawalRecord> page = PageHelper.startPage(pageNumber,pageSize,count).doSelectPage(()->{
+            withdrawalRecordDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+}

+ 126 - 0
common/src/main/resources/mapper/merchant/AccountInfo.xml

@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.bus.modules.merchant.dao.AccountInfoDAO">
+	<resultMap id="AccountInfoMap" type="com.jpsoft.bus.modules.merchant.entity.AccountInfo">
+		<id property="id" column="id_" />
+			<result property="name" column="name_" />
+			<result property="companyId" column="company_id" />
+			<result property="openId" column="open_id" />
+			<result property="phone" column="phone_" />
+			<result property="withdrawAllow" column="withdraw_allow" />
+			<result property="frozen" column="frozen_" />
+			<result property="imageUrl" column="image_url" />
+			<result property="bankName" column="bank_name" />
+			<result property="bankNumber" column="bank_number" />
+			<result property="createBy" column="create_by" />
+			<result property="createTime" column="create_time" />
+			<result property="updateBy" column="update_by" />
+			<result property="updateTime" column="update_time" />
+			<result property="delFlag" column="del_flag" />
+			</resultMap>
+	<insert id="insert" parameterType="com.jpsoft.bus.modules.merchant.entity.AccountInfo">
+	<!--
+	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+		select sys_guid() from dual
+	</selectKey>
+	-->
+	<![CDATA[
+		insert into merchant_account_info
+	    (id_,name_,company_id,open_id,phone_,withdraw_allow,frozen_,image_url,bank_name,bank_number,create_by,create_time,update_by,update_time,del_flag)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{name,jdbcType=VARCHAR}
+,#{companyId,jdbcType=VARCHAR}
+,#{openId,jdbcType=VARCHAR}
+,#{phone,jdbcType=VARCHAR}
+,#{withdrawAllow,jdbcType= NUMERIC }
+,#{frozen,jdbcType= NUMERIC }
+,#{imageUrl,jdbcType=VARCHAR}
+,#{bankName,jdbcType=VARCHAR}
+,#{bankNumber,jdbcType=VARCHAR}
+,#{createBy,jdbcType=VARCHAR}
+,#{createTime,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+,#{updateTime,jdbcType= TIMESTAMP }
+,#{delFlag,jdbcType= NUMERIC }
+		)
+	]]>
+	</insert>
+	<delete id="delete" parameterType="string">
+		delete from merchant_account_info where id_=#{id,jdbcType=VARCHAR}
+	</delete>
+	<update id="update" parameterType="com.jpsoft.bus.modules.merchant.entity.AccountInfo">
+		update merchant_account_info
+		<set>
+				<if test="name!=null">
+		name_=#{name,jdbcType=VARCHAR},
+		</if>
+				<if test="companyId!=null">
+		company_id=#{companyId,jdbcType=VARCHAR},
+		</if>
+				<if test="openId!=null">
+		open_id=#{openId,jdbcType=VARCHAR},
+		</if>
+				<if test="phone!=null">
+		phone_=#{phone,jdbcType=VARCHAR},
+		</if>
+				<if test="withdrawAllow!=null">
+		withdraw_allow=#{withdrawAllow,jdbcType= NUMERIC },
+		</if>
+				<if test="frozen!=null">
+		frozen_=#{frozen,jdbcType= NUMERIC },
+		</if>
+				<if test="imageUrl!=null">
+		image_url=#{imageUrl,jdbcType=VARCHAR},
+		</if>
+				<if test="bankName!=null">
+		bank_name=#{bankName,jdbcType=VARCHAR},
+		</if>
+				<if test="bankNumber!=null">
+		bank_number=#{bankNumber,jdbcType=VARCHAR},
+		</if>
+				<if test="createBy!=null">
+		create_by=#{createBy,jdbcType=VARCHAR},
+		</if>
+				<if test="createTime!=null">
+		create_time=#{createTime,jdbcType= TIMESTAMP },
+		</if>
+				<if test="updateBy!=null">
+		update_by=#{updateBy,jdbcType=VARCHAR},
+		</if>
+				<if test="updateTime!=null">
+		update_time=#{updateTime,jdbcType= TIMESTAMP },
+		</if>
+				<if test="delFlag!=null">
+		del_flag=#{delFlag,jdbcType= NUMERIC },
+		</if>
+		</set>
+	where id_=#{id}
+	</update>
+	<select id="get" parameterType="string" resultMap="AccountInfoMap">
+		select 
+id_,name_,company_id,open_id,phone_,withdraw_allow,frozen_,image_url,bank_name,bank_number,create_by,create_time,update_by,update_time,del_flag		from merchant_account_info where id_=#{0}
+	</select>
+	<select id="exist" parameterType="string" resultType="int">
+		select count(*) from merchant_account_info where id_=#{0}
+	</select>
+	<select id="list" resultMap="AccountInfoMap">
+		select * from merchant_account_info
+	</select>
+	<select id="search" parameterType="hashmap" resultMap="AccountInfoMap">
+		<![CDATA[
+			select * from merchant_account_info
+		]]>
+		<where>
+			<if test="searchParams.id != null">
+				and ID_ like #{searchParams.id}
+			</if>
+		</where>
+		<foreach item="sort" collection="sortList"  open="order by" separator=",">
+	        ${sort.name} ${sort.order}
+	 	</foreach>
+	</select>
+</mapper>

+ 101 - 0
common/src/main/resources/mapper/merchant/CapitalInfo.xml

@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.bus.modules.merchant.dao.CapitalInfoDAO">
+	<resultMap id="CapitalInfoMap" type="com.jpsoft.bus.modules.merchant.entity.CapitalInfo">
+		<id property="id" column="id_" />
+			<result property="merchantId" column="merchant_id" />
+			<result property="withdrawalAmount" column="withdrawal_amount" />
+			<result property="alreadyWithdrawalAmount" column="already_withdrawal_amount" />
+			<result property="totalRevenue" column="total_revenue" />
+			<result property="createBy" column="create_by" />
+			<result property="createTime" column="create_time" />
+			<result property="updateBy" column="update_by" />
+			<result property="updateTime" column="update_time" />
+			<result property="delFlag" column="del_flag" />
+			</resultMap>
+	<insert id="insert" parameterType="com.jpsoft.bus.modules.merchant.entity.CapitalInfo">
+	<!--
+	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+		select sys_guid() from dual
+	</selectKey>
+	-->
+	<![CDATA[
+		insert into merchant_capital_info
+	    (id_,merchant_id,withdrawal_amount,already_withdrawal_amount,total_revenue,create_by,create_time,update_by,update_time,del_flag)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{merchantId,jdbcType=VARCHAR}
+,#{withdrawalAmount,jdbcType= NUMERIC }
+,#{alreadyWithdrawalAmount,jdbcType= NUMERIC }
+,#{totalRevenue,jdbcType= NUMERIC }
+,#{createBy,jdbcType=VARCHAR}
+,#{createTime,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+,#{updateTime,jdbcType= TIMESTAMP }
+,#{delFlag,jdbcType= NUMERIC }
+		)
+	]]>
+	</insert>
+	<delete id="delete" parameterType="string">
+		delete from merchant_capital_info where id_=#{id,jdbcType=VARCHAR}
+	</delete>
+	<update id="update" parameterType="com.jpsoft.bus.modules.merchant.entity.CapitalInfo">
+		update merchant_capital_info
+		<set>
+				<if test="merchantId!=null">
+		merchant_id=#{merchantId,jdbcType=VARCHAR},
+		</if>
+				<if test="withdrawalAmount!=null">
+		withdrawal_amount=#{withdrawalAmount,jdbcType= NUMERIC },
+		</if>
+				<if test="alreadyWithdrawalAmount!=null">
+		already_withdrawal_amount=#{alreadyWithdrawalAmount,jdbcType= NUMERIC },
+		</if>
+				<if test="totalRevenue!=null">
+		total_revenue=#{totalRevenue,jdbcType= NUMERIC },
+		</if>
+				<if test="createBy!=null">
+		create_by=#{createBy,jdbcType=VARCHAR},
+		</if>
+				<if test="createTime!=null">
+		create_time=#{createTime,jdbcType= TIMESTAMP },
+		</if>
+				<if test="updateBy!=null">
+		update_by=#{updateBy,jdbcType=VARCHAR},
+		</if>
+				<if test="updateTime!=null">
+		update_time=#{updateTime,jdbcType= TIMESTAMP },
+		</if>
+				<if test="delFlag!=null">
+		del_flag=#{delFlag,jdbcType= NUMERIC },
+		</if>
+		</set>
+	where id_=#{id}
+	</update>
+	<select id="get" parameterType="string" resultMap="CapitalInfoMap">
+		select 
+id_,merchant_id,withdrawal_amount,already_withdrawal_amount,total_revenue,create_by,create_time,update_by,update_time,del_flag		from merchant_capital_info where id_=#{0}
+	</select>
+	<select id="exist" parameterType="string" resultType="int">
+		select count(*) from merchant_capital_info where id_=#{0}
+	</select>
+	<select id="list" resultMap="CapitalInfoMap">
+		select * from merchant_capital_info
+	</select>
+	<select id="search" parameterType="hashmap" resultMap="CapitalInfoMap">
+		<![CDATA[
+			select * from merchant_capital_info
+		]]>
+		<where>
+			<if test="searchParams.id != null">
+				and ID_ like #{searchParams.id}
+			</if>
+		</where>
+		<foreach item="sort" collection="sortList"  open="order by" separator=",">
+	        ${sort.name} ${sort.order}
+	 	</foreach>
+	</select>
+</mapper>

+ 121 - 0
common/src/main/resources/mapper/merchant/WithdrawalRecord.xml

@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.bus.modules.merchant.dao.WithdrawalRecordDAO">
+	<resultMap id="WithdrawalRecordMap" type="com.jpsoft.bus.modules.merchant.entity.WithdrawalRecord">
+		<id property="id" column="id_" />
+			<result property="merchantId" column="merchant_id" />
+			<result property="applyWithdrawalAmount" column="apply_withdrawal_amount" />
+			<result property="applyTime" column="apply_time" />
+			<result property="status" column="status_" />
+			<result property="examineTime" column="examine_time" />
+			<result property="examineBy" column="examine_by" />
+			<result property="remark" column="remark_" />
+			<result property="withdrawalNo" column="withdrawal_no" />
+			<result property="createBy" column="create_by" />
+			<result property="createTime" column="create_time" />
+			<result property="updateBy" column="update_by" />
+			<result property="updateTime" column="update_time" />
+			<result property="delFlag" column="del_flag" />
+			</resultMap>
+	<insert id="insert" parameterType="com.jpsoft.bus.modules.merchant.entity.WithdrawalRecord">
+	<!--
+	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+		select sys_guid() from dual
+	</selectKey>
+	-->
+	<![CDATA[
+		insert into merchant_withdrawal_record
+	    (id_,merchant_id,apply_withdrawal_amount,apply_time,status_,examine_time,examine_by,remark_,withdrawal_no,create_by,create_time,update_by,update_time,del_flag)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{merchantId,jdbcType=VARCHAR}
+,#{applyWithdrawalAmount,jdbcType= NUMERIC }
+,#{applyTime,jdbcType= TIMESTAMP }
+,#{status,jdbcType=VARCHAR}
+,#{examineTime,jdbcType= TIMESTAMP }
+,#{examineBy,jdbcType=VARCHAR}
+,#{remark,jdbcType=VARCHAR}
+,#{withdrawalNo,jdbcType=VARCHAR}
+,#{createBy,jdbcType=VARCHAR}
+,#{createTime,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+,#{updateTime,jdbcType= TIMESTAMP }
+,#{delFlag,jdbcType= NUMERIC }
+		)
+	]]>
+	</insert>
+	<delete id="delete" parameterType="string">
+		delete from merchant_withdrawal_record where id_=#{id,jdbcType=VARCHAR}
+	</delete>
+	<update id="update" parameterType="com.jpsoft.bus.modules.merchant.entity.WithdrawalRecord">
+		update merchant_withdrawal_record
+		<set>
+				<if test="merchantId!=null">
+		merchant_id=#{merchantId,jdbcType=VARCHAR},
+		</if>
+				<if test="applyWithdrawalAmount!=null">
+		apply_withdrawal_amount=#{applyWithdrawalAmount,jdbcType= NUMERIC },
+		</if>
+				<if test="applyTime!=null">
+		apply_time=#{applyTime,jdbcType= TIMESTAMP },
+		</if>
+				<if test="status!=null">
+		status_=#{status,jdbcType=VARCHAR},
+		</if>
+				<if test="examineTime!=null">
+		examine_time=#{examineTime,jdbcType= TIMESTAMP },
+		</if>
+				<if test="examineBy!=null">
+		examine_by=#{examineBy,jdbcType=VARCHAR},
+		</if>
+				<if test="remark!=null">
+		remark_=#{remark,jdbcType=VARCHAR},
+		</if>
+				<if test="withdrawalNo!=null">
+		withdrawal_no=#{withdrawalNo,jdbcType=VARCHAR},
+		</if>
+				<if test="createBy!=null">
+		create_by=#{createBy,jdbcType=VARCHAR},
+		</if>
+				<if test="createTime!=null">
+		create_time=#{createTime,jdbcType= TIMESTAMP },
+		</if>
+				<if test="updateBy!=null">
+		update_by=#{updateBy,jdbcType=VARCHAR},
+		</if>
+				<if test="updateTime!=null">
+		update_time=#{updateTime,jdbcType= TIMESTAMP },
+		</if>
+				<if test="delFlag!=null">
+		del_flag=#{delFlag,jdbcType= NUMERIC },
+		</if>
+		</set>
+	where id_=#{id}
+	</update>
+	<select id="get" parameterType="string" resultMap="WithdrawalRecordMap">
+		select 
+id_,merchant_id,apply_withdrawal_amount,apply_time,status_,examine_time,examine_by,remark_,withdrawal_no,create_by,create_time,update_by,update_time,del_flag		from merchant_withdrawal_record where id_=#{0}
+	</select>
+	<select id="exist" parameterType="string" resultType="int">
+		select count(*) from merchant_withdrawal_record where id_=#{0}
+	</select>
+	<select id="list" resultMap="WithdrawalRecordMap">
+		select * from merchant_withdrawal_record
+	</select>
+	<select id="search" parameterType="hashmap" resultMap="WithdrawalRecordMap">
+		<![CDATA[
+			select * from merchant_withdrawal_record
+		]]>
+		<where>
+			<if test="searchParams.id != null">
+				and ID_ like #{searchParams.id}
+			</if>
+		</where>
+		<foreach item="sort" collection="sortList"  open="order by" separator=",">
+	        ${sort.name} ${sort.order}
+	 	</foreach>
+	</select>
+</mapper>

+ 225 - 0
web/src/main/java/com/jpsoft/bus/modules/merchant/controller/AccountInfoController.java

@@ -0,0 +1,225 @@
+package com.jpsoft.bus.modules.merchant.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.bus.modules.common.dto.MessageResult;
+import com.jpsoft.bus.modules.common.dto.Sort;
+import com.jpsoft.bus.modules.common.utils.PojoUtils;
+import com.jpsoft.bus.modules.merchant.entity.AccountInfo;
+import com.jpsoft.bus.modules.merchant.service.AccountInfoService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+@RestController
+@RequestMapping("/merchant/accountInfo")
+@Api(description = "商户")
+public class AccountInfoController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private AccountInfoService accountInfoService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<AccountInfo> create(){
+        MessageResult<AccountInfo> msgResult = new MessageResult<>();
+
+        AccountInfo accountInfo = new AccountInfo();
+
+        msgResult.setData(accountInfo);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<AccountInfo> add(@RequestBody AccountInfo accountInfo,@RequestAttribute String subject){
+        MessageResult<AccountInfo> msgResult = new MessageResult<>();
+
+        try {
+            accountInfo.setId(UUID.randomUUID().toString());
+            accountInfo.setDelFlag(false);
+            accountInfo.setCreateBy(subject);
+            accountInfo.setCreateTime(new Date());
+            
+            int affectCount = accountInfoService.insert(accountInfo);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(accountInfo);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<AccountInfo> edit(@PathVariable("id") String id){
+        MessageResult<AccountInfo> msgResult = new MessageResult<>();
+
+        try {
+            AccountInfo accountInfo = accountInfoService.get(id);
+
+            if (accountInfo != null) {
+                msgResult.setResult(true);
+                msgResult.setData(accountInfo);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<AccountInfo> update(@RequestBody AccountInfo accountInfo,@RequestAttribute String subject){
+        MessageResult<AccountInfo> msgResult = new MessageResult<>();
+
+        try {
+            accountInfo.setUpdateBy(subject);
+            accountInfo.setUpdateTime(new Date());
+            
+            int affectCount = accountInfoService.update(accountInfo);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(accountInfo);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            AccountInfo accountInfo = accountInfoService.get(id);
+            accountInfo.setDelFlag(true);
+            accountInfo.setUpdateBy(subject);
+            accountInfo.setUpdateTime(new Date());
+
+            int affectCount = accountInfoService.update(accountInfo);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                AccountInfo accountInfo = accountInfoService.get(id);
+                accountInfo.setDelFlag(true);
+                accountInfo.setUpdateBy(subject);
+                accountInfo.setUpdateTime(new Date());
+
+                affectCount += accountInfoService.update(accountInfo);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("id_","asc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        Page<AccountInfo> page = accountInfoService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+}

+ 225 - 0
web/src/main/java/com/jpsoft/bus/modules/merchant/controller/CapitalInfoController.java

@@ -0,0 +1,225 @@
+package com.jpsoft.bus.modules.merchant.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.bus.modules.common.dto.MessageResult;
+import com.jpsoft.bus.modules.common.dto.Sort;
+import com.jpsoft.bus.modules.common.utils.PojoUtils;
+import com.jpsoft.bus.modules.merchant.entity.CapitalInfo;
+import com.jpsoft.bus.modules.merchant.service.CapitalInfoService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+@RestController
+@RequestMapping("/merchant/capitalInfo")
+@Api(description = "商户钱包")
+public class CapitalInfoController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private CapitalInfoService capitalInfoService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<CapitalInfo> create(){
+        MessageResult<CapitalInfo> msgResult = new MessageResult<>();
+
+        CapitalInfo capitalInfo = new CapitalInfo();
+
+        msgResult.setData(capitalInfo);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<CapitalInfo> add(@RequestBody CapitalInfo capitalInfo,@RequestAttribute String subject){
+        MessageResult<CapitalInfo> msgResult = new MessageResult<>();
+
+        try {
+            capitalInfo.setId(UUID.randomUUID().toString());
+            capitalInfo.setDelFlag(false);
+            capitalInfo.setCreateBy(subject);
+            capitalInfo.setCreateTime(new Date());
+            
+            int affectCount = capitalInfoService.insert(capitalInfo);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(capitalInfo);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<CapitalInfo> edit(@PathVariable("id") String id){
+        MessageResult<CapitalInfo> msgResult = new MessageResult<>();
+
+        try {
+            CapitalInfo capitalInfo = capitalInfoService.get(id);
+
+            if (capitalInfo != null) {
+                msgResult.setResult(true);
+                msgResult.setData(capitalInfo);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<CapitalInfo> update(@RequestBody CapitalInfo capitalInfo,@RequestAttribute String subject){
+        MessageResult<CapitalInfo> msgResult = new MessageResult<>();
+
+        try {
+            capitalInfo.setUpdateBy(subject);
+            capitalInfo.setUpdateTime(new Date());
+            
+            int affectCount = capitalInfoService.update(capitalInfo);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(capitalInfo);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            CapitalInfo capitalInfo = capitalInfoService.get(id);
+            capitalInfo.setDelFlag(true);
+            capitalInfo.setUpdateBy(subject);
+            capitalInfo.setUpdateTime(new Date());
+
+            int affectCount = capitalInfoService.update(capitalInfo);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                CapitalInfo capitalInfo = capitalInfoService.get(id);
+                capitalInfo.setDelFlag(true);
+                capitalInfo.setUpdateBy(subject);
+                capitalInfo.setUpdateTime(new Date());
+
+                affectCount += capitalInfoService.update(capitalInfo);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("id_","asc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        Page<CapitalInfo> page = capitalInfoService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+}

+ 225 - 0
web/src/main/java/com/jpsoft/bus/modules/merchant/controller/WithdrawalRecordController.java

@@ -0,0 +1,225 @@
+package com.jpsoft.bus.modules.merchant.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.bus.modules.common.dto.MessageResult;
+import com.jpsoft.bus.modules.common.dto.Sort;
+import com.jpsoft.bus.modules.common.utils.PojoUtils;
+import com.jpsoft.bus.modules.merchant.entity.WithdrawalRecord;
+import com.jpsoft.bus.modules.merchant.service.WithdrawalRecordService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+@RestController
+@RequestMapping("/merchant/withdrawalRecord")
+@Api(description = "商户提现")
+public class WithdrawalRecordController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private WithdrawalRecordService withdrawalRecordService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<WithdrawalRecord> create(){
+        MessageResult<WithdrawalRecord> msgResult = new MessageResult<>();
+
+        WithdrawalRecord withdrawalRecord = new WithdrawalRecord();
+
+        msgResult.setData(withdrawalRecord);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<WithdrawalRecord> add(@RequestBody WithdrawalRecord withdrawalRecord,@RequestAttribute String subject){
+        MessageResult<WithdrawalRecord> msgResult = new MessageResult<>();
+
+        try {
+            withdrawalRecord.setId(UUID.randomUUID().toString());
+            withdrawalRecord.setDelFlag(false);
+            withdrawalRecord.setCreateBy(subject);
+            withdrawalRecord.setCreateTime(new Date());
+            
+            int affectCount = withdrawalRecordService.insert(withdrawalRecord);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(withdrawalRecord);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<WithdrawalRecord> edit(@PathVariable("id") String id){
+        MessageResult<WithdrawalRecord> msgResult = new MessageResult<>();
+
+        try {
+            WithdrawalRecord withdrawalRecord = withdrawalRecordService.get(id);
+
+            if (withdrawalRecord != null) {
+                msgResult.setResult(true);
+                msgResult.setData(withdrawalRecord);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<WithdrawalRecord> update(@RequestBody WithdrawalRecord withdrawalRecord,@RequestAttribute String subject){
+        MessageResult<WithdrawalRecord> msgResult = new MessageResult<>();
+
+        try {
+            withdrawalRecord.setUpdateBy(subject);
+            withdrawalRecord.setUpdateTime(new Date());
+            
+            int affectCount = withdrawalRecordService.update(withdrawalRecord);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(withdrawalRecord);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            WithdrawalRecord withdrawalRecord = withdrawalRecordService.get(id);
+            withdrawalRecord.setDelFlag(true);
+            withdrawalRecord.setUpdateBy(subject);
+            withdrawalRecord.setUpdateTime(new Date());
+
+            int affectCount = withdrawalRecordService.update(withdrawalRecord);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                WithdrawalRecord withdrawalRecord = withdrawalRecordService.get(id);
+                withdrawalRecord.setDelFlag(true);
+                withdrawalRecord.setUpdateBy(subject);
+                withdrawalRecord.setUpdateTime(new Date());
+
+                affectCount += withdrawalRecordService.update(withdrawalRecord);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
+            @RequestParam(value="pageSize",defaultValue="20") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("id_","asc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id","%" + id + "%");
+        }
+
+        Page<WithdrawalRecord> page = withdrawalRecordService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+}