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

[店铺][修改][参考租金类型]

release_toaliyun_real
gongbiao 6 лет назад
Родитель
Сommit
534c30ae75
3 измененных файлов: 2 добавлений и 15 удалений
  1. +1
    -0
      mallinkAdmin/src/main/resources/db/migration/V201907241543__G_ALTER_SHOP.sql
  2. +1
    -10
      mallinkService/src/main/java/com/iformall/domain/po/WxShop.java
  3. +0
    -5
      mallinkService/src/main/java/com/iformall/service/impl/WxShopServiceImpl.java

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

@@ -0,0 +1 @@
alter table wx_shop modify `rent` varchar(20) DEFAULT '' COMMENT '参与租金';

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

@@ -126,16 +126,7 @@ public class WxShop extends BaseEntity {
private Integer freeDay;

@io.swagger.annotations.ApiModelProperty(value = "参考租金", name = "rent")
private Long rent;

public String getRentStr() {
return rent != null ? new BigDecimal(rent).divide(new BigDecimal(100)).setScale(2).toPlainString() : "0";
}

@Transient
@io.swagger.annotations.ApiModelProperty(value = "参考租金", name = "rentStr")
private String rentStr;

private String rent;

@io.swagger.annotations.ApiModelProperty(value = "预置业态", name = "businessId")
private Long businessId;


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

@@ -25,7 +25,6 @@ import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.*;

@Service
@@ -72,10 +71,6 @@ public class WxShopServiceImpl implements WxShopService {

@Override
public ResultData saveOrUpdate(WxShop record) {
if (StringUtils.isNotEmpty(record.getRentStr())) {
long rent = new BigDecimal(record.getRentStr()).multiply(new BigDecimal(100)).longValue();
record.setRent(rent);
}
if (record.getId() == null) {
final IdWorker idWorker = IdWorker.get();
record.setId(idWorker.nextId());


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