1;帐分快照-50%
This commit is contained in:
parent
8e1e0b93f4
commit
66a1be326a
|
@ -0,0 +1,104 @@
|
|||
package com.ruoyi.business.controller;
|
||||
|
||||
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.business.domain.BusIntegralHistoryInfo;
|
||||
import com.ruoyi.business.service.IBusIntegralHistoryInfoService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 帐分历史快照Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-08-18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/integral/integral")
|
||||
public class BusIntegralHistoryInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBusIntegralHistoryInfoService busIntegralHistoryInfoService;
|
||||
|
||||
/**
|
||||
* 查询帐分历史快照列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('integral:integral:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BusIntegralHistoryInfo busIntegralHistoryInfo)
|
||||
{
|
||||
startPage();
|
||||
List<BusIntegralHistoryInfo> list = busIntegralHistoryInfoService.selectBusIntegralHistoryInfoList(busIntegralHistoryInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出帐分历史快照列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('integral:integral:export')")
|
||||
@Log(title = "帐分历史快照", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BusIntegralHistoryInfo busIntegralHistoryInfo)
|
||||
{
|
||||
List<BusIntegralHistoryInfo> list = busIntegralHistoryInfoService.selectBusIntegralHistoryInfoList(busIntegralHistoryInfo);
|
||||
ExcelUtil<BusIntegralHistoryInfo> util = new ExcelUtil<BusIntegralHistoryInfo>(BusIntegralHistoryInfo.class);
|
||||
util.exportExcel(response, list, "帐分历史快照数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取帐分历史快照详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('integral:integral:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(busIntegralHistoryInfoService.selectBusIntegralHistoryInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增帐分历史快照
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('integral:integral:add')")
|
||||
@Log(title = "帐分历史快照", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BusIntegralHistoryInfo busIntegralHistoryInfo)
|
||||
{
|
||||
return toAjax(busIntegralHistoryInfoService.insertBusIntegralHistoryInfo(busIntegralHistoryInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改帐分历史快照
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('integral:integral:edit')")
|
||||
@Log(title = "帐分历史快照", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BusIntegralHistoryInfo busIntegralHistoryInfo)
|
||||
{
|
||||
return toAjax(busIntegralHistoryInfoService.updateBusIntegralHistoryInfo(busIntegralHistoryInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除帐分历史快照
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('integral:integral:remove')")
|
||||
@Log(title = "帐分历史快照", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(busIntegralHistoryInfoService.deleteBusIntegralHistoryInfoByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,109 @@
|
|||
package com.ruoyi.business.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;
|
||||
|
||||
/**
|
||||
* 帐分历史快照对象 bus_integral_history_info
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-08-18
|
||||
*/
|
||||
public class BusIntegralHistoryInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 账号 */
|
||||
@Excel(name = "账号")
|
||||
private String account;
|
||||
|
||||
/** 账户名 */
|
||||
@Excel(name = "账户名")
|
||||
private String accountName;
|
||||
|
||||
/** 上级账号 */
|
||||
@Excel(name = "上级账号")
|
||||
private String superiorAgentCode;
|
||||
|
||||
/** ai帐分 */
|
||||
@Excel(name = "ai帐分")
|
||||
private Long aiIntegralBalance;
|
||||
|
||||
/** sms帐分 */
|
||||
@Excel(name = "sms帐分")
|
||||
private Long integralBalance;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setAccount(String account)
|
||||
{
|
||||
this.account = account;
|
||||
}
|
||||
|
||||
public String getAccount()
|
||||
{
|
||||
return account;
|
||||
}
|
||||
public void setAccountName(String accountName)
|
||||
{
|
||||
this.accountName = accountName;
|
||||
}
|
||||
|
||||
public String getAccountName()
|
||||
{
|
||||
return accountName;
|
||||
}
|
||||
public void setSuperiorAgentCode(String superiorAgentCode)
|
||||
{
|
||||
this.superiorAgentCode = superiorAgentCode;
|
||||
}
|
||||
|
||||
public String getSuperiorAgentCode()
|
||||
{
|
||||
return superiorAgentCode;
|
||||
}
|
||||
public void setAiIntegralBalance(Long aiIntegralBalance)
|
||||
{
|
||||
this.aiIntegralBalance = aiIntegralBalance;
|
||||
}
|
||||
|
||||
public Long getAiIntegralBalance()
|
||||
{
|
||||
return aiIntegralBalance;
|
||||
}
|
||||
public void setIntegralBalance(Long integralBalance)
|
||||
{
|
||||
this.integralBalance = integralBalance;
|
||||
}
|
||||
|
||||
public Long getIntegralBalance()
|
||||
{
|
||||
return integralBalance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("account", getAccount())
|
||||
.append("accountName", getAccountName())
|
||||
.append("superiorAgentCode", getSuperiorAgentCode())
|
||||
.append("aiIntegralBalance", getAiIntegralBalance())
|
||||
.append("integralBalance", getIntegralBalance())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.business.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.business.domain.BusIntegralHistoryInfo;
|
||||
|
||||
/**
|
||||
* 帐分历史快照Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-08-18
|
||||
*/
|
||||
public interface BusIntegralHistoryInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询帐分历史快照
|
||||
*
|
||||
* @param id 帐分历史快照主键
|
||||
* @return 帐分历史快照
|
||||
*/
|
||||
public BusIntegralHistoryInfo selectBusIntegralHistoryInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询帐分历史快照列表
|
||||
*
|
||||
* @param busIntegralHistoryInfo 帐分历史快照
|
||||
* @return 帐分历史快照集合
|
||||
*/
|
||||
public List<BusIntegralHistoryInfo> selectBusIntegralHistoryInfoList(BusIntegralHistoryInfo busIntegralHistoryInfo);
|
||||
|
||||
/**
|
||||
* 新增帐分历史快照
|
||||
*
|
||||
* @param busIntegralHistoryInfo 帐分历史快照
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBusIntegralHistoryInfo(BusIntegralHistoryInfo busIntegralHistoryInfo);
|
||||
|
||||
/**
|
||||
* 修改帐分历史快照
|
||||
*
|
||||
* @param busIntegralHistoryInfo 帐分历史快照
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBusIntegralHistoryInfo(BusIntegralHistoryInfo busIntegralHistoryInfo);
|
||||
|
||||
/**
|
||||
* 删除帐分历史快照
|
||||
*
|
||||
* @param id 帐分历史快照主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBusIntegralHistoryInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除帐分历史快照
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBusIntegralHistoryInfoByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.business.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.business.domain.BusIntegralHistoryInfo;
|
||||
|
||||
/**
|
||||
* 帐分历史快照Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-08-18
|
||||
*/
|
||||
public interface IBusIntegralHistoryInfoService
|
||||
{
|
||||
/**
|
||||
* 查询帐分历史快照
|
||||
*
|
||||
* @param id 帐分历史快照主键
|
||||
* @return 帐分历史快照
|
||||
*/
|
||||
public BusIntegralHistoryInfo selectBusIntegralHistoryInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询帐分历史快照列表
|
||||
*
|
||||
* @param busIntegralHistoryInfo 帐分历史快照
|
||||
* @return 帐分历史快照集合
|
||||
*/
|
||||
public List<BusIntegralHistoryInfo> selectBusIntegralHistoryInfoList(BusIntegralHistoryInfo busIntegralHistoryInfo);
|
||||
|
||||
/**
|
||||
* 新增帐分历史快照
|
||||
*
|
||||
* @param busIntegralHistoryInfo 帐分历史快照
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBusIntegralHistoryInfo(BusIntegralHistoryInfo busIntegralHistoryInfo);
|
||||
|
||||
/**
|
||||
* 修改帐分历史快照
|
||||
*
|
||||
* @param busIntegralHistoryInfo 帐分历史快照
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBusIntegralHistoryInfo(BusIntegralHistoryInfo busIntegralHistoryInfo);
|
||||
|
||||
/**
|
||||
* 批量删除帐分历史快照
|
||||
*
|
||||
* @param ids 需要删除的帐分历史快照主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBusIntegralHistoryInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除帐分历史快照信息
|
||||
*
|
||||
* @param id 帐分历史快照主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBusIntegralHistoryInfoById(Long id);
|
||||
}
|
|
@ -245,8 +245,9 @@ public class AiConsumer {
|
|||
e.printStackTrace();
|
||||
log.error("营销事件推出-下次继续=====================");
|
||||
throw new ServiceException("营销事件推出-下次继续:"+busOrderInfo.getOrderNo());
|
||||
}finally {
|
||||
System.out.println(("一共耗时time: " + (System.currentTimeMillis() - startTime) / 1000 + " s"));
|
||||
}
|
||||
System.out.println(("一共耗时time: " + (System.currentTimeMillis() - startTime) / 1000 + " s"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,95 @@
|
|||
package com.ruoyi.business.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.business.mapper.BusIntegralHistoryInfoMapper;
|
||||
import com.ruoyi.business.domain.BusIntegralHistoryInfo;
|
||||
import com.ruoyi.business.service.IBusIntegralHistoryInfoService;
|
||||
|
||||
/**
|
||||
* 帐分历史快照Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-08-18
|
||||
*/
|
||||
@Service
|
||||
public class BusIntegralHistoryInfoServiceImpl implements IBusIntegralHistoryInfoService
|
||||
{
|
||||
@Autowired
|
||||
private BusIntegralHistoryInfoMapper busIntegralHistoryInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询帐分历史快照
|
||||
*
|
||||
* @param id 帐分历史快照主键
|
||||
* @return 帐分历史快照
|
||||
*/
|
||||
@Override
|
||||
public BusIntegralHistoryInfo selectBusIntegralHistoryInfoById(Long id)
|
||||
{
|
||||
return busIntegralHistoryInfoMapper.selectBusIntegralHistoryInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询帐分历史快照列表
|
||||
*
|
||||
* @param busIntegralHistoryInfo 帐分历史快照
|
||||
* @return 帐分历史快照
|
||||
*/
|
||||
@Override
|
||||
public List<BusIntegralHistoryInfo> selectBusIntegralHistoryInfoList(BusIntegralHistoryInfo busIntegralHistoryInfo)
|
||||
{
|
||||
return busIntegralHistoryInfoMapper.selectBusIntegralHistoryInfoList(busIntegralHistoryInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增帐分历史快照
|
||||
*
|
||||
* @param busIntegralHistoryInfo 帐分历史快照
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBusIntegralHistoryInfo(BusIntegralHistoryInfo busIntegralHistoryInfo)
|
||||
{
|
||||
busIntegralHistoryInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return busIntegralHistoryInfoMapper.insertBusIntegralHistoryInfo(busIntegralHistoryInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改帐分历史快照
|
||||
*
|
||||
* @param busIntegralHistoryInfo 帐分历史快照
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBusIntegralHistoryInfo(BusIntegralHistoryInfo busIntegralHistoryInfo)
|
||||
{
|
||||
return busIntegralHistoryInfoMapper.updateBusIntegralHistoryInfo(busIntegralHistoryInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除帐分历史快照
|
||||
*
|
||||
* @param ids 需要删除的帐分历史快照主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBusIntegralHistoryInfoByIds(Long[] ids)
|
||||
{
|
||||
return busIntegralHistoryInfoMapper.deleteBusIntegralHistoryInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除帐分历史快照信息
|
||||
*
|
||||
* @param id 帐分历史快照主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBusIntegralHistoryInfoById(Long id)
|
||||
{
|
||||
return busIntegralHistoryInfoMapper.deleteBusIntegralHistoryInfoById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
<?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.business.mapper.BusIntegralHistoryInfoMapper">
|
||||
|
||||
<resultMap type="BusIntegralHistoryInfo" id="BusIntegralHistoryInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="account" column="account" />
|
||||
<result property="accountName" column="account_name" />
|
||||
<result property="superiorAgentCode" column="superior_agent_code" />
|
||||
<result property="aiIntegralBalance" column="ai_integral_balance" />
|
||||
<result property="integralBalance" column="integral_balance" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBusIntegralHistoryInfoVo">
|
||||
select id, account, account_name, superior_agent_code, ai_integral_balance, integral_balance, create_time, remark from bus_integral_history_info
|
||||
</sql>
|
||||
|
||||
<select id="selectBusIntegralHistoryInfoList" parameterType="BusIntegralHistoryInfo" resultMap="BusIntegralHistoryInfoResult">
|
||||
<include refid="selectBusIntegralHistoryInfoVo"/>
|
||||
<where>
|
||||
<if test="account != null and account != ''"> and account = #{account}</if>
|
||||
<if test="accountName != null and accountName != ''"> and account_name like concat('%', #{accountName}, '%')</if>
|
||||
<if test="superiorAgentCode != null and superiorAgentCode != ''"> and superior_agent_code = #{superiorAgentCode}</if>
|
||||
<if test="aiIntegralBalance != null "> and ai_integral_balance = #{aiIntegralBalance}</if>
|
||||
<if test="integralBalance != null "> and integral_balance = #{integralBalance}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBusIntegralHistoryInfoById" parameterType="Long" resultMap="BusIntegralHistoryInfoResult">
|
||||
<include refid="selectBusIntegralHistoryInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBusIntegralHistoryInfo" parameterType="BusIntegralHistoryInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into bus_integral_history_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="account != null">account,</if>
|
||||
<if test="accountName != null">account_name,</if>
|
||||
<if test="superiorAgentCode != null">superior_agent_code,</if>
|
||||
<if test="aiIntegralBalance != null">ai_integral_balance,</if>
|
||||
<if test="integralBalance != null">integral_balance,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="account != null">#{account},</if>
|
||||
<if test="accountName != null">#{accountName},</if>
|
||||
<if test="superiorAgentCode != null">#{superiorAgentCode},</if>
|
||||
<if test="aiIntegralBalance != null">#{aiIntegralBalance},</if>
|
||||
<if test="integralBalance != null">#{integralBalance},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBusIntegralHistoryInfo" parameterType="BusIntegralHistoryInfo">
|
||||
update bus_integral_history_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="account != null">account = #{account},</if>
|
||||
<if test="accountName != null">account_name = #{accountName},</if>
|
||||
<if test="superiorAgentCode != null">superior_agent_code = #{superiorAgentCode},</if>
|
||||
<if test="aiIntegralBalance != null">ai_integral_balance = #{aiIntegralBalance},</if>
|
||||
<if test="integralBalance != null">integral_balance = #{integralBalance},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBusIntegralHistoryInfoById" parameterType="Long">
|
||||
delete from bus_integral_history_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBusIntegralHistoryInfoByIds" parameterType="String">
|
||||
delete from bus_integral_history_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue