Просмотр исходного кода

[sql][修改][账单添加周期开始与结束时间]

release_toaliyun_real
gongbiao 6 лет назад
Родитель
Сommit
a33af4dec8
10 измененных файлов: 48 добавлений и 8 удалений
  1. +11
    -0
      mallinkAdmin/src/main/resources/db/migration/V201907041410__G_ALTER_BILL.sql
  2. +5
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java
  3. +6
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxBillOther.java
  4. +5
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxBillOtherDeposit.java
  5. +2
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java
  6. +1
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java
  7. +1
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java
  8. +7
    -4
      mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml
  9. +5
    -2
      mallinkService/src/main/resources/mapper/WxBillOtherDepositMapper.xml
  10. +5
    -2
      mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml

+ 11
- 0
mallinkAdmin/src/main/resources/db/migration/V201907041410__G_ALTER_BILL.sql Просмотреть файл

@@ -0,0 +1,11 @@
alter table wx_bill_daily
add column starttime datetime default null comment '账单开始时间',
add column endtime datetime default null comment '账单结束时间';

alter table wx_bill_other
add column starttime datetime default null comment '账单开始时间',
add column endtime datetime default null comment '账单结束时间';

alter table wx_bill_other_deposit
add column starttime datetime default null comment '账单开始时间',
add column endtime datetime default null comment '账单结束时间';

+ 5
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java Просмотреть файл

