Procházet zdrojové kódy

Merge commit 'refs/tags/jenkins-back-end-325^{}' into release

release_toaliyun_real
hupeng před 7 roky
rodič
revize
a0acfeccc1
28 změnil soubory, kde provedl 128 přidání a 26 odebrání
  1. +10
    -0
      mallinkAdmin/src/main/java/com/iformall/UserApplication.java
  2. +2
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/HomeController.java
  3. +3
    -0
      mallinkAdmin/src/main/resources/application-dev.yml
  4. +4
    -0
      mallinkAdmin/src/main/resources/application-prod.yml
  5. +3
    -0
      mallinkAdmin/src/main/resources/application-test.yml
  6. +11
    -0
      mallinkBApi/src/main/java/com/iformall/BApplication.java
  7. +3
    -0
      mallinkBApi/src/main/resources/application-dev.yml
  8. +3
    -0
      mallinkBApi/src/main/resources/application-prod.yml
  9. +3
    -0
      mallinkBApi/src/main/resources/application-test.yml
  10. +11
    -0
      mallinkCApi/src/main/java/com/iformall/CApplication.java
  11. +3
    -0
      mallinkCApi/src/main/resources/application-dev.yml
  12. +3
    -0
      mallinkCApi/src/main/resources/application-prod.yml
  13. +3
    -0
      mallinkCApi/src/main/resources/application-test.yml
  14. +11
    -0
      mallinkSchedule/src/main/java/com/iformall/ScheduleApplication.java
  15. +3
    -0
      mallinkSchedule/src/main/resources/application-dev.yml
  16. +3
    -0
      mallinkSchedule/src/main/resources/application-prod.yml
  17. +3
    -0
      mallinkSchedule/src/main/resources/application-test.yml
  18. +17
    -11
      mallinkService/src/main/java/com/iformall/common/GlobalDefultExceptionHandler.java
  19. +3
    -3
      mallinkService/src/main/java/com/iformall/mapper/WxTagsMapper.java
  20. +4
    -4
      mallinkService/src/main/java/com/iformall/service/impl/DataTowerServiceImpl.java
  21. +2
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java
  22. +2
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java
  23. +2
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java
  24. +2
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyDepositServiceImpl.java
  25. +2
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java
  26. +2
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java
  27. +4
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java
  28. +6
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java

+ 10
- 0
mallinkAdmin/src/main/java/com/iformall/UserApplication.java Zobrazit soubor

@@ -1,8 +1,10 @@
package com.iformall;

