parent
0d2a990056
commit
4e634f07d2
13 changed files with 187 additions and 10 deletions
@ -0,0 +1,41 @@ |
||||
package com.daqing.financial.guarantee.controller; |
||||
|
||||
|
||||
import com.daqing.financial.guarantee.service.IDgBankService; |
||||
import com.daqing.framework.domain.guarantee.DgBank; |
||||
import com.daqing.framework.model.response.ResponseResult; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import org.springframework.stereotype.Controller; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* <p> |
||||
* 前端控制器 |
||||
* </p> |
||||
* |
||||
* @author Qyq |
||||
* @since 2020-11-12 |
||||
*/ |
||||
@RestController |
||||
@RequestMapping("/dg-bank") |
||||
public class DgBankController { |
||||
@Resource |
||||
private IDgBankService dgBankService; |
||||
|
||||
/** |
||||
* 查询所有银行数据 |
||||
* @param |
||||
* @return |
||||
*/ |
||||
@GetMapping("/bankList") |
||||
@ApiOperation(value = "查询所有银行数据") |
||||
public ResponseResult bankList(){ |
||||
List<DgBank> result = dgBankService.list(); |
||||
return ResponseResult.SUCCESS(result); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,18 @@ |
||||
package com.daqing.financial.guarantee.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.daqing.framework.domain.guarantee.DgBank; |
||||
import org.apache.ibatis.annotations.Mapper; |
||||
|
||||
/** |
||||
* <p> |
||||
* Mapper 接口 |
||||
* </p> |
||||
* |
||||
* @author Qyq |
||||
* @since 2020-11-12 |
||||
*/ |
||||
@Mapper |
||||
public interface DgBankMapper extends BaseMapper<DgBank> { |
||||
|
||||
} |
@ -0,0 +1,16 @@ |
||||
package com.daqing.financial.guarantee.service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import com.daqing.framework.domain.guarantee.DgBank; |
||||
|
||||
/** |
||||
* <p> |
||||
* 服务类 |
||||
* </p> |
||||
* |
||||
* @author Qyq |
||||
* @since 2020-11-12 |
||||
*/ |
||||
public interface IDgBankService extends IService<DgBank> { |
||||
|
||||
} |
@ -0,0 +1,20 @@ |
||||
package com.daqing.financial.guarantee.service.impl; |
||||
|
||||
import com.daqing.financial.guarantee.mapper.DgBankMapper; |
||||
import com.daqing.financial.guarantee.service.IDgBankService; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import com.daqing.framework.domain.guarantee.DgBank; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* <p> |
||||
* 服务实现类 |
||||
* </p> |
||||
* |
||||
* @author Qyq |
||||
* @since 2020-11-12 |
||||
*/ |
||||
@Service |
||||
public class DgBankServiceImpl extends ServiceImpl<DgBankMapper, DgBank> implements IDgBankService { |
||||
|
||||
} |
@ -0,0 +1,12 @@ |
||||
<?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"> |
||||
<mapper namespace="com.daqing.financial.guarantee.mapper.DgBankMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="BaseResultMap" type="com.daqing.framework.domain.guarantee.DgBank"> |
||||
<id column="id" property="id" /> |
||||
<result column="bank_name" property="bankName" /> |
||||
<result column="bank_code" property="bankCode" /> |
||||
</resultMap> |
||||
|
||||
</mapper> |
@ -0,0 +1,65 @@ |
||||
package com.daqing.framework.domain.guarantee; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* <p> |
||||
* |
||||
* </p> |
||||
* |
||||
* @author Qyq |
||||
* @since 2020-11-12 |
||||
*/ |
||||
@TableName("dg_bank") |
||||
public class DgBank implements Serializable { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
@TableId(value = "id", type = IdType.AUTO) |
||||
private Integer id; |
||||
|
||||
/** |
||||
* 银行名称 |
||||
*/ |
||||
private String bankName; |
||||
|
||||
/** |
||||
* 银行标识码 |
||||
*/ |
||||
private String bankCode; |
||||
|
||||
public Integer getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Integer id) { |
||||
this.id = id; |
||||
} |
||||
public String getBankName() { |
||||
return bankName; |
||||
} |
||||
|
||||
public void setBankName(String bankName) { |
||||
this.bankName = bankName; |
||||
} |
||||
public String getBankCode() { |
||||
return bankCode; |
||||
} |
||||
|
||||
public void setBankCode(String bankCode) { |
||||
this.bankCode = bankCode; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
return "DgBank{" + |
||||
"id=" + id + |
||||
", bankName=" + bankName + |
||||
", bankCode=" + bankCode + |
||||
"}"; |
||||
} |
||||
} |
Loading…
Reference in new issue