@@ -116,6 +116,11 @@ public class WxBillDaily extends BaseEntity{
@Transient
private List<Map<String, Object>> shops;

@io.swagger.annotations.ApiModelProperty(value = "开始时间", name = "starttime")
private Date starttime;

@io.swagger.annotations.ApiModelProperty(value = "结束时间", name = "endtime")
private Date endtime;

public static enum Field
{


+ 6
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxBillOther.java Просмотреть файл

@@ -127,6 +127,12 @@ public class WxBillOther extends BaseEntity {
@Excel(name = "欠缴金额(元)", orderNum = "6", width = 20)
private String oweStr;

@io.swagger.annotations.ApiModelProperty(value = "开始时间", name = "starttime")
private Date starttime;

@io.swagger.annotations.ApiModelProperty(value = "结束时间", name = "endtime")
private Date endtime;

public String getReceivePayStr() {
return new BigDecimal(receivePay == null ? 0 : receivePay).divide(new BigDecimal(100)).toPlainString();
}


+ 5
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxBillOtherDeposit.java Просмотреть файл

@@ -149,6 +149,11 @@ public class WxBillOtherDeposit extends BaseEntity {
@Transient
private List<Map<String, Object>> shops;

@io.swagger.annotations.ApiModelProperty(value = "开始时间", name = "starttime")
private Date starttime;

@io.swagger.annotations.ApiModelProperty(value = "结束时间", name = "endtime")
private Date endtime;

public static enum Field {
Id_ASC("`id` ASC"), Id_DESC("`id` DESC")


+ 2
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java Просмотреть файл

@@ -1070,6 +1070,7 @@ public class WxBillAllServiceImpl implements WxBillAllService {
otherQuery.setTenantId(tenantId);
otherQuery.setMerchantId(bill.getMerchantId());
otherQuery.setReceiveDate(bill.getReceiveDate());
otherQuery.setName(bill.getBillAttr());
otherQuery.setIsDel(EnumDelStatus.NOT_DEL.getCode());
WxBillOther other = wxBillOtherMapper.selectOne(otherQuery);
long pay = new BigDecimal(bill.getPayStr()).multiply(new BigDecimal(100)).longValueExact();
@@ -1123,6 +1124,7 @@ public class WxBillAllServiceImpl implements WxBillAllService {
otherDepositQuery.setTenantId(tenantId);
otherDepositQuery.setMerchantId(bill.getMerchantId());
otherDepositQuery.setReceiveDate(bill.getReceiveDate());
otherDepositQuery.setComments(bill.getBillAttr());
otherDepositQuery.setIsDel(EnumDelStatus.NOT_DEL.getCode());
WxBillOtherDeposit otherDeposit = wxBillOtherDepositMapper.selectOne(otherDepositQuery);
long pay = new BigDecimal(bill.getPayStr()).multiply(new BigDecimal(100)).longValueExact();


+ 1
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java Просмотреть файл

@@ -126,6 +126,7 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService
otherDepositQuery.setTenantId(record.getTenantId());
otherDepositQuery.setMerchantId(record.getMerchantId());
otherDepositQuery.setReceiveDate(record.getReceiveDate());
otherDepositQuery.setComments(record.getComments());
otherDepositQuery.setIsDel(EnumDelStatus.NOT_DEL.getCode());
WxBillOtherDeposit otherDeposit = wxBillOtherDepositMapper.selectOne(otherDepositQuery);
if (otherDeposit != null) {


+ 1
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java Просмотреть файл

@@ -127,6 +127,7 @@ public class WxBillOtherServiceImpl implements WxBillOtherService {
otherQuery.setTenantId(record.getTenantId());
otherQuery.setMerchantId(record.getMerchantId());
otherQuery.setReceiveDate(record.getReceiveDate());
otherQuery.setName(record.getName());
otherQuery.setIsDel(EnumDelStatus.NOT_DEL.getCode());
WxBillOther other = wxBillOtherMapper.selectOne(otherQuery);
if (other != null) {


+ 7
- 4
mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml Просмотреть файл

@@ -23,13 +23,16 @@
<result column="price_detail" jdbcType="VARCHAR" property="priceDetail"/>
<result column="shop_number" jdbcType="VARCHAR" property="shopNumber"/>
<result column="starttime" property="starttime"/>
<result column="endtime" property="endtime"/>
</resultMap>
<sql id="allColumns">
`id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`,
`tenant_id`,`owe`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`updatetime`,`type`,
`rent_shop_type`,`pay_way`,`price_detail`
`rent_shop_type`,`pay_way`,`price_detail`,`starttime`,`endtime`
</sql>

<sql id="dynamicWhereConditions">
@@ -68,9 +71,9 @@
<select id="queryBillDailyList" parameterType="com.iformall.domain.po.WxBillDaily" resultMap="BaseResultMap">
select br.`id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day` ,
case when br.status=1 then br.owe else 0 end owe,br.`status`,m.`name` merchant_name,
s.shop_number,br.`updatetime`,br.`merchant_id`,
br.shop_id,br.type,br.`rent_shop_type`,br.pay_way,br.price_detail
case when br.status=1 then br.owe else 0 end owe,br.`status`,m.`name` merchant_name,s.shop_number,
br.`updatetime`,br.`merchant_id`,br.shop_id,br.type,br.`rent_shop_type`,br.pay_way,br.price_detail,
br.`starttime`,br.`endtime`
from wx_bill_daily br left join wx_merchant m on br.merchant_id=m.id
left join wx_shop s on br.shop_id=s.id
<where>


+ 5
- 2
mallinkService/src/main/resources/mapper/WxBillOtherDepositMapper.xml Просмотреть файл

@@ -24,13 +24,16 @@
<result column="pay_way" jdbcType="INTEGER" property="payWay"/>
<result column="merchant_name" property="merchantName"/>
<result column="starttime" property="starttime"/>
<result column="endtime" property="endtime"/>
</resultMap>
<sql id="allColumns">
`id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`,
`tenant_id`,`owe`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`updatetime`,`name`,`comments`,
`rent_shop_type`,`return_price`,`pay_way`
`rent_shop_type`,`return_price`,`pay_way`,`starttime`,`endtime`
</sql>
<sql id="dynamicWhereConditions">
@@ -73,7 +76,7 @@
<select id="queryBillList" parameterType="com.iformall.domain.po.WxBillOtherDeposit" resultMap="BaseResultMap">
select br.`id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day`,
br.`owe`,br.`status`,m.`name` merchant_name,s.shop_number,br.`updatetime`,br.`return_price`,br.`merchant_id`,
br.shop_id,br.name,br.comments,br.`rent_shop_type`,br.pay_way
br.shop_id,br.name,br.comments,br.`rent_shop_type`,br.pay_way,br.`starttime`,br.`endtime`
from wx_bill_other_deposit br left join wx_merchant m on br.merchant_id=m.id
left join wx_shop s on br.shop_id=s.id
<where>


+ 5
- 2
mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml Просмотреть файл

@@ -23,6 +23,9 @@
<result column="pay_way" jdbcType="INTEGER" property="payWay"/>
<result column="merchant_name" property="merchantName"/>
<result column="starttime" property="starttime"/>
<result column="endtime" property="endtime"/>
</resultMap>
@@ -30,7 +33,7 @@
<sql id="allColumns">
`id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`,
`tenant_id`,`owe`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`updatetime`,`name`,`comments`,
`rent_shop_type`,`pay_way`
`rent_shop_type`,`pay_way`,`starttime`,`endtime`
</sql>

<sql id="dynamicWhereConditions">
@@ -72,7 +75,7 @@
select br.`id`,br.`receive_pay`,br.`pay`,br.`receive_date`, br.`pay_date`,br.`createtime`,br.`expired_day`,
case when br.status=1 then br.owe else 0 end owe,br.`status`,m.`name`
merchant_name,s.shop_number,br.`updatetime`,
br.`merchant_id`,br.shop_id,br.name,br.comments,br.`rent_shop_type`,br.pay_way
br.`merchant_id`,br.shop_id,br.name,br.comments,br.`rent_shop_type`,br.pay_way,br.`starttime`,br.`endtime`
from wx_bill_other br left join wx_merchant m on br.merchant_id=m.id
left join wx_shop s on br.shop_id=s.id
<where>


Загрузка…
Отмена
Сохранить