@ -1,25 +0,0 @@ | |||||
package com.ruoyi.applet.contoller; | |||||
import com.ruoyi.common.core.controller.BaseController; | |||||
import com.ruoyi.common.core.page.TableDataInfo; | |||||
import com.ruoyi.model.service.IWithdrawalConfigService; | |||||
import io.swagger.annotations.Api; | |||||
import io.swagger.annotations.ApiOperation; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.web.bind.annotation.GetMapping; | |||||
import org.springframework.web.bind.annotation.RequestMapping; | |||||
import org.springframework.web.bind.annotation.RestController; | |||||
@Api(description = "钱包提现配置") | |||||
@RestController | |||||
@RequestMapping("/applet/withdrawalConfig") | |||||
public class AppletWithdrawalConfigController extends BaseController { | |||||
@Autowired | |||||
private IWithdrawalConfigService withdrawalConfigService; | |||||
@ApiOperation("钱包提现配置列表") | |||||
@GetMapping("/getWithdrawalConfigList") | |||||
public TableDataInfo getWithdrawalConfigList(){ | |||||
return getDataTable(withdrawalConfigService.getWithdrawalConfigList()); | |||||
} | |||||
} |
@ -1,104 +0,0 @@ | |||||
package com.ruoyi.model.controller; | |||||
import java.io.IOException; | |||||
import java.util.List; | |||||
import javax.servlet.http.HttpServletResponse; | |||||
import org.springframework.security.access.prepost.PreAuthorize; | |||||
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.annotation.Log; | |||||
import com.ruoyi.common.core.controller.BaseController; | |||||
import com.ruoyi.common.core.domain.AjaxResult; | |||||
import com.ruoyi.common.enums.BusinessType; | |||||
import com.ruoyi.model.domain.WithdrawalConfig; | |||||
import com.ruoyi.model.service.IWithdrawalConfigService; | |||||
import com.ruoyi.common.utils.poi.ExcelUtil; | |||||
import com.ruoyi.common.core.page.TableDataInfo; | |||||
/** | |||||
* 钱包提现配置Controller | |||||
* | |||||
* @author ruoyi | |||||
* @date 2025-03-05 | |||||
*/ | |||||
@RestController | |||||
@RequestMapping("/model/WithdrawalConfig") | |||||
public class WithdrawalConfigController extends BaseController | |||||
{ | |||||
@Autowired | |||||
private IWithdrawalConfigService withdrawalConfigService; | |||||
/** | |||||
* 查询钱包提现配置列表 | |||||
*/ | |||||
@PreAuthorize("@ss.hasPermi('model:WithdrawalConfig:list')") | |||||
@GetMapping("/list") | |||||
public TableDataInfo list(WithdrawalConfig withdrawalConfig) | |||||
{ | |||||
startPage(); | |||||
List<WithdrawalConfig> list = withdrawalConfigService.selectWithdrawalConfigList(withdrawalConfig); | |||||
return getDataTable(list); | |||||
} | |||||
/** | |||||
* 导出钱包提现配置列表 | |||||
*/ | |||||
@PreAuthorize("@ss.hasPermi('model:WithdrawalConfig:export')") | |||||
@Log(title = "钱包提现配置", businessType = BusinessType.EXPORT) | |||||
@PostMapping("/export") | |||||
public void export(HttpServletResponse response, WithdrawalConfig withdrawalConfig) throws IOException { | |||||
List<WithdrawalConfig> list = withdrawalConfigService.selectWithdrawalConfigList(withdrawalConfig); | |||||
ExcelUtil<WithdrawalConfig> util = new ExcelUtil<WithdrawalConfig>(WithdrawalConfig.class); | |||||
util.exportExcel(response, list, "钱包提现配置数据"); | |||||
} | |||||
/** | |||||
* 获取钱包提现配置详细信息 | |||||
*/ | |||||
@PreAuthorize("@ss.hasPermi('model:WithdrawalConfig:query')") | |||||
@GetMapping(value = "/{id}") | |||||
public AjaxResult getInfo(@PathVariable("id") Long id) | |||||
{ | |||||
return success(withdrawalConfigService.selectWithdrawalConfigById(id)); | |||||
} | |||||
/** | |||||
* 新增钱包提现配置 | |||||
*/ | |||||
@PreAuthorize("@ss.hasPermi('model:WithdrawalConfig:add')") | |||||
@Log(title = "钱包提现配置", businessType = BusinessType.INSERT) | |||||
@PostMapping | |||||
public AjaxResult add(@RequestBody WithdrawalConfig withdrawalConfig) | |||||
{ | |||||
return toAjax(withdrawalConfigService.insertWithdrawalConfig(withdrawalConfig)); | |||||
} | |||||
/** | |||||
* 修改钱包提现配置 | |||||
*/ | |||||
@PreAuthorize("@ss.hasPermi('model:WithdrawalConfig:edit')") | |||||
@Log(title = "钱包提现配置", businessType = BusinessType.UPDATE) | |||||
@PutMapping | |||||
public AjaxResult edit(@RequestBody WithdrawalConfig withdrawalConfig) | |||||
{ | |||||
return toAjax(withdrawalConfigService.updateWithdrawalConfig(withdrawalConfig)); | |||||
} | |||||
/** | |||||
* 删除钱包提现配置 | |||||
*/ | |||||
@PreAuthorize("@ss.hasPermi('model:WithdrawalConfig:remove')") | |||||
@Log(title = "钱包提现配置", businessType = BusinessType.DELETE) | |||||
@DeleteMapping("/{ids}") | |||||
public AjaxResult remove(@PathVariable Long[] ids) | |||||
{ | |||||
return toAjax(withdrawalConfigService.deleteWithdrawalConfigByIds(ids)); | |||||
} | |||||
} |
@ -1,79 +0,0 @@ | |||||
package com.ruoyi.model.domain; | |||||
import org.apache.commons.lang3.builder.ToStringBuilder; | |||||
import org.apache.commons.lang3.builder.ToStringStyle; | |||||
import com.ruoyi.common.annotation.Excel; | |||||
import com.ruoyi.common.core.domain.BaseEntity; | |||||
/** | |||||
* 钱包提现配置对象 withdrawal_config | |||||
* | |||||
* @author ruoyi | |||||
* @date 2025-03-05 | |||||
*/ | |||||
public class WithdrawalConfig extends BaseEntity | |||||
{ | |||||
private static final long serialVersionUID = 1L; | |||||
/** 主键 */ | |||||
private Long id; | |||||
/** 提现标题 */ | |||||
@Excel(name = "提现标题") | |||||
private String withdrawalTitle; | |||||
/** 提现文本 */ | |||||
@Excel(name = "提现文本") | |||||
private String withdrawalText; | |||||
/** 提现消息弹窗文本 */ | |||||
@Excel(name = "提现消息弹窗文本") | |||||
private String withdrawalMessage; | |||||
public void setId(Long id) | |||||
{ | |||||
this.id = id; | |||||
} | |||||
public Long getId() | |||||
{ | |||||
return id; | |||||
} | |||||
public void setWithdrawalTitle(String withdrawalTitle) | |||||
{ | |||||
this.withdrawalTitle = withdrawalTitle; | |||||
} | |||||
public String getWithdrawalTitle() | |||||
{ | |||||
return withdrawalTitle; | |||||
} | |||||
public void setWithdrawalText(String withdrawalText) | |||||
{ | |||||
this.withdrawalText = withdrawalText; | |||||
} | |||||
public String getWithdrawalText() | |||||
{ | |||||
return withdrawalText; | |||||
} | |||||
public void setWithdrawalMessage(String withdrawalMessage) | |||||
{ | |||||
this.withdrawalMessage = withdrawalMessage; | |||||
} | |||||
public String getWithdrawalMessage() | |||||
{ | |||||
return withdrawalMessage; | |||||
} | |||||
@Override | |||||
public String toString() { | |||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | |||||
.append("id", getId()) | |||||
.append("withdrawalTitle", getWithdrawalTitle()) | |||||
.append("withdrawalText", getWithdrawalText()) | |||||
.append("withdrawalMessage", getWithdrawalMessage()) | |||||
.toString(); | |||||
} | |||||
} |
@ -1,68 +0,0 @@ | |||||
package com.ruoyi.model.mapper; | |||||
import java.util.List; | |||||
import com.ruoyi.model.domain.WithdrawalConfig; | |||||
/** | |||||
* 钱包提现配置Mapper接口 | |||||
* | |||||
* @author ruoyi | |||||
* @date 2025-03-05 | |||||
*/ | |||||
public interface WithdrawalConfigMapper | |||||
{ | |||||
/** | |||||
* 查询钱包提现配置 | |||||
* | |||||
* @param id 钱包提现配置主键 | |||||
* @return 钱包提现配置 | |||||
*/ | |||||
public WithdrawalConfig selectWithdrawalConfigById(Long id); | |||||
/** | |||||
* 查询钱包提现配置列表 | |||||
* | |||||
* @param withdrawalConfig 钱包提现配置 | |||||
* @return 钱包提现配置集合 | |||||
*/ | |||||
public List<WithdrawalConfig> selectWithdrawalConfigList(WithdrawalConfig withdrawalConfig); | |||||
/** | |||||
* 新增钱包提现配置 | |||||
* | |||||
* @param withdrawalConfig 钱包提现配置 | |||||
* @return 结果 | |||||
*/ | |||||
public int insertWithdrawalConfig(WithdrawalConfig withdrawalConfig); | |||||
/** | |||||
* 修改钱包提现配置 | |||||
* | |||||
* @param withdrawalConfig 钱包提现配置 | |||||
* @return 结果 | |||||
*/ | |||||
public int updateWithdrawalConfig(WithdrawalConfig withdrawalConfig); | |||||
/** | |||||
* 删除钱包提现配置 | |||||
* | |||||
* @param id 钱包提现配置主键 | |||||
* @return 结果 | |||||
*/ | |||||
public int deleteWithdrawalConfigById(Long id); | |||||
/** | |||||
* 批量删除钱包提现配置 | |||||
* | |||||
* @param ids 需要删除的数据主键集合 | |||||
* @return 结果 | |||||
*/ | |||||
public int deleteWithdrawalConfigByIds(Long[] ids); | |||||
/** | |||||
* 查询钱包提现配置列表 | |||||
* | |||||
* @return 钱包提现配置集合 | |||||
*/ | |||||
public List<WithdrawalConfig> getWithdrawalConfigList(); | |||||
} |
@ -1,68 +0,0 @@ | |||||
package com.ruoyi.model.service; | |||||
import java.util.List; | |||||
import com.ruoyi.model.domain.WithdrawalConfig; | |||||
/** | |||||
* 钱包提现配置Service接口 | |||||
* | |||||
* @author ruoyi | |||||
* @date 2025-03-05 | |||||
*/ | |||||
public interface IWithdrawalConfigService | |||||
{ | |||||
/** | |||||
* 查询钱包提现配置 | |||||
* | |||||
* @param id 钱包提现配置主键 | |||||
* @return 钱包提现配置 | |||||
*/ | |||||
public WithdrawalConfig selectWithdrawalConfigById(Long id); | |||||
/** | |||||
* 查询钱包提现配置列表 | |||||
* | |||||
* @param withdrawalConfig 钱包提现配置 | |||||
* @return 钱包提现配置集合 | |||||
*/ | |||||
public List<WithdrawalConfig> selectWithdrawalConfigList(WithdrawalConfig withdrawalConfig); | |||||
/** | |||||
* 新增钱包提现配置 | |||||
* | |||||
* @param withdrawalConfig 钱包提现配置 | |||||
* @return 结果 | |||||
*/ | |||||
public int insertWithdrawalConfig(WithdrawalConfig withdrawalConfig); | |||||
/** | |||||
* 修改钱包提现配置 | |||||
* | |||||
* @param withdrawalConfig 钱包提现配置 | |||||
* @return 结果 | |||||
*/ | |||||
public int updateWithdrawalConfig(WithdrawalConfig withdrawalConfig); | |||||
/** | |||||
* 批量删除钱包提现配置 | |||||
* | |||||
* @param ids 需要删除的钱包提现配置主键集合 | |||||
* @return 结果 | |||||
*/ | |||||
public int deleteWithdrawalConfigByIds(Long[] ids); | |||||
/** | |||||
* 删除钱包提现配置信息 | |||||
* | |||||
* @param id 钱包提现配置主键 | |||||
* @return 结果 | |||||
*/ | |||||
public int deleteWithdrawalConfigById(Long id); | |||||
/** | |||||
* 查询钱包提现配置列表 | |||||
* | |||||
* @return 钱包提现配置集合 | |||||
*/ | |||||
public List<WithdrawalConfig> getWithdrawalConfigList(); | |||||
} |
@ -1,103 +0,0 @@ | |||||
package com.ruoyi.model.service.impl; | |||||
import java.util.List; | |||||
import org.springframework.beans.factory.annotation.Autowired; | |||||
import org.springframework.stereotype.Service; | |||||
import com.ruoyi.model.mapper.WithdrawalConfigMapper; | |||||
import com.ruoyi.model.domain.WithdrawalConfig; | |||||
import com.ruoyi.model.service.IWithdrawalConfigService; | |||||
/** | |||||
* 钱包提现配置Service业务层处理 | |||||
* | |||||
* @author ruoyi | |||||
* @date 2025-03-05 | |||||
*/ | |||||
@Service | |||||
public class WithdrawalConfigServiceImpl implements IWithdrawalConfigService | |||||
{ | |||||
@Autowired | |||||
private WithdrawalConfigMapper withdrawalConfigMapper; | |||||
/** | |||||
* 查询钱包提现配置 | |||||
* | |||||
* @param id 钱包提现配置主键 | |||||
* @return 钱包提现配置 | |||||
*/ | |||||
@Override | |||||
public WithdrawalConfig selectWithdrawalConfigById(Long id) | |||||
{ | |||||
return withdrawalConfigMapper.selectWithdrawalConfigById(id); | |||||
} | |||||
/** | |||||
* 查询钱包提现配置列表 | |||||
* | |||||
* @param withdrawalConfig 钱包提现配置 | |||||
* @return 钱包提现配置 | |||||
*/ | |||||
@Override | |||||
public List<WithdrawalConfig> selectWithdrawalConfigList(WithdrawalConfig withdrawalConfig) | |||||
{ | |||||
return withdrawalConfigMapper.selectWithdrawalConfigList(withdrawalConfig); | |||||
} | |||||
/** | |||||
* 新增钱包提现配置 | |||||
* | |||||
* @param withdrawalConfig 钱包提现配置 | |||||
* @return 结果 | |||||
*/ | |||||
@Override | |||||
public int insertWithdrawalConfig(WithdrawalConfig withdrawalConfig) | |||||
{ | |||||
return withdrawalConfigMapper.insertWithdrawalConfig(withdrawalConfig); | |||||
} | |||||
/** | |||||
* 修改钱包提现配置 | |||||
* | |||||
* @param withdrawalConfig 钱包提现配置 | |||||
* @return 结果 | |||||
*/ | |||||
@Override | |||||
public int updateWithdrawalConfig(WithdrawalConfig withdrawalConfig) | |||||
{ | |||||
return withdrawalConfigMapper.updateWithdrawalConfig(withdrawalConfig); | |||||
} | |||||
/** | |||||
* 批量删除钱包提现配置 | |||||
* | |||||
* @param ids 需要删除的钱包提现配置主键 | |||||
* @return 结果 | |||||
*/ | |||||
@Override | |||||
public int deleteWithdrawalConfigByIds(Long[] ids) | |||||
{ | |||||
return withdrawalConfigMapper.deleteWithdrawalConfigByIds(ids); | |||||
} | |||||
/** | |||||
* 删除钱包提现配置信息 | |||||
* | |||||
* @param id 钱包提现配置主键 | |||||
* @return 结果 | |||||
*/ | |||||
@Override | |||||
public int deleteWithdrawalConfigById(Long id) | |||||
{ | |||||
return withdrawalConfigMapper.deleteWithdrawalConfigById(id); | |||||
} | |||||
/** | |||||
* 查询钱包提现配置列表 | |||||
* | |||||
* @return 钱包提现配置集合 | |||||
*/ | |||||
@Override | |||||
public List<WithdrawalConfig> getWithdrawalConfigList() { | |||||
return withdrawalConfigMapper.getWithdrawalConfigList(); | |||||
} | |||||
} |
@ -1,71 +0,0 @@ | |||||
<?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.ruoyi.model.mapper.WithdrawalConfigMapper"> | |||||
<resultMap type="WithdrawalConfig" id="WithdrawalConfigResult"> | |||||
<result property="id" column="id" /> | |||||
<result property="withdrawalTitle" column="withdrawal_title" /> | |||||
<result property="withdrawalText" column="withdrawal_text" /> | |||||
<result property="withdrawalMessage" column="withdrawal_message" /> | |||||
</resultMap> | |||||
<sql id="selectWithdrawalConfigVo"> | |||||
select id, withdrawal_title, withdrawal_text, withdrawal_message from withdrawal_config | |||||
</sql> | |||||
<select id="selectWithdrawalConfigList" parameterType="WithdrawalConfig" resultMap="WithdrawalConfigResult"> | |||||
<include refid="selectWithdrawalConfigVo"/> | |||||
<where> | |||||
<if test="withdrawalTitle != null and withdrawalTitle != ''"> and withdrawal_title = #{withdrawalTitle}</if> | |||||
<if test="withdrawalText != null and withdrawalText != ''"> and withdrawal_text = #{withdrawalText}</if> | |||||
<if test="withdrawalMessage != null and withdrawalMessage != ''"> and withdrawal_message = #{withdrawalMessage}</if> | |||||
</where> | |||||
</select> | |||||
<select id="selectWithdrawalConfigById" parameterType="Long" resultMap="WithdrawalConfigResult"> | |||||
<include refid="selectWithdrawalConfigVo"/> | |||||
where id = #{id} | |||||
</select> | |||||
<select id="getWithdrawalConfigList" resultType="com.ruoyi.model.domain.WithdrawalConfig"> | |||||
<include refid="selectWithdrawalConfigVo"/> | |||||
</select> | |||||
<insert id="insertWithdrawalConfig" parameterType="WithdrawalConfig"> | |||||
insert into withdrawal_config | |||||
<trim prefix="(" suffix=")" suffixOverrides=","> | |||||
<if test="id != null">id,</if> | |||||
<if test="withdrawalTitle != null">withdrawal_title,</if> | |||||
<if test="withdrawalText != null">withdrawal_text,</if> | |||||
<if test="withdrawalMessage != null">withdrawal_message,</if> | |||||
</trim> | |||||
<trim prefix="values (" suffix=")" suffixOverrides=","> | |||||
<if test="id != null">#{id},</if> | |||||
<if test="withdrawalTitle != null">#{withdrawalTitle},</if> | |||||
<if test="withdrawalText != null">#{withdrawalText},</if> | |||||
<if test="withdrawalMessage != null">#{withdrawalMessage},</if> | |||||
</trim> | |||||
</insert> | |||||
<update id="updateWithdrawalConfig" parameterType="WithdrawalConfig"> | |||||
update withdrawal_config | |||||
<trim prefix="SET" suffixOverrides=","> | |||||
<if test="withdrawalTitle != null">withdrawal_title = #{withdrawalTitle},</if> | |||||
<if test="withdrawalText != null">withdrawal_text = #{withdrawalText},</if> | |||||
<if test="withdrawalMessage != null">withdrawal_message = #{withdrawalMessage},</if> | |||||
</trim> | |||||
where id = #{id} | |||||
</update> | |||||
<delete id="deleteWithdrawalConfigById" parameterType="Long"> | |||||
delete from withdrawal_config where id = #{id} | |||||
</delete> | |||||
<delete id="deleteWithdrawalConfigByIds" parameterType="String"> | |||||
delete from withdrawal_config where id in | |||||
<foreach item="id" collection="array" open="(" separator="," close=")"> | |||||
#{id} | |||||
</foreach> | |||||
</delete> | |||||
</mapper> |