import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import tk.mybatis.spring.annotation.MapperScan;
@@ -18,6 +20,14 @@ import tk.mybatis.spring.annotation.MapperScan;
@EnableAsync
public class UserApplication {

@Value("${fm.exception}")
private boolean fmException;

@Bean
public boolean isFmException() {
return fmException;
}

public static void main(String[] args) {
SpringApplication.run(UserApplication.class, args);
}


+ 2
- 0
mallinkAdmin/src/main/java/com/iformall/controller/HomeController.java Zobrazit soubor

@@ -89,6 +89,8 @@ public class HomeController extends BaseController {
return new ResultData(ErrorCode.KAPCHA_NOT_VALID.getCode(), e.getMessage());
}

Double.parseDouble("askhahsf");


ResultData data = new ResultData();
if (StringUtils.isBlank(user.getUsername()) || StringUtils.isBlank(user.getPassword())) {


+ 3
- 0
mallinkAdmin/src/main/resources/application-dev.yml Zobrazit soubor

@@ -39,6 +39,9 @@ spring:
max-wait: -1
min-idle: 10

fm:
exception: false

logging:
level:
tk.mybatis: debug


+ 4
- 0
mallinkAdmin/src/main/resources/application-prod.yml Zobrazit soubor

@@ -35,6 +35,10 @@ spring:
max-wait: -1
min-idle: 0


fm:
exception: true

logging:
level:
tk.mybatis: debug


+ 3
- 0
mallinkAdmin/src/main/resources/application-test.yml Zobrazit soubor

@@ -36,6 +36,9 @@ spring:
max-wait: -1
min-idle: 0

fm:
exception: true

logging:
level:
tk.mybatis: debug


+ 11
- 0
mallinkBApi/src/main/java/com/iformall/BApplication.java Zobrazit soubor

@@ -1,8 +1,10 @@
package com.iformall;

import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import tk.mybatis.spring.annotation.MapperScan;

/**
@@ -14,6 +16,15 @@ import tk.mybatis.spring.annotation.MapperScan;
@EnableEncryptableProperties
public class BApplication {

@Value("${fm.exception}")
private boolean fmException;

@Bean
public boolean isFmException() {
return fmException;
}


public static void main(String[] args) {
SpringApplication.run(BApplication.class, args);
}


+ 3
- 0
mallinkBApi/src/main/resources/application-dev.yml Zobrazit soubor

@@ -38,6 +38,9 @@ spring:
max-wait: -1
min-idle: 0

fm:
exception: false

logging:
level:
tk.mybatis: debug


+ 3
- 0
mallinkBApi/src/main/resources/application-prod.yml Zobrazit soubor

@@ -35,6 +35,9 @@ spring:
max-wait: -1
min-idle: 0

fm:
exception: true

logging:
level:
tk.mybatis: debug


+ 3
- 0
mallinkBApi/src/main/resources/application-test.yml Zobrazit soubor

@@ -35,6 +35,9 @@ spring:
max-wait: -1
min-idle: 0

fm:
exception: true

logging:
level:
tk.mybatis: debug


+ 11
- 0
mallinkCApi/src/main/java/com/iformall/CApplication.java Zobrazit soubor

@@ -1,8 +1,10 @@
package com.iformall;

import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import tk.mybatis.spring.annotation.MapperScan;

/**
@@ -14,6 +16,15 @@ import tk.mybatis.spring.annotation.MapperScan;
@EnableEncryptableProperties
public class CApplication {

@Value("${fm.exception}")
private boolean fmException;

@Bean
public boolean isFmException() {
return fmException;
}


public static void main(String[] args) {
SpringApplication.run(CApplication.class, args);
}


+ 3
- 0
mallinkCApi/src/main/resources/application-dev.yml Zobrazit soubor

@@ -37,6 +37,9 @@ spring:
max-wait: -1
min-idle: 0

fm:
exception: false

logging:
level:
tk.mybatis: debug


+ 3
- 0
mallinkCApi/src/main/resources/application-prod.yml Zobrazit soubor

@@ -35,6 +35,9 @@ spring:
max-wait: -1
min-idle: 0

fm:
exception: true

logging:
level:
tk.mybatis: debug


+ 3
- 0
mallinkCApi/src/main/resources/application-test.yml Zobrazit soubor

@@ -35,6 +35,9 @@ spring:
max-wait: -1
min-idle: 0

fm:
exception: true

logging:
level:
tk.mybatis: debug


+ 11
- 0
mallinkSchedule/src/main/java/com/iformall/ScheduleApplication.java Zobrazit soubor

@@ -1,8 +1,10 @@
package com.iformall;

import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import tk.mybatis.spring.annotation.MapperScan;

@@ -16,6 +18,15 @@ import tk.mybatis.spring.annotation.MapperScan;
@EnableEncryptableProperties
public class ScheduleApplication {

@Value("${fm.exception}")
private boolean fmException;

@Bean
public boolean isFmException() {
return fmException;
}


public static void main(String[] args) {
SpringApplication.run(ScheduleApplication.class, args);
}


+ 3
- 0
mallinkSchedule/src/main/resources/application-dev.yml Zobrazit soubor

@@ -39,6 +39,9 @@ spring:
max-wait: -1
min-idle: 10

fm:
exception: false

logging:
level:
tk.mybatis: debug


+ 3
- 0
mallinkSchedule/src/main/resources/application-prod.yml Zobrazit soubor

@@ -36,6 +36,9 @@ spring:
max-wait: -1
min-idle: 0

fm:
exception: true

logging:
level:
tk.mybatis: debug


+ 3
- 0
mallinkSchedule/src/main/resources/application-test.yml Zobrazit soubor

@@ -36,6 +36,9 @@ spring:
max-wait: -1
min-idle: 0

fm:
exception: true

logging:
level:
tk.mybatis: debug


+ 17
- 11
mallinkService/src/main/java/com/iformall/common/GlobalDefultExceptionHandler.java Zobrazit soubor

@@ -22,6 +22,9 @@ public class GlobalDefultExceptionHandler {

private final Logger logger = LoggerFactory.getLogger(this.getClass());

@Autowired
private boolean isFmException;

@Autowired
private MailService mailService;

@@ -30,21 +33,24 @@ public class GlobalDefultExceptionHandler {
public String defultExcepitonHandler(HttpServletRequest request, Exception e) {
log(e, request);

StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
if(isFmException) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);

SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式

StringBuilder sb = new StringBuilder();
sb.append(df.format(new Date()));
sb.append("\n");
sb.append(sw.toString());
StringBuilder sb = new StringBuilder();
sb.append(df.format(new Date()));
sb.append("\n");
sb.append(sw.toString());

String[] receivers = new String[] {"hupeng@iformall.com", "wuguoqiang@iformall.com", "gongbiao@iformall.com"};
String[] receivers = new String[] {"hupeng@iformall.com", "wuguoqiang@iformall.com", "gongbiao@iformall.com"};

//发送邮件
mailService.sendSimpleMail(receivers, "请求地址:" + request.getRequestURL() + "异常", sb.toString());
}

//发送邮件
mailService.sendSimpleMail(receivers, "请求地址:" + request.getRequestURL() + "异常", sb.toString());

return "发生异常";
}


+ 3
- 3
mallinkService/src/main/java/com/iformall/mapper/WxTagsMapper.java Zobrazit soubor

@@ -1,12 +1,12 @@
package com.iformall.mapper;

import java.util.List;

import com.iformall.common.CommonMapper;
import com.iformall.domain.po.WxTags;

import java.util.List;

public interface WxTagsMapper extends CommonMapper<WxTags, String> {

List<WxTags> findList(WxTags wxTags);
WxTags getByName(String name);
List<WxTags> getByName(String name);
}

+ 4
- 4
mallinkService/src/main/java/com/iformall/service/impl/DataTowerServiceImpl.java Zobrazit soubor

@@ -404,8 +404,8 @@ public class DataTowerServiceImpl implements DataTowerService {
double dczl = new BigDecimal(yczld).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
double wczld = ((double) wczsize / size) * 100;
double wczl = new BigDecimal(wczld).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
datamap.put("yczl", dczl + "%");
datamap.put("wczl", wczl + "%");
datamap.put("yczl", dczl);
datamap.put("wczl", wczl);
}

//租金
@@ -430,7 +430,7 @@ public class DataTowerServiceImpl implements DataTowerService {
double zjcjl = divide.multiply(new BigDecimal(100)).doubleValue();
datamap.put("ysje", receivepay);
datamap.put("ssje", pay);
datamap.put("zjsjl", zjcjl + "%");
datamap.put("zjsjl", zjcjl);
} else {
datamap.put("ysje", 0);
datamap.put("ssje", 0);
@@ -458,7 +458,7 @@ public class DataTowerServiceImpl implements DataTowerService {
if (merchantsize > 0 && tradesize > 0) {
double shsbld = ((double) tradesize / merchantsize) * 100;
double shsbl = new BigDecimal(shsbld).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
datamap.put("shsbl", shsbl + "%");
datamap.put("shsbl", shsbl);
} else {
datamap.put("shsbl", 0);
}


+ 2
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java Zobrazit soubor

@@ -128,6 +128,7 @@ public class WxBillDailyServiceImpl implements WxBillDailyService {
record.setUpdatetime(date);
record.setUserId(user.getId());
record.setExpiredDay(0L);
record.setOwe(record.getReceivePay()-record.getPay());
record.setIsDel(EnumDelStatus.NOT_DEL.getCode());
try {
wxBillDailyMapper.insertSelective(record);
@@ -145,7 +146,7 @@ public class WxBillDailyServiceImpl implements WxBillDailyService {
wxBillDaily.setPayDate(record.getPayDate());
wxBillDaily.setPay(record.getPay());
wxBillDaily.setReceivePay(record.getReceivePay());
wxBillDaily.setOwe(record.getOwe());
wxBillDaily.setOwe(record.getReceivePay()-record.getPay());
wxBillDaily.setStatus(record.getPay().equals(record.getReceivePay()) ? EnumBillDailyStatus.PAID.getCode() : wxBillDaily.getStatus());
wxBillDaily.setUpdatetime(new Date());
wxBillDaily.setUserId(user.getId());


+ 2
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java Zobrazit soubor

@@ -105,6 +105,7 @@ public class WxBillDepositServiceImpl implements WxBillDepositService {
Date date = new Date();
record.setCreatetime(date);
record.setUpdatetime(date);
record.setOwe(record.getReceivePay()-record.getPay());
record.setIsDel(EnumDelStatus.NOT_DEL.getCode());
try {
wxBillDepositMapper.insertSelective(record);
@@ -122,7 +123,7 @@ public class WxBillDepositServiceImpl implements WxBillDepositService {
wxBillDeposit.setPayDate(record.getPayDate());
wxBillDeposit.setPay(record.getPay());
wxBillDeposit.setReceivePay(record.getReceivePay());
wxBillDeposit.setOwe(record.getOwe());
wxBillDeposit.setOwe(record.getReceivePay()-record.getPay());
wxBillDeposit.setStatus(record.getPay().equals(record.getReceivePay())?EnumBillRentStatus.PAID.getCode():wxBillDeposit.getStatus());
wxBillDeposit.setUpdatetime(new Date());
try {


+ 2
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java Zobrazit soubor

@@ -127,6 +127,7 @@ public class WxBillOtherServiceImpl implements WxBillOtherService {
record.setUpdatetime(date);
record.setUserId(user.getId());
record.setExpiredDay(0L);
record.setOwe(record.getReceivePay()-record.getPay());
record.setIsDel(EnumDelStatus.NOT_DEL.getCode());
try {
wxBillOtherMapper.insertSelective(record);
@@ -144,7 +145,7 @@ public class WxBillOtherServiceImpl implements WxBillOtherService {
wxBillOther.setPayDate(record.getPayDate());
wxBillOther.setPay(record.getPay());
wxBillOther.setReceivePay(record.getReceivePay());
wxBillOther.setOwe(record.getOwe());
wxBillOther.setOwe(record.getReceivePay()-record.getPay());
wxBillOther.setStatus(record.getPay().equals(record.getReceivePay()) ? EnumBillDailyStatus.PAID.getCode() : wxBillOther.getStatus());
wxBillOther.setUpdatetime(new Date());
wxBillOther.setUserId(user.getId());


+ 2
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyDepositServiceImpl.java Zobrazit soubor

@@ -106,6 +106,7 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe
Date date = new Date();
record.setCreatetime(date);
record.setUpdatetime(date);
record.setOwe(record.getReceivePay()-record.getPay());
record.setIsDel(EnumDelStatus.NOT_DEL.getCode());
try {
wxBillPropertyDepositMapper.insertSelective(record);
@@ -123,7 +124,7 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe
wxBillDeposit.setPayDate(record.getPayDate());
wxBillDeposit.setPay(record.getPay());
wxBillDeposit.setReceivePay(record.getReceivePay());
wxBillDeposit.setOwe(record.getOwe());
wxBillDeposit.setOwe(record.getReceivePay()-record.getPay());
wxBillDeposit.setStatus(record.getPay().equals(record.getReceivePay())?EnumBillRentStatus.PAID.getCode():wxBillDeposit.getStatus());
wxBillDeposit.setUpdatetime(new Date());
try {


+ 2
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java Zobrazit soubor

@@ -104,6 +104,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService {
Date date = new Date();
record.setCreatetime(date);
record.setUpdatetime(date);
record.setOwe(record.getReceivePay()-record.getPay());
record.setIsDel(EnumDelStatus.NOT_DEL.getCode());
try {
wxBillPropertyMapper.insertSelective(record);
@@ -121,7 +122,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService {
property.setPayDate(record.getPayDate());
property.setPay(record.getPay());
property.setReceivePay(record.getReceivePay());
property.setOwe(record.getOwe());
property.setOwe(record.getReceivePay()-record.getPay());
property.setStatus(record.getPay().equals(record.getReceivePay())?EnumBillRentStatus.PAID.getCode():property.getStatus());
property.setUpdatetime(new Date());
try {


+ 2
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java Zobrazit soubor

@@ -105,6 +105,7 @@ public class WxBillRentServiceImpl implements WxBillRentService {
Date date = new Date();
record.setCreatetime(date);
record.setUpdatetime(date);
record.setOwe(record.getReceivePay()-record.getPay());
record.setIsDel(EnumDelStatus.NOT_DEL.getCode());
try {
wxBillRentMapper.insertSelective(record);
@@ -122,7 +123,7 @@ public class WxBillRentServiceImpl implements WxBillRentService {
wxBillRent.setPayDate(record.getPayDate());
wxBillRent.setPay(record.getPay());
wxBillRent.setReceivePay(record.getReceivePay());
wxBillRent.setOwe(record.getOwe());
wxBillRent.setOwe(record.getReceivePay()-record.getPay());
wxBillRent.setStatus(record.getPay().equals(record.getReceivePay())?EnumBillRentStatus.PAID.getCode():wxBillRent.getStatus());
wxBillRent.setUpdatetime(new Date());
try {


+ 4
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java Zobrazit soubor

@@ -39,6 +39,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StopWatch;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
@@ -582,8 +583,9 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService {
String tagNames = userBase.getTagNames();
List<Long> tagIdList = new ArrayList<>();
for (String tagName : tagNames.split("/")) {
WxTags wxTags = wxTagsMapper.getByName(tagName);
if (wxTags != null) {
List<WxTags> wxTagsList = wxTagsMapper.getByName(tagName);
if (wxTagsList.size()==1) {
WxTags wxTags = wxTagsList.get(0);
tagIdList.add(Long.valueOf(wxTags.getId()));
}
}


+ 6
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java Zobrazit soubor

@@ -152,6 +152,12 @@ public class WxMerchantServiceImpl implements WxMerchantService {
logger.info("未发现要停用的商户");
return;
}

if(!wxMerchant.getCarVendorType().equals(EnumMerchantStatus.NOT_VALID)){
logger.info("不能停用停车商户");
return;
}

wxMerchant.setStatus(EnumMerchantStatus.NOT_VALID.getCode());
wxMerchantMapper.updateByPrimaryKeySelective(wxMerchant);
//解绑商铺


Načítá se…
Zrušit
Uložit