mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-26 14:05:04 +08:00
新增 分润组数据库、实体类、Service
This commit is contained in:
@@ -0,0 +1,159 @@
|
||||
package com.jsowell.pile.domain.shareprofit;
|
||||
|
||||
import com.jsowell.common.annotation.Excel;
|
||||
import com.jsowell.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 运营商分润组对象 shareprofit_group
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2024-09-12
|
||||
*/
|
||||
public class ShareprofitGroup extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 分润组编号
|
||||
*/
|
||||
@Excel(name = "分润组编号")
|
||||
private String groupCode;
|
||||
|
||||
/**
|
||||
* 运营商id
|
||||
*/
|
||||
@Excel(name = "运营商id")
|
||||
private Long merchantId;
|
||||
|
||||
/**
|
||||
* 站点id
|
||||
*/
|
||||
@Excel(name = "站点id")
|
||||
private Long stationId;
|
||||
|
||||
/**
|
||||
* 分润成员手机号码
|
||||
*/
|
||||
@Excel(name = "分润成员手机号码")
|
||||
private String memberPhoneNumber;
|
||||
|
||||
/**
|
||||
* 电费分润比例
|
||||
*/
|
||||
@Excel(name = "电费分润比例")
|
||||
private String electricityFeeScale;
|
||||
|
||||
/**
|
||||
* 服务费分润比例
|
||||
*/
|
||||
@Excel(name = "服务费分润比例")
|
||||
private String serviceFeeScale;
|
||||
|
||||
/**
|
||||
* 是否承担手续费(0-否;1-是)
|
||||
*/
|
||||
@Excel(name = "是否承担手续费(0-否;1-是)")
|
||||
private String undertakeHandlingCharge;
|
||||
|
||||
/**
|
||||
* 删除标识(0-否;1-是)
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setGroupCode(String groupCode) {
|
||||
this.groupCode = groupCode;
|
||||
}
|
||||
|
||||
public String getGroupCode() {
|
||||
return groupCode;
|
||||
}
|
||||
|
||||
public void setMerchantId(Long merchantId) {
|
||||
this.merchantId = merchantId;
|
||||
}
|
||||
|
||||
public Long getMerchantId() {
|
||||
return merchantId;
|
||||
}
|
||||
|
||||
public void setStationId(Long stationId) {
|
||||
this.stationId = stationId;
|
||||
}
|
||||
|
||||
public Long getStationId() {
|
||||
return stationId;
|
||||
}
|
||||
|
||||
public void setMemberPhoneNumber(String memberPhoneNumber) {
|
||||
this.memberPhoneNumber = memberPhoneNumber;
|
||||
}
|
||||
|
||||
public String getMemberPhoneNumber() {
|
||||
return memberPhoneNumber;
|
||||
}
|
||||
|
||||
public void setElectricityFeeScale(String electricityFeeScale) {
|
||||
this.electricityFeeScale = electricityFeeScale;
|
||||
}
|
||||
|
||||
public String getElectricityFeeScale() {
|
||||
return electricityFeeScale;
|
||||
}
|
||||
|
||||
public void setServiceFeeScale(String serviceFeeScale) {
|
||||
this.serviceFeeScale = serviceFeeScale;
|
||||
}
|
||||
|
||||
public String getServiceFeeScale() {
|
||||
return serviceFeeScale;
|
||||
}
|
||||
|
||||
public void setUndertakeHandlingCharge(String undertakeHandlingCharge) {
|
||||
this.undertakeHandlingCharge = undertakeHandlingCharge;
|
||||
}
|
||||
|
||||
public String getUndertakeHandlingCharge() {
|
||||
return undertakeHandlingCharge;
|
||||
}
|
||||
|
||||
public void setDelFlag(String delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
|
||||
.append("id", getId())
|
||||
.append("groupCode", getGroupCode())
|
||||
.append("merchantId", getMerchantId())
|
||||
.append("stationId", getStationId())
|
||||
.append("memberPhoneNumber", getMemberPhoneNumber())
|
||||
.append("electricityFeeScale", getElectricityFeeScale())
|
||||
.append("serviceFeeScale", getServiceFeeScale())
|
||||
.append("undertakeHandlingCharge", getUndertakeHandlingCharge())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.jsowell.pile.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.pile.domain.shareprofit.ShareprofitGroup;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 运营商分润组Mapper接口
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2024-09-12
|
||||
*/
|
||||
@Repository
|
||||
public interface ShareprofitGroupMapper {
|
||||
/**
|
||||
* 查询运营商分润组
|
||||
*
|
||||
* @param id 运营商分润组主键
|
||||
* @return 运营商分润组
|
||||
*/
|
||||
public ShareprofitGroup selectShareprofitGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 查询运营商分润组列表
|
||||
*
|
||||
* @param shareprofitGroup 运营商分润组
|
||||
* @return 运营商分润组集合
|
||||
*/
|
||||
public List<ShareprofitGroup> selectShareprofitGroupList(ShareprofitGroup shareprofitGroup);
|
||||
|
||||
/**
|
||||
* 新增运营商分润组
|
||||
*
|
||||
* @param shareprofitGroup 运营商分润组
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertShareprofitGroup(ShareprofitGroup shareprofitGroup);
|
||||
|
||||
/**
|
||||
* 修改运营商分润组
|
||||
*
|
||||
* @param shareprofitGroup 运营商分润组
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateShareprofitGroup(ShareprofitGroup shareprofitGroup);
|
||||
|
||||
/**
|
||||
* 删除运营商分润组
|
||||
*
|
||||
* @param id 运营商分润组主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteShareprofitGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除运营商分润组
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteShareprofitGroupByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.jsowell.pile.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.pile.domain.shareprofit.ShareprofitGroup;
|
||||
|
||||
/**
|
||||
* 运营商分润组Service接口
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2024-09-12
|
||||
*/
|
||||
public interface IShareprofitGroupService {
|
||||
/**
|
||||
* 查询运营商分润组
|
||||
*
|
||||
* @param id 运营商分润组主键
|
||||
* @return 运营商分润组
|
||||
*/
|
||||
public ShareprofitGroup selectShareprofitGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 查询运营商分润组列表
|
||||
*
|
||||
* @param shareprofitGroup 运营商分润组
|
||||
* @return 运营商分润组集合
|
||||
*/
|
||||
public List<ShareprofitGroup> selectShareprofitGroupList(ShareprofitGroup shareprofitGroup);
|
||||
|
||||
/**
|
||||
* 新增运营商分润组
|
||||
*
|
||||
* @param shareprofitGroup 运营商分润组
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertShareprofitGroup(ShareprofitGroup shareprofitGroup);
|
||||
|
||||
/**
|
||||
* 修改运营商分润组
|
||||
*
|
||||
* @param shareprofitGroup 运营商分润组
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateShareprofitGroup(ShareprofitGroup shareprofitGroup);
|
||||
|
||||
/**
|
||||
* 批量删除运营商分润组
|
||||
*
|
||||
* @param ids 需要删除的运营商分润组主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteShareprofitGroupByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除运营商分润组信息
|
||||
*
|
||||
* @param id 运营商分润组主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteShareprofitGroupById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.jsowell.pile.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.jsowell.pile.mapper.ShareprofitGroupMapper;
|
||||
import com.jsowell.pile.domain.shareprofit.ShareprofitGroup;
|
||||
import com.jsowell.pile.service.IShareprofitGroupService;
|
||||
|
||||
/**
|
||||
* 运营商分润组Service业务层处理
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2024-09-12
|
||||
*/
|
||||
@Service
|
||||
public class ShareprofitGroupServiceImpl implements IShareprofitGroupService {
|
||||
@Autowired
|
||||
private ShareprofitGroupMapper shareprofitGroupMapper;
|
||||
|
||||
/**
|
||||
* 查询运营商分润组
|
||||
*
|
||||
* @param id 运营商分润组主键
|
||||
* @return 运营商分润组
|
||||
*/
|
||||
@Override
|
||||
public ShareprofitGroup selectShareprofitGroupById(Long id) {
|
||||
return shareprofitGroupMapper.selectShareprofitGroupById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询运营商分润组列表
|
||||
*
|
||||
* @param shareprofitGroup 运营商分润组
|
||||
* @return 运营商分润组
|
||||
*/
|
||||
@Override
|
||||
public List<ShareprofitGroup> selectShareprofitGroupList(ShareprofitGroup shareprofitGroup) {
|
||||
return shareprofitGroupMapper.selectShareprofitGroupList(shareprofitGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增运营商分润组
|
||||
*
|
||||
* @param shareprofitGroup 运营商分润组
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertShareprofitGroup(ShareprofitGroup shareprofitGroup) {
|
||||
shareprofitGroup.setCreateTime(DateUtils.getNowDate());
|
||||
return shareprofitGroupMapper.insertShareprofitGroup(shareprofitGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改运营商分润组
|
||||
*
|
||||
* @param shareprofitGroup 运营商分润组
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateShareprofitGroup(ShareprofitGroup shareprofitGroup) {
|
||||
shareprofitGroup.setUpdateTime(DateUtils.getNowDate());
|
||||
return shareprofitGroupMapper.updateShareprofitGroup(shareprofitGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除运营商分润组
|
||||
*
|
||||
* @param ids 需要删除的运营商分润组主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteShareprofitGroupByIds(Long[] ids) {
|
||||
return shareprofitGroupMapper.deleteShareprofitGroupByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除运营商分润组信息
|
||||
*
|
||||
* @param id 运营商分润组主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteShareprofitGroupById(Long id) {
|
||||
return shareprofitGroupMapper.deleteShareprofitGroupById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
<?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.jsowell.pile.mapper.ShareprofitGroupMapper">
|
||||
|
||||
<resultMap type="com.jsowell.pile.domain.shareprofit.ShareprofitGroup" id="ShareprofitGroupResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="groupCode" column="group_code" />
|
||||
<result property="merchantId" column="merchant_id" />
|
||||
<result property="stationId" column="station_id" />
|
||||
<result property="memberPhoneNumber" column="member_phone_number" />
|
||||
<result property="electricityFeeScale" column="electricity_fee_scale" />
|
||||
<result property="serviceFeeScale" column="service_fee_scale" />
|
||||
<result property="undertakeHandlingCharge" column="undertake_handling_charge" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectShareprofitGroupVo">
|
||||
select id, group_code, merchant_id, station_id, member_phone_number, electricity_fee_scale, service_fee_scale, undertake_handling_charge, create_time, create_by, update_time, update_by, del_flag from shareprofit_group
|
||||
</sql>
|
||||
|
||||
<select id="selectShareprofitGroupList" parameterType="com.jsowell.pile.domain.shareprofit.ShareprofitGroup" resultMap="ShareprofitGroupResult">
|
||||
<include refid="selectShareprofitGroupVo"/>
|
||||
<where>
|
||||
<if test="groupCode != null and groupCode != ''"> and group_code = #{groupCode}</if>
|
||||
<if test="merchantId != null "> and merchant_id = #{merchantId}</if>
|
||||
<if test="stationId != null "> and station_id = #{stationId}</if>
|
||||
<if test="memberPhoneNumber != null and memberPhoneNumber != ''"> and member_phone_number = #{memberPhoneNumber}</if>
|
||||
<if test="electricityFeeScale != null and electricityFeeScale != ''"> and electricity_fee_scale = #{electricityFeeScale}</if>
|
||||
<if test="serviceFeeScale != null and serviceFeeScale != ''"> and service_fee_scale = #{serviceFeeScale}</if>
|
||||
<if test="undertakeHandlingCharge != null and undertakeHandlingCharge != ''"> and undertake_handling_charge = #{undertakeHandlingCharge}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectShareprofitGroupById" parameterType="Long" resultMap="ShareprofitGroupResult">
|
||||
<include refid="selectShareprofitGroupVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertShareprofitGroup" parameterType="com.jsowell.pile.domain.shareprofit.ShareprofitGroup" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into shareprofit_group
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="groupCode != null">group_code,</if>
|
||||
<if test="merchantId != null">merchant_id,</if>
|
||||
<if test="stationId != null">station_id,</if>
|
||||
<if test="memberPhoneNumber != null">member_phone_number,</if>
|
||||
<if test="electricityFeeScale != null">electricity_fee_scale,</if>
|
||||
<if test="serviceFeeScale != null">service_fee_scale,</if>
|
||||
<if test="undertakeHandlingCharge != null">undertake_handling_charge,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="groupCode != null">#{groupCode},</if>
|
||||
<if test="merchantId != null">#{merchantId},</if>
|
||||
<if test="stationId != null">#{stationId},</if>
|
||||
<if test="memberPhoneNumber != null">#{memberPhoneNumber},</if>
|
||||
<if test="electricityFeeScale != null">#{electricityFeeScale},</if>
|
||||
<if test="serviceFeeScale != null">#{serviceFeeScale},</if>
|
||||
<if test="undertakeHandlingCharge != null">#{undertakeHandlingCharge},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateShareprofitGroup" parameterType="com.jsowell.pile.domain.shareprofit.ShareprofitGroup">
|
||||
update shareprofit_group
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="groupCode != null">group_code = #{groupCode},</if>
|
||||
<if test="merchantId != null">merchant_id = #{merchantId},</if>
|
||||
<if test="stationId != null">station_id = #{stationId},</if>
|
||||
<if test="memberPhoneNumber != null">member_phone_number = #{memberPhoneNumber},</if>
|
||||
<if test="electricityFeeScale != null">electricity_fee_scale = #{electricityFeeScale},</if>
|
||||
<if test="serviceFeeScale != null">service_fee_scale = #{serviceFeeScale},</if>
|
||||
<if test="undertakeHandlingCharge != null">undertake_handling_charge = #{undertakeHandlingCharge},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteShareprofitGroupById" parameterType="Long">
|
||||
delete from shareprofit_group where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteShareprofitGroupByIds" parameterType="String">
|
||||
delete from shareprofit_group where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user