svn to git

0 parents
Showing 212 changed files with 5207 additions and 0 deletions
File mode changed
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="SerializableHasSerialVersionUIDField" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>
\ No newline at end of file \ No newline at end of file
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cn.com.glsx.framework</groupId>
<artifactId>framework-rop</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rop-dj</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>rop-dj</name>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>cn.com.glsx</groupId>
<artifactId>rpc-dj-insure-api</artifactId>
<version>4.53.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-system-api</artifactId>
<version>0.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-aibschance-api</artifactId>
<version>0.0.7-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-gop-api</artifactId>
<version>0.0.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-hardware-api</artifactId>
<version>4.33.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-customer-api</artifactId>
<version>0.0.6-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-marketing-api</artifactId>
<version>0.0.7-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.oreframework.boot</groupId>
<artifactId>ore-boot-starter-jms</artifactId>
</dependency>
<dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-weapp-api</artifactId>
<version>0.0.5-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-car-boutique-api</artifactId>
<version>0.0.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-wechat-api</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency><dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-payment-api</artifactId>
<version>0.0.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.oreframework.boot</groupId>
<artifactId>ore-boot-starter-fastdfs</artifactId>
<version>2.2.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="FacetManager">
<facet type="web" name="Web">
<configuration>
<webroots>
<root url="file://$MODULE_DIR$/src/main/webapp" relative="/" />
</webroots>
<sourceRoots>
<root url="file://$MODULE_DIR$/src/main/java" />
<root url="file://$MODULE_DIR$/src/main/resources" />
</sourceRoots>
</configuration>
</facet>
<facet type="jpa" name="JPA">
<configuration>
<setting name="validation-enabled" value="true" />
<datasource-mapping>
<factory-entry name="rop-dj" />
</datasource-mapping>
<naming-strategy-map />
</configuration>
</facet>
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
</module>
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.rop;
import org.oreframework.boot.main.AbsOreBootStarter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
/**
* @Title: Main.java
* @Description:
* @author zengqi
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2015
*/
@SpringBootApplication
@ServletComponentScan
public class Main extends AbsOreBootStarter {
@Override
public void run(String[] args)
{
SpringApplication.run(Main.class, args);
}
public static void main(String[] args)
{
Main main = new Main();
main.run(args);
}
}
package cn.com.glsx.dj.rop.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
/**
* @Title: SystemProperty.java
* @Description:
* @author deployer name
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2017
*/
@Configuration
@ConfigurationProperties("system")
public class SystemProperty {
/** 嘀加**/
public static final String DJ = "DJ";
/** 广汇爱车保镖**/
public static final String GH = "GH";
/**
* 渠道名称(DJ:嘀加;GH:广汇爱车保镖)
*/
private String channel;
public String getChannel() {
return channel;
}
public void setChannel(String channel) {
this.channel = channel;
}
}
package cn.com.glsx.dj.rop.config.dubbo;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import cn.com.glsx.dj.aibschance.remote.CarCollisionRemote;
import cn.com.glsx.dj.aibschance.remote.CollisionNoticeConfigRemote;
import cn.com.glsx.dj.aibschance.remote.FollowRecordRemote;
/**
* @Title: AibschanceDubboConfig.java
* @Description: AI商机模块Dubbo服务注册
* @author Alvin
* @date 2019年10月29日 下午1:51:12
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
@Configuration
public class AibschanceDubboConfig extends DubboConfig{
/**
* 注册碰撞通知配置远程服务
* @return
* @author Alvin
* @date 2019年9月13日 上午9:23:34
*/
@Bean
public CollisionNoticeConfigRemote collisionNoticeConfigRemote(){
return factory.builder(CollisionNoticeConfigRemote.class).check(check).timeout(timeout).build();
}
/**
* 注册碰撞远程服务
* @return
* @author Alvin
* @date 2019年9月21日 上午10:58:52
*/
@Bean
public CarCollisionRemote carCollisionRemote(){
return factory.builder(CarCollisionRemote.class).check(check).timeout(timeout).build();
}
@Bean
public FollowRecordRemote followRecordRemote(){
return factory.builder(FollowRecordRemote.class).check(check).timeout(timeout).build();
}
}
package cn.com.glsx.dj.rop.config.dubbo;
import cn.com.glsx.dj.car.boutique.remote.BdGoodsRelationRemote;
import cn.com.glsx.dj.car.boutique.remote.BdGoodsRemote;
import cn.com.glsx.dj.car.boutique.remote.BdOrderRemote;
import cn.com.glsx.dj.car.boutique.remote.BdSubOrderRemote;
import cn.com.glsx.dj.gop.remote.GopBoutiqueDeliveryRemote;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class BoutiqueDeliveryDubboConfig extends DubboConfig {
@Bean
public BdSubOrderRemote bdSubOrderRemote() {
return factory.builder(BdSubOrderRemote.class).check(check).timeout(timeout).build();
}
@Bean
public BdOrderRemote bdOrderRemote() {
return factory.builder(BdOrderRemote.class).check(check).timeout(timeout).build();
}
@Bean
public BdGoodsRelationRemote bdGoodsRelationRemote() {
return factory.builder(BdGoodsRelationRemote.class).check(check).timeout(timeout).build();
}
@Bean
public BdGoodsRemote bdGoodsRemote() {
return factory.builder(BdGoodsRemote.class).check(check).timeout(timeout).build();
}
@Bean
public GopBoutiqueDeliveryRemote gopBoutiqueDeliveryRemote() {
return factory.builder(GopBoutiqueDeliveryRemote.class).check(false).timeout(30000).build();
}
}
package cn.com.glsx.dj.rop.config.dubbo;
import cn.com.glsx.dj.customer.remote.CustomerActiveUserRemote;
import cn.com.glsx.dj.customer.remote.CustomerDeviceMerchantRemote;
import cn.com.glsx.dj.customer.remote.CustomerDeviceUserRemote;
import cn.com.glsx.dj.customer.remote.MerchantCustomerExportRemote;
import cn.com.glsx.dj.customer.remote.MerchantCustomerRemote;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import cn.com.glsx.dj.customer.remote.CustomerDeviceRemote;
/**
* @Title: CustomerDubboConfig.java
* @Description: 客户模块Dubbo服务注册
* @author Alvin
* @date 2019年11月20日 上午10:07:36
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
@Configuration
public class CustomerDubboConfig extends DubboConfig {
/**
* 导入设备远程服务注册
* @return
* @author Alvin
* @date 2019年11月20日 上午10:10:13
*/
@Bean
public CustomerDeviceRemote customerDeviceRemote(){
return factory.builder(CustomerDeviceRemote.class).check(check).timeout(timeout).build();
}
/**
* 设备商户关系
* @return
* @author Suro
* @date 2019年11月20日 上午10:10:13
*/
@Bean
public CustomerDeviceMerchantRemote customerDeviceMerchantRemote(){
return factory.builder(CustomerDeviceMerchantRemote.class).check(check).timeout(timeout).build();
}
/**
* 设备激活用户信息
* @return
* @author Suro
* @date 2019年11月20日 上午10:10:13
*/
@Bean
public CustomerActiveUserRemote customerActiveUserRemote(){
return factory.builder(CustomerActiveUserRemote.class).check(check).timeout(timeout).build();
}
/**
* 设备激活用户信息
* @return
* @author Suro
* @date 2019年11月20日 上午10:10:13
*/
@Bean
public CustomerDeviceUserRemote customerDeviceUserRemote(){
return factory.builder(CustomerDeviceUserRemote.class).check(check).timeout(timeout).build();
}
/**
* 商户客户
* @return
* @author zengqi
* @date 2021年3月30日 下午9:21:23
*/
@Bean
public MerchantCustomerRemote merchantCustomerRemote(){
return factory.builder(MerchantCustomerRemote.class).check(check).timeout(timeout).build();
}
@Bean
public MerchantCustomerExportRemote merchantCustomerExportRemote(){
return factory.builder(MerchantCustomerExportRemote.class).check(check).timeout(60000).protocol("rmi").build();
}
}
package cn.com.glsx.dj.rop.config.dubbo;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import cn.com.glsx.dj.system.remote.RopAppAccessRemote;
import cn.com.glsx.dj.system.remote.RopAppServiceRemote;
import cn.com.glsx.dj.system.remote.RopServiceRemote;
/**
* @Title: DopDubboConfig.java
* @Description: 嘀加开放平台服务配置
* @author zengqi
* @date 2020年01月06日 上午9:23:52
* @version V1.0
* @Company: glsx.com.cn
* @Copyright Copyright (c) 2020
*/
@Configuration
public class DopDubboConfig extends DubboConfig{
/**
* 应用授权远程服务注册
* @return
* @author Alvin
* @date 2020年1月6日 上午10:28:21
*/
@Bean
public RopAppAccessRemote ropAppAccessRemote(){
return factory.builder(RopAppAccessRemote.class).check(check).timeout(timeout).build();
}
/**
* 应用服务授权远程服务注册
* @return
* @author Alvin
* @date 2020年1月6日 上午10:29:25
*/
@Bean
public RopAppServiceRemote ropAppServiceRemote(){
return factory.builder(RopAppServiceRemote.class).check(check).timeout(timeout).build();
}
/**
* 服务定义远程服务注册
* @return
* @author Alvin
* @date 2020年1月6日 上午10:30:20
*/
@Bean
public RopServiceRemote ropServiceRemote(){
return factory.builder(RopServiceRemote.class).check(check).timeout(timeout).build();
}
}
package cn.com.glsx.dj.rop.config.dubbo;
import org.oreframework.boot.autoconfigure.dubbo.reference.ReferenceBuilderFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
/**
* @Title: DubboConfig.java
* @Description: Dubbo服务注册配置
* @author deployer name
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2018
*/
@Configuration
public class DubboConfig {
@Autowired
protected ReferenceBuilderFactory factory;
protected final boolean check = false;
protected final int timeout = 30000;
}
package cn.com.glsx.dj.rop.config.dubbo;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import cn.com.glsx.dj.gop.remote.GopAddressRemote;
import cn.com.glsx.dj.gop.remote.GopCarInfoRemote;
import cn.com.glsx.dj.gop.remote.GopGpsLocationRemote;
import cn.com.glsx.dj.gop.remote.GopSendSmsRemote;
/**
* @Title: GopDubboConfig.java
* @Description:
* @author zhoulm
* @date 2019年11月11日 上午9:23:52
* @version V1.0
* @Company: glsx.com.cn
* @Copyright Copyright (c) 2019
*/
@Configuration
public class GopDubboConfig extends DubboConfig{
/**
* 注册车信息远程服务
* @Description:
* @return
* @author zhoulm
* @date 2019年11月11日 上午9:24:28
*/
@Bean
public GopCarInfoRemote gopCarInfoRemote(){
return factory.builder(GopCarInfoRemote.class).check(check).timeout(timeout).build();
}
/**
* 注册地址远程服务
* @Description:
* @return
* @author zhoulm
* @date 2019年11月11日 下午5:11:17
*/
@Bean
public GopAddressRemote gopAddressRemote(){
return factory.builder(GopAddressRemote.class).check(check).timeout(timeout).build();
}
/**
* 注册设备位置服务
* @return
* @author Alvin
* @date 2020年5月21日 下午5:06:41
*/
@Bean
public GopGpsLocationRemote gopGpsLocationRemote(){
return factory.builder(GopGpsLocationRemote.class).check(check).timeout(timeout).build();
}
/**
* 注册短信服务
* @return
* @author zengqi
* @date 2021年6月3日 下午3:10:42
*/
@Bean
public GopSendSmsRemote gopSendSmsRemote(){
return factory.builder(GopSendSmsRemote.class).check(check).timeout(timeout).build();
}
}
package cn.com.glsx.dj.rop.config.dubbo;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import cn.com.glsx.dj.hardware.remote.DeviceKafkaRemote;
import cn.com.glsx.dj.hardware.remote.DeviceMerchantKafkaRemote;
import cn.com.glsx.dj.hardware.remote.MerchantKafkaRemote;
import cn.com.glsx.dj.hardware.remote.ProxyKafkaRemote;
/**
* @Title: HardwareDubboConfig.java
* @Description: 智能硬件Dubbo服务注册
* @author Alvin
* @date 2019年7月11日 上午9:57:14
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
@Configuration
public class HardwareDubboConfig extends DubboConfig {
@Bean
public MerchantKafkaRemote merchantKafkaRemote(){
return factory.builder(MerchantKafkaRemote.class).check(false).timeout(timeout).build();
}
@Bean
public DeviceKafkaRemote deviceKafkaRemote(){
return factory.builder(DeviceKafkaRemote.class).check(false).timeout(timeout).build();
}
@Bean
public DeviceMerchantKafkaRemote deviceMerchantKafkaRemote() {
return factory.builder(DeviceMerchantKafkaRemote.class).check(false).timeout(timeout).build();
}
@Bean
public ProxyKafkaRemote proxyKafkaRemote() {
return factory.builder(ProxyKafkaRemote.class).check(false).timeout(timeout).version("1.0.0").build();
}
}
package cn.com.glsx.dj.rop.config.dubbo;
import cn.com.glsx.dj.insure.remote.*;
import cn.com.glsx.scrm.equity.remote.ServiceEquityOrderSummaryRemote;
import org.apache.dubbo.config.MethodConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.Arrays;
/**
* @Title: InsureDubboConfig.java
* @Description: 保单模块Dubbo注册
* @author Alvin
* @date 2019年10月29日 下午1:51:00
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
@Configuration
public class InsureDubboConfig extends DubboConfig{
/**
* 注册保单远程服务
* @return
*/
@Bean
public InsureRemote insureRemote(){
MethodConfig listEquitySummaryDataPage = new MethodConfig();
listEquitySummaryDataPage.setName("listEquitySummaryDataPage");
listEquitySummaryDataPage.setRetries(3);
listEquitySummaryDataPage.setTimeout(60*1000);
return factory.builder(InsureRemote.class).check(check).timeout(timeout).methods(Arrays.asList(listEquitySummaryDataPage)).build();
}
/**
* 注册保单车辆远程服务
* @return
* @author Alvin
* @date 2019年10月10日 上午11:03:01
*/
@Bean
public InsureVehicleRemote insureVehicleRemote(){
return factory.builder(InsureVehicleRemote.class).check(check).timeout(timeout).build();
}
@Bean
public InsuranceAddDeviceRecordRemote insuranceAddDeviceRecordRemote(){
return factory.builder(InsuranceAddDeviceRecordRemote.class).check(check).timeout(timeout).build();
}
@Bean
public DidiInsureRemote didiInsureRemote(){
return factory.builder(DidiInsureRemote.class).check(check).timeout(timeout).build();
}
@Bean
public InsureSeqNoRemote insureSeqNoRemote(){
return factory.builder(InsureSeqNoRemote.class).check(check).timeout(timeout).build();
}
@Bean
public PromiseRemote promiseRemote(){
return factory.builder(PromiseRemote.class).check(check).timeout(timeout).build();
}
@Bean
public EquityActiveInfoRemote equityActiveInfoRemote(){
return factory.builder(EquityActiveInfoRemote.class).check(check).timeout(timeout).build();
}
@Bean
public InsureExternalRemote insureExternalRemote(){
return factory.builder(InsureExternalRemote.class).check(check).timeout(timeout).build();
}
@Bean
public InsureEquityRemote insureEquityRemote(){
MethodConfig listEquitySummaryDataPage = new MethodConfig();
listEquitySummaryDataPage.setName("listEquitySummaryDataPage");
listEquitySummaryDataPage.setRetries(3);
listEquitySummaryDataPage.setTimeout(60*1000);
return factory.builder(InsureEquityRemote.class).check(check).timeout(timeout).methods(Arrays.asList(listEquitySummaryDataPage)).build();
}
@Bean
public WwInsureRemote wwInsureRemote(){
return factory.builder(WwInsureRemote.class).check(check).timeout(timeout).build();
}
@Bean
public InsureEquityCardRemote insureEquityCardRemote(){
return factory.builder(InsureEquityCardRemote.class).check(check).timeout(timeout).build();
}
}
package cn.com.glsx.dj.rop.config.dubbo;
import cn.com.glsx.dj.marketing.remote.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @Title: MarketingDubboConfig.java
* @Description: 活动营销Dubbo服务注册
* @author Alvin
* @date 2019年7月11日 上午9:36:04
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
@Configuration
public class MarketingDubboConfig extends DubboConfig{
@Bean
public MerchantAccountGoodsRemote merchantAccountGoodsRemote(){
return factory.builder(MerchantAccountGoodsRemote.class).check(false).timeout(timeout).build();
}
@Bean
public AccountGoodsRemote accountGoodsRemote(){
return factory.builder(AccountGoodsRemote.class).check(false).timeout(timeout).build();
}
@Bean
public WxShopRechargeRecordRemote wxShopRechargeRecordRemote(){
return factory.builder(WxShopRechargeRecordRemote.class).version("0.0.1").check(false).timeout(timeout).build();
}
@Bean
public FissonMerchantChannelRemote fissonMerchantChannelRemote(){
return factory.builder(FissonMerchantChannelRemote.class).check(false).timeout(timeout).build();
}
@Bean
public FissionOrderRemote fissionOrderRemote(){
return factory.builder(FissionOrderRemote.class).check(false).timeout(timeout).build();
}
}
package cn.com.glsx.dj.rop.config.dubbo;
import cn.com.glsx.dj.gop.remote.GopMerchantRemote;
import cn.com.glsx.dj.system.remote.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @Title: SystemDubboConfig.java
* @Description: 系统模块Dubbo注册
* @author Alvin
* @date 2019年10月29日 下午2:12:20
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
@Configuration
public class SystemDubboConfig extends DubboConfig{
/**
* 注册商户信息远程服务
* @return
* @author Alvin
* @date 2019年9月13日 上午9:21:43
*/
@Bean
public MerchantRemote merchantRemote(){
return factory.builder(MerchantRemote.class).check(check).timeout(timeout).build();
}
/**
* @Description: 注册用户信息远程服务
* @return
* @author zhoulm
* @date 2019年11月4日 上午10:02:26
*/
@Bean
public UserRemote userRemote(){
return factory.builder(UserRemote.class).check(check).timeout(timeout).build();
}
/**
* @Description:注册渠道配置信息远程服务
* @return
* @author zhoulm
* @date 2019年11月4日 上午11:32:17
*/
@Bean
public ChannelConfigRemote channelConfigRemote(){
return factory.builder(ChannelConfigRemote.class).check(check).timeout(timeout).build();
}
@Bean
public EmployeeRemote employeeRemote(){
return factory.builder(EmployeeRemote.class).check(check).timeout(timeout).build();
}
@Bean
public MerchantCompanyRemote merchantCompanyRemote(){
return factory.builder(MerchantCompanyRemote.class).check(check).timeout(timeout).build();
}
@Bean
public MerchantLevelRemote MerchantLevelRemote(){
return factory.builder(MerchantLevelRemote.class).check(check).timeout(timeout).build();
}
@Bean
public MerchantCarBrandRemote merchantCarBrandRemote() {
return factory.builder(MerchantCarBrandRemote.class).check(check).timeout(timeout).build();
}
@Bean
public ConfigRemote configRemote() {
return factory.builder(ConfigRemote.class).check(check).timeout(timeout).build();
}
@Bean
public RoleRemote roleRemote(){
return factory.builder(RoleRemote.class).check(check).timeout(timeout).build();
}
@Bean
public GopMerchantRemote gopMerchantRemote() {
return factory.builder(GopMerchantRemote.class).check(check).timeout(timeout).build();
}
@Bean
public LoginLogRemote loginLogRemote(){
return factory.builder(LoginLogRemote.class).check(check).timeout(timeout).build();
}
}
package cn.com.glsx.dj.rop.config.dubbo;
import cn.com.glsx.dj.weapp.remote.PageVisitCollectRemote;
import org.oreframework.boot.autoconfigure.dubbo.reference.ReferenceBuilderFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import cn.com.glsx.dj.weapp.remote.VpMaterialInfoRemote;
@Configuration
public class WeappDubboConfig {
@Autowired
private ReferenceBuilderFactory factory;
@Bean
public VpMaterialInfoRemote vpMaterialInfoRemote(){
return factory.builder(VpMaterialInfoRemote.class).check(false).timeout(30000).build();
}
@Bean
public PageVisitCollectRemote pageVisitCollectRemote(){
return factory.builder(PageVisitCollectRemote.class).check(false).timeout(30000).build();
}
}
package cn.com.glsx.dj.rop.config.dubbo;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import cn.com.glsx.dj.wechat.remote.WechatH5AuthorizeInfoRemote;
import cn.com.glsx.dj.wechat.remote.WechatMessageRemote;
import cn.com.glsx.dj.wechat.remote.WechatMiniprogramRemote;
import cn.com.glsx.dj.wechat.remote.WechatQrcodeSceneRemote;
import cn.com.glsx.dj.wechat.remote.WechatUserInfoRemote;
@Configuration
public class WechantDubboConfig extends DubboConfig {
@Bean
public WechatMiniprogramRemote wechatMiniprogramRemote() {
return factory.builder(WechatMiniprogramRemote.class).check(check).timeout(timeout).build();
}
@Bean
public WechatQrcodeSceneRemote wechatQrcodeSceneRemote() {
return factory.builder(WechatQrcodeSceneRemote.class).check(check).timeout(timeout).build();
}
@Bean
public WechatMessageRemote woechatMessageRemote() {
return factory.builder(WechatMessageRemote.class).check(check).timeout(timeout).build();
}
@Bean
public WechatH5AuthorizeInfoRemote wechatH5AuthorizeInfoRemote(){
return factory.builder(WechatH5AuthorizeInfoRemote.class).check(check).timeout(timeout).build();
}
@Bean
public WechatUserInfoRemote wechatUserInfoRemote(){
return factory.builder(WechatUserInfoRemote.class).check(check).timeout(timeout).build();
}
}
package cn.com.glsx.dj.rop.config.upload;
/**
* @Title: FileConfig.java
* @Description:
* @author Alvin
* @date 2019年5月2日 上午11:32:18
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
public class FileConfig{
/**
* 文件大小:单位KB
*/
private Integer size;
/**
* 文件格式
*/
private String format;
/**
* weizhi
*/
private String dir;
/**
* weizhi
*/
private String url;
public Integer getSize() {
return size;
}
public void setSize(Integer size) {
this.size = size;
}
public String getFormat() {
return format;
}
public void setFormat(String format) {
this.format = format;
}
public String getDir() {
return dir;
}
public void setDir(String dir) {
this.dir = dir;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
}
package cn.com.glsx.dj.rop.config.upload;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import java.util.Map;
/**
* @Title: UploadProperty.java
* @Description:
* @author Alvin.zengqi
* @date 2018年5月11日 上午11:02:04
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2015
*/
@Configuration
@ConfigurationProperties("rop.dj")
public class UploadProperty {
/**
* 文件访问路径
*/
private Map<String, FileConfig> upload;
private String equityUrl;
public Map<String, FileConfig> getUpload() {
return upload;
}
public void setUpload(Map<String, FileConfig> upload) {
this.upload = upload;
}
public String getEquityUrl() {
return equityUrl;
}
public void setEquityUrl(String equityUrl) {
this.equityUrl = equityUrl;
}
}
package cn.com.glsx.dj.rop.constant;
/**
*
* @author zhoudan
* @date 2019/4/30
*/
public class DidiInsuranceConstants {
public final static String CAPTION_INDEX = "序号";
public final static String CAPTION_INSURANCE_NUM = "保险单号";
public final static String CAPTION_DIDI_NUM = "保险编号";
public final static String CAPTION_INSURANCE_COMPANY = "所属保险公司";
public final static String CAPTION_INSURANCE_MARK = "保险公司标识";
/**
* 迪迪设备型号
*/
public static final String DD_DEVICE = "DD_DEVICE";
/**
* 南京人保 - 丰田金融
*/
public static final String PC_NJ_TOYOTA = "PC_NJ_TOYO";
/**
* 武汉人保 - 东财
*/
public static final String PC_EAST_FINANCIAL = "PC_EAST_FI";
/**
* 武汉人保 - 东风日产
*/
public static final String PC_DF_NISSAN = "PC_DF_NISS";
/**
* 武汉人保 - 广汽汇理
*/
public static final String PC_GACSOFINCO = "PC_GACSOFI";
/**
* 武汉人保 - 通用
*/
public static final String PC_GENERAL = "PC_GENERAL";
/**
* 第一受益人关键字 - 丰田金融
*/
public static final String KEYWORD_TOYOTA = "丰田金融";
/**
* 第一受益人关键字 - 丰田汽车金融
*/
public static final String KEYWORD_TOYOTA_AUTO = "丰田汽车金融";
/**
* 第一受益人关键字 - 东风日产金融
*/
public static final String KEYWORD_DF_NISSAN = "东风日产金融";
public static final String KEYWORD_DF_NISSAN_AUTO = "东风日产汽车金融";
/**
* 第一受益人关键字 - 东风汽车财务
*/
public static final String KEYWORD_EAST_FINANCIAL = "东风汽车财务";
/**
* 第一受益人关键字 - 广汽汇理
*/
public static final String KEYWORD_GACSOFINCO = "广汽汇理";
/**
* 迪迪保单号未使用,即可用
*/
public static final Integer INSURANCE_NUM_AVAILABLE = 0;
/**
* 丰田附件路径
*/
public static final String PATH_ATTACHMENT_TOYOTA = "/templates/insurance/didi/attachment_toyota.pdf";
/**
* 广汽附件路径
*/
public static final String PATH_ATTACHMENT_GAC = "/templates/insurance/didi/attachment_gac.pdf";
/**
* 武汉人保
*/
public final static String SHORT_NAME_PC_WH = "PC_WH";
/**
* 南京人保
*/
public final static String SHORT_NAME_PC_NJ = "PC_NJ";
/**
* 国寿财
*/
public final static String SHORT_NAME_GSC = "GSC";
/**
* 武汉人保(全称)
*/
public final static String FULL_NAME_PC_WH = "中国人民财产保险股份有限公司武汉市分公司";
/**
* 南京人保(全称)
*/
public final static String FULL_NAME_PC_NJ = "中国人民财产保险股份有限公司南京市分公司";
/**
* 临时迪迪保单号在session中的key
*/
public final static String TEMP_INSURANCE_NO_KEY = "ddNumberkey";
}
package cn.com.glsx.dj.rop.constant;
public interface RopConstants {
/** 登录信息session**/
final String LOGIN_SESSION = "ROP_USER";
/** 登录用户信息session**/
final String LOGIN_USER_SESSION = "LOGIN_USER";
/** 登录令牌存贮有效期(单位:秒)**/
final int LOGIN_TOKEN_EXPIRE_TIME = 5 * 60;
/** 登录跳转地址**/
final String LOGIN_REDIRECT_URL = "/loginByToken?token=";
}
package cn.com.glsx.dj.rop.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import cn.com.glsx.dj.rop.request.ExampleRequest;
import cn.com.glsx.dj.rop.response.ExampleResponse;
import cn.com.glsx.dj.rop.response.RopResponse;
/**
* @Title: ExampleController.java
* @Description:
* @author Alvin
* @date 2019年9月2日 下午3:27:41
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class ExampleController
{
/**
* logger
*/
protected final Logger logger = LoggerFactory.getLogger(getClass());
/**
* 接口例子
*
* @param req ExampleRequest
* @return Object
* @throws Exception 异常
*/
@ServiceMethod(method = "org.ore.api.example", needInSession = NeedInSessionType.NO)
public RopResponse<ExampleResponse> getExample(ExampleRequest req)
throws Exception
{
ExampleResponse response = new ExampleResponse();
response.setField1("Ni Hao");
response.setField2(req.getName());
return RopResponse.success(response);
}
}
package cn.com.glsx.dj.rop.controller.boutique;
import cn.com.glsx.dj.car.boutique.dto.BdGoodsDTO;
import cn.com.glsx.dj.car.boutique.dto.BdGoodsKindDTO;
import cn.com.glsx.dj.car.boutique.remote.BdGoodsRemote;
import cn.com.glsx.dj.rop.request.boutique.BdRelationGoodsRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* @Title BoutiqueDeliveryOrderController
* @Description 精品支付订单
* @Author suro -huangzhi
* @Date 2020年07月1日 10:06:18
* @Version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
**/
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class BoutiqueDeliveryRelationGoodesController {
protected final Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private BdGoodsRemote bdGoodsRemote;
@ServiceMethod(method="dj.api.get.bdRelationGoods", needInSession= NeedInSessionType.NO)
public RopResponse<List<BdGoodsDTO>> getBdRelationGoods(BdRelationGoodsRequest request) {
RpcPagination<BdGoodsDTO> pagination =new RpcPagination<>();
pagination.setPageNum(1);
pagination.setPageSize(50);
pagination.setCondition(new BdGoodsDTO());
pagination.getCondition().setMerchantId(Integer.valueOf(request.getMerchantId()));
RpcResponse<RpcPagination<BdGoodsDTO>> updateRpc= bdGoodsRemote.listRelationGoodsWithPage(pagination);
if (updateRpc.hasResult()) {
return RopResponse.success(updateRpc.getResult().getList());
} else {
return RopResponse.error("-1", updateRpc.getMessage());
}
}
@ServiceMethod(method="dj.api.get.bdGood.level", needInSession= NeedInSessionType.NO)
public RopResponse<List<BdGoodsKindDTO>> getBdOrder(BdRelationGoodsRequest request) {
RpcResponse<List<BdGoodsKindDTO>> bdGoodsDTOList = bdGoodsRemote.getBdGoodsLevelByMerchantId(Integer.parseInt(request.getMerchantId()));
if(bdGoodsDTOList.hasResult()){
return RopResponse.success(bdGoodsDTOList.getResult());
}else {
return RopResponse.error("-1",bdGoodsDTOList.getMessage());
}
}
@ServiceMethod(method="dj.api.get.base.goods", needInSession= NeedInSessionType.NO)
public RopResponse<List<BdGoodsDTO>> getBaseGoods(BdRelationGoodsRequest request) {
RpcPagination<BdGoodsDTO> pagination =new RpcPagination<>();
pagination.setPageNum(1);
pagination.setPageSize(10);
BdGoodsDTO baseGoods = new BdGoodsDTO();
baseGoods.setMerchantId(Integer.parseInt(request.getMerchantId()));
pagination.setCondition(baseGoods);
RpcResponse<RpcPagination<BdGoodsDTO>> bdGoodsDTOList = bdGoodsRemote.listBaseGoodsWithPage(pagination);
if (bdGoodsDTOList.hasResult()) {
return RopResponse.success(bdGoodsDTOList.getResult().getList());
} else {
return RopResponse.error("-1", bdGoodsDTOList.getMessage());
}
}
}
package cn.com.glsx.dj.rop.controller.common;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import com.rop.AbstractRopRequest;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import cn.com.glsx.dj.gop.remote.GopAddressRemote;
import cn.com.glsx.dj.gop.response.common.CityResponse;
import cn.com.glsx.dj.gop.response.common.ProvinceResponse;
import cn.com.glsx.dj.rop.request.common.GetCityRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class AddressController {
protected final Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private GopAddressRemote gopAddressRemote;
@ServiceMethod(method = "dj.api.get.provinceList", needInSession = NeedInSessionType.NO)
public RopResponse<List<ProvinceResponse>> getProvinceList(AbstractRopRequest request) throws Exception{
return RopResponse.success(gopAddressRemote.getAllProvince().getResult());
}
@ServiceMethod(method = "dj.api.get.cityList.byProvinceId", needInSession = NeedInSessionType.NO)
public RopResponse<List<CityResponse>> getCityListByProvinceId(GetCityRequest request) throws Exception{
return RopResponse.success(gopAddressRemote.getCityListByProvinceId(request.getProvinceId()).getResult());
}
}
package cn.com.glsx.dj.rop.controller.common;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import cn.com.glsx.dj.gop.remote.GopCarInfoRemote;
import cn.com.glsx.dj.gop.response.common.CarInfoResponse;
import cn.com.glsx.dj.rop.request.common.GetCarBrandListRequest;
import cn.com.glsx.dj.rop.request.common.GetCarTypeListRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class CarInfoController {
protected final Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private GopCarInfoRemote gopCarInfoRemote;
/**
* 获取车品牌列表
* @Description:
* @param request
* @return
* @throws Exception
* @author zhoulm
* @date 2020年3月2日 上午9:33:04
*/
@ServiceMethod(method = "dj.api.get.car.brandList", needInSession = NeedInSessionType.NO)
public RopResponse<List<CarInfoResponse>> getCarBrandList(GetCarBrandListRequest request) throws Exception{
boolean reutrnChild = request.getNeedCarSeries() == null ? false:request.getNeedCarSeries();
return RopResponse.success(gopCarInfoRemote.getCarBrandList(reutrnChild).getResult());
}
/**
* 获取车型
* @Description:
* @param request
* @return
* @throws Exception
* @author zhoulm
* @date 2020年3月2日 上午9:33:20
*/
@ServiceMethod(method = "dj.api.get.car.TypeList", needInSession = NeedInSessionType.NO)
public RopResponse<List<CarInfoResponse>> getCarTypeList(GetCarTypeListRequest request) throws Exception{
return RopResponse.success(gopCarInfoRemote.getCarTypeListByCarSeriesId(request.getCarSeriesId()).getResult());
}
}
package cn.com.glsx.dj.rop.controller.common;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.io.IOUtils;
import org.springframework.beans.factory.annotation.Autowired;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import cn.com.glsx.dj.hardware.remote.ProxyKafkaRemote;
import cn.com.glsx.dj.rop.request.common.ProxyKafkaSendRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class ProxyKafkaController {
@Autowired
private ProxyKafkaRemote proxyKafkaRemote;
@ServiceMethod(method = "dj.api.common.proxyKafkaSend", needInSession = NeedInSessionType.NO)
public RopResponse<Boolean> proxyKafkaSend(ProxyKafkaSendRequest request){
HttpServletRequest r = (HttpServletRequest)request.getRopRequestContext().getRawRequestObject();
try {
String result = IOUtils.toString(r.getInputStream());
log.info("proxyKafkaSend message:{}",result);
RpcResponse<Boolean> res = proxyKafkaRemote.send(request.getOuterNet(), request.getTopic(),result);
if (res.hasResult()) {
return RopResponse.success(res.getResult());
} else {
return RopResponse.error(res.getError());
}
} catch (IOException e) {
log.error(e.getMessage(),e);
}
return RopResponse.error("发送失败");
}
}
package cn.com.glsx.dj.rop.controller.common;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import cn.com.glsx.dj.gop.remote.GopSendSmsRemote;
import cn.com.glsx.dj.rop.request.common.GetSmsCodeRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
import cn.com.glsx.dj.rop.util.IpAddressUtil;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import java.util.concurrent.TimeUnit;
/**
* @Title: SmsController.java
* @Description:
* @author zengqi
* @date 2021年6月3日 下午2:56:09
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class SmsController {
private final String SMS_CODE_PREFIX = "SMS_CODE:";
@Autowired
private GopSendSmsRemote gopSendSmsRemote;
@Autowired
private RedisTemplate<String, String> redisTemplate;
/**
* 获取短信验证码
* @param request
* @return
* @author zengqi
* @date 2021年6月3日 下午3:09:22
*/
@ServiceMethod(method = "dj.api.common.sms.code.get", needInSession = NeedInSessionType.NO)
public RopResponse<Boolean> sendSmsCode(GetSmsCodeRequest request) {
HttpServletRequest httpServletRequest = HttpServletRequest.class.cast(request.getRopRequestContext().getRawRequestObject());
final String key = SMS_CODE_PREFIX.concat(request.getPhone());
String value = redisTemplate.opsForValue().get(key);
if(StringUtils.isNotBlank(value)){
return RopResponse.success(true);
}
RpcResponse<Boolean> res = gopSendSmsRemote.sendSmsCode(request.getPhone());
if(res.hasResult()){
redisTemplate.opsForValue().set(key, IpAddressUtil.getIpAddr(httpServletRequest), 60, TimeUnit.SECONDS);
return RopResponse.success(res.getResult());
}
return RopResponse.error(res.getMessage());
}
}
package cn.com.glsx.dj.rop.controller.common;
import cn.com.glsx.dj.rop.config.upload.FileConfig;
import cn.com.glsx.dj.rop.config.upload.UploadProperty;
import cn.com.glsx.dj.rop.enums.CommonErrorEnum;
import cn.com.glsx.dj.rop.request.common.UploadFileRequest;
import cn.com.glsx.framework.rop.response.RopResponse;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import com.rop.request.UploadFile;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.io.FileUtils;
import org.oreframework.fastdfs.DefaultFastDFSClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.text.MessageFormat;
/**
* @Title: UploadController.java
* @Description:
* @author zengqi
* @date 2021年3月19日 下午5:53:03
* @version V1.0
* @Company: glsx.com.cn
* @Copyright Copyright (c) 2021
*/
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
@Api("文件上传")
public class UploadController {
protected Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private UploadProperty uploadProperty;
@Autowired
private DefaultFastDFSClient fastDFSClient;
@ServiceMethod(method="dj.api.common.upload.image", needInSession= NeedInSessionType.NO)
@ApiOperation("图片上传接口")
public RopResponse<String> uploadImg(UploadFileRequest request) {
return upload(request.getFile(), "image");
}
public RopResponse<String> upload(UploadFile file, String fileType){
try {
FileConfig config = uploadProperty.getUpload().get(fileType);
String extension = file.getFileType();
boolean isAllowFormat = false;
for(String f:config.getFormat().split(",")){
if(f.equalsIgnoreCase("*") || f.equalsIgnoreCase(extension)){
isAllowFormat = true;
break;
}
}
if(!isAllowFormat){
return RopResponse.error(CommonErrorEnum.NOT_SUPPORT_FILE_FORMAT.getValue(), MessageFormat.format("请上传{0}格式的文件", config.getFormat()));
}
Long maxUploadSize = Long.valueOf(config.getSize());
long fileSize = (long) Math.ceil(getFileSize(Base64.encodeBase64String(file.getContent())) / FileUtils.ONE_KB);
logger.info("maxUploadSize:{},fileSize:{}",maxUploadSize,fileSize);
if (maxUploadSize != null && fileSize > maxUploadSize.longValue()) {
return RopResponse.error(CommonErrorEnum.BEYOND_FILE_MAX_SIZE.getValue(), MessageFormat.format("文件超出大小限制({0})KB", maxUploadSize));
}
String url = fastDFSClient.uploadFile(file.getContent(), file.getFileType());
return RopResponse.success(url);
} catch (Exception e) {
logger.error("服务器繁忙,上传文件失败", e);
return RopResponse.error(CommonErrorEnum.FILE_UPLOAD_FAILED);
}
}
public int getFileSize(String base64File){
//Base64图片编码原理:
//Base64编码要求把3个8位字节(3*8=24)转化为4个6位的字节(4*6=24),之后在6位的前面补两个0,形成8位一个字节的形式。 如果剩下的字符不足3个字节,则用0填充,输出字符使用’=’,因此编码后输出的文本末尾可能会出现1或2个’=’
//去掉头部的data:image/png;base64,(注意有逗号)去掉。
String content = base64File;
if(base64File.split(",").length > 1){
content = base64File.split(",")[1];
}
int equalIndex= content.indexOf("=");
if(equalIndex != -1){
content = content.substring(0, equalIndex);
}
int length = content.length();
return length - (length /8) * 2;//bit
}
}
package cn.com.glsx.dj.rop.controller.common;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import cn.com.glsx.dj.rop.request.common.SendWeAppSubscribeMessageRequest;
import cn.com.glsx.dj.rop.request.common.WeappQrcodeRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
import cn.com.glsx.dj.wechat.dto.request.SendWeAppSubscribeMessageRequestDTO;
import cn.com.glsx.dj.wechat.dto.request.WeappQrcodeReqeustDTO;
import cn.com.glsx.dj.wechat.enums.WeappQrcodeTypeEnum;
import cn.com.glsx.dj.wechat.enums.WeappQrcodeWidthEnum;
import cn.com.glsx.dj.wechat.enums.WechatAppTypeEnum;
import cn.com.glsx.dj.wechat.remote.WechatMiniprogramRemote;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class WechatMiniprogramController {
protected final Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private WechatMiniprogramRemote wechatMiniprogramRemote;
/**
* 生成小程序码
* @Description:
* @param request
* @return
* @author zhoulm
* @date 2020年10月30日 下午5:24:51
*/
@ServiceMethod(method="dj.api.common.createWeappQrcode", needInSession= NeedInSessionType.NO)
public RopResponse<String> createWeappQrcode(WeappQrcodeRequest request) {
logger.info("createWeappQrcode :{}", request);
WeappQrcodeReqeustDTO reqeustDTO = new WeappQrcodeReqeustDTO();
reqeustDTO.setAppType(WechatAppTypeEnum.WEAPP.name());
reqeustDTO.setIsHyaline(false);
reqeustDTO.setPath(request.getPath());
// 默认为永久不限小程序码
WeappQrcodeTypeEnum qrcodeType = WeappQrcodeTypeEnum.get(request.getQrcodeType());
if(qrcodeType == null){
reqeustDTO.setType(WeappQrcodeTypeEnum.QR_WXA_UNLIMIT);
}else{
reqeustDTO.setType(qrcodeType);
}
reqeustDTO.setWidth(WeappQrcodeWidthEnum.W_280);
reqeustDTO.setAppId(request.getAppId());
reqeustDTO.setScene(request.getScene());
reqeustDTO.setEnvVersion(request.getEnvVersion());
logger.info("createWeappQrcode by reqeustDTO:{}",reqeustDTO);
RpcResponse<String> rpc = wechatMiniprogramRemote.createQrCode(reqeustDTO);
logger.info("wechatMiniprogramRemote.createQrCode request:{} rpc:{}",reqeustDTO, rpc);
if(rpc.isSuccess() && rpc.hasResult()){
return RopResponse.success(rpc.getResult());
}else{
return RopResponse.error(rpc.getMessage());
}
}
/**
* 发送小程序订阅消息
* @param request
* @return
*/
@ServiceMethod(method="dj.api.common.sendSubscribeMessage", needInSession= NeedInSessionType.NO)
public RopResponse<Boolean> sendSubscribeMessage(SendWeAppSubscribeMessageRequest request) {
logger.info("sendSubscribeMessage :{}", request);
SendWeAppSubscribeMessageRequestDTO requestDTO = new SendWeAppSubscribeMessageRequestDTO();
BeanUtils.copyProperties(request, requestDTO);
RpcResponse<Boolean> rpc = wechatMiniprogramRemote.sendSubscribeMessage(requestDTO);
logger.info("sendSubscribeMessage request:{} rpc:{}",requestDTO, rpc);
if(rpc.hasResult()){
return RopResponse.success(rpc.getResult());
}else{
return RopResponse.error(rpc.getMessage());
}
}
}
package cn.com.glsx.dj.rop.controller.common;
import cn.com.glsx.dj.rop.request.common.WechatUrlLinkRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
import cn.com.glsx.dj.wechat.dto.request.WechatMiniprogramUrlLinkRequestDTO;
import cn.com.glsx.dj.wechat.enums.ExpireTypeEnum;
import cn.com.glsx.dj.wechat.remote.WechatMiniprogramRemote;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class WechatUrlLinkController {
protected final Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private WechatMiniprogramRemote wechatMiniprogramRemote;
/**
* 获取小程序URL LINK
* @param request
* @return
*/
@ServiceMethod(method="dj.api.common.createWeappUrlLink", needInSession= NeedInSessionType.NO)
public RopResponse<String> createWeappUrlLink(WechatUrlLinkRequest request){
WechatMiniprogramUrlLinkRequestDTO requestDTO = new WechatMiniprogramUrlLinkRequestDTO();
requestDTO.setAppId(request.getAppId());
requestDTO.setAppType(request.getAppType());
requestDTO.setPath(request.getPath());
requestDTO.setQuery(request.getQuery());
requestDTO.setExpire(true);
requestDTO.setExpireType(ExpireTypeEnum.EXPIRE_INTERVAL.getValue());
requestDTO.setExpireInterval(30);
requestDTO.setCloudBase(request.getCloudBase());
requestDTO.setEnvVersion(request.getEnvVersion());
logger.info("createWeappUrlLink by reqeustDTO:{}",requestDTO);
RpcResponse<String> response = wechatMiniprogramRemote.getMiniprogramUrlLink(requestDTO);
logger.info("createWeappUrlLink by response:{}",response);
if(response.isSuccess() && response.hasResult()){
return RopResponse.success(response.getResult());
}else{
return RopResponse.error(response.getMessage());
}
}
}
package cn.com.glsx.dj.rop.controller.customer;
import cn.com.glsx.dj.hardware.dto.DeviceMerchantMerssagesDTO;
import cn.com.glsx.dj.hardware.remote.DeviceMerchantKafkaRemote;
import cn.com.glsx.dj.rop.config.SystemProperty;
import cn.com.glsx.dj.rop.dto.DevcieMerchantInfo;
import cn.com.glsx.dj.rop.manager.DeviceMerchantManger;
import cn.com.glsx.dj.rop.manager.SystemManger;
import cn.com.glsx.dj.rop.request.customer.DeviceMerchantRequest;
import cn.com.glsx.dj.rop.request.insure.GetInsureUserRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
import cn.com.glsx.dj.rop.response.insure.GetInsureUserResponse;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
/**
* 绑定设备商户信息
* @author Suro/huangzhi
* @date 2019年9月13日 上午9:18:48
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class DeviceMerchantController {
protected final Logger LOGGER = LoggerFactory.getLogger(getClass());
@Autowired
private DeviceMerchantKafkaRemote deviceMerchantKafkaRemote;
@Autowired
private DeviceMerchantManger deviceMerchantManger;
@Autowired
private SystemManger systemManger;
@Autowired
private SystemProperty systemProperty;
/**
* 处理设备绑定的接口
* @param request
* @return
* @author Alvin
* @date 2019年9月13日 上午9:38:20
*/
@ServiceMethod(method = "dj.api.bind.device.merchant")
public RopResponse<Boolean> bindDeviceMerhcant(DeviceMerchantRequest request){
LOGGER.info("bindDeviceMerhcant {}", request);
DeviceMerchantMerssagesDTO deviceMerchantMerssagesDTO = new DeviceMerchantMerssagesDTO();
BeanUtils.copyProperties(request,deviceMerchantMerssagesDTO);
deviceMerchantMerssagesDTO.setIsBind(request.getIsBind());
RpcResponse<Boolean> booleanRpcResponse = deviceMerchantKafkaRemote.sendBindMerchant(deviceMerchantMerssagesDTO);
return RopResponse.success(booleanRpcResponse.getResult());
}
/**
* 获取保单用户信息
* @param request
* @return
* @author Alvin
* @date 2019年9月13日 上午9:26:29
*/
@ServiceMethod(method = "dj.api.device.merchant.user")
public RopResponse<GetInsureUserResponse> getDeviceMerchantUser(
GetInsureUserRequest request) {
DevcieMerchantInfo params = deviceMerchantManger.getParams(request.getSn());
GetInsureUserResponse response = new GetInsureUserResponse();
response.setMerchantId(params.getMerchantId());
response.setMobile(params.getPhone());
response.setUserName(params.getName());
response.setChannelCode(params.getChannelCode() == null ? systemProperty.getChannel() : params.getChannelCode());
response.setRegistDate(params.getSuccessDate());
response.setCarBrand(params.getVehicleBrand());
systemManger.setMerchantInfo(response);
return RopResponse.success(response);
}
}
package cn.com.glsx.dj.rop.controller.customer;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import cn.com.glsx.dj.customer.dto.CustomerMerchantRefDTO;
import cn.com.glsx.dj.customer.remote.MerchantCustomerRemote;
import cn.com.glsx.dj.rop.request.customer.QueryCustomerMerchantRefRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
/**
* @Title: MerchantCustomerController.java
* @Description:
* @author zengqi
* @date 2021年3月30日 下午9:19:43
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class MerchantCustomerController {
@Autowired
private MerchantCustomerRemote merchantCustomerRemote;
/**
* 分页查询客户商户关系
* @param request
* @return
* @author zengqi
* @date 2021年3月30日 下午10:39:06
*/
@ServiceMethod(method = "dj.api.customer.merchant.ref.page")
public RopResponse<List<CustomerMerchantRefDTO>> queryCustomerMerchantRef(QueryCustomerMerchantRefRequest request){
RpcPagination<CustomerMerchantRefDTO> pagination = new RpcPagination<>();
pagination.setPageNum(1);
pagination.setPageSize(request.getPageSize());
CustomerMerchantRefDTO condition = new CustomerMerchantRefDTO();
condition.setId(request.getLastId());
pagination.setCondition(condition);
RpcResponse<RpcPagination<CustomerMerchantRefDTO>> rpcResponse = merchantCustomerRemote.queryCustomerMerchantRef(pagination);
if(rpcResponse.hasResult()){
return RopResponse.success(rpcResponse.getResult().getList());
}else{
return RopResponse.success(null);
}
}
}
package cn.com.glsx.dj.rop.controller.insure;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import cn.com.glsx.dj.rop.manager.SystemManger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import cn.com.glsx.dj.customer.model.CustomerDevice;
import cn.com.glsx.dj.customer.remote.CustomerDeviceRemote;
import cn.com.glsx.dj.insure.dto.InsureOrderDTO;
import cn.com.glsx.dj.insure.dto.InsureVehicleDTO;
import cn.com.glsx.dj.insure.enums.InsuranceStatusEnum;
import cn.com.glsx.dj.insure.remote.InsureRemote;
import cn.com.glsx.dj.insure.remote.InsureVehicleRemote;
import cn.com.glsx.dj.rop.config.SystemProperty;
import cn.com.glsx.dj.rop.request.insure.GetInsureUserRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
import cn.com.glsx.dj.rop.response.insure.GetInsureUserResponse;
import cn.com.glsx.dj.system.model.Merchant;
import cn.com.glsx.dj.system.model.MerchantLevel;
import cn.com.glsx.dj.system.remote.MerchantLevelRemote;
import cn.com.glsx.dj.system.remote.MerchantRemote;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
/**
* @Title: InsureDeviceController.java
* @Description: 保单设备接口
* @author Alvin
* @date 2019年9月5日 下午3:41:07
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class InsureDeviceController {
protected final Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private SystemProperty systemProperty;
@Autowired
private InsureRemote insureRemote;
@Autowired
private InsureVehicleRemote insureVehicleRemote;
@Autowired
private CustomerDeviceRemote customerDeviceRemote;
@Autowired
private SystemManger systemManger;
private String[] insuranceStatusArray = {
InsuranceStatusEnum.INSURE_SUCEESS.getValue(),
InsuranceStatusEnum.ORDER_EXPRIRE.getValue(),
InsuranceStatusEnum.WAITING_TO_AUDIT.getValue(),
InsuranceStatusEnum.FROM_FRMS.getValue()};
/**
* 获取保单用户信息
* @param request
* @return
* @author Alvin
* @date 2019年9月13日 上午9:26:29
*/
@ServiceMethod(method = "dj.api.get.insure.user")
public RopResponse<GetInsureUserResponse> getInsureUser(
GetInsureUserRequest request) {
InsureOrderDTO condition = new InsureOrderDTO();
condition.setInsuranceStatusList(Arrays.asList(insuranceStatusArray));
condition.setSubDeviceSn(request.getSn());
logger.info("获取设备condition {}", condition);
// 优先获取保单用户
RpcResponse<List<InsureOrderDTO>> rpcResponse = insureRemote
.queryInsure(condition);
if (rpcResponse.isFailed()) {
return RopResponse.error(rpcResponse.getError());
}
GetInsureUserResponse response = new GetInsureUserResponse();
List<InsureOrderDTO> insureOrderList = rpcResponse.getResult();
iol:if (insureOrderList != null && !insureOrderList.isEmpty()) {
insureOrderList = insureOrderList
.stream()
.filter(insureOrderDTO -> Arrays.asList(insuranceStatusArray)
.contains(insureOrderDTO.getInsuranceStatus()))
.collect(Collectors.toList());
insureOrderList.sort((a, b)-> Integer.valueOf(a.getInsuranceStatus()) - Integer.valueOf(b.getInsuranceStatus()));
if(CollectionUtils.isEmpty(insureOrderList)){
break iol;
}
InsureOrderDTO insureOrder = insureOrderList.get(0);
logger.info("get insure order by sn:{} return:{}", request.getSn(), insureOrder);
response.setMerchantId(insureOrder.getMerchantId());
response.setMerchantName(insureOrder.getMerchantName());
response.setMobile(insureOrder.getPhone());
response.setUserName(insureOrder.getName());
response.setChannelCode(insureOrder.getChannelCode());
response.setRegistDate(insureOrder.getCreatedDate());
if(insureOrder.getVehicleId() != null){
RpcResponse<InsureVehicleDTO> queryInsureVehicleResponse = insureVehicleRemote.getByVehicleId(insureOrder.getVehicleId());
if(queryInsureVehicleResponse.hasResult()){
InsureVehicleDTO insureVehicleDTO = queryInsureVehicleResponse.getResult();
response.setCarBrand(insureVehicleDTO.getVehicleChildsBrandName());
}
}
systemManger.setMerchantInfo(response);
return RopResponse.success(response);
}
// 获取导入设备用户
RpcResponse<CustomerDevice> getByImeiResponse = customerDeviceRemote.getByImei(request.getSn());
logger.info("get customer device by sn:{} return:{}", request.getSn(), getByImeiResponse.getResult());
if(getByImeiResponse.isFailed()){
return RopResponse.error(rpcResponse.getError());
}
if(!getByImeiResponse.hasResult()){
return RopResponse.success(null);
}
CustomerDevice customerDevice = getByImeiResponse.getResult();
response.setMerchantId(customerDevice.getMerchantId());
response.setMerchantName(customerDevice.getMerchantName());
response.setMobile(customerDevice.getPhone());
response.setUserName(customerDevice.getName());
response.setChannelCode(systemProperty.getChannel());
response.setRegistDate(customerDevice.getCreatedDate());
systemManger.setMerchantInfo(response);
return RopResponse.success(response);
}
}
package cn.com.glsx.dj.rop.controller.insure;
import java.util.List;
import java.util.UUID;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import cn.com.glsx.dj.insure.dto.EquityInsureDTO;
import cn.com.glsx.dj.insure.dto.EquityRequestDTO;
import cn.com.glsx.dj.insure.enums.EquityActiveTypeEnum;
import cn.com.glsx.dj.insure.enums.EquityTypeEnum;
import cn.com.glsx.dj.insure.enums.InsuranceCompanyEnum;
import cn.com.glsx.dj.insure.model.EquityActiveInfo;
import cn.com.glsx.dj.insure.model.InsureEquityCard;
import cn.com.glsx.dj.insure.remote.EquityActiveInfoRemote;
import cn.com.glsx.dj.insure.remote.InsureEquityCardRemote;
import cn.com.glsx.dj.insure.remote.InsureEquityRemote;
import cn.com.glsx.dj.rop.enums.RopErrorEnum;
import cn.com.glsx.dj.rop.request.insure.GetEquityRequest;
import cn.com.glsx.dj.rop.request.insure.GetInsureEquityCardByCardNoRequest;
import cn.com.glsx.dj.rop.request.insure.SaveEquityRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
import cn.com.glsx.dj.rop.response.insure.GetInsureEquityCardByCardNoResponse;
import cn.com.glsx.dj.system.model.Merchant;
import cn.com.glsx.dj.system.remote.MerchantRemote;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
/**
* 保单权益http接口
* @title InsureEquityController
* @author zhangyan
* @date 2020年3月24日09:34:08
*
*/
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class InsureEquityController {
protected final Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private EquityActiveInfoRemote equityActiveInfoRemote;
@Autowired
private InsureEquityRemote insureEquityRemote;
@Autowired
private InsureEquityCardRemote insureEquityCardRemote;
@Autowired
private MerchantRemote merchantRemote;
/**
* 获取权益信息
* @param condition
* @return
* @author zhangyan
* @date 2020年3月24日09:39:34
*/
@ServiceMethod(method = "dj.api.insure.equity.info", needInSession = NeedInSessionType.NO)
public RopResponse<EquityActiveInfo> getEquityStatus(GetEquityRequest request){
logger.info("getEquityStatus :{}", request);
EquityActiveInfo condition = new EquityActiveInfo();
condition.setUnionId(request.getUnionId());
RpcResponse<EquityActiveInfo> rpcResponse = equityActiveInfoRemote.getEquity(condition);
logger.info("equityActiveInfoRemote.getEquity result:{}", rpcResponse.getResult());
if(null != rpcResponse && rpcResponse.isSuccess()){
return RopResponse.success(rpcResponse.getResult());
}
return RopResponse.error(RopErrorEnum.INSURE_GET_EQUITY_NO_ERROR);
}
/**
* 根据standNo获取已购买权益
* @param request
* @return Integer 数量
* @author zhangyan
* @date 2020年4月2日15:01:53
*/
@ServiceMethod(method = "dj.api.insure.equity.get", needInSession = NeedInSessionType.NO)
public RopResponse<EquityInsureDTO> getAllEquities(GetEquityRequest request){
logger.info("listEquityAndInsure request:{}", request);
RpcResponse<EquityInsureDTO> rpcResponse = insureEquityRemote.getAllEquities(request.getStandNo());
logger.info("equityActiveInfoRemote.getEquity result:{}", rpcResponse.getResult());
if(null != rpcResponse && rpcResponse.isSuccess() && null != rpcResponse.getResult()){
return RopResponse.success(rpcResponse.getResult());
}
return RopResponse.error(RopErrorEnum.INSURE_GET_EQUITY_NO_ERROR);
}
/**
* 根据standNo获取已激活权益
* @param request
* @return Integer 数量
* @author zhangyan
* @date 2020年4月2日16:03:31
*/
@ServiceMethod(method = "dj.api.insure.equity.list", needInSession = NeedInSessionType.NO)
public RopResponse<List<EquityActiveInfo>> listEquity(GetEquityRequest request){
logger.info("listEquityAndInsure request:{}", request);
EquityActiveInfo condition = new EquityActiveInfo();
condition.setStandNo(request.getStandNo());
condition.setActiveStatus(EquityActiveTypeEnum.EQUITY_IS_ACTIVE.getValue());
RpcResponse<List<EquityActiveInfo>> rpcResponse = equityActiveInfoRemote.listEquities(condition);
logger.info("equityActiveInfoRemote.getEquity result:{}", rpcResponse.getResult());
if(null != rpcResponse && rpcResponse.isSuccess() && null != rpcResponse.getResult()){
return RopResponse.success(rpcResponse.getResult());
}
return RopResponse.error(RopErrorEnum.INSURE_GET_EQUITY_NO_ERROR);
}
/**
* @author: luoqiang
* @description: 出险无忧-投保,先生成保单权益卡,在进行投保绑定保单权益卡(投保成功返回权益保单ID)
* @date: 2021/3/24 11:30
* @param request
* @return: cn.com.glsx.dj.rop.response.RopResponse<java.util.List<cn.com.glsx.dj.insure.model.EquityActiveInfo>>
*/
@ServiceMethod(method = "dj.api.insure.equity.maintain.service.save", needInSession = NeedInSessionType.NO)
public RopResponse<Long> saveEquityInsure(SaveEquityRequest request){
logger.info("saveEquityInsure request:{}, ", request);
if(CollectionUtils.isEmpty(request.getEquityList()) || request.getInsureEquityCard() == null){
return RopResponse.error("投保权益参数为空");
}
Merchant merchant = merchantRemote.getByMerchantId(request.getMerchantId()).getResult();
if(merchant == null){
return RopResponse.error("商户号不存在");
}
EquityRequestDTO equityRequestDTO = null;
for (EquityRequestDTO equityRequest : request.getEquityList()) {
if(EquityTypeEnum.MAINTAIN_SERVICE.getValue().equals(equityRequest.getEquityType())){
equityRequestDTO = equityRequest;
break;
}
}
if(equityRequestDTO == null){
return RopResponse.error("未包含" + EquityTypeEnum.MAINTAIN_SERVICE.getDisplayName());
}
EquityRequestDTO requestDTO = new EquityRequestDTO();
requestDTO.setInsureEquityCard(request.getInsureEquityCard());
RpcResponse<String> checkInsureEquityResponse = insureEquityRemote.checkInsureEquity(requestDTO);
if(checkInsureEquityResponse.hasException()){
return RopResponse.error(checkInsureEquityResponse.getMessage());
}
equityRequestDTO.setCreatedBy(request.getCreatedBy());
equityRequestDTO.setVehicle(request.getVehicle());
equityRequestDTO.setStandNo(request.getStandNo());
equityRequestDTO.setAddress(request.getAddress());
equityRequestDTO.setCardNo(request.getCardNo());
equityRequestDTO.setCardType(request.getCardType());
equityRequestDTO.setCustomerType(request.getCustomerType());
equityRequestDTO.setCompanyCode("RB");
equityRequestDTO.setInsuranceCompany(InsuranceCompanyEnum.PICC_INSURANCE.getValue());
equityRequestDTO.setPhone(request.getPhone());
equityRequestDTO.setInsurePeriod(12);
equityRequestDTO.setUpdatedBy(request.getCreatedBy());
equityRequestDTO.setSubDeviceSn(request.getSubDeviceSn());
equityRequestDTO.setSpid(request.getSpid());
equityRequestDTO.setBuyDate(request.getVehicle().getBuyDate());
equityRequestDTO.setCompensationName(request.getCompensationName());
equityRequestDTO.setUserId(request.getUserId());
equityRequestDTO.setName(request.getName());
equityRequestDTO.setMerchantId(request.getMerchantId());
equityRequestDTO.setMerchantName(merchant.getMerchantName());
equityRequestDTO.setMerchantTel(merchant.getPhone());
equityRequestDTO.setMerchantAdr(merchant.getAddress());
equityRequestDTO.setSeqNo(UUID.randomUUID().toString());
// 投保
logger.info("insure maintain service equtiy parmas:{}", equityRequestDTO);
RpcResponse<Long> result = insureEquityRemote.maintainServiceEquityInsure(equityRequestDTO);
logger.info("insure maintain service equtiy result:{}", result);
if(result.hasResult()){
if(EquityTypeEnum.MAINTAIN_SERVICE.getValue().equals(equityRequestDTO.getEquityType())) {
//绑定保单权益卡
InsureEquityCard insureEquityCard = request.getInsureEquityCard();
insureEquityCard.setEquityId(result.getResult());
insureEquityCard.setCreatedBy(request.getPhone());
RpcResponse<InsureEquityCard> insertInsureEquityCardResponse = insureEquityCardRemote.insertInsureEquityCard(insureEquityCard);
if(insertInsureEquityCardResponse.hasResult()){
return RopResponse.success(result.getResult());
}
}
}
return RopResponse.error("投保失败" + result.getMessage());
}
/**
* 根据权益卡号获取保单权益
* @param request
* @return
* @author zengqi
* @date 2021年4月16日 下午9:04:13
*/
@ServiceMethod(method = "dj.api.insure.equity.card.get.by.cardno", needInSession = NeedInSessionType.NO)
public RopResponse<GetInsureEquityCardByCardNoResponse> getInsureEquityCardByCardNo(GetInsureEquityCardByCardNoRequest request){
RpcResponse<InsureEquityCard> rpcResponse = insureEquityCardRemote.getByCardNo(request.getCardNo());
if(rpcResponse.isFailed()){
return RopResponse.error(rpcResponse.getError());
}
GetInsureEquityCardByCardNoResponse response = null;
InsureEquityCard card = rpcResponse.getResult();
if(card != null){
response = new GetInsureEquityCardByCardNoResponse();
response.setCardStatus(card.getCardStatus());
response.setEquityId(card.getEquityId());
}
return RopResponse.success(response);
}
}
package cn.com.glsx.dj.rop.controller.insure;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import cn.com.glsx.dj.insure.dto.InsureDeviceDTO;
import cn.com.glsx.dj.insure.dto.InsureRequestDTO;
import cn.com.glsx.dj.insure.dto.PdfStampRequestDTO;
import cn.com.glsx.dj.insure.enums.InsuranceCompanyEnum;
import cn.com.glsx.dj.insure.model.InsureVehicle;
import cn.com.glsx.dj.insure.remote.InsureExternalRemote;
import cn.com.glsx.dj.insure.util.Result;
import cn.com.glsx.dj.rop.enums.RopErrorEnum;
import cn.com.glsx.dj.rop.request.insure.ExternalSendInsureRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
/**
* 对外投保相关接口
* @author zhangyan
* @date 2020年4月1日17:34:25
*
*/
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class InsureExternalController {
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private InsureExternalRemote insureExternalRemote;
/**
* 投保
* @param request
* @return
* @throws Exception
* @author zhangyan
* @date 2020年4月1日17:42:45
*/
@ServiceMethod(method = "dj.api.insure.send", needInSession = NeedInSessionType.NO)
public RopResponse<Result> sendInsure(ExternalSendInsureRequest request) throws Exception{
logger.info("sendInsure param:{}", request);
InsureRequestDTO requestDTO = new InsureRequestDTO();
setData(requestDTO, request);
RpcResponse<Result> rpcResponse = insureExternalRemote.sendInsure(requestDTO);
logger.info("insureExternalRemote.sendInsure result:{}", rpcResponse);
if(null != rpcResponse && rpcResponse.isSuccess() && rpcResponse.hasResult()){
return RopResponse.success(rpcResponse.getResult());
}
return RopResponse.error(RopErrorEnum.INSURE_SAVE_ERROR, rpcResponse.getMessage());
}
/**
* 投保数据
* @param dest
* @param sour
* @author zhangyan
* @date 2020年4月2日09:35:18
*/
private void setData(InsureRequestDTO dest, ExternalSendInsureRequest sour){
dest.setInsuranceCompany(sour.getInsuranceCompany());
dest.setSeqNo(sour.getSeqNo());
dest.setFullInsuranceNo(sour.getFullInsuranceNo());
dest.setProductCode(sour.getProductCode());
dest.setSpid(sour.getSpid());
dest.setSpecialContent(sour.getSpecialContent());
dest.setCustomerType(sour.getCustomerType());
dest.setName(sour.getName());
dest.setAddress(sour.getAddress());
dest.setCardType(sour.getCardType());
dest.setCardNo(sour.getCardNo());
dest.setPhone(sour.getPhone());
dest.setSex(sour.getSex());
dest.setBirthday(sour.getBirthday());
dest.setInstallPerson(sour.getInstallPerson());
dest.setInstallPoint(sour.getInstallPoint());
dest.setCompensationName(sour.getCompensationName());
dest.setEndDate(sour.getEndDate());
dest.setSumAmount(sour.getSumAmount());
dest.setSumPremium(sour.getSumPremium());
dest.setInsurePeriod(sour.getInsurePeriod());
dest.setCompanyCode(sour.getCompanyCode());
dest.setInstallPoint(sour.getInstallPoint());
dest.setInstallPerson(sour.getInstallPerson());
dest.setPlanNo(sour.getPlanNo());
// 凭证号在rpc统一按规则生成
// dest.setVoucherNum(sour.getVoucherNum());
// 设置车辆信息
InsureVehicle vehicle = new InsureVehicle();
vehicle.setPlateNum(sour.getPlateNum());
vehicle.setBuyDate(sour.getBuyDate());
vehicle.setStandNo(sour.getStandNo());
vehicle.setEngine(sour.getEngine());
vehicle.setVehicleColor(sour.getVehicleColor());
vehicle.setVehiclePrice(sour.getVehiclePrice());
vehicle.setBuyType(sour.getBuyType());
vehicle.setVehicleBrand(sour.getVehicleBrand());
vehicle.setVehicleChildsBrandName(sour.getVehicleChildsBrandName());
vehicle.setVehicleSeriesName(sour.getVehicleSeriesName());
vehicle.setVehicleTypeName(sour.getVehicleTypeName());
vehicle.setShopName(sour.getShopName());
vehicle.setVehicleUsage(sour.getVehicleUsage());
vehicle.setFixTime(sour.getFixTime());
dest.setEffectDate(sour.getEffectDate());
dest.setVehicle(vehicle);
if (StringUtils.isNotEmpty(sour.getSn())) {
dest.setSubDeviceSn(sour.getSn());
}
// 设置设备信息
List<InsureDeviceDTO> list = new ArrayList<InsureDeviceDTO>();
InsureDeviceDTO insureDeviceDTO = new InsureDeviceDTO();
insureDeviceDTO.setActiveDate(sour.getActiveDate());
insureDeviceDTO.setDeviceName(sour.getDeviceName());
insureDeviceDTO.setDeviceType(sour.getDeviceType());
insureDeviceDTO.setImsi(sour.getImsi());
insureDeviceDTO.setProductType(sour.getProductType());
insureDeviceDTO.setSn(sour.getSn());
list.add(insureDeviceDTO);
dest.setDeviceList(list);
}
/**
* 退保
* @param request
* @return
* @throws Exception
* @author zhangyan
* @date 2020年4月1日17:42:45
*/
@ServiceMethod(method = "dj.api.insure.cancel", needInSession = NeedInSessionType.NO)
public RopResponse<Result> cancelInsure(ExternalSendInsureRequest request) throws Exception{
logger.info("sendInsure param:{}", request);
InsureRequestDTO requestDTO = new InsureRequestDTO();
BeanUtils.copyProperties(request, requestDTO);
RpcResponse<Result> rpcResponse = insureExternalRemote.cancelInsure(requestDTO);
logger.info("insureExternalRemote.cancelInsure result:{}", rpcResponse.getResult());
if(null != rpcResponse && rpcResponse.isSuccess() && rpcResponse.hasResult()){
return RopResponse.success(rpcResponse.getResult());
}
return RopResponse.error(RopErrorEnum.INSURE_CANCEL_ERROR, rpcResponse.getMessage());
}
/**
* 修改保单(仅支持华安修改第一受益人,人保可修改任意参数)
* @param request
* @return
* @throws Exception
* @author zhangyan
* @date 2020年4月1日17:42:45
*/
@ServiceMethod(method = "dj.api.insure.update", needInSession = NeedInSessionType.NO)
public RopResponse<Result> updateInsure(ExternalSendInsureRequest request) throws Exception{
logger.info("sendInsure param:{}", request);
InsureRequestDTO requestDTO = new InsureRequestDTO();
if(request.getInsuranceCompany().equals(InsuranceCompanyEnum.PICC_INSURANCE.getValue())){
// 人保可以修改所有参数
setData(requestDTO, request);
}else{
BeanUtils.copyProperties(request, requestDTO);
}
RpcResponse<Result> rpcResponse = insureExternalRemote.updateInsure(requestDTO);
logger.info("insureExternalRemote.updateInsure result:{}", rpcResponse.getResult());
if(null != rpcResponse && rpcResponse.isSuccess() && rpcResponse.hasResult()){
return RopResponse.success(rpcResponse.getResult());
}
return RopResponse.error(RopErrorEnum.INSURE_UPDATE_ERROR, rpcResponse.getMessage());
}
/**
* 查询保单是否存在(不支持富德)
* @param request
* @return
* @throws Exception
* @author zhangyan
* @date 2020年4月1日17:42:45
*/
@ServiceMethod(method = "dj.api.insure.query", needInSession = NeedInSessionType.NO)
public RopResponse<Result> queryInsure(ExternalSendInsureRequest request) throws Exception{
logger.info("sendInsure param:{}", request);
InsureRequestDTO requestDTO = new InsureRequestDTO();
BeanUtils.copyProperties(request, requestDTO);
RpcResponse<Result> rpcResponse = insureExternalRemote.queryInsure(requestDTO);
logger.info("insureExternalRemote.queryInsure result:{}", rpcResponse.getResult());
if(null != rpcResponse && rpcResponse.isSuccess() && rpcResponse.hasResult()){
return RopResponse.success(rpcResponse.getResult());
}
return RopResponse.error(RopErrorEnum.INSURE_GET_BY_INSURE_NO_NOT_EXISTS, rpcResponse.getMessage());
}
/**
* 查询pdf
* @param request
* @return
* @throws Exception
* @author zhangyan
* @date 2020年4月1日17:42:45
*/
@ServiceMethod(method = "dj.api.insure.pdf", needInSession = NeedInSessionType.NO)
public RopResponse<Result> queryPdf(ExternalSendInsureRequest request) throws Exception{
logger.info("sendInsure param:{}", request);
RpcResponse<Result> rpcResponse;
if(request.getInsuranceCompany().equals(InsuranceCompanyEnum.PICC_INSURANCE.getValue())){
// 人保调用查询地址接口
InsureRequestDTO requestDTO = new InsureRequestDTO();
BeanUtils.copyProperties(request, requestDTO);
rpcResponse = insureExternalRemote.queryInsure(requestDTO);
}else{
PdfStampRequestDTO requestDTO = new PdfStampRequestDTO();
BeanUtils.copyProperties(request, requestDTO);
rpcResponse = insureExternalRemote.queryPdf(requestDTO);
}
if(!request.getInsuranceCompany().equals(InsuranceCompanyEnum.SINOFD_INSURANCE.getValue())){
logger.info("insureExternalRemote.queryInsure result:{}", rpcResponse);
}else{
logger.info("insureExternalRemote.queryInsure result:{}", rpcResponse.getMessage());
}
if(null != rpcResponse && rpcResponse.isSuccess() && rpcResponse.hasResult()){
return RopResponse.success(rpcResponse.getResult());
}
return RopResponse.error(RopErrorEnum.INSURE_GET_BY_INSURE_NO_NOT_EXISTS, rpcResponse.getMessage());
}
@Deprecated
@ServiceMethod(method = "dj.api.insure.query.by.standNo", needInSession = NeedInSessionType.NO)
public RopResponse<Result> queryByStandNo(ExternalSendInsureRequest request) throws Exception{
logger.info("queryByStandNo param:{}", request);
InsureRequestDTO requestDTO = new InsureRequestDTO();
RpcResponse<Result> rpcResponse = insureExternalRemote.sendInsure(requestDTO);
logger.info("insureExternalRemote.sendInsure result:{}", rpcResponse);
if(null != rpcResponse && rpcResponse.isSuccess() && rpcResponse.hasResult()){
return RopResponse.success(rpcResponse.getResult());
}
return RopResponse.error(RopErrorEnum.INSURE_SAVE_ERROR, rpcResponse.getMessage());
}
}
package cn.com.glsx.dj.rop.controller.insure;
import java.util.List;
import org.apache.dubbo.common.utils.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import cn.com.glsx.dj.insure.dto.InsureVehicleDTO;
import cn.com.glsx.dj.insure.remote.InsureVehicleRemote;
import cn.com.glsx.dj.rop.request.insure.GetInsureBySnRequest;
import cn.com.glsx.dj.rop.request.insure.GetVehicleByIdRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
import cn.com.glsx.dj.rop.response.insure.InsureVehicleResponse;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
/**
* @Title: InsureDeviceController.java
* @Description: 保单设备接口
* @author huangzhi
* @date 2020年3月26日 下午3:41:07
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class InsureVehicleController {
protected final Logger LOGGER = LoggerFactory.getLogger(getClass());
@Autowired
private InsureVehicleRemote insureVehicleRemote;
/**
* 根据sn获取车辆信息
* @param request
* @return
* @author huangzhi
* @date 2019年9月13日 上午9:38:20
*/
@ServiceMethod(method = "dj.api.get.insure.vehicle")
public RopResponse<InsureVehicleResponse> getInsureVehicle(GetInsureBySnRequest request){
InsureVehicleResponse response = new InsureVehicleResponse();
InsureVehicleDTO record = new InsureVehicleDTO();
record.setSn(request.getSn());
RpcResponse<List<InsureVehicleDTO>> rpc = insureVehicleRemote.list(record);
LOGGER.info("getInsureVehicle by sn:{}", request.getSn());
if (rpc.hasResult()) {
if (CollectionUtils.isNotEmpty(rpc.getResult())) {
InsureVehicleDTO vehicle= rpc.getResult().get(0);
BeanUtils.copyProperties(vehicle, response);
LOGGER.info("getInsureVehicle vehicle:{}", vehicle);
}
}
LOGGER.info("getInsureVehicle result:{}", response);
return RopResponse.success(response);
}
/**
* 根据车辆id获取车辆信息
* @param request
* @return
* * @author zhoudan
* @date 2020年6月18日 下午9:38:20
*/
@ServiceMethod(method = "dj.api.get.insure.vehicle.by.id")
public RopResponse<InsureVehicleResponse> getInsureVehicleById(GetVehicleByIdRequest request){
InsureVehicleResponse response = new InsureVehicleResponse();
RpcResponse<InsureVehicleDTO> rpc = insureVehicleRemote.getByVehicleId(request.getVehicleId());
LOGGER.info("getInsureVehicle by id:{}", request.getVehicleId());
if (rpc.hasResult()) {
BeanUtils.copyProperties(rpc.getResult(), response);
LOGGER.info("getInsureVehicleById response:{}", response);
}
LOGGER.info("getInsureVehicleById result:{}", response);
return RopResponse.success(response);
}
}
package cn.com.glsx.dj.rop.controller.insure;
import cn.com.glsx.dj.insure.dto.EquityRequestDTO;
import cn.com.glsx.dj.insure.dto.MerchantInsureOrderStatisticsDTO;
import cn.com.glsx.dj.insure.dto.OrderSummaryQueryDTO;
import cn.com.glsx.dj.insure.remote.InsureEquityRemote;
import cn.com.glsx.dj.insure.remote.InsureRemote;
import cn.com.glsx.dj.rop.request.insure.InsuranceStatisticsRequest;
import cn.com.glsx.dj.rop.request.insure.SummaryEquityPageRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.scrm.equity.dto.service.summary.ServiceEquityOrderSummaryDTO;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Arrays;
import java.util.List;
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class SummaryInsuranceController {
private static final Object LOCK = new Object();
protected final Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private InsureRemote insureRemote;
@Autowired
private InsureEquityRemote insureEquityRemote;
@ServiceMethod(method = "dj.api.insure.summary.insurance.list", needInSession = NeedInSessionType.NO)
public RopResponse<RpcPagination<ServiceEquityOrderSummaryDTO>> listInsuranceSummaryDataPage(SummaryEquityPageRequest request) throws Exception{
RpcPagination<OrderSummaryQueryDTO> pagination = new RpcPagination<>();
BeanUtils.copyProperties(request,pagination);
OrderSummaryQueryDTO condition = new OrderSummaryQueryDTO();
BeanUtils.copyProperties(request, condition);
pagination.setCondition(condition);
RpcResponse<RpcPagination<ServiceEquityOrderSummaryDTO>> page = insureRemote.listEquitySummaryDataPage(pagination);
if(!page.hasResult()){
return RopResponse.error(page.getMessage());
}
return RopResponse.success(page.getResult());
}
@ServiceMethod(method = "dj.api.insure.summary.equity.list", needInSession = NeedInSessionType.NO)
public RopResponse<RpcPagination<ServiceEquityOrderSummaryDTO>> listEquitySummaryDataPage(SummaryEquityPageRequest request) throws Exception {
RpcPagination<OrderSummaryQueryDTO> pagination = new RpcPagination<>();
BeanUtils.copyProperties(request,pagination);
OrderSummaryQueryDTO condition = new OrderSummaryQueryDTO();
BeanUtils.copyProperties(request, condition);
pagination.setCondition(condition);
RpcResponse<RpcPagination<ServiceEquityOrderSummaryDTO>> page = insureEquityRemote.listEquitySummaryDataPage(pagination);
if (!page.hasResult()) {
return RopResponse.error(page.getMessage());
}
return RopResponse.success(page.getResult());
}
@ServiceMethod(method = "dj.api.insure.merchant.statistics", needInSession = NeedInSessionType.NO)
public RopResponse<MerchantInsureOrderStatisticsDTO> listEquitySummaryDataPage(InsuranceStatisticsRequest request) throws Exception {
RpcResponse<MerchantInsureOrderStatisticsDTO> rpcResponse = insureEquityRemote.selectMerchantInsureOrderStatistics(request.getMerchantId());
if (rpcResponse.isSuccess()) {
return RopResponse.success(rpcResponse.getResult());
}
return RopResponse.error(rpcResponse.getMessage());
}
/**
* 同步其他权益退单时间数据
* @param request
* @return
* @throws Exception
*/
@ServiceMethod(method = "dj.api.insure.summary.equity.canceldate.list", needInSession = NeedInSessionType.NO)
public RopResponse<RpcPagination<ServiceEquityOrderSummaryDTO>> listEquitySummaryCancelDatePage(SummaryEquityPageRequest request) throws Exception {
RpcPagination<EquityRequestDTO> pagination = new RpcPagination<>();
BeanUtils.copyProperties(request, pagination);
EquityRequestDTO condition = new EquityRequestDTO();
String[] contractArr = request.getContracts().split(",");
List<String> contractList = Arrays.asList(contractArr);
condition.setContractList(contractList);
pagination.setCondition(condition);
RpcResponse<RpcPagination<ServiceEquityOrderSummaryDTO>> page = insureEquityRemote.listEquitySummaryCancelDatePage(pagination);
if (!page.hasResult()) {
return RopResponse.error(page.getMessage());
}
return RopResponse.success(page.getResult());
}
}
package cn.com.glsx.dj.rop.controller.insure;
import cn.com.glsx.dj.aibschance.dto.FollowRecordDTO;
import cn.com.glsx.dj.aibschance.remote.FollowRecordRemote;
import cn.com.glsx.dj.insure.dto.*;
import cn.com.glsx.dj.insure.enums.*;
import cn.com.glsx.dj.insure.model.DidiInsuranceNo;
import cn.com.glsx.dj.insure.model.InsureEquity;
import cn.com.glsx.dj.insure.model.InsureOrder;
import cn.com.glsx.dj.insure.model.InsureVehicle;
import cn.com.glsx.dj.insure.remote.*;
import cn.com.glsx.dj.rop.enums.RopErrorEnum;
import cn.com.glsx.dj.rop.request.insure.SyncInsuranceRequest;
import cn.com.glsx.dj.rop.request.insure.SyncOrderRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
import cn.com.glsx.dj.rop.response.insure.*;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import com.alibaba.fastjson.JSON;
import com.github.pagehelper.Page;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class SyncInsuranceController {
private static final Object LOCK = new Object();
protected final Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private InsureRemote insureRemote;
@Autowired
private InsureEquityRemote insureEquityRemote;
@ServiceMethod(method = "dj.api.insure.sync.insurance.list", needInSession = NeedInSessionType.NO)
public RopResponse<RpcPagination<InsureOrderDataSyncDTO>> listInsurenceSyncDataPage(SyncInsuranceRequest request) throws Exception{
RpcPagination<InsureOrder> pagination = new RpcPagination<>();
BeanUtils.copyProperties(request,pagination);
InsureOrder insureOrder = new InsureOrder();
insureOrder.setMerchantId(request.getMerchantId());
pagination.setCondition(insureOrder);
RpcResponse<RpcPagination<InsureOrderDataSyncDTO>> page = insureRemote.listInsurenceSyncDataPage(pagination);
if(!page.hasResult()){
return RopResponse.error(page.getMessage());
}
return RopResponse.success(page.getResult());
}
@ServiceMethod(method = "dj.api.insure.sync.equity.list", needInSession = NeedInSessionType.NO)
public RopResponse<RpcPagination<InsureEquityDataSyncDTO>> listEquitySyncDataPage(SyncInsuranceRequest request) throws Exception{
RpcPagination<InsureEquity> pagination = new RpcPagination<>();
BeanUtils.copyProperties(request,pagination);
InsureEquity insureEquity = new InsureEquity();
insureEquity.setMerchantId(request.getMerchantId());
pagination.setCondition(insureEquity);
RpcResponse<RpcPagination<InsureEquityDataSyncDTO>> page = insureEquityRemote.listEquitySyncDataPage(pagination);
if(!page.hasResult()){
return RopResponse.error(page.getMessage());
}
return RopResponse.success(page.getResult());
}
/**
* 同步权益订单数据(盗抢和其他权益合并)
* @param request
* @return
* @throws Exception
*/
@ServiceMethod(method = "dj.api.insure.sync.data", needInSession = NeedInSessionType.NO)
public RopResponse<InsureDataSyncDTO> syncOrderData(SyncOrderRequest request) throws Exception {
RpcResponse<InsureDataSyncDTO> response = insureEquityRemote.syncOrderData(request.getContractNo());
if(!response.hasResult()){
return RopResponse.error(response.getMessage());
}
return RopResponse.success(response.getResult());
}
/**
* 打印其他权益订单合同
* @param request
* @return
* @throws Exception
*/
@ServiceMethod(method = "dj.api.insure.print.contract", needInSession = NeedInSessionType.NO)
public RopResponse<EquityContractUrlDTO> getContractUrl(SyncOrderRequest request) throws Exception {
PrintContractDTO param = new PrintContractDTO();
BeanUtils.copyProperties(request, param);
RpcResponse<EquityContractUrlDTO> response = insureEquityRemote.getContractUrl(param);
if(!response.hasResult()){
return RopResponse.error(response.getMessage());
}
return RopResponse.success(response.getResult());
}
}
package cn.com.glsx.dj.rop.controller.marketing;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import com.rop.AbstractRopRequest;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import cn.com.glsx.dj.marketing.model.AccountGoods;
import cn.com.glsx.dj.marketing.model.MerchantAccountGoods;
import cn.com.glsx.dj.marketing.remote.AccountGoodsRemote;
import cn.com.glsx.dj.marketing.remote.MerchantAccountGoodsRemote;
import cn.com.glsx.dj.rop.enums.RopErrorEnum;
import cn.com.glsx.dj.rop.enums.RopSourceEnum;
import cn.com.glsx.dj.rop.request.marketing.GetMerchantGoodsRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
import cn.com.glsx.dj.rop.response.marketing.GetMerchantGoodsResponse;
import cn.com.glsx.dj.system.enums.MerchantCompanyStatusEnum;
import cn.com.glsx.dj.system.model.Merchant;
import cn.com.glsx.dj.system.model.MerchantCompany;
import cn.com.glsx.dj.system.remote.MerchantCompanyRemote;
import cn.com.glsx.dj.system.remote.MerchantRemote;
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class MerchantAccountGoodsController {
protected final Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private MerchantRemote merchantRemote;
@Autowired
private MerchantCompanyRemote merchantCompanyRemote;
@Autowired
private MerchantAccountGoodsRemote merchantAccountGoodsRemote;
@Autowired
private AccountGoodsRemote accountGoodsRemote;
@Autowired
private Environment env;
@ServiceMethod(method = "dj.api.get.marketing.getMerchantGoods", needInSession = NeedInSessionType.NO)
public RopResponse<GetMerchantGoodsResponse> getMerchantGoods(GetMerchantGoodsRequest req) throws Exception{
MerchantAccountGoods merchantAccountGoods = merchantAccountGoodsRemote.getByCode(req.getCode()).getResult();
if(merchantAccountGoods == null){
return RopResponse.error(RopErrorEnum.MARKETING_GET_MERCHANT_GOODS_CODE_NOT_EXISTS);
}
Merchant merchant = merchantRemote.getByMerchantId(merchantAccountGoods.getMerchantId()).getResult();
if(merchant == null){
return RopResponse.error(RopErrorEnum.MARKETING_GET_MERCHANT_GOODS_MERCHANT_EXCEPTION);
}
MerchantCompany merchantCompany = merchantCompanyRemote.getByMerchantId(merchantAccountGoods.getMerchantId()).getResult();
if(merchantCompany == null || MerchantCompanyStatusEnum.CHECK_YES.getValue() != merchantCompany.getStatus()){
return RopResponse.error(RopErrorEnum.MARKETING_GET_MERCHANT_GOODS_NOT_COMPANY);
}
AccountGoods accountGoods = accountGoodsRemote.getByGoodsId(merchantAccountGoods.getGoodsId()).getResult();
if(accountGoods == null){
return RopResponse.error(RopErrorEnum.MARKETING_GET_MERCHANT_GOODS_GOODS_EXCEPTION);
}
GetMerchantGoodsResponse response = new GetMerchantGoodsResponse();
response.setMerchantCompany(merchantCompany);
response.setGoods(accountGoods);
response.setMerchantId(merchant.getMerchantId());
response.setMerchantName(merchant.getMerchantName());
return RopResponse.success(response);
}
@ServiceMethod(method = "dj.api.get.marketing.getGlAccount", needInSession = NeedInSessionType.NO)
public RopResponse<GetMerchantGoodsResponse> getGlAccount(AbstractRopRequest req) throws Exception{
String source = req.getRopRequestContext().getParamValue(RopSourceEnum.KEY);
if(RopSourceEnum.GLSX.getValue().equals(source)){
Integer merchantId = env.getProperty("glsx.account.merchantId", Integer.class);
Merchant merchant = merchantRemote.getByMerchantId(merchantId).getResult();
if(merchant == null){
return RopResponse.error(RopErrorEnum.MARKETING_GET_MERCHANT_GOODS_MERCHANT_EXCEPTION);
}
MerchantCompany merchantCompany = merchantCompanyRemote.getByMerchantId(merchantId).getResult();
if(merchantCompany == null || MerchantCompanyStatusEnum.CHECK_YES.getValue() != merchantCompany.getStatus()){
return RopResponse.error(RopErrorEnum.MARKETING_GET_MERCHANT_GOODS_NOT_COMPANY);
}
GetMerchantGoodsResponse response = new GetMerchantGoodsResponse();
response.setMerchantCompany(merchantCompany);
response.setMerchantId(merchant.getMerchantId());
response.setMerchantName(merchant.getMerchantName());
return RopResponse.success(response);
}
return RopResponse.error(RopErrorEnum.MARKETING_GET_GL_ACCOUNT_CHANNEL_ERROR);
}
}
package cn.com.glsx.dj.rop.controller.system;
import cn.com.glsx.dj.rop.constant.RopConstants;
import cn.com.glsx.dj.rop.enums.RopErrorEnum;
import cn.com.glsx.dj.rop.request.system.EmployeeLabelRequest;
import cn.com.glsx.dj.rop.request.system.EmployeeListRequest;
import cn.com.glsx.dj.rop.request.system.EmployeeRegisterRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
import cn.com.glsx.dj.rop.response.system.RegisterResponse;
import cn.com.glsx.dj.system.dto.EmployeeDTO;
import cn.com.glsx.dj.system.dto.RoleDTO;
import cn.com.glsx.dj.system.dto.UserDTO;
import cn.com.glsx.dj.system.enums.RegSourceEnum;
import cn.com.glsx.dj.system.model.Merchant;
import cn.com.glsx.dj.system.model.User;
import cn.com.glsx.dj.system.remote.EmployeeRemote;
import cn.com.glsx.dj.system.remote.MerchantRemote;
import cn.com.glsx.dj.system.remote.UserRemote;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.enums.DefaultErrorEnum;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import com.rop.session.SimpleSession;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.RandomStringUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.ArrayList;
import java.util.List;
@ServiceMethodBean(version = "1.0.0")
public class EmployeeController {
protected final Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private EmployeeRemote employeeRemote;
@Autowired
private MerchantRemote merchantRemote;
@Autowired
private UserRemote userRemote;
public EmployeeDTO convert2Employee(EmployeeRegisterRequest req){
EmployeeDTO employee = new EmployeeDTO();
BeanUtils.copyProperties(req, employee);
if(req.getRoleId() != null){
RoleDTO role = new RoleDTO();
role.setId(req.getRoleId());
employee.setRole(role);
}
if(!CollectionUtils.isEmpty(req.getLabels())){
List<String> labels = new ArrayList<String>();
for(EmployeeLabelRequest el:req.getLabels()){
labels.add(el.getName());
}
employee.setLabels(labels);
}
return employee;
}
@ServiceMethod(method = "dj.api.register.system.employee", needInSession = NeedInSessionType.YES)
public RopResponse<RegisterResponse> register(EmployeeRegisterRequest req) throws Exception{
EmployeeDTO employee = convert2Employee(req);
if(StringUtils.isBlank(employee.getPassword())){
employee.setPassword(RandomStringUtils.randomAlphanumeric(6));
}
if(employee.getIsOpenCard() == null){
employee.setIsOpenCard(false);
}
SimpleSession session = (SimpleSession) req.getRopRequestContext().getSession();
UserDTO loginUser = (UserDTO)session.getAttribute(RopConstants.LOGIN_SESSION);
employee.setMerchantId(loginUser.getMerchantId());
Merchant merchant = merchantRemote.getByMerchantId(loginUser.getMerchantId()).getResult();
if(merchant == null){
return RopResponse.error(RopErrorEnum.SYSTEM_REGISTER_EMPLOYEE_MERCHANT_NOT_EXISTS);
}
employee.setMerchantName(merchant.getMerchantName());
employee.setCreatedBy(loginUser.getAccountName());
employee.setRegSource(RegSourceEnum.ROP.getValue());
RpcResponse<EmployeeDTO> res = employeeRemote.register(employee);
if(!res.hasResult()){
return RopResponse.error(RopErrorEnum.SYSTEM_REGISTER_EMPLOYEE_ERROR,res.getMessage());
}
User user = userRemote.getByEmployeeId(res.getResult().getEmployeeId()).getResult();
RegisterResponse response = new RegisterResponse();
response.setOpenId(user.getDjId());
return RopResponse.success(response);
}
@ServiceMethod(method = "dj.api.list.system.employee", needInSession = NeedInSessionType.NO)
public RopResponse<List<EmployeeDTO>> list(EmployeeListRequest req) throws Exception{
EmployeeDTO employee = new EmployeeDTO();
BeanUtils.copyProperties(req, employee);
// employee.setIsOpenCard(true);
// if (req.getFilterNoOpenCard() != null
// && req.getFilterNoOpenCard() == false) {
// employee.setIsOpenCard(null);
// }
RpcResponse<List<EmployeeDTO>> res = employeeRemote.list(employee);
if(res.hasResult()){
return RopResponse.success(res.getResult());
}
return RopResponse.error(DefaultErrorEnum.DATA_NOT_EXIST);
}
}
package cn.com.glsx.dj.rop.controller.system;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import cn.com.glsx.dj.rop.request.system.GetMerchantCarBrandRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
import cn.com.glsx.dj.system.model.MerchantCarBrand;
import cn.com.glsx.dj.system.remote.MerchantCarBrandRemote;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
/**
* @Title: MerchantCarBrandController.java
* @Description:
* @author Alvin
* @date 2020年7月3日 下午2:50:15
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class MerchantCarBrandController {
@Autowired
private MerchantCarBrandRemote merchantCarBrandRemote;
/**
* 获取商户车辆品牌
* @param request
* @return
* @author Alvin
* @date 2020年7月3日 下午3:06:55
*/
@ServiceMethod(method = "dj.api.get.system.merchant.carbrand")
public RopResponse<List<MerchantCarBrand>> getMerchantCarBrand(GetMerchantCarBrandRequest request){
RpcResponse<List<MerchantCarBrand>> response = merchantCarBrandRemote.getAllByMerchantId(request.getMerchantId());
if(response.hasResult()){
return RopResponse.success(response.getResult());
}else{
return RopResponse.error(response.getError());
}
}
}
package cn.com.glsx.dj.rop.controller.system;
import java.util.List;
import cn.com.glsx.dj.rop.request.system.MerchantSearchSelfRequest;
import org.springframework.beans.factory.annotation.Autowired;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import cn.com.glsx.dj.rop.request.system.GetMerchantLevelChildRequest;
import cn.com.glsx.dj.rop.request.system.MerchantSearchRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
import cn.com.glsx.dj.system.model.MerchantLevel;
import cn.com.glsx.dj.system.remote.MerchantLevelRemote;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class MerchantLevelController {
@Autowired
private MerchantLevelRemote merchantLevelRemote;
@ServiceMethod(method = "dj.api.search.system.merchantLevel.get")
public RopResponse<MerchantLevel> getMerchantLevel(MerchantSearchRequest request){
RpcResponse<MerchantLevel> rpc = merchantLevelRemote.getByMerchantId(Integer.valueOf(request.getMerchantId()));
return RopResponse.success(rpc.getResult());
}
/**
* 获取商户下级(包含自身)
* @param request
* @return
*/
@ServiceMethod(method = "dj.api.search.system.merchantLevel.getChild")
public RopResponse<List<MerchantLevel>> getChild(GetMerchantLevelChildRequest request){
RpcResponse<List<MerchantLevel>> rpc = merchantLevelRemote.listMerchant(request.getMerchantId());
return RopResponse.success(rpc.getResult());
}
/**
* 获取商户自身)
* @param request
* @return
*/
@ServiceMethod(method = "dj.api.search.system.self.merchantLevel")
public RopResponse<List<MerchantLevel>> getChild(MerchantSearchSelfRequest request){
RpcResponse<List<MerchantLevel>> rpc = merchantLevelRemote.listSelfMerchantIds(request.getMerchantIds());
return RopResponse.success(rpc.getResult());
}
}
package cn.com.glsx.dj.rop.controller.weapp;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import cn.com.glsx.dj.rop.enums.RopErrorEnum;
import cn.com.glsx.dj.rop.request.weapp.VpVideoFinishNotifyRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
import cn.com.glsx.dj.weapp.model.VpMaterialInfo;
import cn.com.glsx.dj.weapp.remote.VpMaterialInfoRemote;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
@ServiceMethodBean(version = "1.0.0")
public class MaterialInfoController {
protected final Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private VpMaterialInfoRemote vpMaterialInfoRemote;
/**
* 视频合成完成通知
* @Description:
* @param request
* @return
* @author zhoulm
* @date 2020年4月25日 下午1:52:26
*/
@ServiceMethod(method = "dj.api.video.plus.finish.notify", needInSession = NeedInSessionType.NO)
public RopResponse<Boolean> notify(VpVideoFinishNotifyRequest request){
VpMaterialInfo info = new VpMaterialInfo();
info.setId(request.getJobId());
info.setVideoCoverUrl(request.getVideoCoverUrl());
info.setVideoUrl(request.getVideoUrl());
RpcResponse<VpMaterialInfo> rpc = vpMaterialInfoRemote.videoFinishNotify(info);
if(rpc.hasResult()){
return RopResponse.success(true);
} else {
return RopResponse.error(RopErrorEnum.VIDEO_PLUS_FINISH_NOTIRY_ERROR);
}
}
}
package cn.com.glsx.dj.rop.controller.wechat;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import cn.com.glsx.dj.rop.request.wechat.GetQrcodeSceneRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
import cn.com.glsx.dj.rop.response.wechat.QrcodeSceneResponse;
import cn.com.glsx.dj.wechat.remote.WechatQrcodeSceneRemote;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class QrcodeSceneController {
protected final Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private WechatQrcodeSceneRemote wechatQrcodeSceneRemote;
@ServiceMethod(method = "dj.api.wechat.get.scene.by.id")
public RopResponse<QrcodeSceneResponse> getSceneById (GetQrcodeSceneRequest request) {
RpcResponse<String> rpc = wechatQrcodeSceneRemote.getById(request.getId());
if (rpc.hasResult()) {
QrcodeSceneResponse r = new QrcodeSceneResponse();
r.setScene(rpc.getResult());
return RopResponse.success(r);
} else {
return RopResponse.error(rpc.getError());
}
}
}
package cn.com.glsx.dj.rop.controller.wechat;
import cn.com.glsx.dj.rop.request.wechat.WechatJsConfigRequest;
import cn.com.glsx.dj.wechat.dto.JsWxConfigDTO;
import cn.com.glsx.dj.wechat.remote.WechatH5AuthorizeInfoRemote;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import cn.com.glsx.dj.rop.request.wechat.SendWechatMessageRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
import cn.com.glsx.dj.wechat.enums.WechatMsgTypeEnum;
import cn.com.glsx.dj.wechat.remote.WechatMessageRemote;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import javax.servlet.http.HttpServletRequest;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class WechatMessageController {
protected final Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private WechatMessageRemote wechatMessageRemote;
@Autowired
private WechatH5AuthorizeInfoRemote wechatH5AuthorizeInfoRemote;
@ServiceMethod(method = "dj.api.wechat.send.template.message")
public RopResponse<Integer> sendTemplateMessage (SendWechatMessageRequest request) {
RpcResponse<Integer> rpc = null;
if(request.getUserId() != null) {
rpc = wechatMessageRemote.sendMessage(WechatMsgTypeEnum.get(request.getMsgType()),
request.getUserId(), request.getParams());
}else {
rpc = wechatMessageRemote.sendMessageByUuid(WechatMsgTypeEnum.get(request.getMsgType()),
request.getUuid(), request.getParams());
}
if (rpc.hasResult()) {
return RopResponse.success(rpc.getResult());
} else {
return RopResponse.error(rpc.getError());
}
}
/**
* 获取微信JsConfig
* @param ropRequest
* @return
* @author zengqi
* @date 2021年4月18日 下午6:21:55
*/
@ServiceMethod(method="dj.api.common.wechat.jsconfig", needInSession= NeedInSessionType.NO)
@ApiOperation("获取微信JsConfig")
public RopResponse<JsWxConfigDTO> getJsConfig(WechatJsConfigRequest ropRequest) throws UnsupportedEncodingException {
if(StringUtils.isEmpty(ropRequest.getUrl())){
HttpServletRequest request = HttpServletRequest.class.cast(ropRequest.getRopRequestContext().getRawRequestObject());
ropRequest.setUrl(request.getHeader("Referer"));
}
RpcResponse<JsWxConfigDTO> response = wechatH5AuthorizeInfoRemote.getJsWxConfig(URLDecoder.decode(ropRequest.getUrl(),"utf-8"),ropRequest.getAppId());
return RopResponse.success(response.getResult());
}
}
package cn.com.glsx.dj.rop.controller.ws;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.oreframework.util.http.HttpUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import com.alibaba.fastjson.JSONObject;
import com.rop.AbstractRopRequest;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import cn.com.glsx.dj.rop.request.ws.WsSendMessageRequest;
import cn.com.glsx.dj.rop.response.RopResponse;
import cn.com.glsx.dj.rop.response.ws.WsConfigResponse;
import cn.com.glsx.framework.core.enums.DefaultErrorEnum;
@ServiceMethodBean(version = "1.0.0")
public class WsController {
protected final Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private Environment env;
@ServiceMethod(method = "dj.api.ws.get.config", needInSession = NeedInSessionType.NO)
public RopResponse<WsConfigResponse> getWsConfig(AbstractRopRequest req) throws Exception{
String sessionId = this.getWsSessionId();
if(StringUtils.isNotBlank(sessionId)){
WsConfigResponse res = new WsConfigResponse();
res.setUrl(env.getProperty("dj.ws.url").concat(sessionId));
res.setSessionId(sessionId);
return RopResponse.success(res);
}
return RopResponse.error(DefaultErrorEnum.SERVICE_ERROR,"获取WS SESSION_ID 失败");
}
@ServiceMethod(method = "dj.api.ws.send.message", needInSession = NeedInSessionType.NO)
public RopResponse<Boolean> sendMessage(WsSendMessageRequest req) throws Exception{
final String url = env.getProperty("dj.ws.send.message.url");
Map<String,String> params = new HashMap<String,String>();
params.put("code", req.getCode());
params.put("to", req.getTo());
params.put("from", req.getFrom());
params.put("content", req.getContent());
params.put("type", req.getType());
params.put("unionId", req.getUnionId());
String result = HttpUtil.postJson(url,JSONObject.toJSONString(params),60 * 1000);
logger.info("url:{},sendResult:{}.",url,result);
return RopResponse.success(true);
}
private String getWsSessionId(){
try {
String result = HttpUtil.get(env.getProperty("dj.ws.get.session.url"), null);
JSONObject json = JSONObject.parseObject(result);
logger.info("result:{}.",result);
return json.getString("data");
} catch (Exception e) {
logger.error(e.getMessage(),e);
}
return null;
}
}
package cn.com.glsx.dj.rop.dto;
import java.util.Date;
import java.util.Date;
/**
* @author admin
*/
public class DevcieMerchantInfo {
// 车架和sn必须有一个
private String standNo;
private Integer vehicleId;
private String name;
private String createdBy;
private String updatedBy;
private String phone;
private Integer merchantId;
private String channelCode;
private Date successDate;
/*
* 车辆信息
* */
private String plateNum;
private String vehicleTypeName;
private String vehicleSeriesName;
private String vehicleBrand;
public DevcieMerchantInfo() {
}
public String getStandNo() {
return standNo;
}
public void setStandNo(String standNo) {
this.standNo = standNo;
}
public Integer getVehicleId() {
return vehicleId;
}
public void setVehicleId(Integer vehicleId) {
this.vehicleId = vehicleId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public String getUpdatedBy() {
return updatedBy;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public Integer getMerchantId() {
return merchantId;
}
public void setMerchantId(Integer merchantId) {
this.merchantId = merchantId;
}
public String getChannelCode() {
return channelCode;
}
public void setChannelCode(String channelCode) {
this.channelCode = channelCode;
}
public Date getSuccessDate() {
return successDate;
}
public void setSuccessDate(Date successDate) {
this.successDate = successDate;
}
public String getPlateNum() {
return plateNum;
}
public void setPlateNum(String plateNum) {
this.plateNum = plateNum;
}
public String getVehicleTypeName() {
return vehicleTypeName;
}
public void setVehicleTypeName(String vehicleTypeName) {
this.vehicleTypeName = vehicleTypeName;
}
public String getVehicleSeriesName() {
return vehicleSeriesName;
}
public void setVehicleSeriesName(String vehicleSeriesName) {
this.vehicleSeriesName = vehicleSeriesName;
}
public String getVehicleBrand() {
return vehicleBrand;
}
public void setVehicleBrand(String vehicleBrand) {
this.vehicleBrand = vehicleBrand;
}
@Override
public String toString() {
return "ConsumerDTO{" +
"standNo='" + standNo + '\'' +
", vehicleId=" + vehicleId +
", name='" + name + '\'' +
", createdBy='" + createdBy + '\'' +
", updatedBy='" + updatedBy + '\'' +
", phone='" + phone + '\'' +
", merchantId=" + merchantId +
", channelCode='" + channelCode + '\'' +
", successDate=" + successDate +
", plateNum='" + plateNum + '\'' +
", vehicleTypeName='" + vehicleTypeName + '\'' +
", vehicleSeriesName='" + vehicleSeriesName + '\'' +
", vehicleBrand='" + vehicleBrand + '\'' +
'}';
}
}
package cn.com.glsx.dj.rop.dto;
import java.io.Serializable;
import java.util.Date;
/**
* 承保外部接口设备对象
* @author zhangyan
* @date 2020年4月1日17:17:14
*
*/
public class ExternalInsureDeviceDTO implements Serializable{
private static final long serialVersionUID = -5349161136212276535L;
/**
* 主键
*/
private Long id;
/**
* imsi
*/
private String imsi;
/**
* sn:设备号
*/
private String sn;
/**
* device_name:设备名称
*/
private String deviceName;
/**
* productType:见字典项,产品类型(有源无源)
*/
private String productType;
/**
* device_type:设备类型
*/
private String deviceType;
/**
* active_date:激活日期
*/
private Date activeDate;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getImsi() {
return imsi;
}
public void setImsi(String imsi) {
this.imsi = imsi;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public String getDeviceName() {
return deviceName;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
public String getProductType() {
return productType;
}
public void setProductType(String productType) {
this.productType = productType;
}
public String getDeviceType() {
return deviceType;
}
public void setDeviceType(String deviceType) {
this.deviceType = deviceType;
}
public Date getActiveDate() {
return activeDate;
}
public void setActiveDate(Date activeDate) {
this.activeDate = activeDate;
}
@Override
public String toString() {
return "ExternalInsureDeviceDTO [id=" + id + ", imsi=" + imsi + ", sn="
+ sn + ", deviceName=" + deviceName + ", productType="
+ productType + ", deviceType=" + deviceType + ", activeDate="
+ activeDate + ", toString()=" + super.toString() + "]";
}
}
package cn.com.glsx.dj.rop.dto;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 外部承保接口车辆信息对象
* @author zhangyan
* @date 2020年4月1日17:20:55
*
*/
public class ExternalInsureVehicleDTO implements Serializable {
private static final long serialVersionUID = 2162187271897545296L;
/**
* plate_num:车牌
*/
private String plateNum;
/**
* buy_date:购车时间
*/
private Date buyDate;
/**
* name:姓名
*/
private String name;
/**
* standno:车架号
*/
private String standNo;
/**
* engine:发动机号
*/
private String engine;
/**
* buy_type:00贷款车,01全款车
*/
private String buyType;
/**
* notice_user:是否为高危用户
*/
private Integer noticeUser;
/**
* vehicle_color:车辆颜色
*/
private String vehicleColor;
/**
* vehicle_price:车辆价格
*/
private BigDecimal vehiclePrice;
/**
* vehicle_brand:车辆品牌名称
*/
private String vehicleBrand;
/**
* vehicle_usage:1:非营运客车 2:营运货车
*/
private Integer vehicleUsage;
/**
* 店面名称
*/
private String shopName;
/**
* 店面联系人
*/
private String shopContactor;
/**
* 店面联系电话
*/
private String shopPhone;
/**
* 要求安装时间
*/
private Date fixTime;
/**
* 到期时间
*/
private Date endTime;
/**
* 车型名称
*/
private String vehicleTypeName;
/**
* 子品牌名称
*/
private String vehicleChildsBrandName;
/**
* 车系名称
*/
private String vehicleSeriesName;
public String getPlateNum() {
return plateNum;
}
public void setPlateNum(String plateNum) {
this.plateNum = plateNum;
}
public Date getBuyDate() {
return buyDate;
}
public void setBuyDate(Date buyDate) {
this.buyDate = buyDate;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getStandNo() {
return standNo;
}
public void setStandNo(String standNo) {
this.standNo = standNo;
}
public String getEngine() {
return engine;
}
public void setEngine(String engine) {
this.engine = engine;
}
public String getBuyType() {
return buyType;
}
public void setBuyType(String buyType) {
this.buyType = buyType;
}
public Integer getNoticeUser() {
return noticeUser;
}
public void setNoticeUser(Integer noticeUser) {
this.noticeUser = noticeUser;
}
public String getVehicleColor() {
return vehicleColor;
}
public void setVehicleColor(String vehicleColor) {
this.vehicleColor = vehicleColor;
}
public BigDecimal getVehiclePrice() {
return vehiclePrice;
}
public void setVehiclePrice(BigDecimal vehiclePrice) {
this.vehiclePrice = vehiclePrice;
}
public String getVehicleBrand() {
return vehicleBrand;
}
public void setVehicleBrand(String vehicleBrand) {
this.vehicleBrand = vehicleBrand;
}
public Integer getVehicleUsage() {
return vehicleUsage;
}
public void setVehicleUsage(Integer vehicleUsage) {
this.vehicleUsage = vehicleUsage;
}
public String getShopName() {
return shopName;
}
public void setShopName(String shopName) {
this.shopName = shopName;
}
public String getShopContactor() {
return shopContactor;
}
public void setShopContactor(String shopContactor) {
this.shopContactor = shopContactor;
}
public String getShopPhone() {
return shopPhone;
}
public void setShopPhone(String shopPhone) {
this.shopPhone = shopPhone;
}
public Date getFixTime() {
return fixTime;
}
public void setFixTime(Date fixTime) {
this.fixTime = fixTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public String getVehicleTypeName() {
return vehicleTypeName;
}
public void setVehicleTypeName(String vehicleTypeName) {
this.vehicleTypeName = vehicleTypeName;
}
public String getVehicleChildsBrandName() {
return vehicleChildsBrandName;
}
public void setVehicleChildsBrandName(String vehicleChildsBrandName) {
this.vehicleChildsBrandName = vehicleChildsBrandName;
}
public String getVehicleSeriesName() {
return vehicleSeriesName;
}
public void setVehicleSeriesName(String vehicleSeriesName) {
this.vehicleSeriesName = vehicleSeriesName;
}
@Override
public String toString() {
return "ExternalInsureVehicleDTO [plateNum=" + plateNum + ", buyDate="
+ buyDate + ", name=" + name + ", standNo=" + standNo
+ ", engine=" + engine + ", buyType=" + buyType
+ ", noticeUser=" + noticeUser + ", vehicleColor="
+ vehicleColor + ", vehiclePrice=" + vehiclePrice
+ ", vehicleBrand=" + vehicleBrand + ", vehicleUsage="
+ vehicleUsage + ", shopName=" + shopName + ", shopContactor="
+ shopContactor + ", shopPhone=" + shopPhone + ", fixTime="
+ fixTime + ", endTime=" + endTime + ", vehicleTypeName="
+ vehicleTypeName + ", vehicleChildsBrandName="
+ vehicleChildsBrandName + ", vehicleSeriesName="
+ vehicleSeriesName + ", toString()=" + super.toString() + "]";
}
}
package cn.com.glsx.dj.rop.enums;
import cn.com.glsx.framework.core.enums.ErrorEnum;
import java.util.HashMap;
import java.util.Map;
/**
* @Title: UserErrorEnum.java
* @Description:
* @author zengqi
* @date 2021年3月18日 下午8:24:49
* @version V1.0
* @Company: glsx.com.cn
* @Copyright Copyright (c) 2021
*/
public enum CommonErrorEnum implements ErrorEnum {
NOT_SUPPORT_FILE_FORMAT("2001", "不支持的文件格式"),
BEYOND_FILE_MAX_SIZE("2002", "文件超出大小限制"),
FILE_UPLOAD_FAILED("2003", "文件上传失败"),
PARAM_ERROR("2004", "请求参数错误");
private String value;
private String displayName;
static Map<String, CommonErrorEnum> enumMap = new HashMap<String, CommonErrorEnum>();
static{
for(CommonErrorEnum code:CommonErrorEnum.values()){
enumMap.put(code.getValue(), code);
}
}
CommonErrorEnum(String value, String displayName){
this.value = value;
this.displayName = displayName;
}
@Override
public String getValue() {
return value;
}
@Override
public String getDisplayName() {
return displayName;
}
public static CommonErrorEnum getEnum(String value){
return enumMap.get(value);
}
@Override
public String toString() {
return this.name().concat("[value:").concat(getValue()).concat(", displayName:").concat(getDisplayName()).concat("]");
}
}
package cn.com.glsx.dj.rop.enums;
import java.util.HashMap;
import java.util.Map;
import cn.com.glsx.framework.core.enums.ErrorEnum;
public enum RopErrorEnum implements ErrorEnum{
//20010101 20固定业务异常,01模块,01模块下第几个接口,01该接口下第几个错误信息
/*******************SYSTEM模块*************************/
/** 登录-该openId不存在**/
SYSTEM_LOGIN_DJID_NOT_EXISTS("20010101", "该openId不存在"),
/** 登录-商户信息不存在**/
SYSTEM_LOGIN_MERCHANT_NOT_EXISTS("20010102", "商户信息不存在"),
/** 登录-渠道信息不存在**/
SYSTEM_LOGIN_CHANNEL_NOT_EXISTS("20010103", "渠道信息不存在"),
/** 登录-该渠道暂未开放**/
SYSTEM_LOGIN_CHANNEL_NOT_OPEN("20010104", "该渠道暂未开放"),
/** 登录-创建登录令牌失败**/
SYSTEM_LOGIN_SAVE_TOKEN_ERROR("20010105", "创建登录令牌失败"),
/** 登录-账号未启用**/
SYSTEM_LOGIN_ACCOUNT_NOT_ENABLED("20010106", "账号未启用"),
/** 登录-账号已注销**/
SYSTEM_LOGIN_ACCOUNT_CANCELLED("20010107", "账号已注销"),
/** 登录-oauth2 code无效**/
SYSTEM_LOGIN_OAUTH2_CODE_INVALID("20010108", "oauth2 code无效"),
/** 登录-oauth2失败**/
SYSTEM_LOGIN_OAUTH2_FAILED("20010109", "oauth2失败"),
/** 登录-未关注公众号**/
SYSTEM_LOGIN_NOT_SUBSCRIBE("20010110", "未关注公众号"),
/** 已退出登陆**/
SYSTEM_LOGOUT("20010111", "已退出登陆"),
/** 登录-用户ID不存在**/
SYSTEM_LOGIN_USERID_NOT_EXISTS("20010112", "登录-用户ID不存在"),
/** 账号未登录**/
SYSTEM_NOT_LOGIN("20010113", "账号未登录"),
/** 登录失败**/
SYSTEM_LOGIN_FAILED("20010114", "登录失败"),
/** 短信验证码错误**/
SYSTEM_LOGIN_SMS_CODE_INVALID("20010115", "短信验证码错误"),
/** 手机号未绑定账号**/
SYSTEM_LOGIN_PHONE_NOT_BIND("20010116", "手机号未绑定账号"),
/** 手机号绑定多个账号**/
SYSTEM_LOGIN_PHONE_MULTI_BIND("20010117", "手机号绑定多个账号"),
/** 商户注册-商户注册失败**/
SYSTEM_REGISTER_MERCHANT_ERROR("20010201", "商户注册失败"),
/** 商户注册-地图类型错误**/
SYSTEM_REGISTER_MAPTYPE_ERROR("20010202", "地图类型错误"),
/** 商户员工注册-商户员工注册失败**/
SYSTEM_REGISTER_EMPLOYEE_ERROR("20010301", "商户员工注册失败"),
/** 商户员工注册-商户信息不存在**/
SYSTEM_REGISTER_EMPLOYEE_MERCHANT_NOT_EXISTS("20010302", "商户信息不存在"),
/*******************marketing模块*************************/
/** 获取商户分账商品信息-编号不存在**/
MARKETING_GET_MERCHANT_GOODS_CODE_NOT_EXISTS("20020101","编号不存在"),
/** 获取商户分账商品信息-商户信息异常**/
MARKETING_GET_MERCHANT_GOODS_MERCHANT_EXCEPTION("20020102","商户信息异常"),
/** 获取商户分账商品信息-商户未设置对公账户信息**/
MARKETING_GET_MERCHANT_GOODS_NOT_COMPANY("20020103","商户未设置对公账户信息"),
/** 获取商户分账商品信息-商品信息异常**/
MARKETING_GET_MERCHANT_GOODS_GOODS_EXCEPTION("20020104","商品信息异常"),
/** 获取广联分账账户信息-暂不支持此渠道查询**/
MARKETING_GET_GL_ACCOUNT_CHANNEL_ERROR("20020201","暂不支持此渠道查询"),
/*******************保单模块*************************/
/** 根据保单序列号获取保单信息-保单信息不存在**/
INSURE_GET_BY_SEQ_NO_NOT_EXISTS("20030101","保单信息不存在"),
INSURE_GET_BY_SN_NOT_EXISTS("20030102","保单信息不存在"),
INSURE_GET_BY_INSURE_NO_NOT_EXISTS("20030103","保单信息不存在"),
/** 根据保单序列号获取保单pdf地址-保单信息异常**/
INSURE_GET_INSURE_PDF_ADDRESS_INFO_ERROR("20030201","保单信息异常"),
/** 根据保单号获取待审批的保单(万位投保)-保单信息异常**/
INSURE_GET_AUDITING_INSURE__INFO_ERROR("20030202","保单信息异常"),
/** 修改/退保失败(万位投保)-操作异常**/
INSURE_OPERATE_ERROR("20030203","操作异常"),
INSURE_OPERATE_WANWAY_URL_INVALID_ERROR("20030204","链接失效"),
/** 退保-富德保险退保时间必须在投保之后的5分钟再进行退保**/
INSURE_CANCEL_5MINUTIS_TIME_LIMIT("20030301","富德保险退保时间必须在投保之后的5分钟再进行退保"),
/** 退保-保单已经不在系统 7 日退保期限内,如需退保请走线下人工退保流程**/
INSURE_CANCEL_7DAYS_TIME_LIMIT("20030302","保单已经不在系统 7 日退保期限内,如需退保请走线下人工退保流程"),
/** 退保-退保异常**/
INSURE_CANCEL_ERROR("20030303","退保异常"),
/** 根据保单序列号获取保单pdf地址-保单信息异常**/
INSURE_CANCEL_INFO_ERROR("20030304","保单信息异常"),
/** 投保-该openId不存在**/
INSURE_SAVE_INFO_DJID_NOT_EXISTS("20030401","该openId不存在"),
/** 投保-库存单号用尽,请联系管理员**/
INSURE_SAVE_DIDI_AVAILABLE_INSURANCE_NUM_NONE("20030402","库存单号用尽,请联系管理员"),
/** 投保-投保失败**/
INSURE_SAVE_ERROR("20030403","投保失败"),
/** 投保-不支持的保险公司代码**/
INSURE_SAVE_COMPANT_CODE_ERROR("20030404","不支持的保险公司代码"),
/** 投保-不支持的证件类型**/
INSURE_SAVE_CARD_TYPE_ERROR("20030405","不支持的证件类型"),
/** 投保-保单序列号已被使用**/
INSURE_SAVE_SEQNO_HAS_USED("20030406","保单序列号已被使用"),
/** 投保-保单序列号无效**/
INSURE_SAVE_SEQNO_INVALID("20030407","保单序列号无效"),
/** 投保-特约无效**/
INSURE_SPECIAL_PROMISE_INVALID("20030408","特别约定无效"),
/** 生成保单序列号-生成保单序列号异常**/
INSURE_CREATE_SEQ_NO_ERROR("20030501","生成保单序列号异常"),
/** 获取保单权益信息失败 **/
INSURE_GET_EQUITY_NO_ERROR("20030601", "获取保单权益信息失败"),
/** 修改保单-修改保单异常**/
INSURE_UPDATE_ERROR("20030601", "修改保单信息异常"),
/*******************视频+模块*************************/
/** 视频+-业务处理异常**/
VIDEO_PLUS_FINISH_NOTIRY_ERROR("20040101", "业务处理异常"),
/*******************支付模块*************************/
/** 支付-生成POS机订单异常**/
PAYMENT_CREATE_POS_ORDER_ERROR("20030101", "生成POS机订单异常"),
;
private String value;
private String displayName;
static Map<String, RopErrorEnum> enumMap = new HashMap<String, RopErrorEnum>();
static{
for(RopErrorEnum code:RopErrorEnum.values()){
enumMap.put(code.getValue(), code);
}
}
RopErrorEnum(String value, String displayName){
this.value = value;
this.displayName = displayName;
}
public static RopErrorEnum getEnum(String value){
return enumMap.get(value);
}
@Override
public String getValue() {
return value;
}
@Override
public String getDisplayName() {
return displayName;
}
}
package cn.com.glsx.dj.rop.enums;
/**
* 请求来源
* @Title: RopSourceEnum.java
* @Description:
* @author zhoulm
* @date 2019年11月7日 下午3:25:39
* @version V1.0
* @Company: glsx.com.cn
* @Copyright Copyright (c) 2019
*/
public enum RopSourceEnum {
/** 爱卡**/
XCAR("xcar"),
/** 广联**/
GLSX("glsx"),
/** 海圳**/
SZHZ("szhz");
private final String value;
public static final String KEY = "source";
RopSourceEnum(String value){
this.value = value;
}
public String getValue() {
return value;
}
}
package cn.com.glsx.dj.rop.manager;
import java.util.List;
import cn.com.glsx.dj.insure.model.InsureEquity;
import cn.com.glsx.dj.insure.remote.InsureEquityRemote;
import org.apache.commons.lang.StringUtils;
import org.apache.dubbo.common.utils.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import cn.com.glsx.dj.car.boutique.model.BdOrder;
import cn.com.glsx.dj.car.boutique.remote.BdOrderRemote;
import cn.com.glsx.dj.customer.enums.DeviceBindMerchantSourceEnum;
import cn.com.glsx.dj.customer.model.CustomerActiveUser;
import cn.com.glsx.dj.customer.model.CustomerDevice;
import cn.com.glsx.dj.customer.model.CustomerDeviceMerchant;
import cn.com.glsx.dj.customer.model.CustomerDeviceUser;
import cn.com.glsx.dj.customer.remote.CustomerActiveUserRemote;
import cn.com.glsx.dj.customer.remote.CustomerDeviceMerchantRemote;
import cn.com.glsx.dj.customer.remote.CustomerDeviceRemote;
import cn.com.glsx.dj.customer.remote.CustomerDeviceUserRemote;
import cn.com.glsx.dj.insure.dto.InsureVehicleDTO;
import cn.com.glsx.dj.insure.model.InsureOrder;
import cn.com.glsx.dj.insure.remote.InsureRemote;
import cn.com.glsx.dj.insure.remote.InsureVehicleRemote;
import cn.com.glsx.dj.rop.dto.DevcieMerchantInfo;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
/**
* @author admin
*/
@Component
public class DeviceMerchantManger {
private static final Logger LOGGER = LoggerFactory.getLogger(DeviceMerchantManger.class);
@Autowired
private InsureRemote insureRemote;
@Autowired
private CustomerDeviceRemote customerDeviceRemote;
@Autowired
private InsureVehicleRemote insureVehicleRemote;
@Autowired
private CustomerDeviceMerchantRemote customerDeviceMerchantRemote;
@Autowired
private CustomerActiveUserRemote customerActiveUserRemote;
@Autowired
private CustomerDeviceUserRemote customerDeviceUserRemote;
@Autowired
private BdOrderRemote bdOrderRemote;
@Autowired
private InsureEquityRemote insureEquityRemote;
public DevcieMerchantInfo getParams(String sn) {
Byte deviceMerchantSource =null;
DevcieMerchantInfo result = new DevcieMerchantInfo();
CustomerDeviceMerchant customerDeviceMerchant = null;
RpcResponse<CustomerDeviceMerchant> bindDeviceMerchantRpc = customerDeviceMerchantRemote.getBindDeviceMerchant(sn);
if (bindDeviceMerchantRpc.hasResult()) {
customerDeviceMerchant = bindDeviceMerchantRpc.getResult();
deviceMerchantSource = customerDeviceMerchant.getSource();
} else {
LOGGER.info("{} 设备没有绑定商户 异常{}", sn, bindDeviceMerchantRpc.getMessage());
return result;
}
if (deviceMerchantSource == DeviceBindMerchantSourceEnum.ORDER.getCode()){
result = handleOrderParams(sn);
} else if (deviceMerchantSource == DeviceBindMerchantSourceEnum.ENTER_CUSTOMER_DEVICE.getCode()) {
result = handleDeviceParams(sn);
} else if (deviceMerchantSource == DeviceBindMerchantSourceEnum.BOUTIQUE.getCode()) {
result = handleBdOrderParams(sn);
} else if (deviceMerchantSource == DeviceBindMerchantSourceEnum.SEND_MERCHENR.getCode() || deviceMerchantSource == DeviceBindMerchantSourceEnum.LOCATION_REPORT.getCode()) {
// 查询设备激活表
result = handleDDHActiveParams(sn);
}
// 注入门店绑定关系
result.setMerchantId(customerDeviceMerchant.getMerchantId());
if (result.getSuccessDate() == null) {
result.setSuccessDate(customerDeviceMerchant.getCreatedDate());
}
return result;
}
private DevcieMerchantInfo handleDDHActiveParams(String sn) {
DevcieMerchantInfo result = new DevcieMerchantInfo();
RpcResponse<CustomerActiveUser> activerUserRpc = customerActiveUserRemote.getActiverUser(sn);
if (activerUserRpc.hasResult()) {
CustomerActiveUser activerUser = activerUserRpc.getResult();
result = new DevcieMerchantInfo();
setParamsByActiverUser(activerUser, result);
}
return result;
}
private DevcieMerchantInfo handleBdOrderParams(String sn) {
DevcieMerchantInfo result = new DevcieMerchantInfo();
// 查询设备用户表 然后用手机号去查订单表
RpcResponse<CustomerDeviceUser> deviceUserRpc = customerDeviceUserRemote.getBySnAndSource(sn, DeviceBindMerchantSourceEnum.BOUTIQUE.getCode());
if (deviceUserRpc.hasResult()) {
String mobile = deviceUserRpc.getResult().getPhone();
if (StringUtils.isNotEmpty(mobile)) {
RpcResponse<BdOrder> firstPaidOrderByPhoneRpc = bdOrderRemote.getFirstPaidOrderByPhone(mobile);
if (firstPaidOrderByPhoneRpc.hasResult()) {
result = handleDDHActiveParams( sn);
BdOrder bdOrder = firstPaidOrderByPhoneRpc.getResult();
setBaseParamsByBdOrder(bdOrder, result);
setVehicleByBdOrder(bdOrder, result);
}
}
}
return result;
}
private DevcieMerchantInfo handleDeviceParams(String sn) {
DevcieMerchantInfo result = new DevcieMerchantInfo();
// 获取设备录入信息
RpcResponse<CustomerDevice> deviceRpc = customerDeviceRemote.getByImei(sn);
if(!deviceRpc.hasResult()) {
LOGGER.error("{}通过SN{}查询到的设备录入信息为空,不保存到数据库中", "到店和流失商机", sn);
return result;
}
CustomerDevice device = deviceRpc.getResult();
if(StringUtils.isEmpty(device.getPhone())) {
LOGGER.error("{}通过SN{}查询到的录入设备未绑定,不保存到数据库中", "到店和流失商机", sn);
return result;
}
result = new DevcieMerchantInfo();
setBaseParamsByCoustomerDevice(deviceRpc.getResult(), result);
setVehicleInfoByCustomerDevice(deviceRpc.getResult(), result);
return result;
}
private DevcieMerchantInfo handleOrderParams(String sn) {
// 首先判断有没有保单 有保单就保单处理
RpcResponse<InsureOrder> insureRpc = insureRemote.getLatestSuccessedRecord(sn);
DevcieMerchantInfo result = new DevcieMerchantInfo();
if(insureRpc.hasResult()) {
result = new DevcieMerchantInfo();
setBaseParamsByOrder(insureRpc.getResult(),result);
// 将保单信息放到参数对象中去
InsureVehicleDTO record = new InsureVehicleDTO();
record.setStandNo(insureRpc.getResult().getStandNo());
RpcResponse<List<InsureVehicleDTO>> veRpc= insureVehicleRemote.list(record);
if (veRpc.hasResult() && CollectionUtils.isNotEmpty(veRpc.getResult())) {
record = veRpc.getResult().get(0);
}
setVehicleInfosByOrder(record, result);
} else {
RpcResponse<List<InsureEquity>> listRpcResponse = insureEquityRemote.queryEquitySuccessBySn(sn);
if (listRpcResponse.hasResult() && CollectionUtils.isNotEmpty(listRpcResponse.getResult())) {
InsureEquity equity = listRpcResponse.getResult().get(0);
BeanUtils.copyProperties(equity, result);
result.setVehicleId(Integer.valueOf(equity.getVehicleId().toString()));
RpcResponse<InsureVehicleDTO> byVehicleId = insureVehicleRemote.getByVehicleId(equity.getVehicleId());
if (byVehicleId.hasResult()) {
setVehicleInfosByOrder(byVehicleId.getResult(), result);
}
}
}
return result;
}
/**
* 保单入参
*/
public static DevcieMerchantInfo setVehicleInfosByOrder(InsureVehicleDTO vehicle, DevcieMerchantInfo result) {
result.setVehicleBrand(vehicle.getVehicleBrand());
result.setVehicleTypeName(vehicle.getVehicleTypeName());
result.setVehicleSeriesName(vehicle.getVehicleSeriesName());
result.setPlateNum(vehicle.getPlateNum());
return result;
}
/**
* 录入设备入参车辆信息
* @param device
*/
public static DevcieMerchantInfo setVehicleInfoByCustomerDevice(CustomerDevice device, DevcieMerchantInfo result) {
result.setVehicleBrand(device.getVehicleBrand());
result.setVehicleTypeName(device.getVehicleTypeName());
result.setVehicleSeriesName(device.getVehicleSeriesName());
result.setPlateNum(device.getPlateNum());
return result;
}
private static void setVehicleByBdOrder(BdOrder order, DevcieMerchantInfo result) {
result.setVehicleBrand(order.getCarBrand());
result.setVehicleTypeName(order.getCarTypeName());
result.setVehicleSeriesName(order.getCarSeriesName());
}
private static void setBaseParamsByCoustomerDevice(CustomerDevice device, DevcieMerchantInfo result) {
result.setCreatedBy(device.getCreatedBy());
result.setUpdatedBy(device.getUpdatedBy());
//result.setStandNo(device.getStandNo());
result.setName(StringUtils.isEmpty(device.getName()) ? "--" : device.getName());
result.setPhone(device.getPhone());
result.setMerchantId(device.getMerchantId());
result.setSuccessDate(device.getCreatedDate());
}
private static void setBaseParamsByOrder(InsureOrder order, DevcieMerchantInfo result) {
BeanUtils.copyProperties(order, result);
if (null != order.getVehicleId()) {
result.setVehicleId(order.getVehicleId().intValue());
}
result.setChannelCode(order.getChannelCode());
}
private static void setBaseParamsByBdOrder(BdOrder order, DevcieMerchantInfo result) {
BeanUtils.copyProperties(order, result);
if (StringUtils.isNotEmpty(order.getCustomerName())) {
result.setName(order.getCustomerName());
}
if (StringUtils.isNotEmpty(order.getCustomerPhone())) {
result.setPhone(order.getCustomerPhone());
}
}
private static void setParamsByActiverUser(CustomerActiveUser activeUser, DevcieMerchantInfo result) {
BeanUtils.copyProperties(activeUser, result);
result.setSuccessDate(activeUser.getCreatedDate());
}
}
package cn.com.glsx.dj.rop.manager;
import cn.com.glsx.dj.gop.remote.GopMerchantRemote;
import cn.com.glsx.dj.gop.response.system.GopMerchantResponse;
import cn.com.glsx.dj.rop.response.insure.GetInsureUserResponse;
import cn.com.glsx.dj.system.enums.ConfGroupEnum;
import cn.com.glsx.dj.system.model.ChannelConfig;
import cn.com.glsx.dj.system.model.Config;
import cn.com.glsx.dj.system.model.Merchant;
import cn.com.glsx.dj.system.model.MerchantLevel;
import cn.com.glsx.dj.system.remote.ChannelConfigRemote;
import cn.com.glsx.dj.system.remote.ConfigRemote;
import cn.com.glsx.dj.system.remote.MerchantLevelRemote;
import cn.com.glsx.dj.system.remote.MerchantRemote;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.*;
import java.util.stream.Collectors;
@Component
public class SystemManger {
@Autowired
private MerchantLevelRemote merchantLevelRemote;
@Autowired
private MerchantRemote merchantRemote;
@Autowired
private ChannelConfigRemote channelConfigRemote;
@Autowired
private GopMerchantRemote gopMerchantRemote;
@Autowired
private ConfigRemote configRemote;
public GetInsureUserResponse setMerchantInfo(GetInsureUserResponse response) {
MerchantLevel merchantLevel = merchantLevelRemote.getByMerchantId(response.getMerchantId()).getResult();
if (merchantLevel != null) {
response.setFactoryMerchantId(merchantLevel.getFactoryMerchantId());
response.setFactoryMerchantName(merchantLevel.getFactoryMerchantName());
response.setProvinceMerchantId(merchantLevel.getProvinceMerchantId());
response.setProvinceMerchantName(merchantLevel.getProvinceMerchantName());
response.setCityMerchantId(merchantLevel.getCityMerchantId());
response.setCityMerchantName(merchantLevel.getCityMerchantName());
}
Merchant merchant = merchantRemote.getByMerchantId(response.getMerchantId()).getResult();
if (merchant != null) {
response.setProvinceId(merchant.getProvinceId());
response.setProvinceName(merchant.getProvinceName());
response.setCityId(merchant.getCityId());
response.setCityName(merchant.getCityName());
response.setAreaId(merchant.getAreaId());
response.setAreaName(merchant.getAreaName());
response.setMerchantName(merchant.getMerchantName());
}
return response;
}
/**
* 返回直接下级商户列表
*
* @param merchantId
* @return
*/
public List<Merchant> getChildMerchant(Integer merchantId) {
if (merchantId == null) {
return null;
}
Merchant merchant = merchantRemote.getByMerchantId(merchantId).getResult();
if (merchant == null) {
return null;
}
ChannelConfig channel = channelConfigRemote.getById(merchant.getChannelId()).getResult();
if (channel == null) {
return null;
}
List<GopMerchantResponse> list = gopMerchantRemote.getLastSonMerchantList(merchantId, channel.getPlatformGroup()).getResult();
if (CollectionUtils.isNotEmpty(list)) {
List<Merchant> merchantList = new ArrayList<Merchant>(list.size());
for (GopMerchantResponse gopMerchantVo : list) {
Merchant m = new Merchant();
BeanUtils.copyProperties(gopMerchantVo, m);
Config config = configRemote.get(ConfGroupEnum.PLATFORM_MERCHANT_TYPE_PREFFIX + channel.getChannelType(), String.valueOf(gopMerchantVo.getMerchantType())).getResult();
if (config != null) {
m.setUserType(Byte.valueOf(config.getConfName()));
}
merchantList.add(m);
}
return merchantList;
}
return null;
}
/**
* 返回直接下级商户Id列表
*
* @param merchantId
* @return
*/
public Set<Integer> getChildMerchantIds(Integer merchantId) {
List<Merchant> merchants = Optional.ofNullable(getChildMerchant(merchantId)).orElse(new ArrayList<Merchant>());
return merchants.stream().map(Merchant::getMerchantId).filter(Objects::nonNull).collect(Collectors.toSet());
}
}
package cn.com.glsx.dj.rop.request;
import org.apache.commons.lang.builder.ToStringBuilder;
import com.rop.AbstractRopRequest;
/**
* 例子参数实体类
*
* @author alvin.zengqi
* @version [版本号, 2019-09-02]
* @see [相关类/方法]
* @since [产品/模块版本]
*/
public class ExampleRequest extends AbstractRopRequest
{
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
/**
* 得到属性字符串
* @return String 属性字符串
*/
public String toString()
{
return ToStringBuilder.reflectionToString(this);
}
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.dj.rop.request.aibschance;
import java.util.List;
import javax.validation.constraints.NotNull;
import org.apache.commons.lang.builder.ToStringBuilder;
import com.rop.AbstractRopRequest;
/**
* @Title: CollisionRescueMediaRequest.java
* @Description: 碰撞救援媒体文件请求参数
* @author Alvin
* @date 2019年9月13日 上午10:18:37
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
public class CollisionRescueMediaRequest extends AbstractRopRequest {
/**
* 碰撞记录ID
*/
@NotNull
private Long collisionId;
/**
* 图片列表
**/
private List<String> imageList;
/**
* 视频列表
**/
private List<String> videoList;
public Long getCollisionId() {
return collisionId;
}
public void setCollisionId(Long collisionId) {
this.collisionId = collisionId;
}
public List<String> getImageList() {
return imageList;
}
public void setImageList(List<String> imageList) {
this.imageList = imageList;
}
public List<String> getVideoList() {
return videoList;
}
public void setVideoList(List<String> videoList) {
this.videoList = videoList;
}
public String toString()
{
return ToStringBuilder.reflectionToString(this);
}
}
package cn.com.glsx.dj.rop.request.aibschance;
import java.util.Date;
import java.util.List;
import javax.validation.constraints.NotNull;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;
import com.rop.AbstractRopRequest;
/**
* @Title: CollisionRescueRequest.java
* @Description: 碰撞救援请求参数
* @author Alvin
* @date 2019年9月13日 上午10:18:37
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
public class CollisionRescueRequest extends AbstractRopRequest {
/**
* 设备号
*/
@NotEmpty
private String sn;
/**
* 救援类型(SOS:紧急求助;COLLIDE:碰撞; CUSTOMER_SUBMIT:客户自提)
*/
private String rescueType;
/**
* 救援位置
*/
private String address;
/**
* 救援经度
*/
@NotEmpty
private String longitude;
/**
* 救援纬度
*/
@NotEmpty
private String latitude;
/**
* 当前速度
*/
private Integer speed;
/**
* 发送时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date requestDate;
/**
* 图片列表
*/
private List<String> imageList;
/**
* 视频列表
*/
private List<String> videoList;
/**
* 手机号
*/
private String mobile;
/**
* 车主名称
*/
private String userName;
/**
* 车辆品牌
*/
private String carBrand;
/**
* 商户号
*/
@NotNull
private Integer merchantId;
private String isNotarize;
private String isSecondReview;
public String getIsSecondReview() {
return isSecondReview;
}
public void setIsSecondReview(String isSecondReview) {
this.isSecondReview = isSecondReview;
}
public String getIsNotarize() {
return isNotarize;
}
public void setIsNotarize(String isNotarize) {
this.isNotarize = isNotarize;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public String getRescueType() {
return rescueType;
}
public void setRescueType(String rescueType) {
this.rescueType = rescueType;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public Date getRequestDate() {
return requestDate;
}
public void setRequestDate(Date requestDate) {
this.requestDate = requestDate;
}
public List<String> getImageList() {
return imageList;
}
public void setImageList(List<String> imageList) {
this.imageList = imageList;
}
public List<String> getVideoList() {
return videoList;
}
public void setVideoList(List<String> videoList) {
this.videoList = videoList;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getCarBrand() {
return carBrand;
}
public void setCarBrand(String carBrand) {
this.carBrand = carBrand;
}
public Integer getMerchantId() {
return merchantId;
}
public void setMerchantId(Integer merchantId) {
this.merchantId = merchantId;
}
public Integer getSpeed() {
return speed;
}
public void setSpeed(Integer speed) {
this.speed = speed;
}
public String toString()
{
return ToStringBuilder.reflectionToString(this);
}
}
package cn.com.glsx.dj.rop.request.aibschance;
import javax.validation.constraints.NotNull;
import org.apache.commons.lang.builder.ToStringBuilder;
import com.rop.AbstractRopRequest;
/**
* @Title: GetCollisionConfigRequest.java
* @Description: 获取商户碰撞配置请求参数
* @author Alvin
* @date 2019年9月12日 下午7:48:55
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
public class GetCollisionConfigRequest extends AbstractRopRequest {
/**
* 商户号
*/
@NotNull
private Integer merchantId;
public Integer getMerchantId() {
return merchantId;
}
public void setMerchantId(Integer merchantId) {
this.merchantId = merchantId;
}
public String toString()
{
return ToStringBuilder.reflectionToString(this);
}
}
package cn.com.glsx.dj.rop.request.aibschance;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.hibernate.validator.constraints.NotEmpty;
import com.rop.AbstractRopRequest;
/**
* @Title: GetCollisionConfigRequest.java
* @Description: 获取商户碰撞配置请求参数
* @author Alvin
* @date 2019年9月12日 下午7:48:55
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
public class GetCollisionConfigRequestBySn extends AbstractRopRequest {
/**
* 商户号
*/
@NotEmpty
private String sn;
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public String toString()
{
return ToStringBuilder.reflectionToString(this);
}
}
package cn.com.glsx.dj.rop.request.aibschance;
import java.util.Date;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;
import com.rop.AbstractRopRequest;
/**
* @Title: CollisionRescueRequest.java
* @Description: 获取到碰撞的轨迹点
* @author Huangzhi
* @date 2019年2月20日 上午10:18:37
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
public class ListTrackPointRequst extends AbstractRopRequest {
/**
* 设备号
*/
@NotEmpty
private String sn;
/**
* 碰撞时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date collisionTime;
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public Date getCollisionTime() {
return collisionTime;
}
public void setCollisionTime(Date collisionTime) {
this.collisionTime = collisionTime;
}
@Override
public String toString() {
return "ListTrackPointRequst [sn=" + sn + ", collisionTime=" + collisionTime + "]";
}
}
package cn.com.glsx.dj.rop.request.aibschance;
import java.util.List;
import org.apache.commons.lang.builder.ToStringBuilder;
import com.rop.AbstractRopRequest;
/**
* @Title: SaveDefaultCollisionConfigRequest.java
* @Description: 保存商户碰撞配置请求参数
* @author Huangzhi
* @date 2019年9月12日 下午7:48:55
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
public class SaveDefaultCollisionConfigRequest extends AbstractRopRequest {
/**
* 商户号
*/
private List<Integer> merchantIds;
public List<Integer> getMerchantIds() {
return merchantIds;
}
public void setMerchantIds(List<Integer> merchantIds) {
this.merchantIds = merchantIds;
}
public String toString()
{
return ToStringBuilder.reflectionToString(this);
}
}
package cn.com.glsx.dj.rop.request.boutique;
import cn.com.glsx.dj.car.boutique.dto.BdGoodsDTO;
import cn.com.glsx.dj.car.boutique.model.BdSubOrder;
import com.rop.AbstractRopRequest;
import org.apache.commons.lang.builder.ToStringBuilder;
import java.util.List;
public class BdOrderDTORequest extends AbstractRopRequest {
/** 可选基础商品列表**/
private List<BdGoodsDTO> baseGoodsList;
private List<BdSubOrder> subOrderList;
/**
* 用户ID
*/
private String userId;
/**
* 商户号
*/
private String merchantId;
/**
* 商户名称
*/
private String merchantName;
private String standNo;
/**
* 来源
*/
private String orderSource;
/**
* 车辆品牌LOGO
*/
private String carBrandLogo;
/**
* 车辆品牌id
*/
private String carBrandId;
/**
* 车辆品牌名称
*/
private String carBrand;
/**
* 子品牌id
*/
private String carChildsBrandId;
/**
* 子品牌名字
*/
private String carChildsBrandName;
/**
* 车系id
*/
private String carSeriesId;
/**
* 车系名字
*/
private String carSeriesName;
/**
* 车型id
*/
private String carTypeId;
/**
* 车型名称
*/
private String carTypeName;
/**
* 车型图片
*/
private String carTypeImg;
/**
* 车辆销售单
*/
private String carSaleInvoiceImg;
private String isBind;
/**
* 客户姓名
*/
private String customerName;
/**
* 客户手机号
*/
private String customerPhone;
/**
* 店面销售账号
*/
private String shopSellerAccountName;
/**
* 店面销售姓名
*/
private String shopSellerName;
/**
* 店面销售手机号
*/
private String shopSellerPhone;
/**
* 广联销售姓名
*/
private String glSellerName;
/**
* 广联销售手机号
*/
private String glSellerPhone;
/**
* 关联子订单批次号
*/
private String batchCode;
/**
*
* 备注
*/
private String remark;
/**
* 创建人
*/
private String createdBy;
private String customerProfession;
private Byte customerType;
public String getCustomerProfession() {
return customerProfession;
}
public void setCustomerProfession(String customerProfession) {
this.customerProfession = customerProfession;
}
public Byte getCustomerType() {
return customerType;
}
public void setCustomerType(Byte customerType) {
this.customerType = customerType;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getMerchantId() {
return merchantId;
}
public void setMerchantId(String merchantId) {
this.merchantId = merchantId;
}
public String getMerchantName() {
return merchantName;
}
public void setMerchantName(String merchantName) {
this.merchantName = merchantName;
}
public String getStandNo() {
return standNo;
}
public void setStandNo(String standNo) {
this.standNo = standNo;
}
public String getOrderSource() {
return orderSource;
}
public void setOrderSource(String orderSource) {
this.orderSource = orderSource;
}
public String getCarBrandLogo() {
return carBrandLogo;
}
public void setCarBrandLogo(String carBrandLogo) {
this.carBrandLogo = carBrandLogo;
}
public String getCarBrandId() {
return carBrandId;
}
public void setCarBrandId(String carBrandId) {
this.carBrandId = carBrandId;
}
public String getCarBrand() {
return carBrand;
}
public void setCarBrand(String carBrand) {
this.carBrand = carBrand;
}
public String getCarChildsBrandId() {
return carChildsBrandId;
}
public void setCarChildsBrandId(String carChildsBrandId) {
this.carChildsBrandId = carChildsBrandId;
}
public String getCarChildsBrandName() {
return carChildsBrandName;
}
public void setCarChildsBrandName(String carChildsBrandName) {
this.carChildsBrandName = carChildsBrandName;
}
public String getCarSeriesId() {
return carSeriesId;
}
public void setCarSeriesId(String carSeriesId) {
this.carSeriesId = carSeriesId;
}
public String getCarSeriesName() {
return carSeriesName;
}
public void setCarSeriesName(String carSeriesName) {
this.carSeriesName = carSeriesName;
}
public String getCarTypeId() {
return carTypeId;
}
public void setCarTypeId(String carTypeId) {
this.carTypeId = carTypeId;
}
public String getCarTypeName() {
return carTypeName;
}
public void setCarTypeName(String carTypeName) {
this.carTypeName = carTypeName;
}
public String getCarTypeImg() {
return carTypeImg;
}
public void setCarTypeImg(String carTypeImg) {
this.carTypeImg = carTypeImg;
}
public String getCarSaleInvoiceImg() {
return carSaleInvoiceImg;
}
public void setCarSaleInvoiceImg(String carSaleInvoiceImg) {
this.carSaleInvoiceImg = carSaleInvoiceImg;
}
public String getIsBind() {
return isBind;
}
public void setIsBind(String isBind) {
this.isBind = isBind;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getCustomerPhone() {
return customerPhone;
}
public void setCustomerPhone(String customerPhone) {
this.customerPhone = customerPhone;
}
public String getShopSellerAccountName() {
return shopSellerAccountName;
}
public void setShopSellerAccountName(String shopSellerAccountName) {
this.shopSellerAccountName = shopSellerAccountName;
}
public String getShopSellerName() {
return shopSellerName;
}
public void setShopSellerName(String shopSellerName) {
this.shopSellerName = shopSellerName;
}
public String getShopSellerPhone() {
return shopSellerPhone;
}
public void setShopSellerPhone(String shopSellerPhone) {
this.shopSellerPhone = shopSellerPhone;
}
public String getGlSellerName() {
return glSellerName;
}
public void setGlSellerName(String glSellerName) {
this.glSellerName = glSellerName;
}
public String getGlSellerPhone() {
return glSellerPhone;
}
public void setGlSellerPhone(String glSellerPhone) {
this.glSellerPhone = glSellerPhone;
}
public String getBatchCode() {
return batchCode;
}
public void setBatchCode(String batchCode) {
this.batchCode = batchCode;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public List<BdGoodsDTO> getBaseGoodsList() {
return baseGoodsList;
}
public void setBaseGoodsList(List<BdGoodsDTO> baseGoodsList) {
this.baseGoodsList = baseGoodsList;
}
public List<BdSubOrder> getSubOrderList() {
return subOrderList;
}
public void setSubOrderList(List<BdSubOrder> subOrderList) {
this.subOrderList = subOrderList;
}
public String toString(){
return ToStringBuilder.reflectionToString(this);
}
}
This diff could not be displayed because it is too large.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!