| @@ -1,8 +1,10 @@ | |||||
| package com.iformall; | package com.iformall; | ||||
| import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties; | import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties; | ||||
| import org.springframework.beans.factory.annotation.Value; | |||||
| import org.springframework.boot.SpringApplication; | import org.springframework.boot.SpringApplication; | ||||
| import org.springframework.boot.autoconfigure.SpringBootApplication; | import org.springframework.boot.autoconfigure.SpringBootApplication; | ||||
| import org.springframework.context.annotation.Bean; | |||||
| import org.springframework.scheduling.annotation.EnableAsync; | import org.springframework.scheduling.annotation.EnableAsync; | ||||
| import springfox.documentation.swagger2.annotations.EnableSwagger2; | import springfox.documentation.swagger2.annotations.EnableSwagger2; | ||||
| import tk.mybatis.spring.annotation.MapperScan; | import tk.mybatis.spring.annotation.MapperScan; | ||||
| @@ -18,6 +20,14 @@ import tk.mybatis.spring.annotation.MapperScan; | |||||
| @EnableAsync | @EnableAsync | ||||
| public class UserApplication { | public class UserApplication { | ||||
| @Value("${fm.exception}") | |||||
| private boolean fmException; | |||||
| @Bean | |||||
| public boolean isFmException() { | |||||
| return fmException; | |||||
| } | |||||
| public static void main(String[] args) { | public static void main(String[] args) { | ||||
| SpringApplication.run(UserApplication.class, args); | SpringApplication.run(UserApplication.class, args); | ||||
| } | } | ||||
| @@ -89,6 +89,8 @@ public class HomeController extends BaseController { | |||||
| return new ResultData(ErrorCode.KAPCHA_NOT_VALID.getCode(), e.getMessage()); | return new ResultData(ErrorCode.KAPCHA_NOT_VALID.getCode(), e.getMessage()); | ||||
| } | } | ||||
| Double.parseDouble("askhahsf"); | |||||
| ResultData data = new ResultData(); | ResultData data = new ResultData(); | ||||
| if (StringUtils.isBlank(user.getUsername()) || StringUtils.isBlank(user.getPassword())) { | if (StringUtils.isBlank(user.getUsername()) || StringUtils.isBlank(user.getPassword())) { | ||||
| @@ -39,6 +39,9 @@ spring: | |||||
| max-wait: -1 | max-wait: -1 | ||||
| min-idle: 10 | min-idle: 10 | ||||
| fm: | |||||
| exception: false | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| tk.mybatis: debug | tk.mybatis: debug | ||||
| @@ -35,6 +35,10 @@ spring: | |||||
| max-wait: -1 | max-wait: -1 | ||||
| min-idle: 0 | min-idle: 0 | ||||
| fm: | |||||
| exception: true | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| tk.mybatis: debug | tk.mybatis: debug | ||||
| @@ -36,6 +36,9 @@ spring: | |||||
| max-wait: -1 | max-wait: -1 | ||||
| min-idle: 0 | min-idle: 0 | ||||
| fm: | |||||
| exception: true | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| tk.mybatis: debug | tk.mybatis: debug | ||||
| @@ -1,8 +1,10 @@ | |||||
| package com.iformall; | package com.iformall; | ||||
| import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties; | import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties; | ||||
| import org.springframework.beans.factory.annotation.Value; | |||||
| import org.springframework.boot.SpringApplication; | import org.springframework.boot.SpringApplication; | ||||
| import org.springframework.boot.autoconfigure.SpringBootApplication; | import org.springframework.boot.autoconfigure.SpringBootApplication; | ||||
| import org.springframework.context.annotation.Bean; | |||||
| import tk.mybatis.spring.annotation.MapperScan; | import tk.mybatis.spring.annotation.MapperScan; | ||||
| /** | /** | ||||
| @@ -14,6 +16,15 @@ import tk.mybatis.spring.annotation.MapperScan; | |||||
| @EnableEncryptableProperties | @EnableEncryptableProperties | ||||
| public class BApplication { | public class BApplication { | ||||
| @Value("${fm.exception}") | |||||
| private boolean fmException; | |||||
| @Bean | |||||
| public boolean isFmException() { | |||||
| return fmException; | |||||
| } | |||||
| public static void main(String[] args) { | public static void main(String[] args) { | ||||
| SpringApplication.run(BApplication.class, args); | SpringApplication.run(BApplication.class, args); | ||||
| } | } | ||||
| @@ -38,6 +38,9 @@ spring: | |||||
| max-wait: -1 | max-wait: -1 | ||||
| min-idle: 0 | min-idle: 0 | ||||
| fm: | |||||
| exception: false | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| tk.mybatis: debug | tk.mybatis: debug | ||||
| @@ -35,6 +35,9 @@ spring: | |||||
| max-wait: -1 | max-wait: -1 | ||||
| min-idle: 0 | min-idle: 0 | ||||
| fm: | |||||
| exception: true | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| tk.mybatis: debug | tk.mybatis: debug | ||||
| @@ -35,6 +35,9 @@ spring: | |||||
| max-wait: -1 | max-wait: -1 | ||||
| min-idle: 0 | min-idle: 0 | ||||
| fm: | |||||
| exception: true | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| tk.mybatis: debug | tk.mybatis: debug | ||||
| @@ -1,8 +1,10 @@ | |||||
| package com.iformall; | package com.iformall; | ||||
| import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties; | import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties; | ||||
| import org.springframework.beans.factory.annotation.Value; | |||||
| import org.springframework.boot.SpringApplication; | import org.springframework.boot.SpringApplication; | ||||
| import org.springframework.boot.autoconfigure.SpringBootApplication; | import org.springframework.boot.autoconfigure.SpringBootApplication; | ||||
| import org.springframework.context.annotation.Bean; | |||||
| import tk.mybatis.spring.annotation.MapperScan; | import tk.mybatis.spring.annotation.MapperScan; | ||||
| /** | /** | ||||
| @@ -14,6 +16,15 @@ import tk.mybatis.spring.annotation.MapperScan; | |||||
| @EnableEncryptableProperties | @EnableEncryptableProperties | ||||
| public class CApplication { | public class CApplication { | ||||
| @Value("${fm.exception}") | |||||
| private boolean fmException; | |||||
| @Bean | |||||
| public boolean isFmException() { | |||||
| return fmException; | |||||
| } | |||||
| public static void main(String[] args) { | public static void main(String[] args) { | ||||
| SpringApplication.run(CApplication.class, args); | SpringApplication.run(CApplication.class, args); | ||||
| } | } | ||||
| @@ -37,6 +37,9 @@ spring: | |||||
| max-wait: -1 | max-wait: -1 | ||||
| min-idle: 0 | min-idle: 0 | ||||
| fm: | |||||
| exception: false | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| tk.mybatis: debug | tk.mybatis: debug | ||||
| @@ -35,6 +35,9 @@ spring: | |||||
| max-wait: -1 | max-wait: -1 | ||||
| min-idle: 0 | min-idle: 0 | ||||
| fm: | |||||
| exception: true | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| tk.mybatis: debug | tk.mybatis: debug | ||||
| @@ -35,6 +35,9 @@ spring: | |||||
| max-wait: -1 | max-wait: -1 | ||||
| min-idle: 0 | min-idle: 0 | ||||
| fm: | |||||
| exception: true | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| tk.mybatis: debug | tk.mybatis: debug | ||||
| @@ -1,8 +1,10 @@ | |||||
| package com.iformall; | package com.iformall; | ||||
| import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties; | import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties; | ||||
| import org.springframework.beans.factory.annotation.Value; | |||||
| import org.springframework.boot.SpringApplication; | import org.springframework.boot.SpringApplication; | ||||
| import org.springframework.boot.autoconfigure.SpringBootApplication; | import org.springframework.boot.autoconfigure.SpringBootApplication; | ||||
| import org.springframework.context.annotation.Bean; | |||||
| import springfox.documentation.swagger2.annotations.EnableSwagger2; | import springfox.documentation.swagger2.annotations.EnableSwagger2; | ||||
| import tk.mybatis.spring.annotation.MapperScan; | import tk.mybatis.spring.annotation.MapperScan; | ||||
| @@ -16,6 +18,15 @@ import tk.mybatis.spring.annotation.MapperScan; | |||||
| @EnableEncryptableProperties | @EnableEncryptableProperties | ||||
| public class ScheduleApplication { | public class ScheduleApplication { | ||||
| @Value("${fm.exception}") | |||||
| private boolean fmException; | |||||
| @Bean | |||||
| public boolean isFmException() { | |||||
| return fmException; | |||||
| } | |||||
| public static void main(String[] args) { | public static void main(String[] args) { | ||||
| SpringApplication.run(ScheduleApplication.class, args); | SpringApplication.run(ScheduleApplication.class, args); | ||||
| } | } | ||||
| @@ -39,6 +39,9 @@ spring: | |||||
| max-wait: -1 | max-wait: -1 | ||||
| min-idle: 10 | min-idle: 10 | ||||
| fm: | |||||
| exception: false | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| tk.mybatis: debug | tk.mybatis: debug | ||||
| @@ -36,6 +36,9 @@ spring: | |||||
| max-wait: -1 | max-wait: -1 | ||||
| min-idle: 0 | min-idle: 0 | ||||
| fm: | |||||
| exception: true | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| tk.mybatis: debug | tk.mybatis: debug | ||||
| @@ -36,6 +36,9 @@ spring: | |||||
| max-wait: -1 | max-wait: -1 | ||||
| min-idle: 0 | min-idle: 0 | ||||
| fm: | |||||
| exception: true | |||||
| logging: | logging: | ||||
| level: | level: | ||||
| tk.mybatis: debug | tk.mybatis: debug | ||||
| @@ -22,6 +22,9 @@ public class GlobalDefultExceptionHandler { | |||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | private final Logger logger = LoggerFactory.getLogger(this.getClass()); | ||||
| @Autowired | |||||
| private boolean isFmException; | |||||
| @Autowired | @Autowired | ||||
| private MailService mailService; | private MailService mailService; | ||||
| @@ -30,21 +33,24 @@ public class GlobalDefultExceptionHandler { | |||||
| public String defultExcepitonHandler(HttpServletRequest request, Exception e) { | public String defultExcepitonHandler(HttpServletRequest request, Exception e) { | ||||
| log(e, request); | 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 "发生异常"; | return "发生异常"; | ||||
| } | } | ||||
| @@ -1,12 +1,12 @@ | |||||
| package com.iformall.mapper; | package com.iformall.mapper; | ||||
| import java.util.List; | |||||
| import com.iformall.common.CommonMapper; | import com.iformall.common.CommonMapper; | ||||
| import com.iformall.domain.po.WxTags; | import com.iformall.domain.po.WxTags; | ||||
| import java.util.List; | |||||
| public interface WxTagsMapper extends CommonMapper<WxTags, String> { | public interface WxTagsMapper extends CommonMapper<WxTags, String> { | ||||
| List<WxTags> findList(WxTags wxTags); | List<WxTags> findList(WxTags wxTags); | ||||
| WxTags getByName(String name); | |||||
| List<WxTags> getByName(String name); | |||||
| } | } | ||||
| @@ -404,8 +404,8 @@ public class DataTowerServiceImpl implements DataTowerService { | |||||
| double dczl = new BigDecimal(yczld).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); | double dczl = new BigDecimal(yczld).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); | ||||
| double wczld = ((double) wczsize / size) * 100; | double wczld = ((double) wczsize / size) * 100; | ||||
| double wczl = new BigDecimal(wczld).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); | 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(); | double zjcjl = divide.multiply(new BigDecimal(100)).doubleValue(); | ||||
| datamap.put("ysje", receivepay); | datamap.put("ysje", receivepay); | ||||
| datamap.put("ssje", pay); | datamap.put("ssje", pay); | ||||
| datamap.put("zjsjl", zjcjl + "%"); | |||||
| datamap.put("zjsjl", zjcjl); | |||||
| } else { | } else { | ||||
| datamap.put("ysje", 0); | datamap.put("ysje", 0); | ||||
| datamap.put("ssje", 0); | datamap.put("ssje", 0); | ||||
| @@ -458,7 +458,7 @@ public class DataTowerServiceImpl implements DataTowerService { | |||||
| if (merchantsize > 0 && tradesize > 0) { | if (merchantsize > 0 && tradesize > 0) { | ||||
| double shsbld = ((double) tradesize / merchantsize) * 100; | double shsbld = ((double) tradesize / merchantsize) * 100; | ||||
| double shsbl = new BigDecimal(shsbld).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); | double shsbl = new BigDecimal(shsbld).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); | ||||
| datamap.put("shsbl", shsbl + "%"); | |||||
| datamap.put("shsbl", shsbl); | |||||
| } else { | } else { | ||||
| datamap.put("shsbl", 0); | datamap.put("shsbl", 0); | ||||
| } | } | ||||
| @@ -128,6 +128,7 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { | |||||
| record.setUpdatetime(date); | record.setUpdatetime(date); | ||||
| record.setUserId(user.getId()); | record.setUserId(user.getId()); | ||||
| record.setExpiredDay(0L); | record.setExpiredDay(0L); | ||||
| record.setOwe(record.getReceivePay()-record.getPay()); | |||||
| record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | ||||
| try { | try { | ||||
| wxBillDailyMapper.insertSelective(record); | wxBillDailyMapper.insertSelective(record); | ||||
| @@ -145,7 +146,7 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { | |||||
| wxBillDaily.setPayDate(record.getPayDate()); | wxBillDaily.setPayDate(record.getPayDate()); | ||||
| wxBillDaily.setPay(record.getPay()); | wxBillDaily.setPay(record.getPay()); | ||||
| wxBillDaily.setReceivePay(record.getReceivePay()); | 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.setStatus(record.getPay().equals(record.getReceivePay()) ? EnumBillDailyStatus.PAID.getCode() : wxBillDaily.getStatus()); | ||||
| wxBillDaily.setUpdatetime(new Date()); | wxBillDaily.setUpdatetime(new Date()); | ||||
| wxBillDaily.setUserId(user.getId()); | wxBillDaily.setUserId(user.getId()); | ||||
| @@ -105,6 +105,7 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { | |||||
| Date date = new Date(); | Date date = new Date(); | ||||
| record.setCreatetime(date); | record.setCreatetime(date); | ||||
| record.setUpdatetime(date); | record.setUpdatetime(date); | ||||
| record.setOwe(record.getReceivePay()-record.getPay()); | |||||
| record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | ||||
| try { | try { | ||||
| wxBillDepositMapper.insertSelective(record); | wxBillDepositMapper.insertSelective(record); | ||||
| @@ -122,7 +123,7 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { | |||||
| wxBillDeposit.setPayDate(record.getPayDate()); | wxBillDeposit.setPayDate(record.getPayDate()); | ||||
| wxBillDeposit.setPay(record.getPay()); | wxBillDeposit.setPay(record.getPay()); | ||||
| wxBillDeposit.setReceivePay(record.getReceivePay()); | 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.setStatus(record.getPay().equals(record.getReceivePay())?EnumBillRentStatus.PAID.getCode():wxBillDeposit.getStatus()); | ||||
| wxBillDeposit.setUpdatetime(new Date()); | wxBillDeposit.setUpdatetime(new Date()); | ||||
| try { | try { | ||||
| @@ -127,6 +127,7 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { | |||||
| record.setUpdatetime(date); | record.setUpdatetime(date); | ||||
| record.setUserId(user.getId()); | record.setUserId(user.getId()); | ||||
| record.setExpiredDay(0L); | record.setExpiredDay(0L); | ||||
| record.setOwe(record.getReceivePay()-record.getPay()); | |||||
| record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | ||||
| try { | try { | ||||
| wxBillOtherMapper.insertSelective(record); | wxBillOtherMapper.insertSelective(record); | ||||
| @@ -144,7 +145,7 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { | |||||
| wxBillOther.setPayDate(record.getPayDate()); | wxBillOther.setPayDate(record.getPayDate()); | ||||
| wxBillOther.setPay(record.getPay()); | wxBillOther.setPay(record.getPay()); | ||||
| wxBillOther.setReceivePay(record.getReceivePay()); | 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.setStatus(record.getPay().equals(record.getReceivePay()) ? EnumBillDailyStatus.PAID.getCode() : wxBillOther.getStatus()); | ||||
| wxBillOther.setUpdatetime(new Date()); | wxBillOther.setUpdatetime(new Date()); | ||||
| wxBillOther.setUserId(user.getId()); | wxBillOther.setUserId(user.getId()); | ||||
| @@ -106,6 +106,7 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe | |||||
| Date date = new Date(); | Date date = new Date(); | ||||
| record.setCreatetime(date); | record.setCreatetime(date); | ||||
| record.setUpdatetime(date); | record.setUpdatetime(date); | ||||
| record.setOwe(record.getReceivePay()-record.getPay()); | |||||
| record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | ||||
| try { | try { | ||||
| wxBillPropertyDepositMapper.insertSelective(record); | wxBillPropertyDepositMapper.insertSelective(record); | ||||
| @@ -123,7 +124,7 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe | |||||
| wxBillDeposit.setPayDate(record.getPayDate()); | wxBillDeposit.setPayDate(record.getPayDate()); | ||||
| wxBillDeposit.setPay(record.getPay()); | wxBillDeposit.setPay(record.getPay()); | ||||
| wxBillDeposit.setReceivePay(record.getReceivePay()); | 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.setStatus(record.getPay().equals(record.getReceivePay())?EnumBillRentStatus.PAID.getCode():wxBillDeposit.getStatus()); | ||||
| wxBillDeposit.setUpdatetime(new Date()); | wxBillDeposit.setUpdatetime(new Date()); | ||||
| try { | try { | ||||
| @@ -104,6 +104,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||||
| Date date = new Date(); | Date date = new Date(); | ||||
| record.setCreatetime(date); | record.setCreatetime(date); | ||||
| record.setUpdatetime(date); | record.setUpdatetime(date); | ||||
| record.setOwe(record.getReceivePay()-record.getPay()); | |||||
| record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | ||||
| try { | try { | ||||
| wxBillPropertyMapper.insertSelective(record); | wxBillPropertyMapper.insertSelective(record); | ||||
| @@ -121,7 +122,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||||
| property.setPayDate(record.getPayDate()); | property.setPayDate(record.getPayDate()); | ||||
| property.setPay(record.getPay()); | property.setPay(record.getPay()); | ||||
| property.setReceivePay(record.getReceivePay()); | 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.setStatus(record.getPay().equals(record.getReceivePay())?EnumBillRentStatus.PAID.getCode():property.getStatus()); | ||||
| property.setUpdatetime(new Date()); | property.setUpdatetime(new Date()); | ||||
| try { | try { | ||||
| @@ -105,6 +105,7 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||||
| Date date = new Date(); | Date date = new Date(); | ||||
| record.setCreatetime(date); | record.setCreatetime(date); | ||||
| record.setUpdatetime(date); | record.setUpdatetime(date); | ||||
| record.setOwe(record.getReceivePay()-record.getPay()); | |||||
| record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | ||||
| try { | try { | ||||
| wxBillRentMapper.insertSelective(record); | wxBillRentMapper.insertSelective(record); | ||||
| @@ -122,7 +123,7 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||||
| wxBillRent.setPayDate(record.getPayDate()); | wxBillRent.setPayDate(record.getPayDate()); | ||||
| wxBillRent.setPay(record.getPay()); | wxBillRent.setPay(record.getPay()); | ||||
| wxBillRent.setReceivePay(record.getReceivePay()); | 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.setStatus(record.getPay().equals(record.getReceivePay())?EnumBillRentStatus.PAID.getCode():wxBillRent.getStatus()); | ||||
| wxBillRent.setUpdatetime(new Date()); | wxBillRent.setUpdatetime(new Date()); | ||||
| try { | try { | ||||
| @@ -39,6 +39,7 @@ import org.slf4j.Logger; | |||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
| import org.springframework.util.StopWatch; | |||||
| import org.springframework.web.multipart.MultipartFile; | import org.springframework.web.multipart.MultipartFile; | ||||
| import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.HttpServletRequest; | ||||
| @@ -582,8 +583,9 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { | |||||
| String tagNames = userBase.getTagNames(); | String tagNames = userBase.getTagNames(); | ||||
| List<Long> tagIdList = new ArrayList<>(); | List<Long> tagIdList = new ArrayList<>(); | ||||
| for (String tagName : tagNames.split("/")) { | 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())); | tagIdList.add(Long.valueOf(wxTags.getId())); | ||||
| } | } | ||||
| } | } | ||||
| @@ -152,6 +152,12 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| logger.info("未发现要停用的商户"); | logger.info("未发现要停用的商户"); | ||||
| return; | return; | ||||
| } | } | ||||
| if(!wxMerchant.getCarVendorType().equals(EnumMerchantStatus.NOT_VALID)){ | |||||
| logger.info("不能停用停车商户"); | |||||
| return; | |||||
| } | |||||
| wxMerchant.setStatus(EnumMerchantStatus.NOT_VALID.getCode()); | wxMerchant.setStatus(EnumMerchantStatus.NOT_VALID.getCode()); | ||||
| wxMerchantMapper.updateByPrimaryKeySelective(wxMerchant); | wxMerchantMapper.updateByPrimaryKeySelective(wxMerchant); | ||||
| //解绑商铺 | //解绑商铺 | ||||