Commit ba54ed90 by jinxin

订单表代码开发

parent 7b44b0f9
package com.gic.haoban.manage.api.service.licence;
/**
* <p>
* 服务类
* </p>
*
* @author jx
* @since 2023-03-09
*/
public interface LicenceOrderApiService {
}
package com.gic.haoban.manage.web.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author jx
* @since 2023-03-09
*/
@RestController
@RequestMapping("/licence-order")
public class LicenceOrderController {
}
package com.gic.haoban.manage.service.dao.mapper.licence;
/**
* <p>
* Mapper 接口
* </p>
*
* @author jx
* @since 2023-03-09
*/
public interface TabHaobanLicenceOrderMapper {
}
package com.gic.haoban.manage.service.dao.mapper.licence;
/**
* <p>
* Mapper 接口
* </p>
*
* @author jx
* @since 2023-03-09
*/
public interface TabHaobanLicenceOrderProgressMapper {
}
package com.gic.haoban.manage.service.entity.licence;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author jx
* @since 2023-03-09
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class TabHaobanLicenceOrder implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 订单id
*/
private Long orderId;
/**
* gic商户Id
*/
private String enterpriseId;
/**
* wx企业Id
*/
private String wxEnterpriseId;
/**
* 订单类型,1:购买帐号,2:续期帐号
*/
private Integer orderType;
/**
* 互通帐号个数
*/
private Integer externalContactCount;
/**
* 基础帐号个数
*/
private Integer baseCount;
/**
* 订单金额,单位分
*/
private Integer price;
/**
* 购买时间类型 1:按月购买,2:按天购买
*/
private Integer timeType;
/**
* 购买的时间数值
*/
private Integer timeValue;
/**
* 支付类型 1在线支付 2对公转账
*/
private Integer payType;
/**
* 微信支付订单号
*/
private String transactionId;
/**
* 上传凭证url
*/
private String voucher;
/**
* 订单状态,0:待支付,1:已支付,2:已取消,3:已过期,4:已退款,5:审核中
*/
private Integer orderStatus;
/**
* 订单状态更改原因
*/
private String orderStatusReason;
/**
* 支付类型为1:微信支付时间 2:上传凭证时间
*/
private Date payTime;
/**
* 退款时间
*/
private Date refundTime;
/**
* 企业微信订单id
*/
private String qywxOrderId;
/**
* 企业微信订单状态,0:待支付,1:已支付,2:已取消,3:已过期,4:退款中,5:退款被拒绝,6:已退款,7已失效
*/
private Integer qywxOrderStatus;
/**
* 企业微信订单更改原因
*/
private String qywxOrderStatusReason;
/**
* 企业微信支付时间
*/
private Date qywxPayTime;
/**
* 企业微信退款时间
*/
private Date qywxRefundTime;
/**
* 审核不通过原因
*/
private String reason;
/**
* 逻辑删除,0未删除,1删除
*/
private Integer deleteFlag;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 创建人
*/
private String creatorId;
/**
* 创建人名称
*/
private String creatorName;
}
package com.gic.haoban.manage.service.entity.licence;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
* </p>
*
* @author jx
* @since 2023-03-09
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class TabHaobanLicenceOrderProgress implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
private Long id;
/**
* gic商户Id
*/
private String enterpriseId;
/**
* wx企业Id
*/
private String wxEnterpriseId;
/**
* 订单id
*/
private Long orderId;
/**
* 订单状态
*/
private String orderStatus;
/**
* 标记字段 1好办后台
*/
private Integer type;
/**
* 上传凭证url
*/
private String voucher;
/**
* 原因
*/
private String reason;
/**
* 逻辑删除,0未删除,1删除
*/
private Integer deleteFlag;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 创建人名称
*/
private String creatorName;
}
package com.gic.haoban.manage.service.service.licence;
/**
* <p>
* 服务类
* </p>
*
* @author jx
* @since 2023-03-09
*/
public interface LicenceOrderProgressService {
}
package com.gic.haoban.manage.service.service.licence;
/**
* <p>
* 服务类
* </p>
*
* @author jx
* @since 2023-03-09
*/
public interface LicenceOrderService {
}
package com.gic.haoban.manage.service.service.licence.impl;
import com.gic.haoban.manage.service.service.licence.LicenceOrderProgressService;
/**
* @description:
* @Author: wenhua
* @Date: 2023/3/9 17:02
*/
public class LicenceOrderProgressServiceImpl implements LicenceOrderProgressService {
}
package com.gic.haoban.manage.service.service.licence.impl;
import com.gic.haoban.manage.service.service.licence.LicenceOrderService;
/**
* @description:
* @Author: wenhua
* @Date: 2023/3/9 17:01
*/
public class LicenceOrderServiceImpl implements LicenceOrderService {
}
package com.gic.haoban.manage.service.service.out.impl.licence;
import com.gic.haoban.manage.api.service.licence.LicenceOrderApiService;
/**
* @description:
* @Author: wenhua
* @Date: 2023/3/9 17:04
*/
public class LicenceOrderApiServiceImpl implements LicenceOrderApiService {
}
<?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.gic.haoban.manage.service.dao.mapper.licence.TabHaobanLicenceOrderMapper">
<resultMap type="com.gic.haoban.manage.service.entity.licence.TabHaobanLicenceOrder" id="BaseResultMap">
<result column="order_id" property="orderId"/>
<result column="enterprise_id" property="enterpriseId"/>
<result column="wx_enterprise_id" property="wxEnterpriseId"/>
<result column="order_type" property="orderType"/>
<result column="external_contact_count" property="externalContactCount"/>
<result column="base_count" property="baseCount"/>
<result column="price" property="price"/>
<result column="time_type" property="timeType"/>
<result column="time_value" property="timeValue"/>
<result column="pay_type" property="payType"/>
<result column="transaction_id" property="transactionId"/>
<result column="voucher" property="voucher"/>
<result column="order_status" property="orderStatus"/>
<result column="order_status_reason" property="orderStatusReason"/>
<result column="pay_time" property="payTime"/>
<result column="refund_time" property="refundTime"/>
<result column="qywx_order_id" property="qywxOrderId"/>
<result column="qywx_order_status" property="qywxOrderStatus"/>
<result column="qywx_order_status_reason" property="qywxOrderStatusReason"/>
<result column="qywx_pay_time" property="qywxPayTime"/>
<result column="qywx_refund_time" property="qywxRefundTime"/>
<result column="reason" property="reason"/>
<result column="delete_flag" property="deleteFlag"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
<result column="creator_id" property="creatorId"/>
<result column="creator_name" property="creatorName"/>
</resultMap>
<sql id="Base_Column_List">
order_id,
enterprise_id,
wx_enterprise_id,
order_type,
external_contact_count,
base_count,
price,
time_type,
time_value,
pay_type,
transaction_id,
voucher,
order_status,
order_status_reason,
pay_time,
refund_time,
qywx_order_id,
qywx_order_status,
qywx_order_status_reason,
qywx_pay_time,
qywx_refund_time,
reason,
delete_flag,
create_time,
update_time,
creator_id,
creator_name
</sql>
<!-- ===================== 新增 ======================== -->
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.licence.TabHaobanLicenceOrder" useGeneratedKeys="true" keyProperty="id">
<![CDATA[
INSERT INTO tab_haoban_licence_order(
order_id,
enterprise_id,
wx_enterprise_id,
order_type,
external_contact_count,
base_count,
price,
time_type,
time_value,
pay_type,
transaction_id,
voucher,
order_status,
order_status_reason,
pay_time,
refund_time,
qywx_order_id,
qywx_order_status,
qywx_order_status_reason,
qywx_pay_time,
qywx_refund_time,
reason,
delete_flag,
create_time,
update_time,
creator_id,
creator_name
)VALUES(
#{orderId,jdbcType=BIGINT},
#{enterpriseId,jdbcType=VARCHAR},
#{wxEnterpriseId,jdbcType=VARCHAR},
#{orderType,jdbcType=INTEGER},
#{externalContactCount,jdbcType=INTEGER},
#{baseCount,jdbcType=INTEGER},
#{price,jdbcType=INTEGER},
#{timeType,jdbcType=INTEGER},
#{timeValue,jdbcType=INTEGER},
#{payType,jdbcType=INTEGER},
#{transactionId,jdbcType=CHAR},
#{voucher,jdbcType=VARCHAR},
#{orderStatus,jdbcType=INTEGER},
#{orderStatusReason,jdbcType=VARCHAR},
#{payTime,jdbcType=TIMESTAMP},
#{refundTime,jdbcType=TIMESTAMP},
#{qywxOrderId,jdbcType=VARCHAR},
#{qywxOrderStatus,jdbcType=INTEGER},
#{qywxOrderStatusReason,jdbcType=VARCHAR},
#{qywxPayTime,jdbcType=TIMESTAMP},
#{qywxRefundTime,jdbcType=TIMESTAMP},
#{reason,jdbcType=VARCHAR},
#{deleteFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP},
#{creatorId,jdbcType=VARCHAR},
#{creatorName,jdbcType=VARCHAR}
)
]]>
</insert>
<!-- =====================删除==================== -->
<delete id="deleteByPrimaryKey" parameterType="long">
UPDATE tab_haoban_licence_order SET delete_flag = 1 WHERE order_id = #{orderId}
</delete>
<!-- ==================更新 ========== -->
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.licence.TabHaobanLicenceOrder">
<![CDATA[
UPDATE tab_haoban_licence_order SET
order_id=#{orderId,jdbcType=BIGINT},
enterprise_id=#{enterpriseId,jdbcType=VARCHAR},
wx_enterprise_id=#{wxEnterpriseId,jdbcType=VARCHAR},
order_type=#{orderType,jdbcType=INTEGER},
external_contact_count=#{externalContactCount,jdbcType=INTEGER},
base_count=#{baseCount,jdbcType=INTEGER},
price=#{price,jdbcType=INTEGER},
time_type=#{timeType,jdbcType=INTEGER},
time_value=#{timeValue,jdbcType=INTEGER},
pay_type=#{payType,jdbcType=INTEGER},
transaction_id=#{transactionId,jdbcType=CHAR},
voucher=#{voucher,jdbcType=VARCHAR},
order_status=#{orderStatus,jdbcType=INTEGER},
order_status_reason=#{orderStatusReason,jdbcType=VARCHAR},
pay_time=#{payTime,jdbcType=TIMESTAMP},
refund_time=#{refundTime,jdbcType=TIMESTAMP},
qywx_order_id=#{qywxOrderId,jdbcType=VARCHAR},
qywx_order_status=#{qywxOrderStatus,jdbcType=INTEGER},
qywx_order_status_reason=#{qywxOrderStatusReason,jdbcType=VARCHAR},
qywx_pay_time=#{qywxPayTime,jdbcType=TIMESTAMP},
qywx_refund_time=#{qywxRefundTime,jdbcType=TIMESTAMP},
reason=#{reason,jdbcType=VARCHAR},
delete_flag=#{deleteFlag,jdbcType=INTEGER},
create_time=#{createTime,jdbcType=TIMESTAMP},
update_time=#{updateTime,jdbcType=TIMESTAMP},
creator_id=#{creatorId,jdbcType=VARCHAR},
creator_name=#{creatorName,jdbcType=VARCHAR}
order_id = #{orderId}
]]>
</update>
<!-- ============ 查询=============-->
<select id="selectById" parameterType="long" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" /> FROM tab_haoban_licence_order WHERE order_id = #{orderId}
</select>
</mapper>
\ No newline at end of file
<?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.gic.haoban.manage.service.dao.mapper.licence.TabHaobanLicenceOrderProgressMapper">
<resultMap type="com.gic.haoban.manage.service.entity.licence.TabHaobanLicenceOrderProgress" id="BaseResultMap">
<result column="id" property="id"/>
<result column="enterprise_id" property="enterpriseId"/>
<result column="wx_enterprise_id" property="wxEnterpriseId"/>
<result column="order_id" property="orderId"/>
<result column="order_status" property="orderStatus"/>
<result column="type" property="type"/>
<result column="voucher" property="voucher"/>
<result column="reason" property="reason"/>
<result column="delete_flag" property="deleteFlag"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
<result column="creator_name" property="creatorName"/>
</resultMap>
<sql id="Base_Column_List">
enterprise_id,
wx_enterprise_id,
order_id,
order_status,
type,
voucher,
reason,
delete_flag,
create_time,
update_time,
creator_name
</sql>
<!-- ===================== 新增 ======================== -->
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.licence.TabHaobanLicenceOrderProgress" useGeneratedKeys="true" keyProperty="id">
<![CDATA[
INSERT INTO tab_haoban_licence_order_progress(
enterprise_id,
wx_enterprise_id,
order_id,
order_status,
type,
voucher,
reason,
delete_flag,
create_time,
update_time,
creator_name
)VALUES(
#{enterpriseId,jdbcType=VARCHAR},
#{wxEnterpriseId,jdbcType=VARCHAR},
#{orderId,jdbcType=BIGINT},
#{orderStatus,jdbcType=VARCHAR},
#{type,jdbcType=INTEGER},
#{voucher,jdbcType=VARCHAR},
#{reason,jdbcType=VARCHAR},
#{deleteFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP},
#{creatorName,jdbcType=VARCHAR}
)
]]>
</insert>
<!-- =====================删除==================== -->
<delete id="deleteByPrimaryKey" parameterType="long">
UPDATE tab_haoban_licence_order_progress SET delete_flag = 1 WHERE id = #{id}
</delete>
<!-- ==================更新 ========== -->
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.licence.TabHaobanLicenceOrderProgress">
<![CDATA[
UPDATE tab_haoban_licence_order_progress SET
id=#{id,jdbcType=BIGINT},
enterprise_id=#{enterpriseId,jdbcType=VARCHAR},
wx_enterprise_id=#{wxEnterpriseId,jdbcType=VARCHAR},
order_id=#{orderId,jdbcType=BIGINT},
order_status=#{orderStatus,jdbcType=VARCHAR},
type=#{type,jdbcType=INTEGER},
voucher=#{voucher,jdbcType=VARCHAR},
reason=#{reason,jdbcType=VARCHAR},
delete_flag=#{deleteFlag,jdbcType=INTEGER},
create_time=#{createTime,jdbcType=TIMESTAMP},
update_time=#{updateTime,jdbcType=TIMESTAMP},
creator_name=#{creatorName,jdbcType=VARCHAR}
id = #{id}
]]>
</update>
<!-- ============ 查询=============-->
<select id="selectById" parameterType="long" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" /> FROM tab_haoban_licence_order_progress WHERE id = #{id}
</select>
</mapper>
\ No newline at end of file
package com.gic.haoban.manage.web.controller.licence;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 前端控制器
* </p>
*
* @author jx
* @since 2023-03-09
*/
@RestController
@RequestMapping("/licence-order")
public class LicenceOrderController {
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment