Commit 1faac854 by guojuxing

Merge remote-tracking branch 'origin/developer' into developer

parents 54e25f2d e0429ce8
package com.gic.enterprise.dto;
import java.io.Serializable;
import java.util.Date;
/**
* tab_billing_enterprise_sms_package
*/
public class EnterpriseSmsPackageDTO implements Serializable {
/**
*
*/
private Integer enterpriseSmsPackageId;
/**
*
*/
private Integer enterpriseId;
/**
* 1:有效 2逾期 0无效
*/
private Integer status;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
* 套餐包名称
*/
private String smsPackageName;
/**
* 套餐包字典code
*/
private String smsPackageCode;
/**
* 1短信套餐包
*/
private Integer type;
/**
* 有效截止时间
*/
private Date effectiveDate;
/**
* 订单id
*/
private Integer billingOrderId;
/**
* 套餐包条数
*/
private Integer totalAcount;
/**
* 剩余条数
*/
private Integer remainAccount;
public Integer getEnterpriseSmsPackageId() {
return enterpriseSmsPackageId;
}
public void setEnterpriseSmsPackageId(Integer enterpriseSmsPackageId) {
this.enterpriseSmsPackageId = enterpriseSmsPackageId;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getSmsPackageName() {
return smsPackageName;
}
public void setSmsPackageName(String smsPackageName) {
this.smsPackageName = smsPackageName;
}
public String getSmsPackageCode() {
return smsPackageCode;
}
public void setSmsPackageCode(String smsPackageCode) {
this.smsPackageCode = smsPackageCode;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public Date getEffectiveDate() {
return effectiveDate;
}
public void setEffectiveDate(Date effectiveDate) {
this.effectiveDate = effectiveDate;
}
public Integer getBillingOrderId() {
return billingOrderId;
}
public void setBillingOrderId(Integer billingOrderId) {
this.billingOrderId = billingOrderId;
}
public Integer getTotalAcount() {
return totalAcount;
}
public void setTotalAcount(Integer totalAcount) {
this.totalAcount = totalAcount;
}
public Integer getRemainAccount() {
return remainAccount;
}
public void setRemainAccount(Integer remainAccount) {
this.remainAccount = remainAccount;
}
}
\ No newline at end of file
package com.gic.enterprise.service;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.enterprise.dto.EnterpriseSmsPackageDTO;
import com.gic.enterprise.dto.PackageDTO;
import com.gic.enterprise.dto.SmsPackageDTO;
import java.util.List;
public interface PackApiService {
public interface PackageApiService {
/** @Description: 查询所有套餐包
......@@ -17,5 +18,20 @@ public interface PackApiService {
*/
ServiceResponse<List<PackageDTO>> listAllPackage();
/** @Description: 查询所有短信套餐包
* @author taogs
* @Date 15:56 2019/8/16
* @Param
* @return
*/
ServiceResponse<List<SmsPackageDTO>> listAllSmsPackage();
/** @Description: 查询企业下短信套餐包
* @author taogs
* @Date 15:58 2019/8/16
* @Param
* @return
*/
ServiceResponse<List<EnterpriseSmsPackageDTO>> listEnterpriseSmsPackage(Integer enterpriseId);
}
......@@ -17,7 +17,7 @@ public class TabBillingEnterpriseSmsPackage {
private Integer enterpriseId;
/**
*
* 1:有效 2逾期 0无效
*/
private Integer status;
......@@ -42,6 +42,11 @@ public class TabBillingEnterpriseSmsPackage {
private String smsPackageCode;
/**
* 1短信套餐包
*/
private Integer type;
/**
* 有效截止时间
*/
private Date effectiveDate;
......@@ -51,6 +56,16 @@ public class TabBillingEnterpriseSmsPackage {
*/
private Integer billingOrderId;
/**
* 套餐包条数
*/
private Integer totalAcount;
/**
* 剩余条数
*/
private Integer remainAccount;
public Integer getEnterpriseSmsPackageId() {
return enterpriseSmsPackageId;
}
......@@ -107,6 +122,14 @@ public class TabBillingEnterpriseSmsPackage {
this.smsPackageCode = smsPackageCode;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public Date getEffectiveDate() {
return effectiveDate;
}
......@@ -122,4 +145,20 @@ public class TabBillingEnterpriseSmsPackage {
public void setBillingOrderId(Integer billingOrderId) {
this.billingOrderId = billingOrderId;
}
public Integer getTotalAcount() {
return totalAcount;
}
public void setTotalAcount(Integer totalAcount) {
this.totalAcount = totalAcount;
}
public Integer getRemainAccount() {
return remainAccount;
}
public void setRemainAccount(Integer remainAccount) {
this.remainAccount = remainAccount;
}
}
\ No newline at end of file
......@@ -3,17 +3,18 @@ package com.gic.enterprise.service.outer;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.bizdict.api.dto.BizdictDTO;
import com.gic.bizdict.sdk.service.impl.RedisCacheBizdictService;
import com.gic.enterprise.dto.EnterpriseSmsPackageDTO;
import com.gic.enterprise.dto.PackageDTO;
import com.gic.enterprise.dto.SmsPackageDTO;
import com.gic.enterprise.service.PackApiService;
import com.gic.enterprise.service.PackageApiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
@Service("packApiService")
public class PackApiServiceImpl implements PackApiService {
@Service("packageApiService")
public class PackageApiServiceImpl implements PackageApiService {
@Autowired
private RedisCacheBizdictService bizdictService;
......@@ -46,4 +47,9 @@ public class PackApiServiceImpl implements PackApiService {
}
return ServiceResponse.success(result);
}
@Override
public ServiceResponse<List<EnterpriseSmsPackageDTO>> listEnterpriseSmsPackage(Integer enterpriseId) {
return null;
}
}
......@@ -30,7 +30,7 @@
<!--支付信息-->
<dubbo:service interface="com.gic.enterprise.service.BillingPayInfoApiService" ref="billingPayInfoApiService" timeout="60000" />
<dubbo:service interface="com.gic.enterprise.service.PackApiService" ref="packApiService" timeout="6000" />
<!--计费中心余额账户-->
<dubbo:service interface="com.gic.enterprise.service.BillingAccountApiService" ref="billingAccountApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.PackageApiService" ref="packageApiService" timeout="6000" />
</beans>
......@@ -9,12 +9,15 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="sms_package_name" jdbcType="VARCHAR" property="smsPackageName" />
<result column="sms_package_code" jdbcType="VARCHAR" property="smsPackageCode" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="effective_date" jdbcType="DATE" property="effectiveDate" />
<result column="billing_order_id" jdbcType="INTEGER" property="billingOrderId" />
<result column="total_acount" jdbcType="INTEGER" property="totalAcount" />
<result column="remain_account" jdbcType="INTEGER" property="remainAccount" />
</resultMap>
<sql id="Base_Column_List">
enterprise_sms_package_id, enterprise_id, status, create_time, update_time, sms_package_name,
sms_package_code, effective_date, billing_order_id
sms_package_code, type, effective_date, billing_order_id, total_acount, remain_account
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -29,12 +32,14 @@
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingEnterpriseSmsPackage">
insert into tab_billing_enterprise_sms_package (enterprise_sms_package_id, enterprise_id,
status, create_time, update_time,
sms_package_name, sms_package_code, effective_date,
billing_order_id)
sms_package_name, sms_package_code, type,
effective_date, billing_order_id, total_acount,
remain_account)
values (#{enterpriseSmsPackageId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{smsPackageName,jdbcType=VARCHAR}, #{smsPackageCode,jdbcType=VARCHAR}, #{effectiveDate,jdbcType=DATE},
#{billingOrderId,jdbcType=INTEGER})
#{smsPackageName,jdbcType=VARCHAR}, #{smsPackageCode,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER},
#{effectiveDate,jdbcType=DATE}, #{billingOrderId,jdbcType=INTEGER}, #{totalAcount,jdbcType=INTEGER},
#{remainAccount,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingEnterpriseSmsPackage">
insert into tab_billing_enterprise_sms_package
......@@ -60,12 +65,21 @@
<if test="smsPackageCode != null">
sms_package_code,
</if>
<if test="type != null">
type,
</if>
<if test="effectiveDate != null">
effective_date,
</if>
<if test="billingOrderId != null">
billing_order_id,
</if>
<if test="totalAcount != null">
total_acount,
</if>
<if test="remainAccount != null">
remain_account,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseSmsPackageId != null">
......@@ -89,12 +103,21 @@
<if test="smsPackageCode != null">
#{smsPackageCode,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="effectiveDate != null">
#{effectiveDate,jdbcType=DATE},
</if>
<if test="billingOrderId != null">
#{billingOrderId,jdbcType=INTEGER},
</if>
<if test="totalAcount != null">
#{totalAcount,jdbcType=INTEGER},
</if>
<if test="remainAccount != null">
#{remainAccount,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingEnterpriseSmsPackage">
......@@ -118,12 +141,21 @@
<if test="smsPackageCode != null">
sms_package_code = #{smsPackageCode,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="effectiveDate != null">
effective_date = #{effectiveDate,jdbcType=DATE},
</if>
<if test="billingOrderId != null">
billing_order_id = #{billingOrderId,jdbcType=INTEGER},
</if>
<if test="totalAcount != null">
total_acount = #{totalAcount,jdbcType=INTEGER},
</if>
<if test="remainAccount != null">
remain_account = #{remainAccount,jdbcType=INTEGER},
</if>
</set>
where enterprise_sms_package_id = #{enterpriseSmsPackageId,jdbcType=INTEGER}
</update>
......@@ -135,8 +167,11 @@
update_time = #{updateTime,jdbcType=TIMESTAMP},
sms_package_name = #{smsPackageName,jdbcType=VARCHAR},
sms_package_code = #{smsPackageCode,jdbcType=VARCHAR},
type = #{type,jdbcType=INTEGER},
effective_date = #{effectiveDate,jdbcType=DATE},
billing_order_id = #{billingOrderId,jdbcType=INTEGER}
billing_order_id = #{billingOrderId,jdbcType=INTEGER},
total_acount = #{totalAcount,jdbcType=INTEGER},
remain_account = #{remainAccount,jdbcType=INTEGER}
where enterprise_sms_package_id = #{enterpriseSmsPackageId,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
package com.gic.enterprise.web.controller;
import com.gic.enterprise.service.PackageApiService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -8,7 +9,6 @@ import org.springframework.web.bind.annotation.RestController;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.enterprise.service.BillingAccountApiService;
import com.gic.enterprise.service.PackApiService;
import com.gic.enterprise.utils.ResultControllerUtils;
/**
......@@ -25,7 +25,7 @@ public class BillingAccountController {
@Autowired
private BillingAccountApiService billingAccountApiService;
@Autowired
private PackApiService packApiService;
private PackageApiService packageApiService;
@RequestMapping("/billing-account-info")
public RestResponse billingAccountInfo() {
......@@ -35,6 +35,6 @@ public class BillingAccountController {
@RequestMapping("/list-package-type")
public RestResponse listPackageType() {
return ResultControllerUtils.commonResult(packApiService.listAllSmsPackage());
return ResultControllerUtils.commonResult(packageApiService.listAllSmsPackage());
}
}
......@@ -6,7 +6,7 @@ import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.enterprise.dto.PackageDTO;
import com.gic.enterprise.dto.SmsPackageDTO;
import com.gic.enterprise.response.EnterpriseRestResponse;
import com.gic.enterprise.service.PackApiService;
import com.gic.enterprise.service.PackageApiService;
import com.gic.enterprise.web.vo.PackageVO;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
......@@ -20,7 +20,7 @@ import java.util.List;
public class PackageController {
private Logger logger = LogManager.getLogger(PackageController.class);
@Autowired
private PackApiService packApiService;
private PackageApiService packApiService;
@RequestMapping("list-all-package")
public RestResponse listAllPackage(){
......
......@@ -37,7 +37,7 @@
<dubbo:reference interface="com.gic.log.api.service.LogApiService" id="logApiService" timeout="60000" />
<!--支付信息-->
<dubbo:reference interface="com.gic.enterprise.service.BillingPayInfoApiService" id="billingPayInfoApiService" timeout="60000" />
<dubbo:reference interface="com.gic.enterprise.service.PackApiService" id="packApiService" timeout="60000" />
<dubbo:reference interface="com.gic.enterprise.service.PackageApiService" id="packageApiService" timeout="60000" />
<!--发票管理-->
<dubbo:reference interface="com.gic.finance.service.InvoiceManageApiService" id="invoiceManageApiService" timeout="60000" />
......
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