2024-04 新增足球场馆邀请链接逻辑-免责声明
This commit is contained in:
19
service/src/main/java/com/sv/mapper/DisclaimersMapper.java
Normal file
19
service/src/main/java/com/sv/mapper/DisclaimersMapper.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package com.sv.mapper;
|
||||
|
||||
import com.sv.entity.Disclaimers;
|
||||
|
||||
public interface DisclaimersMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(Disclaimers record);
|
||||
|
||||
int insertSelective(Disclaimers record);
|
||||
|
||||
Disclaimers selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(Disclaimers record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(Disclaimers record);
|
||||
|
||||
int updateByPrimaryKey(Disclaimers record);
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.sv.service.oms;
|
||||
|
||||
import com.sv.entity.Disclaimers;
|
||||
import com.sv.mapper.DisclaimersMapper;
|
||||
import com.ydd.framework.core.service.impl.BaseServiceImpl;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* Service - 免责声明
|
||||
*
|
||||
* @author limqsh
|
||||
* @since 2024-04-28
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly = true)
|
||||
public class DisclaimersService extends BaseServiceImpl {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(DisclaimersService.class);
|
||||
|
||||
@Resource
|
||||
private DisclaimersMapper disclaimersMapper;
|
||||
|
||||
/**
|
||||
* 创建免责声明
|
||||
*
|
||||
* @param disclaimers 免责声明
|
||||
*/
|
||||
@Transactional
|
||||
public void save(Disclaimers disclaimers) {
|
||||
// 需要更新或者创建
|
||||
if (disclaimers.getId() != null && disclaimers.getId() > 0) {
|
||||
// 更新
|
||||
disclaimersMapper.updateByPrimaryKey(disclaimers);
|
||||
} else {
|
||||
// 新建
|
||||
disclaimers.setPlatformId(1);
|
||||
disclaimers.setId(1);
|
||||
disclaimersMapper.insert(disclaimers);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询免责声明
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 免责声明
|
||||
*/
|
||||
public Disclaimers findById(Integer id) {
|
||||
return disclaimersMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -306,8 +306,10 @@
|
||||
m.nickname,
|
||||
m.mobile,
|
||||
(select IFNULL(sum(ot.price),0) from sv_order ot
|
||||
where ot.member_id = t.member_id and (ot.order_sn = t.order_sn or ot.order_sn = t.order_add_sn)
|
||||
) as price,
|
||||
where ot.member_id = t.member_id and ot.order_sn = t.order_sn
|
||||
) + (select IFNULL(sum(ot.price),0) from sv_order ot
|
||||
where ot.member_id = t.member_id and ot.order_sn = t.order_add_sn
|
||||
) as price,
|
||||
t.paying,
|
||||
IFNULL(t.sum_pay_money,0) as payMoney,
|
||||
t.order_sn as orderSn,
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
<?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.sv.mapper.DisclaimersMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.sv.entity.Disclaimers" >
|
||||
<constructor >
|
||||
<idArg column="id" jdbcType="INTEGER" javaType="java.lang.Integer" />
|
||||
<arg column="platform_id" jdbcType="INTEGER" javaType="java.lang.Integer" />
|
||||
<arg column="created_id" jdbcType="INTEGER" javaType="java.lang.Integer" />
|
||||
<arg column="modified_id" jdbcType="INTEGER" javaType="java.lang.Integer" />
|
||||
<arg column="created_time" jdbcType="TIMESTAMP" javaType="java.util.Date" />
|
||||
<arg column="modified_time" jdbcType="TIMESTAMP" javaType="java.util.Date" />
|
||||
<arg column="deleted" jdbcType="INTEGER" javaType="java.lang.Integer" />
|
||||
</constructor>
|
||||
</resultMap>
|
||||
<resultMap id="ResultMapWithBLOBs" type="com.sv.entity.Disclaimers" >
|
||||
<constructor >
|
||||
<idArg column="id" jdbcType="INTEGER" javaType="java.lang.Integer" />
|
||||
<arg column="platform_id" jdbcType="INTEGER" javaType="java.lang.Integer" />
|
||||
<arg column="created_id" jdbcType="INTEGER" javaType="java.lang.Integer" />
|
||||
<arg column="modified_id" jdbcType="INTEGER" javaType="java.lang.Integer" />
|
||||
<arg column="created_time" jdbcType="TIMESTAMP" javaType="java.util.Date" />
|
||||
<arg column="modified_time" jdbcType="TIMESTAMP" javaType="java.util.Date" />
|
||||
<arg column="deleted" jdbcType="INTEGER" javaType="java.lang.Integer" />
|
||||
<arg column="description" jdbcType="LONGVARCHAR" javaType="java.lang.String" />
|
||||
</constructor>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List" >
|
||||
id, platform_id, created_id, modified_id, created_time, modified_time, deleted
|
||||
</sql>
|
||||
<sql id="Blob_Column_List" >
|
||||
description
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from sv_disclaimers
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
||||
delete from sv_disclaimers
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sv.entity.Disclaimers" >
|
||||
insert into sv_disclaimers (id, platform_id, created_id,
|
||||
modified_id, created_time, modified_time,
|
||||
deleted, description)
|
||||
values (#{id,jdbcType=INTEGER}, #{platformId,jdbcType=INTEGER}, #{createdId,jdbcType=INTEGER},
|
||||
#{modifiedId,jdbcType=INTEGER}, #{createdTime,jdbcType=TIMESTAMP}, #{modifiedTime,jdbcType=TIMESTAMP},
|
||||
#{deleted,jdbcType=INTEGER}, #{description,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sv.entity.Disclaimers" >
|
||||
insert into sv_disclaimers
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
id,
|
||||
</if>
|
||||
<if test="platformId != null" >
|
||||
platform_id,
|
||||
</if>
|
||||
<if test="createdId != null" >
|
||||
created_id,
|
||||
</if>
|
||||
<if test="modifiedId != null" >
|
||||
modified_id,
|
||||
</if>
|
||||
<if test="createdTime != null" >
|
||||
created_time,
|
||||
</if>
|
||||
<if test="modifiedTime != null" >
|
||||
modified_time,
|
||||
</if>
|
||||
<if test="deleted != null" >
|
||||
deleted,
|
||||
</if>
|
||||
<if test="description != null" >
|
||||
description,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="platformId != null" >
|
||||
#{platformId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createdId != null" >
|
||||
#{createdId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="modifiedId != null" >
|
||||
#{modifiedId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createdTime != null" >
|
||||
#{createdTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="modifiedTime != null" >
|
||||
#{modifiedTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="deleted != null" >
|
||||
#{deleted,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="description != null" >
|
||||
#{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.sv.entity.Disclaimers" >
|
||||
update sv_disclaimers
|
||||
<set >
|
||||
<if test="platformId != null" >
|
||||
platform_id = #{platformId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createdId != null" >
|
||||
created_id = #{createdId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="modifiedId != null" >
|
||||
modified_id = #{modifiedId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createdTime != null" >
|
||||
created_time = #{createdTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="modifiedTime != null" >
|
||||
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="deleted != null" >
|
||||
deleted = #{deleted,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="description != null" >
|
||||
description = #{description,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.sv.entity.Disclaimers" >
|
||||
update sv_disclaimers
|
||||
set platform_id = #{platformId,jdbcType=INTEGER},
|
||||
created_id = #{createdId,jdbcType=INTEGER},
|
||||
modified_id = #{modifiedId,jdbcType=INTEGER},
|
||||
created_time = #{createdTime,jdbcType=TIMESTAMP},
|
||||
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
|
||||
deleted = #{deleted,jdbcType=INTEGER},
|
||||
description = #{description,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.sv.entity.Disclaimers" >
|
||||
update sv_disclaimers
|
||||
set platform_id = #{platformId,jdbcType=INTEGER},
|
||||
created_id = #{createdId,jdbcType=INTEGER},
|
||||
modified_id = #{modifiedId,jdbcType=INTEGER},
|
||||
created_time = #{createdTime,jdbcType=TIMESTAMP},
|
||||
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
|
||||
deleted = #{deleted,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -90,7 +90,7 @@
|
||||
domainObjectName 给表对应的 model 起名字
|
||||
注意:大小写敏感问题。
|
||||
-->
|
||||
<table tableName="sv_member_lesson_ticket_invite" domainObjectName="MemberTicketInvite"
|
||||
<table tableName="sv_disclaimers" domainObjectName="Disclaimers"
|
||||
enableInsert="true"
|
||||
enableDeleteByPrimaryKey="true"
|
||||
enableSelectByPrimaryKey="true"
|
||||
|
||||
Reference in New Issue
Block a user