Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
mingxing.ai committed Aug 31, 2023
1 parent c78d34e commit 902ce7c
Show file tree
Hide file tree
Showing 8 changed files with 1,122 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
package com.ruoyi.client.controller;

import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.log.annotation.Log;
import com.ruoyi.common.log.enums.BusinessType;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import com.ruoyi.client.domain.FundAccountInfo;
import com.ruoyi.client.service.IFundAccountInfoService;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.utils.poi.ExcelUtil;
import com.ruoyi.common.core.web.page.TableDataInfo;

/**
* 账号管理Controller
*
* @author ruoyi
* @date 2023-08-31
*/
@RestController
@RequestMapping("/account")
public class FundAccountInfoController extends BaseController
{
@Autowired
private IFundAccountInfoService fundAccountInfoService;

/**
* 查询账号管理列表
*/
@RequiresPermissions("fund:account:list")
@GetMapping("/list")
public TableDataInfo list(FundAccountInfo fundAccountInfo)
{
startPage();
List<FundAccountInfo> list = fundAccountInfoService.selectFundAccountInfoList(fundAccountInfo);
return getDataTable(list);
}

/**
* 导出账号管理列表
*/
@RequiresPermissions("fund:account:export")
@Log(title = "账号管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, FundAccountInfo fundAccountInfo)
{
List<FundAccountInfo> list = fundAccountInfoService.selectFundAccountInfoList(fundAccountInfo);
ExcelUtil<FundAccountInfo> util = new ExcelUtil<FundAccountInfo>(FundAccountInfo.class);
util.exportExcel(response, list, "账号管理数据");
}

/**
* 获取账号管理详细信息
*/
@RequiresPermissions("fund:account:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(fundAccountInfoService.selectFundAccountInfoById(id));
}

/**
* 新增账号管理
*/
@RequiresPermissions("fund:account:add")
@Log(title = "账号管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody FundAccountInfo fundAccountInfo)
{
return toAjax(fundAccountInfoService.insertFundAccountInfo(fundAccountInfo));
}

/**
* 修改账号管理
*/
@RequiresPermissions("fund:account:edit")
@Log(title = "账号管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody FundAccountInfo fundAccountInfo)
{
return toAjax(fundAccountInfoService.updateFundAccountInfo(fundAccountInfo));
}

/**
* 删除账号管理
*/
@RequiresPermissions("fund:account:remove")
@Log(title = "账号管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(fundAccountInfoService.deleteFundAccountInfoByIds(ids));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
package com.ruoyi.client.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
* 账号管理对象 fund_account_info
*
* @author ruoyi
* @date 2023-08-31
*/
public class FundAccountInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;

/** 编号 */
private Long id;

/** 所属用户 */
@Excel(name = "所属用户")
private Long userId;

/** 所属用户名 */
@Excel(name = "所属用户名")
private String userName;

/** 账户名 */
@Excel(name = "账户名")
private String accountName;

/** 账号 */
@Excel(name = "账号")
private String accountNo;

/** 币种 */
@Excel(name = "币种")
private String accountCurrency;

/** 账户类型 */
@Excel(name = "账户类型")
private String accountType;

/** 账户用途 */
@Excel(name = "账户用途")
private String accountUsage;

/** 账户所属机构 */
@Excel(name = "账户所属机构")
private String accountOwner;

/** 账号机构号码 */
@Excel(name = "账号机构号码")
private String accountOwnerCode;

/** 账号机构地址 */
@Excel(name = "账号机构地址")
private String accountOwnerAddr;

/** 状态 */
@Excel(name = "状态")
private Long status;

/** 删除标识 */
private Long delFlag;

public void setId(Long id)
{
this.id = id;
}

public Long getId()
{
return id;
}
public void setUserId(Long userId)
{
this.userId = userId;
}

public Long getUserId()
{
return userId;
}
public void setUserName(String userName)
{
this.userName = userName;
}

public String getUserName()
{
return userName;
}
public void setAccountName(String accountName)
{
this.accountName = accountName;
}

public String getAccountName()
{
return accountName;
}
public void setAccountNo(String accountNo)
{
this.accountNo = accountNo;
}

public String getAccountNo()
{
return accountNo;
}
public void setAccountCurrency(String accountCurrency)
{
this.accountCurrency = accountCurrency;
}

public String getAccountCurrency()
{
return accountCurrency;
}
public void setAccountType(String accountType)
{
this.accountType = accountType;
}

public String getAccountType()
{
return accountType;
}
public void setAccountUsage(String accountUsage)
{
this.accountUsage = accountUsage;
}

public String getAccountUsage()
{
return accountUsage;
}
public void setAccountOwner(String accountOwner)
{
this.accountOwner = accountOwner;
}

public String getAccountOwner()
{
return accountOwner;
}
public void setAccountOwnerCode(String accountOwnerCode)
{
this.accountOwnerCode = accountOwnerCode;
}

public String getAccountOwnerCode()
{
return accountOwnerCode;
}
public void setAccountOwnerAddr(String accountOwnerAddr)
{
this.accountOwnerAddr = accountOwnerAddr;
}

public String getAccountOwnerAddr()
{
return accountOwnerAddr;
}
public void setStatus(Long status)
{
this.status = status;
}

public Long getStatus()
{
return status;
}
public void setDelFlag(Long delFlag)
{
this.delFlag = delFlag;
}

public Long getDelFlag()
{
return delFlag;
}

@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("userId", getUserId())
.append("userName", getUserName())
.append("accountName", getAccountName())
.append("accountNo", getAccountNo())
.append("accountCurrency", getAccountCurrency())
.append("accountType", getAccountType())
.append("accountUsage", getAccountUsage())
.append("accountOwner", getAccountOwner())
.append("accountOwnerCode", getAccountOwnerCode())
.append("accountOwnerAddr", getAccountOwnerAddr())
.append("remark", getRemark())
.append("status", getStatus())
.append("delFlag", getDelFlag())
.append("createTime", getCreateTime())
.append("createBy", getCreateBy())
.append("updateTime", getUpdateTime())
.append("updateBy", getUpdateBy())
.toString();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package com.ruoyi.client.mapper;

import java.util.List;
import com.ruoyi.client.domain.FundAccountInfo;

/**
* 账号管理Mapper接口
*
* @author ruoyi
* @date 2023-08-31
*/
public interface FundAccountInfoMapper
{
/**
* 查询账号管理
*
* @param id 账号管理主键
* @return 账号管理
*/
public FundAccountInfo selectFundAccountInfoById(Long id);

/**
* 查询账号管理列表
*
* @param fundAccountInfo 账号管理
* @return 账号管理集合
*/
public List<FundAccountInfo> selectFundAccountInfoList(FundAccountInfo fundAccountInfo);

/**
* 新增账号管理
*
* @param fundAccountInfo 账号管理
* @return 结果
*/
public int insertFundAccountInfo(FundAccountInfo fundAccountInfo);

/**
* 修改账号管理
*
* @param fundAccountInfo 账号管理
* @return 结果
*/
public int updateFundAccountInfo(FundAccountInfo fundAccountInfo);

/**
* 删除账号管理
*
* @param id 账号管理主键
* @return 结果
*/
public int deleteFundAccountInfoById(Long id);

/**
* 批量删除账号管理
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteFundAccountInfoByIds(Long[] ids);
}
Loading

0 comments on commit 902ce7c

Please sign in to comment.