修改逻辑
This commit is contained in:
parent
61b8165eba
commit
04208acf61
86
pom.xml
86
pom.xml
@ -74,6 +74,11 @@
|
||||
<artifactId>login-oauth2-server</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ink.wgink</groupId>
|
||||
<artifactId>module-oauth2-client</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ink.wgink</groupId>
|
||||
<artifactId>login-app</artifactId>
|
||||
@ -193,17 +198,12 @@
|
||||
<artifactId>mongo-module-file</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ink.wgink</groupId>
|
||||
<artifactId>module-file</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<version>3.0.9</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
@ -214,43 +214,67 @@
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.gmavenplus</groupId>
|
||||
<artifactId>gmavenplus-plugin</artifactId>
|
||||
<version>1.6.1</version>
|
||||
<!-- 打包时去除第三方依赖 -->
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<sourceEncoding>UTF-8</sourceEncoding>
|
||||
<sources>
|
||||
<source>
|
||||
<directory>${project.basedir}/src/main/java/cn/com/tenlion/groovy</directory>
|
||||
<includes>
|
||||
<include>**/*.groovy</include>
|
||||
</includes>
|
||||
</source>
|
||||
</sources>
|
||||
<testSources>
|
||||
<testSource>
|
||||
<directory>${project.basedir}/src/main/test/cn/com/tenlion/groovy</directory>
|
||||
<includes>
|
||||
<include>**/*.groovy</include>
|
||||
</includes>
|
||||
</testSource>
|
||||
</testSources>
|
||||
<!-- 用maven编译时需要加encoding:mvn -Dfile.encoding=UTF-8 compile -->
|
||||
<layout>ZIP</layout>
|
||||
<includes>
|
||||
<include>
|
||||
<groupId>non-exists</groupId>
|
||||
<artifactId>non-exists</artifactId>
|
||||
</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- 拷贝第三方依赖文件到指定目录 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy-dependencies</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>addSources</goal>
|
||||
<goal>addTestSources</goal>
|
||||
<goal>compile</goal>
|
||||
<goal>compileTests</goal>
|
||||
<goal>copy-dependencies</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<!-- target/lib 是依赖jar包的输出目录,根据自己喜好配置 -->
|
||||
<outputDirectory>target/lib</outputDirectory>
|
||||
<excludeTransitive>false</excludeTransitive>
|
||||
<stripVersion>false</stripVersion>
|
||||
<includeScope>runtime</includeScope>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- 排除静态资源,静态资源自行拷贝 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>**/*.properties</exclude>
|
||||
<exclude>**/*.xml</exclude>
|
||||
<exclude>**/*.yml</exclude>
|
||||
<exclude>static/**</exclude>
|
||||
<exclude>templates/**</exclude>
|
||||
<exclude>mybatis/**</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<includeSystemScope>true</includeSystemScope>
|
||||
<excludes>
|
||||
<exclude>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
@ -1,8 +1,15 @@
|
||||
package cn.com.tenlion.operator.controller.api.account;
|
||||
|
||||
import cn.com.tenlion.operator.pojo.dtos.accountbank.AccountBankDTO;
|
||||
import cn.com.tenlion.operator.pojo.dtos.accountrecharge.AccountRechargeDTO;
|
||||
import cn.com.tenlion.operator.pojo.dtos.accountrecharge.AccountRechargePayResultDTO;
|
||||
import cn.com.tenlion.operator.pojo.dtos.customorg.CustomOrgDTO;
|
||||
import cn.com.tenlion.operator.service.accountbank.IAccountBankService;
|
||||
import cn.com.tenlion.operator.service.accountrecharge.IAccountRechargeService;
|
||||
import cn.com.tenlion.operator.util.UserUtil;
|
||||
import cn.com.tenlion.operator.util.pay.PayUtil;
|
||||
import cn.com.tenlion.operator.util.socket.MessageWebSocketServer;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
@ -41,6 +48,35 @@ public class AccountController extends DefaultBaseController {
|
||||
@Autowired
|
||||
private IUserBaseService iUserBaseService;
|
||||
|
||||
@Autowired
|
||||
private IAccountBankService iAccountBankService;
|
||||
|
||||
@Autowired
|
||||
private IAccountRechargeService iAccountRechargeService;
|
||||
@Autowired
|
||||
private cn.com.tenlion.operator.util.socket.MessageWebSocketServer MessageWebSocketServer;
|
||||
|
||||
@ApiOperation(value = "微信支付成功后回调", notes = "支付成功后回调接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("pay/{rechargeId}")
|
||||
public synchronized Object pay(@PathVariable("rechargeId") String rechargeId) {
|
||||
AccountRechargeDTO dto = iAccountRechargeService.get(rechargeId);
|
||||
// 成功
|
||||
if (dto.getThirdParty().equals("微信") && !dto.getReconciliationStatus().equals("1") && !dto.getRechargeCheck().equals("-1") && !dto.getRechargeCheck().equals("2")) {
|
||||
AccountRechargePayResultDTO payResultDTO = PayUtil.queryOrder(rechargeId);
|
||||
if (payResultDTO.getOrderStatus().equals("1") && payResultDTO.getMoney().equals(dto.getRechargeMoney())) {
|
||||
iAccountRechargeService.saveConfirmOnline(dto.getAccountRechargeId(), payResultDTO.getOrderId(), payResultDTO.getOrderSuccessTime());
|
||||
// 发送socket
|
||||
MessageWebSocketServer.sendAll(rechargeId, "success");
|
||||
}
|
||||
}
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("code", "SUCCESS");
|
||||
json.put("message", null);
|
||||
System.out.println(rechargeId);
|
||||
return json;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private UserUtil userUtil;
|
||||
|
||||
@ -50,11 +86,13 @@ public class AccountController extends DefaultBaseController {
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("system-bank")
|
||||
public Map<String, String> systemBank() {
|
||||
AccountDTO accountDTO = accountService.getByUserId(userUtil.getUserId(null));
|
||||
AccountBankDTO bankDTO = iAccountBankService.getOpen();
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("bankName", accountDTO.getBankName());
|
||||
map.put("bankAccountName", accountDTO.getBankAccountName());
|
||||
map.put("bankNumber", accountDTO.getBankNumber());
|
||||
map.put("bankName", bankDTO.getBankName());
|
||||
map.put("bankAccountName", bankDTO.getBankAccountName());
|
||||
map.put("bankNumber", bankDTO.getBankNumber());
|
||||
map.put("bankUnionpayNumber", bankDTO.getBankUnionpayNumber());
|
||||
map.put("bankRemark", bankDTO.getBankRemark());
|
||||
return map;
|
||||
}
|
||||
|
||||
@ -83,14 +121,6 @@ public class AccountController extends DefaultBaseController {
|
||||
return accountService.getByUserId(userId);
|
||||
}
|
||||
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("pay/{orderId}")
|
||||
public SuccessResult pay(@PathVariable("orderId") String orderId) {
|
||||
Map<String, Object> params = requestParams();
|
||||
System.out.println(params);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("nativePay")
|
||||
public SuccessResult nativePay() {
|
||||
|
@ -0,0 +1,111 @@
|
||||
package cn.com.tenlion.operator.controller.api.accountbank;
|
||||
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import cn.com.tenlion.operator.pojo.dtos.accountbank.AccountBankDTO;
|
||||
import cn.com.tenlion.operator.pojo.vos.accountbank.AccountBankVO;
|
||||
import cn.com.tenlion.operator.service.accountbank.IAccountBankService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: AccountBankController
|
||||
* @Description: 平台账户表
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:30:50
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "平台账户表接口")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.API_PREFIX + "/accountbank")
|
||||
public class AccountBankController extends DefaultBaseController {
|
||||
|
||||
@Autowired
|
||||
private IAccountBankService accountBankService;
|
||||
|
||||
@ApiOperation(value = "新增平台账户表", notes = "新增平台账户表接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("save")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult save(@RequestBody AccountBankVO accountBankVO) {
|
||||
accountBankService.save(accountBankVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除平台账户表", notes = "删除平台账户表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@DeleteMapping("remove/{ids}")
|
||||
public SuccessResult remove(@PathVariable("ids") String ids) {
|
||||
accountBankService.remove(Arrays.asList(ids.split("\\_")));
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改平台账户表", notes = "修改平台账户表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "accountBankId", value = "平台账户表ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("update/{accountBankId}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult update(@PathVariable("accountBankId") String accountBankId, @RequestBody AccountBankVO accountBankVO) {
|
||||
accountBankService.update(accountBankId, accountBankVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台账户表详情", notes = "平台账户表详情接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "accountBankId", value = "平台账户表ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("get/{accountBankId}")
|
||||
public AccountBankDTO get(@PathVariable("accountBankId") String accountBankId) {
|
||||
return accountBankService.get(accountBankId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台账户表列表", notes = "平台账户表列表接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list")
|
||||
public List<AccountBankDTO> list() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return accountBankService.list(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台账户表分页列表", notes = "平台账户表分页列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listpage")
|
||||
public SuccessResultList<List<AccountBankDTO>> listPage(ListPage page) {
|
||||
Map<String, Object> params = requestParams();
|
||||
page.setParams(params);
|
||||
return accountBankService.listPage(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台账户表统计", notes = "平台账户表统计接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("count")
|
||||
SuccessResultData<Integer> count() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return new SuccessResultData<>(accountBankService.count(params));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package cn.com.tenlion.operator.controller.api.agreement;
|
||||
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import cn.com.tenlion.operator.pojo.dtos.agreement.AgreementDTO;
|
||||
import cn.com.tenlion.operator.pojo.vos.agreement.AgreementVO;
|
||||
import cn.com.tenlion.operator.service.agreement.IAgreementService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: AgreementController
|
||||
* @Description: 平台协议管理
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:32:44
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "平台协议管理接口")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.API_PREFIX + "/agreement")
|
||||
public class AgreementController extends DefaultBaseController {
|
||||
|
||||
@Autowired
|
||||
private IAgreementService agreementService;
|
||||
|
||||
@ApiOperation(value = "平台协议管理详情", notes = "平台协议管理详情接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "agreementId", value = "平台协议管理ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("by-type/{type}")
|
||||
public AgreementDTO getType(@PathVariable("type") String type) {
|
||||
return agreementService.getByType(type);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新增平台协议管理", notes = "新增平台协议管理接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("save")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult save(@RequestBody AgreementVO agreementVO) {
|
||||
agreementService.save(agreementVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除平台协议管理", notes = "删除平台协议管理接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@DeleteMapping("remove/{ids}")
|
||||
public SuccessResult remove(@PathVariable("ids") String ids) {
|
||||
agreementService.remove(Arrays.asList(ids.split("\\_")));
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改平台协议管理", notes = "修改平台协议管理接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "agreementId", value = "平台协议管理ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("update/{agreementId}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult update(@PathVariable("agreementId") String agreementId, @RequestBody AgreementVO agreementVO) {
|
||||
agreementService.update(agreementId, agreementVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台协议管理详情", notes = "平台协议管理详情接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "agreementId", value = "平台协议管理ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("get/{agreementId}")
|
||||
public AgreementDTO get(@PathVariable("agreementId") String agreementId) {
|
||||
return agreementService.get(agreementId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台协议管理列表", notes = "平台协议管理列表接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list")
|
||||
public List<AgreementDTO> list() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return agreementService.list(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台协议管理分页列表", notes = "平台协议管理分页列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listpage")
|
||||
public SuccessResultList<List<AgreementDTO>> listPage(ListPage page) {
|
||||
Map<String, Object> params = requestParams();
|
||||
page.setParams(params);
|
||||
return agreementService.listPage(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台协议管理统计", notes = "平台协议管理统计接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("count")
|
||||
SuccessResultData<Integer> count() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return new SuccessResultData<>(agreementService.count(params));
|
||||
}
|
||||
|
||||
}
|
@ -12,6 +12,7 @@ import ink.wgink.interfaces.user.IUserBaseService;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.service.user.service.IUserService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -35,6 +36,16 @@ public class SystemUserApiontroller extends DefaultBaseController {
|
||||
@Autowired
|
||||
private IAccountService iAccountService;
|
||||
|
||||
@Autowired
|
||||
private IUserService iUserService;
|
||||
|
||||
@ApiOperation(value = "更改开放状态", notes = "更改开放状态")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("check-exists/{phone}")
|
||||
public Boolean updateUserState(@PathVariable("phone") String phone) throws Exception {
|
||||
return iUserService.getPOByUsername(phone) != null;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "更改开放状态", notes = "更改开放状态")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("updatestate/{userId}/{userState}")
|
||||
@ -60,7 +71,7 @@ public class SystemUserApiontroller extends DefaultBaseController {
|
||||
if (userDTO.getAccountRole().equals("代理商")) {
|
||||
return new SuccessResultData<>(ProjectConfigUtil.getText("AgentServerUrl"));
|
||||
}
|
||||
if (userDTO.getAccountRole().equals("个人") || userDTO.getAccountRole().equals("企业")) {
|
||||
if (userDTO.getAccountRole().equals("普通用户")) {
|
||||
return new SuccessResultData<>(ProjectConfigUtil.getText("AiServerUrl"));
|
||||
}
|
||||
throw new SearchException("系统错误");
|
||||
|
@ -0,0 +1,81 @@
|
||||
package cn.com.tenlion.operator.controller.api.wg;
|
||||
|
||||
import cn.com.tenlion.operator.pojo.vos.agentscore.AgentScoreVO;
|
||||
import cn.com.tenlion.operator.service.remote.IRemoteWangGengInvoiceService;
|
||||
import cn.com.tenlion.operator.service.remote.InvoiceDTO;
|
||||
import cn.com.tenlion.operator.service.remote.InvoiceExamineVO;
|
||||
import cn.com.tenlion.operator.util.UserUtil;
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.common.component.SecurityComponent;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: WangeGengInvoiceController
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-01-27 14:25:52
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "发票信息接口")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.API_PREFIX + "/wg-invoice")
|
||||
public class WangeGengInvoiceController extends DefaultBaseController {
|
||||
|
||||
@Autowired
|
||||
private IRemoteWangGengInvoiceService remoteWangGengInvoiceSerivceImpl;
|
||||
|
||||
@ApiOperation(value = "发票信息分页列表", notes = "发票信息分页列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listpage")
|
||||
public SuccessResultList<List<InvoiceDTO>> listPage(ListPage page) {
|
||||
Map<String, Object> params = requestParams();
|
||||
page.setParams(params);
|
||||
return remoteWangGengInvoiceSerivceImpl.listPage(page, params.get("invoiceStatus") == null ? "" : params.get("invoiceStatus").toString());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "发票信息详情", notes = "发票信息详情接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "invoiceId", value = "发票信息ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("get/{invoiceId}")
|
||||
public InvoiceDTO get(@PathVariable("invoiceId") String invoiceId) {
|
||||
return remoteWangGengInvoiceSerivceImpl.get(invoiceId);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
protected SecurityComponent securityComponent;
|
||||
|
||||
@ApiOperation(value = "修改", notes = "修改接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "invoiceId", value = "发票信息ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("update/{invoiceId}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult update(@PathVariable("invoiceId") String invoiceId, @RequestBody InvoiceExamineVO invoiceExamineVO) {
|
||||
invoiceExamineVO.setUserId(securityComponent.getCurrentUser().getUserId());
|
||||
invoiceExamineVO.setUsername(securityComponent.getCurrentUser().getUserName());
|
||||
remoteWangGengInvoiceSerivceImpl.update(invoiceId, invoiceExamineVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package cn.com.tenlion.operator.controller.app.api.accountbank;
|
||||
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import cn.com.tenlion.operator.pojo.dtos.accountbank.AccountBankDTO;
|
||||
import cn.com.tenlion.operator.pojo.vos.accountbank.AccountBankVO;
|
||||
import cn.com.tenlion.operator.service.accountbank.IAccountBankService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: AccountBankAppController
|
||||
* @Description: 平台账户表
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:30:50
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "平台账户表接口")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.APP_PREFIX + "/accountbank")
|
||||
public class AccountBankAppController extends DefaultBaseController {
|
||||
|
||||
@Autowired
|
||||
private IAccountBankService accountBankService;
|
||||
|
||||
@ApiOperation(value = "新增平台账户表", notes = "新增平台账户表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("save")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult save(@RequestHeader("token") String token, @RequestBody AccountBankVO accountBankVO) {
|
||||
accountBankService.save(token, accountBankVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除平台账户表(id列表)", notes = "删除平台账户表(id列表)接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||
@ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@DeleteMapping("remove/{ids}")
|
||||
public SuccessResult remove(@RequestHeader("token") String token, @PathVariable("ids") String ids) {
|
||||
accountBankService.remove(token, Arrays.asList(ids.split("\\_")));
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改平台账户表", notes = "修改平台账户表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||
@ApiImplicitParam(name = "accountBankId", value = "平台账户表ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("updateaccountbank/{accountBankId}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult updateAccountBank(@RequestHeader("token") String token, @PathVariable("accountBankId") String accountBankId, @RequestBody AccountBankVO accountBankVO) {
|
||||
accountBankService.update(token, accountBankId, accountBankVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台账户表详情(通过ID)", notes = "平台账户表详情(通过ID)接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||
@ApiImplicitParam(name = "accountBankId", value = "平台账户表ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("get/{accountBankId}")
|
||||
public AccountBankDTO get(@RequestHeader("token") String token, @PathVariable("accountBankId") String accountBankId) {
|
||||
return accountBankService.get(accountBankId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台账户表列表", notes = "平台账户表列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list")
|
||||
public List<AccountBankDTO> list(@RequestHeader("token") String token) {
|
||||
Map<String, Object> params = requestParams();
|
||||
return accountBankService.list(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台账户表分页列表", notes = "平台账户表分页列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listpageaccountbank")
|
||||
public SuccessResultList<List<AccountBankDTO>> listPage(@RequestHeader("token") String token, ListPage page) {
|
||||
Map<String, Object> params = requestParams();
|
||||
page.setParams(params);
|
||||
return accountBankService.listPage(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台账户表统计", notes = "平台账户表统计接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("count")
|
||||
SuccessResultData<Integer> count() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return new SuccessResultData<>(accountBankService.count(params));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package cn.com.tenlion.operator.controller.app.api.agreement;
|
||||
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import cn.com.tenlion.operator.pojo.dtos.agreement.AgreementDTO;
|
||||
import cn.com.tenlion.operator.pojo.vos.agreement.AgreementVO;
|
||||
import cn.com.tenlion.operator.service.agreement.IAgreementService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: AgreementAppController
|
||||
* @Description: 平台协议管理
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:32:44
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "平台协议管理接口")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.APP_PREFIX + "/agreement")
|
||||
public class AgreementAppController extends DefaultBaseController {
|
||||
|
||||
@Autowired
|
||||
private IAgreementService agreementService;
|
||||
|
||||
@ApiOperation(value = "新增平台协议管理", notes = "新增平台协议管理接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("save")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult save(@RequestHeader("token") String token, @RequestBody AgreementVO agreementVO) {
|
||||
agreementService.save(token, agreementVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除平台协议管理(id列表)", notes = "删除平台协议管理(id列表)接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||
@ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@DeleteMapping("remove/{ids}")
|
||||
public SuccessResult remove(@RequestHeader("token") String token, @PathVariable("ids") String ids) {
|
||||
agreementService.remove(token, Arrays.asList(ids.split("\\_")));
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改平台协议管理", notes = "修改平台协议管理接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||
@ApiImplicitParam(name = "agreementId", value = "平台协议管理ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("updateagreement/{agreementId}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult updateAgreement(@RequestHeader("token") String token, @PathVariable("agreementId") String agreementId, @RequestBody AgreementVO agreementVO) {
|
||||
agreementService.update(token, agreementId, agreementVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台协议管理详情(通过ID)", notes = "平台协议管理详情(通过ID)接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||
@ApiImplicitParam(name = "agreementId", value = "平台协议管理ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("get/{agreementId}")
|
||||
public AgreementDTO get(@RequestHeader("token") String token, @PathVariable("agreementId") String agreementId) {
|
||||
return agreementService.get(agreementId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台协议管理列表", notes = "平台协议管理列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list")
|
||||
public List<AgreementDTO> list(@RequestHeader("token") String token) {
|
||||
Map<String, Object> params = requestParams();
|
||||
return agreementService.list(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台协议管理分页列表", notes = "平台协议管理分页列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listpageagreement")
|
||||
public SuccessResultList<List<AgreementDTO>> listPage(@RequestHeader("token") String token, ListPage page) {
|
||||
Map<String, Object> params = requestParams();
|
||||
page.setParams(params);
|
||||
return agreementService.listPage(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台协议管理统计", notes = "平台协议管理统计接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("count")
|
||||
SuccessResultData<Integer> count() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return new SuccessResultData<>(agreementService.count(params));
|
||||
}
|
||||
|
||||
}
|
@ -1,7 +1,9 @@
|
||||
package cn.com.tenlion.operator.controller.resource.account;
|
||||
|
||||
import cn.com.tenlion.operator.pojo.bos.account.AccountBO;
|
||||
import cn.com.tenlion.operator.pojo.dtos.accountbank.AccountBankDTO;
|
||||
import cn.com.tenlion.operator.pojo.vos.accountitem.AccountItemOrderVO;
|
||||
import cn.com.tenlion.operator.service.accountbank.IAccountBankService;
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
@ -37,6 +39,9 @@ public class AccountResourceController extends DefaultBaseController {
|
||||
@Autowired
|
||||
private IAccountService accountService;
|
||||
|
||||
@Autowired
|
||||
private IAccountBankService iAccountBankService;
|
||||
|
||||
@ApiOperation(value = "客户账户详情", notes = "客户账户详情接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ -55,11 +60,13 @@ public class AccountResourceController extends DefaultBaseController {
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("system-bank")
|
||||
public Map<String, String> systemBank() {
|
||||
AccountDTO accountDTO = accountService.getByUserId("1");
|
||||
AccountBankDTO bankDTO = iAccountBankService.getOpen();
|
||||
Map<String, String> map = new HashMap<>();
|
||||
map.put("bankName", accountDTO.getBankName());
|
||||
map.put("bankAccountName", accountDTO.getBankAccountName());
|
||||
map.put("bankNumber", accountDTO.getBankNumber());
|
||||
map.put("bankName", bankDTO.getBankName());
|
||||
map.put("bankAccountName", bankDTO.getBankAccountName());
|
||||
map.put("bankNumber", bankDTO.getBankNumber());
|
||||
map.put("bankUnionpayNumber", bankDTO.getBankUnionpayNumber());
|
||||
map.put("bankRemark", bankDTO.getBankRemark());
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,121 @@
|
||||
package cn.com.tenlion.operator.controller.resource.accountbank;
|
||||
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import cn.com.tenlion.operator.pojo.dtos.accountbank.AccountBankDTO;
|
||||
import cn.com.tenlion.operator.pojo.vos.accountbank.AccountBankVO;
|
||||
import cn.com.tenlion.operator.service.accountbank.IAccountBankService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: AccountBankResourceController
|
||||
* @Description: 平台账户表
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:30:50
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Api(tags = ISystemConstant.API_TAGS_RESOURCE_PREFIX + "平台账户表接口")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.RESOURCE_PREFIX + "/accountbank")
|
||||
public class AccountBankResourceController extends DefaultBaseController {
|
||||
|
||||
@Autowired
|
||||
private IAccountBankService accountBankService;
|
||||
|
||||
@ApiOperation(value = "新增平台账户表", notes = "新增平台账户表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("save")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult save(@RequestBody AccountBankVO accountBankVO) {
|
||||
accountBankService.save(accountBankVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除平台账户表(id列表)", notes = "删除平台账户表(id列表)接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@DeleteMapping("remove/{ids}")
|
||||
public SuccessResult remove(@PathVariable("ids") String ids) {
|
||||
accountBankService.remove(Arrays.asList(ids.split("\\_")));
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改平台账户表", notes = "修改平台账户表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "accountBankId", value = "平台账户表ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("update/{accountBankId}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult update(@PathVariable("accountBankId") String accountBankId, @RequestBody AccountBankVO accountBankVO) {
|
||||
accountBankService.update(accountBankId, accountBankVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台账户表详情", notes = "平台账户表详情接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "accountBankId", value = "平台账户表ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("get/{accountBankId}")
|
||||
public AccountBankDTO get(@PathVariable("accountBankId") String accountBankId) {
|
||||
return accountBankService.get(accountBankId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台账户表列表", notes = "平台账户表列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list")
|
||||
public List<AccountBankDTO> list() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return accountBankService.list(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台账户表分页列表", notes = "平台账户表分页列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listpage")
|
||||
public SuccessResultList<List<AccountBankDTO>> listPage(ListPage page) {
|
||||
Map<String, Object> params = requestParams();
|
||||
page.setParams(params);
|
||||
return accountBankService.listPage(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台账户表统计", notes = "平台账户表统计接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("count")
|
||||
SuccessResultData<Integer> count() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return new SuccessResultData<>(accountBankService.count(params));
|
||||
}
|
||||
|
||||
}
|
@ -3,9 +3,12 @@ package cn.com.tenlion.operator.controller.resource.accountitem;
|
||||
import cn.com.tenlion.operator.pojo.bos.accountitem.AccountItemBO;
|
||||
import cn.com.tenlion.operator.pojo.dtos.agent.AgentDTO;
|
||||
import cn.com.tenlion.operator.pojo.vos.accountitem.AccountItemOrderVO;
|
||||
import cn.com.tenlion.operator.util.EncryptUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.common.component.SecurityComponent;
|
||||
import ink.wgink.exceptions.SaveException;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
@ -19,7 +22,10 @@ import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -48,7 +54,22 @@ public class AccountItemResourceController extends DefaultBaseController {
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("pay-in-agent")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult payInAgent(@RequestBody AccountItemOrderVO accountItemOrderVO) {
|
||||
public SuccessResult payInAgent(@RequestBody AccountItemOrderVO accountItemOrderVO) throws Exception {
|
||||
String code = EncryptUtil.decode(accountItemOrderVO.getCode());
|
||||
JSONObject jsonObject = JSONObject.parseObject(code);
|
||||
String time = jsonObject.getString("time");
|
||||
Integer money = jsonObject.getInteger("money");
|
||||
String userId = jsonObject.getString("userId");
|
||||
String orderId = jsonObject.getString("orderId");
|
||||
Date dateTime = sdf.parse(time);
|
||||
long diffInMillis = Math.abs(System.currentTimeMillis() - dateTime.getTime());
|
||||
int secondsDiff = (int)(diffInMillis / 1000);
|
||||
if (secondsDiff > 30) {
|
||||
throw new SaveException("鉴权失败");
|
||||
}
|
||||
if (!money.equals(accountItemOrderVO.getAccountMoney()) || !userId.equals(accountItemOrderVO.getUserId()) || !orderId.equals(accountItemOrderVO.getOrderId())) {
|
||||
throw new SaveException("鉴权失败");
|
||||
}
|
||||
AccountItemVO accountItemVO = new AccountItemVO();
|
||||
accountItemVO.setMode(1); // 入账
|
||||
accountItemVO.setType(5); // 收入类型 订单收入
|
||||
@ -68,7 +89,22 @@ public class AccountItemResourceController extends DefaultBaseController {
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("pay-in/{type}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult payIn(@PathVariable("type") String type, @RequestBody AccountItemOrderVO accountItemOrderVO) {
|
||||
public SuccessResult payIn(@PathVariable("type") String type, @RequestBody AccountItemOrderVO accountItemOrderVO) throws Exception {
|
||||
String code = EncryptUtil.decode(accountItemOrderVO.getCode());
|
||||
JSONObject jsonObject = JSONObject.parseObject(code);
|
||||
String time = jsonObject.getString("time");
|
||||
Integer money = jsonObject.getInteger("money");
|
||||
String userId = jsonObject.getString("userId");
|
||||
String orderId = jsonObject.getString("orderId");
|
||||
Date dateTime = sdf.parse(time);
|
||||
long diffInMillis = Math.abs(System.currentTimeMillis() - dateTime.getTime());
|
||||
int secondsDiff = (int)(diffInMillis / 1000);
|
||||
if (secondsDiff > 30) {
|
||||
throw new SaveException("鉴权失败");
|
||||
}
|
||||
if (!money.equals(accountItemOrderVO.getAccountMoney()) || !userId.equals(accountItemOrderVO.getUserId()) || !orderId.equals(accountItemOrderVO.getOrderId())) {
|
||||
throw new SaveException("鉴权失败");
|
||||
}
|
||||
AccountItemVO accountItemVO = new AccountItemVO();
|
||||
accountItemVO.setMode(1); // 入账
|
||||
accountItemVO.setType(accountItemOrderVO.getType() == 1 || accountItemOrderVO.getType() == 5 ? accountItemOrderVO.getType() : 5); // 收入类型 充值 | 订单收入
|
||||
@ -81,6 +117,8 @@ public class AccountItemResourceController extends DefaultBaseController {
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
@ApiOperation(value = "出账/订单", notes = "出账/订单接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||
@ -88,7 +126,22 @@ public class AccountItemResourceController extends DefaultBaseController {
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("pay-out/{type}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult payOut(@PathVariable("type") String type, @RequestBody AccountItemOrderVO accountItemOrderVO) {
|
||||
public SuccessResult payOut(@PathVariable("type") String type, @RequestBody AccountItemOrderVO accountItemOrderVO) throws Exception {
|
||||
String code = EncryptUtil.decode(accountItemOrderVO.getCode());
|
||||
JSONObject jsonObject = JSONObject.parseObject(code);
|
||||
String time = jsonObject.getString("time");
|
||||
Integer money = jsonObject.getInteger("money");
|
||||
String userId = jsonObject.getString("userId");
|
||||
String orderId = jsonObject.getString("orderId");
|
||||
Date dateTime = sdf.parse(time);
|
||||
long diffInMillis = Math.abs(System.currentTimeMillis() - dateTime.getTime());
|
||||
int secondsDiff = (int)(diffInMillis / 1000);
|
||||
if (secondsDiff > 30) {
|
||||
throw new SaveException("鉴权失败");
|
||||
}
|
||||
if (!money.equals(accountItemOrderVO.getAccountMoney()) || !userId.equals(accountItemOrderVO.getUserId()) || !orderId.equals(accountItemOrderVO.getOrderId())) {
|
||||
throw new SaveException("鉴权失败");
|
||||
}
|
||||
AccountItemVO accountItemVO = new AccountItemVO();
|
||||
accountItemVO.setMode(2); // 出账
|
||||
accountItemVO.setType(accountItemOrderVO.getType() == 2 || accountItemOrderVO.getType() == 3 || accountItemOrderVO.getType() == 4 ? accountItemOrderVO.getType() : 2); // 支出类型 系统扣款 | 支出 | 提现
|
||||
|
@ -74,10 +74,10 @@ public class AccountRechargeResourceController extends DefaultBaseController {
|
||||
|
||||
@ApiOperation(value = "保存充值", notes = "保存充值接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("save-account/{thirdParty}")
|
||||
@PostMapping("save-account")
|
||||
@CheckRequestBodyAnnotation
|
||||
public AccountRechargePayDTO saveAccount(@PathVariable("thirdParty") String thirdParty, @RequestBody AccountRechargeVO accountRechargeVO) {
|
||||
AccountRechargePayDTO url = accountRechargeService.saveAccount(thirdParty, accountRechargeVO);
|
||||
public AccountRechargePayDTO saveAccount(@RequestBody AccountRechargeVO accountRechargeVO) {
|
||||
AccountRechargePayDTO url = accountRechargeService.saveAccount(accountRechargeVO.getThirdParty(), accountRechargeVO);
|
||||
return url;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,121 @@
|
||||
package cn.com.tenlion.operator.controller.resource.agreement;
|
||||
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import cn.com.tenlion.operator.pojo.dtos.agreement.AgreementDTO;
|
||||
import cn.com.tenlion.operator.pojo.vos.agreement.AgreementVO;
|
||||
import cn.com.tenlion.operator.service.agreement.IAgreementService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: AgreementResourceController
|
||||
* @Description: 平台协议管理
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:32:44
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Api(tags = ISystemConstant.API_TAGS_RESOURCE_PREFIX + "平台协议管理接口")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.RESOURCE_PREFIX + "/agreement")
|
||||
public class AgreementResourceController extends DefaultBaseController {
|
||||
|
||||
@Autowired
|
||||
private IAgreementService agreementService;
|
||||
|
||||
@ApiOperation(value = "新增平台协议管理", notes = "新增平台协议管理接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("save")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult save(@RequestBody AgreementVO agreementVO) {
|
||||
agreementService.save(agreementVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除平台协议管理(id列表)", notes = "删除平台协议管理(id列表)接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@DeleteMapping("remove/{ids}")
|
||||
public SuccessResult remove(@PathVariable("ids") String ids) {
|
||||
agreementService.remove(Arrays.asList(ids.split("\\_")));
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改平台协议管理", notes = "修改平台协议管理接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "agreementId", value = "平台协议管理ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("update/{agreementId}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult update(@PathVariable("agreementId") String agreementId, @RequestBody AgreementVO agreementVO) {
|
||||
agreementService.update(agreementId, agreementVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台协议管理详情", notes = "平台协议管理详情接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "agreementId", value = "平台协议管理ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("get/{agreementId}")
|
||||
public AgreementDTO get(@PathVariable("agreementId") String agreementId) {
|
||||
return agreementService.get(agreementId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台协议管理列表", notes = "平台协议管理列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list")
|
||||
public List<AgreementDTO> list() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return agreementService.list(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台协议管理分页列表", notes = "平台协议管理分页列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listpage")
|
||||
public SuccessResultList<List<AgreementDTO>> listPage(ListPage page) {
|
||||
Map<String, Object> params = requestParams();
|
||||
page.setParams(params);
|
||||
return agreementService.listPage(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "平台协议管理统计", notes = "平台协议管理统计接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("count")
|
||||
SuccessResultData<Integer> count() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return new SuccessResultData<>(agreementService.count(params));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package cn.com.tenlion.operator.controller.route.accountbank;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import cn.com.tenlion.operator.service.accountbank.IAccountBankService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: AccountBankController
|
||||
* @Description: 平台账户表
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:30:50
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Api(tags = ISystemConstant.ROUTE_TAGS_PREFIX + "平台账户表路由")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/accountbank")
|
||||
public class AccountBankRouteController extends DefaultBaseController {
|
||||
|
||||
@GetMapping("save")
|
||||
public ModelAndView save() {
|
||||
return new ModelAndView("accountbank/save");
|
||||
}
|
||||
|
||||
@GetMapping("update")
|
||||
public ModelAndView update() {
|
||||
return new ModelAndView("accountbank/update");
|
||||
}
|
||||
|
||||
@GetMapping("list")
|
||||
public ModelAndView list() {
|
||||
return new ModelAndView("accountbank/list");
|
||||
}
|
||||
|
||||
}
|
@ -83,6 +83,7 @@ public class AccountRechargeRouteController extends DefaultBaseController {
|
||||
public ModelAndView update(String accountRechargeId) {
|
||||
ModelAndView mv = new ModelAndView("accountrecharge/update");
|
||||
mv.addObject("dto" , iAccountRechargeService.get(accountRechargeId));
|
||||
mv.addObject("AiServerUrl" , ProjectConfigUtil.getText("AiServerUrl"));
|
||||
return mv;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,42 @@
|
||||
package cn.com.tenlion.operator.controller.route.agreement;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import cn.com.tenlion.operator.service.agreement.IAgreementService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: AgreementController
|
||||
* @Description: 平台协议管理
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:32:44
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Api(tags = ISystemConstant.ROUTE_TAGS_PREFIX + "平台协议管理路由")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/agreement")
|
||||
public class AgreementRouteController extends DefaultBaseController {
|
||||
|
||||
@GetMapping("save")
|
||||
public ModelAndView save() {
|
||||
return new ModelAndView("agreement/save");
|
||||
}
|
||||
|
||||
@GetMapping("update")
|
||||
public ModelAndView update() {
|
||||
return new ModelAndView("agreement/update");
|
||||
}
|
||||
|
||||
@GetMapping("list")
|
||||
public ModelAndView list() {
|
||||
return new ModelAndView("agreement/list");
|
||||
}
|
||||
|
||||
}
|
@ -68,13 +68,14 @@ public class SystemUserRouteController extends DefaultBaseController {
|
||||
if (roleSimpleDTOList == null || roleSimpleDTOList.size() < 1) {
|
||||
throw new SaveException("角色不存在");
|
||||
}
|
||||
if(roleSimpleDTOList.get(0).getRoleName().contains("企业") || roleSimpleDTOList.get(0).getRoleName().contains("个人")) {
|
||||
if(roleSimpleDTOList.get(0).getRoleName().contains("普通用户")) {
|
||||
return new ModelAndView(new RedirectView(ProjectConfigUtil.getText("AiServerUrl")));
|
||||
}else if(roleSimpleDTOList.get(0).getRoleName().contains("代理商")) {
|
||||
return new ModelAndView(new RedirectView(ProjectConfigUtil.getText("AgentServerUrl")));
|
||||
}else{
|
||||
}else if(roleSimpleDTOList.get(0).getRoleName().contains("运营平台") || userInfoBO.getUserId().equals("1")){
|
||||
return new ModelAndView("forward:/default-main");
|
||||
}
|
||||
return new ModelAndView("systemuser/login?error=无权限访问");
|
||||
}
|
||||
|
||||
@GetMapping("select")
|
||||
|
@ -0,0 +1,55 @@
|
||||
package cn.com.tenlion.operator.controller.route.wg;
|
||||
|
||||
import cn.com.tenlion.operator.util.UserUtil;
|
||||
import cn.com.tenlion.projectconfig.util.ProjectConfigUtil;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.common.component.SecurityComponent;
|
||||
import ink.wgink.exceptions.SaveException;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.interfaces.role.IRoleBaseService;
|
||||
import ink.wgink.interfaces.user.IUserBaseService;
|
||||
import ink.wgink.login.base.consts.IUserCenterConst;
|
||||
import ink.wgink.login.base.service.IOAuthService;
|
||||
import ink.wgink.login.base.service.login.ILoginFormService;
|
||||
import ink.wgink.pojo.bos.UserInfoBO;
|
||||
import ink.wgink.pojo.dtos.role.RoleSimpleDTO;
|
||||
import ink.wgink.properties.ServerProperties;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.web.servlet.view.RedirectView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Api(tags = ISystemConstant.ROUTE_TAGS_PREFIX + "AI系统")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/wg")
|
||||
public class WgRouteController extends DefaultBaseController {
|
||||
|
||||
|
||||
@GetMapping("list")
|
||||
public ModelAndView list() {
|
||||
return new ModelAndView("wg/list");
|
||||
}
|
||||
|
||||
@GetMapping("list-check")
|
||||
public ModelAndView listCheck() {
|
||||
return new ModelAndView("wg/list-check");
|
||||
}
|
||||
|
||||
@GetMapping("update")
|
||||
public ModelAndView update() {
|
||||
return new ModelAndView("wg/update");
|
||||
}
|
||||
|
||||
@GetMapping("show")
|
||||
public ModelAndView show() {
|
||||
return new ModelAndView("wg/show");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,123 @@
|
||||
package cn.com.tenlion.operator.dao.accountbank;
|
||||
|
||||
import ink.wgink.exceptions.RemoveException;
|
||||
import ink.wgink.exceptions.SaveException;
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.exceptions.UpdateException;
|
||||
import cn.com.tenlion.operator.pojo.bos.accountbank.AccountBankBO;
|
||||
import cn.com.tenlion.operator.pojo.pos.accountbank.AccountBankPO;
|
||||
import cn.com.tenlion.operator.pojo.dtos.accountbank.AccountBankDTO;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: IAccountBankDao
|
||||
* @Description: 平台账户表
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:30:50
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Repository
|
||||
public interface IAccountBankDao {
|
||||
|
||||
/**
|
||||
* 新增平台账户表
|
||||
*
|
||||
* @param params
|
||||
* @throws SaveException
|
||||
*/
|
||||
void save(Map<String, Object> params) throws SaveException;
|
||||
|
||||
/**
|
||||
* 删除平台账户表
|
||||
*
|
||||
* @param params
|
||||
* @throws RemoveException
|
||||
*/
|
||||
void remove(Map<String, Object> params) throws RemoveException;
|
||||
|
||||
/**
|
||||
* 删除平台账户表(物理)
|
||||
*
|
||||
* @param params
|
||||
* @throws RemoveException
|
||||
*/
|
||||
void delete(Map<String, Object> params) throws RemoveException;
|
||||
|
||||
/**
|
||||
* 修改平台账户表
|
||||
*
|
||||
* @param params
|
||||
* @throws UpdateException
|
||||
*/
|
||||
void update(Map<String, Object> params) throws UpdateException;
|
||||
|
||||
/**
|
||||
* 平台账户表详情
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
AccountBankDTO get(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 平台账户表详情
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
AccountBankBO getBO(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 平台账户表详情
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
AccountBankPO getPO(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 平台账户表列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
List<AccountBankDTO> list(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 平台账户表列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
List<AccountBankBO> listBO(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 平台账户表列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
List<AccountBankPO> listPO(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 平台账户表统计
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
Integer count(Map<String, Object> params) throws SearchException;
|
||||
|
||||
void updateSwitch(Map<String, Object> updateParam);
|
||||
|
||||
AccountBankDTO getOpen(Map<String, Object> params);
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package cn.com.tenlion.operator.dao.agreement;
|
||||
|
||||
import ink.wgink.exceptions.RemoveException;
|
||||
import ink.wgink.exceptions.SaveException;
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.exceptions.UpdateException;
|
||||
import cn.com.tenlion.operator.pojo.bos.agreement.AgreementBO;
|
||||
import cn.com.tenlion.operator.pojo.pos.agreement.AgreementPO;
|
||||
import cn.com.tenlion.operator.pojo.dtos.agreement.AgreementDTO;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: IAgreementDao
|
||||
* @Description: 平台协议管理
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:32:44
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Repository
|
||||
public interface IAgreementDao {
|
||||
|
||||
/**
|
||||
* 新增平台协议管理
|
||||
*
|
||||
* @param params
|
||||
* @throws SaveException
|
||||
*/
|
||||
void save(Map<String, Object> params) throws SaveException;
|
||||
|
||||
/**
|
||||
* 删除平台协议管理
|
||||
*
|
||||
* @param params
|
||||
* @throws RemoveException
|
||||
*/
|
||||
void remove(Map<String, Object> params) throws RemoveException;
|
||||
|
||||
/**
|
||||
* 删除平台协议管理(物理)
|
||||
*
|
||||
* @param params
|
||||
* @throws RemoveException
|
||||
*/
|
||||
void delete(Map<String, Object> params) throws RemoveException;
|
||||
|
||||
/**
|
||||
* 修改平台协议管理
|
||||
*
|
||||
* @param params
|
||||
* @throws UpdateException
|
||||
*/
|
||||
void update(Map<String, Object> params) throws UpdateException;
|
||||
|
||||
/**
|
||||
* 平台协议管理详情
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
AgreementDTO get(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 平台协议管理详情
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
AgreementBO getBO(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 平台协议管理详情
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
AgreementPO getPO(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 平台协议管理列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
List<AgreementDTO> list(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 平台协议管理列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
List<AgreementBO> listBO(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 平台协议管理列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
List<AgreementPO> listPO(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 平台协议管理统计
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
Integer count(Map<String, Object> params) throws SearchException;
|
||||
|
||||
AgreementDTO getByType(String type);
|
||||
}
|
@ -0,0 +1,123 @@
|
||||
package cn.com.tenlion.operator.pojo.bos.accountbank;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: AccountBankBO
|
||||
* @Description: 平台账户表
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:30:50
|
||||
* @Version: 3.0
|
||||
**/
|
||||
public class AccountBankBO {
|
||||
|
||||
private String accountBankId;
|
||||
private String bankName;
|
||||
private String bankNumber;
|
||||
private String bankAccountName;
|
||||
private String bankUnionpayNumber;
|
||||
private String bankRemark;
|
||||
private String bankSwitch;
|
||||
private String gmtCreate;
|
||||
private String creator;
|
||||
private String gmtModified;
|
||||
private String modifier;
|
||||
private Integer isDelete;
|
||||
|
||||
public String getAccountBankId() {
|
||||
return accountBankId == null ? "" : accountBankId.trim();
|
||||
}
|
||||
|
||||
public void setAccountBankId(String accountBankId) {
|
||||
this.accountBankId = accountBankId;
|
||||
}
|
||||
|
||||
public String getBankName() {
|
||||
return bankName == null ? "" : bankName.trim();
|
||||
}
|
||||
|
||||
public void setBankName(String bankName) {
|
||||
this.bankName = bankName;
|
||||
}
|
||||
|
||||
public String getBankNumber() {
|
||||
return bankNumber == null ? "" : bankNumber.trim();
|
||||
}
|
||||
|
||||
public void setBankNumber(String bankNumber) {
|
||||
this.bankNumber = bankNumber;
|
||||
}
|
||||
|
||||
public String getBankAccountName() {
|
||||
return bankAccountName == null ? "" : bankAccountName.trim();
|
||||
}
|
||||
|
||||
public void setBankAccountName(String bankAccountName) {
|
||||
this.bankAccountName = bankAccountName;
|
||||
}
|
||||
|
||||
public String getBankUnionpayNumber() {
|
||||
return bankUnionpayNumber == null ? "" : bankUnionpayNumber.trim();
|
||||
}
|
||||
|
||||
public void setBankUnionpayNumber(String bankUnionpayNumber) {
|
||||
this.bankUnionpayNumber = bankUnionpayNumber;
|
||||
}
|
||||
|
||||
public String getBankRemark() {
|
||||
return bankRemark == null ? "" : bankRemark.trim();
|
||||
}
|
||||
|
||||
public void setBankRemark(String bankRemark) {
|
||||
this.bankRemark = bankRemark;
|
||||
}
|
||||
|
||||
public String getBankSwitch() {
|
||||
return bankSwitch == null ? "" : bankSwitch.trim();
|
||||
}
|
||||
|
||||
public void setBankSwitch(String bankSwitch) {
|
||||
this.bankSwitch = bankSwitch;
|
||||
}
|
||||
|
||||
public String getGmtCreate() {
|
||||
return gmtCreate == null ? "" : gmtCreate.trim();
|
||||
}
|
||||
|
||||
public void setGmtCreate(String gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator == null ? "" : creator.trim();
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getGmtModified() {
|
||||
return gmtModified == null ? "" : gmtModified.trim();
|
||||
}
|
||||
|
||||
public void setGmtModified(String gmtModified) {
|
||||
this.gmtModified = gmtModified;
|
||||
}
|
||||
|
||||
public String getModifier() {
|
||||
return modifier == null ? "" : modifier.trim();
|
||||
}
|
||||
|
||||
public void setModifier(String modifier) {
|
||||
this.modifier = modifier;
|
||||
}
|
||||
|
||||
public Integer getIsDelete() {
|
||||
return isDelete == null ? 0 : isDelete;
|
||||
}
|
||||
|
||||
public void setIsDelete(Integer isDelete) {
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
package cn.com.tenlion.operator.pojo.bos.agreement;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: AgreementBO
|
||||
* @Description: 平台协议管理
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:32:44
|
||||
* @Version: 3.0
|
||||
**/
|
||||
public class AgreementBO {
|
||||
|
||||
private String agreementId;
|
||||
private String agreementTitle;
|
||||
private String agreementType;
|
||||
private String agreementContent;
|
||||
private String agreementSwitch;
|
||||
private Double agreementVersion;
|
||||
private String gmtCreate;
|
||||
private String creator;
|
||||
private String modifier;
|
||||
private String gmtModified;
|
||||
private Integer isDelete;
|
||||
|
||||
public String getAgreementId() {
|
||||
return agreementId == null ? "" : agreementId.trim();
|
||||
}
|
||||
|
||||
public void setAgreementId(String agreementId) {
|
||||
this.agreementId = agreementId;
|
||||
}
|
||||
|
||||
public String getAgreementTitle() {
|
||||
return agreementTitle == null ? "" : agreementTitle.trim();
|
||||
}
|
||||
|
||||
public void setAgreementTitle(String agreementTitle) {
|
||||
this.agreementTitle = agreementTitle;
|
||||
}
|
||||
|
||||
public String getAgreementType() {
|
||||
return agreementType == null ? "" : agreementType.trim();
|
||||
}
|
||||
|
||||
public void setAgreementType(String agreementType) {
|
||||
this.agreementType = agreementType;
|
||||
}
|
||||
|
||||
public String getAgreementContent() {
|
||||
return agreementContent == null ? "" : agreementContent.trim();
|
||||
}
|
||||
|
||||
public void setAgreementContent(String agreementContent) {
|
||||
this.agreementContent = agreementContent;
|
||||
}
|
||||
|
||||
public String getAgreementSwitch() {
|
||||
return agreementSwitch == null ? "" : agreementSwitch.trim();
|
||||
}
|
||||
|
||||
public void setAgreementSwitch(String agreementSwitch) {
|
||||
this.agreementSwitch = agreementSwitch;
|
||||
}
|
||||
|
||||
public Double getAgreementVersion() {
|
||||
return agreementVersion == null ? 0D : agreementVersion;
|
||||
}
|
||||
|
||||
public void setAgreementVersion(Double agreementVersion) {
|
||||
this.agreementVersion = agreementVersion;
|
||||
}
|
||||
|
||||
public String getGmtCreate() {
|
||||
return gmtCreate == null ? "" : gmtCreate.trim();
|
||||
}
|
||||
|
||||
public void setGmtCreate(String gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator == null ? "" : creator.trim();
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getModifier() {
|
||||
return modifier == null ? "" : modifier.trim();
|
||||
}
|
||||
|
||||
public void setModifier(String modifier) {
|
||||
this.modifier = modifier;
|
||||
}
|
||||
|
||||
public String getGmtModified() {
|
||||
return gmtModified == null ? "" : gmtModified.trim();
|
||||
}
|
||||
|
||||
public void setGmtModified(String gmtModified) {
|
||||
this.gmtModified = gmtModified;
|
||||
}
|
||||
|
||||
public Integer getIsDelete() {
|
||||
return isDelete == null ? 0 : isDelete;
|
||||
}
|
||||
|
||||
public void setIsDelete(Integer isDelete) {
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,139 @@
|
||||
package cn.com.tenlion.operator.pojo.dtos.accountbank;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: AccountBankDTO
|
||||
* @Description: 平台账户表
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:30:50
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@ApiModel
|
||||
public class AccountBankDTO {
|
||||
|
||||
@ApiModelProperty(name = "accountBankId", value = "平台收款号码")
|
||||
private String accountBankId;
|
||||
@ApiModelProperty(name = "bankName", value = "开户银行")
|
||||
private String bankName;
|
||||
@ApiModelProperty(name = "bankNumber", value = "银行账号")
|
||||
private String bankNumber;
|
||||
@ApiModelProperty(name = "bankAccountName", value = "公司名称")
|
||||
private String bankAccountName;
|
||||
@ApiModelProperty(name = "bankUnionpayNumber", value = "银行联行号")
|
||||
private String bankUnionpayNumber;
|
||||
@ApiModelProperty(name = "bankRemark", value = "备注")
|
||||
private String bankRemark;
|
||||
@ApiModelProperty(name = "bankSwitch", value = "开关")
|
||||
private String bankSwitch;
|
||||
@ApiModelProperty(name = "gmtCreate", value = "")
|
||||
private String gmtCreate;
|
||||
@ApiModelProperty(name = "creator", value = "")
|
||||
private String creator;
|
||||
@ApiModelProperty(name = "gmtModified", value = "")
|
||||
private String gmtModified;
|
||||
@ApiModelProperty(name = "modifier", value = "")
|
||||
private String modifier;
|
||||
@ApiModelProperty(name = "isDelete", value = "")
|
||||
private Integer isDelete;
|
||||
|
||||
public String getAccountBankId() {
|
||||
return accountBankId == null ? "" : accountBankId.trim();
|
||||
}
|
||||
|
||||
public void setAccountBankId(String accountBankId) {
|
||||
this.accountBankId = accountBankId;
|
||||
}
|
||||
|
||||
public String getBankName() {
|
||||
return bankName == null ? "" : bankName.trim();
|
||||
}
|
||||
|
||||
public void setBankName(String bankName) {
|
||||
this.bankName = bankName;
|
||||
}
|
||||
|
||||
public String getBankNumber() {
|
||||
return bankNumber == null ? "" : bankNumber.trim();
|
||||
}
|
||||
|
||||
public void setBankNumber(String bankNumber) {
|
||||
this.bankNumber = bankNumber;
|
||||
}
|
||||
|
||||
public String getBankAccountName() {
|
||||
return bankAccountName == null ? "" : bankAccountName.trim();
|
||||
}
|
||||
|
||||
public void setBankAccountName(String bankAccountName) {
|
||||
this.bankAccountName = bankAccountName;
|
||||
}
|
||||
|
||||
public String getBankUnionpayNumber() {
|
||||
return bankUnionpayNumber == null ? "" : bankUnionpayNumber.trim();
|
||||
}
|
||||
|
||||
public void setBankUnionpayNumber(String bankUnionpayNumber) {
|
||||
this.bankUnionpayNumber = bankUnionpayNumber;
|
||||
}
|
||||
|
||||
public String getBankRemark() {
|
||||
return bankRemark == null ? "" : bankRemark.trim();
|
||||
}
|
||||
|
||||
public void setBankRemark(String bankRemark) {
|
||||
this.bankRemark = bankRemark;
|
||||
}
|
||||
|
||||
public String getBankSwitch() {
|
||||
return bankSwitch == null ? "" : bankSwitch.trim();
|
||||
}
|
||||
|
||||
public void setBankSwitch(String bankSwitch) {
|
||||
this.bankSwitch = bankSwitch;
|
||||
}
|
||||
|
||||
public String getGmtCreate() {
|
||||
return gmtCreate == null ? "" : gmtCreate.trim();
|
||||
}
|
||||
|
||||
public void setGmtCreate(String gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator == null ? "" : creator.trim();
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getGmtModified() {
|
||||
return gmtModified == null ? "" : gmtModified.trim();
|
||||
}
|
||||
|
||||
public void setGmtModified(String gmtModified) {
|
||||
this.gmtModified = gmtModified;
|
||||
}
|
||||
|
||||
public String getModifier() {
|
||||
return modifier == null ? "" : modifier.trim();
|
||||
}
|
||||
|
||||
public void setModifier(String modifier) {
|
||||
this.modifier = modifier;
|
||||
}
|
||||
|
||||
public Integer getIsDelete() {
|
||||
return isDelete == null ? 0 : isDelete;
|
||||
}
|
||||
|
||||
public void setIsDelete(Integer isDelete) {
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -23,6 +23,16 @@ public class AccountRechargePayResultDTO {
|
||||
private String orderSuccessTime;
|
||||
@ApiModelProperty(name = "orderMessage", value = "提示")
|
||||
private String orderMessage;
|
||||
@ApiModelProperty(name = "money", value = "总金额")
|
||||
private Integer money;
|
||||
|
||||
public Integer getMoney() {
|
||||
return money == null ? 0 : money;
|
||||
}
|
||||
|
||||
public void setMoney(Integer money) {
|
||||
this.money = money;
|
||||
}
|
||||
|
||||
public String getOrderMessage() {
|
||||
return orderMessage == null ? "" : orderMessage.trim();
|
||||
|
@ -39,7 +39,7 @@ public class AccountWithdrawalDTO {
|
||||
private String withdrawTransferVoucher;
|
||||
@ApiModelProperty(name = "bankAccountName", value = "收款人银行卡户名")
|
||||
private String bankAccountName;
|
||||
@ApiModelProperty(name = "bankNumber", value = "收款人银行卡号")
|
||||
@ApiModelProperty(name = "bankNumber", value = "收款人银行账号")
|
||||
private String bankNumber;
|
||||
@ApiModelProperty(name = "bankName", value = "收款人银行卡开户行")
|
||||
private String bankName;
|
||||
|
@ -0,0 +1,129 @@
|
||||
package cn.com.tenlion.operator.pojo.dtos.agreement;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: AgreementDTO
|
||||
* @Description: 平台协议管理
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:32:44
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@ApiModel
|
||||
public class AgreementDTO {
|
||||
|
||||
@ApiModelProperty(name = "agreementId", value = "协议ID")
|
||||
private String agreementId;
|
||||
@ApiModelProperty(name = "agreementTitle", value = "协议标题")
|
||||
private String agreementTitle;
|
||||
@ApiModelProperty(name = "agreementType", value = "协议类型")
|
||||
private String agreementType;
|
||||
@ApiModelProperty(name = "agreementContent", value = "协议内容")
|
||||
private String agreementContent;
|
||||
@ApiModelProperty(name = "agreementSwitch", value = "协议开关")
|
||||
private String agreementSwitch;
|
||||
@ApiModelProperty(name = "agreementVersion", value = "协议版本")
|
||||
private Double agreementVersion;
|
||||
@ApiModelProperty(name = "gmtCreate", value = "")
|
||||
private String gmtCreate;
|
||||
@ApiModelProperty(name = "creator", value = "")
|
||||
private String creator;
|
||||
@ApiModelProperty(name = "modifier", value = "")
|
||||
private String modifier;
|
||||
@ApiModelProperty(name = "gmtModified", value = "")
|
||||
private String gmtModified;
|
||||
@ApiModelProperty(name = "isDelete", value = "")
|
||||
private Integer isDelete;
|
||||
|
||||
public String getAgreementId() {
|
||||
return agreementId == null ? "" : agreementId.trim();
|
||||
}
|
||||
|
||||
public void setAgreementId(String agreementId) {
|
||||
this.agreementId = agreementId;
|
||||
}
|
||||
|
||||
public String getAgreementTitle() {
|
||||
return agreementTitle == null ? "" : agreementTitle.trim();
|
||||
}
|
||||
|
||||
public void setAgreementTitle(String agreementTitle) {
|
||||
this.agreementTitle = agreementTitle;
|
||||
}
|
||||
|
||||
public String getAgreementType() {
|
||||
return agreementType == null ? "" : agreementType.trim();
|
||||
}
|
||||
|
||||
public void setAgreementType(String agreementType) {
|
||||
this.agreementType = agreementType;
|
||||
}
|
||||
|
||||
public String getAgreementContent() {
|
||||
return agreementContent == null ? "" : agreementContent.trim();
|
||||
}
|
||||
|
||||
public void setAgreementContent(String agreementContent) {
|
||||
this.agreementContent = agreementContent;
|
||||
}
|
||||
|
||||
public String getAgreementSwitch() {
|
||||
return agreementSwitch == null ? "" : agreementSwitch.trim();
|
||||
}
|
||||
|
||||
public void setAgreementSwitch(String agreementSwitch) {
|
||||
this.agreementSwitch = agreementSwitch;
|
||||
}
|
||||
|
||||
public Double getAgreementVersion() {
|
||||
return agreementVersion == null ? 0D : agreementVersion;
|
||||
}
|
||||
|
||||
public void setAgreementVersion(Double agreementVersion) {
|
||||
this.agreementVersion = agreementVersion;
|
||||
}
|
||||
|
||||
public String getGmtCreate() {
|
||||
return gmtCreate == null ? "" : gmtCreate.trim();
|
||||
}
|
||||
|
||||
public void setGmtCreate(String gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator == null ? "" : creator.trim();
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getModifier() {
|
||||
return modifier == null ? "" : modifier.trim();
|
||||
}
|
||||
|
||||
public void setModifier(String modifier) {
|
||||
this.modifier = modifier;
|
||||
}
|
||||
|
||||
public String getGmtModified() {
|
||||
return gmtModified == null ? "" : gmtModified.trim();
|
||||
}
|
||||
|
||||
public void setGmtModified(String gmtModified) {
|
||||
this.gmtModified = gmtModified;
|
||||
}
|
||||
|
||||
public Integer getIsDelete() {
|
||||
return isDelete == null ? 0 : isDelete;
|
||||
}
|
||||
|
||||
public void setIsDelete(Integer isDelete) {
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,123 @@
|
||||
package cn.com.tenlion.operator.pojo.pos.accountbank;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: AccountBankPO
|
||||
* @Description: 平台账户表
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:30:50
|
||||
* @Version: 3.0
|
||||
**/
|
||||
public class AccountBankPO {
|
||||
|
||||
private String accountBankId;
|
||||
private String bankName;
|
||||
private String bankNumber;
|
||||
private String bankAccountName;
|
||||
private String bankUnionpayNumber;
|
||||
private String bankRemark;
|
||||
private String bankSwitch;
|
||||
private String gmtCreate;
|
||||
private String creator;
|
||||
private String gmtModified;
|
||||
private String modifier;
|
||||
private Integer isDelete;
|
||||
|
||||
public String getAccountBankId() {
|
||||
return accountBankId == null ? "" : accountBankId.trim();
|
||||
}
|
||||
|
||||
public void setAccountBankId(String accountBankId) {
|
||||
this.accountBankId = accountBankId;
|
||||
}
|
||||
|
||||
public String getBankName() {
|
||||
return bankName == null ? "" : bankName.trim();
|
||||
}
|
||||
|
||||
public void setBankName(String bankName) {
|
||||
this.bankName = bankName;
|
||||
}
|
||||
|
||||
public String getBankNumber() {
|
||||
return bankNumber == null ? "" : bankNumber.trim();
|
||||
}
|
||||
|
||||
public void setBankNumber(String bankNumber) {
|
||||
this.bankNumber = bankNumber;
|
||||
}
|
||||
|
||||
public String getBankAccountName() {
|
||||
return bankAccountName == null ? "" : bankAccountName.trim();
|
||||
}
|
||||
|
||||
public void setBankAccountName(String bankAccountName) {
|
||||
this.bankAccountName = bankAccountName;
|
||||
}
|
||||
|
||||
public String getBankUnionpayNumber() {
|
||||
return bankUnionpayNumber == null ? "" : bankUnionpayNumber.trim();
|
||||
}
|
||||
|
||||
public void setBankUnionpayNumber(String bankUnionpayNumber) {
|
||||
this.bankUnionpayNumber = bankUnionpayNumber;
|
||||
}
|
||||
|
||||
public String getBankRemark() {
|
||||
return bankRemark == null ? "" : bankRemark.trim();
|
||||
}
|
||||
|
||||
public void setBankRemark(String bankRemark) {
|
||||
this.bankRemark = bankRemark;
|
||||
}
|
||||
|
||||
public String getBankSwitch() {
|
||||
return bankSwitch == null ? "" : bankSwitch.trim();
|
||||
}
|
||||
|
||||
public void setBankSwitch(String bankSwitch) {
|
||||
this.bankSwitch = bankSwitch;
|
||||
}
|
||||
|
||||
public String getGmtCreate() {
|
||||
return gmtCreate == null ? "" : gmtCreate.trim();
|
||||
}
|
||||
|
||||
public void setGmtCreate(String gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator == null ? "" : creator.trim();
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getGmtModified() {
|
||||
return gmtModified == null ? "" : gmtModified.trim();
|
||||
}
|
||||
|
||||
public void setGmtModified(String gmtModified) {
|
||||
this.gmtModified = gmtModified;
|
||||
}
|
||||
|
||||
public String getModifier() {
|
||||
return modifier == null ? "" : modifier.trim();
|
||||
}
|
||||
|
||||
public void setModifier(String modifier) {
|
||||
this.modifier = modifier;
|
||||
}
|
||||
|
||||
public Integer getIsDelete() {
|
||||
return isDelete == null ? 0 : isDelete;
|
||||
}
|
||||
|
||||
public void setIsDelete(Integer isDelete) {
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
package cn.com.tenlion.operator.pojo.pos.agreement;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: AgreementPO
|
||||
* @Description: 平台协议管理
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:32:44
|
||||
* @Version: 3.0
|
||||
**/
|
||||
public class AgreementPO {
|
||||
|
||||
private String agreementId;
|
||||
private String agreementTitle;
|
||||
private String agreementType;
|
||||
private String agreementContent;
|
||||
private String agreementSwitch;
|
||||
private Double agreementVersion;
|
||||
private String gmtCreate;
|
||||
private String creator;
|
||||
private String modifier;
|
||||
private String gmtModified;
|
||||
private Integer isDelete;
|
||||
|
||||
public String getAgreementId() {
|
||||
return agreementId == null ? "" : agreementId.trim();
|
||||
}
|
||||
|
||||
public void setAgreementId(String agreementId) {
|
||||
this.agreementId = agreementId;
|
||||
}
|
||||
|
||||
public String getAgreementTitle() {
|
||||
return agreementTitle == null ? "" : agreementTitle.trim();
|
||||
}
|
||||
|
||||
public void setAgreementTitle(String agreementTitle) {
|
||||
this.agreementTitle = agreementTitle;
|
||||
}
|
||||
|
||||
public String getAgreementType() {
|
||||
return agreementType == null ? "" : agreementType.trim();
|
||||
}
|
||||
|
||||
public void setAgreementType(String agreementType) {
|
||||
this.agreementType = agreementType;
|
||||
}
|
||||
|
||||
public String getAgreementContent() {
|
||||
return agreementContent == null ? "" : agreementContent.trim();
|
||||
}
|
||||
|
||||
public void setAgreementContent(String agreementContent) {
|
||||
this.agreementContent = agreementContent;
|
||||
}
|
||||
|
||||
public String getAgreementSwitch() {
|
||||
return agreementSwitch == null ? "" : agreementSwitch.trim();
|
||||
}
|
||||
|
||||
public void setAgreementSwitch(String agreementSwitch) {
|
||||
this.agreementSwitch = agreementSwitch;
|
||||
}
|
||||
|
||||
public Double getAgreementVersion() {
|
||||
return agreementVersion == null ? 0D : agreementVersion;
|
||||
}
|
||||
|
||||
public void setAgreementVersion(Double agreementVersion) {
|
||||
this.agreementVersion = agreementVersion;
|
||||
}
|
||||
|
||||
public String getGmtCreate() {
|
||||
return gmtCreate == null ? "" : gmtCreate.trim();
|
||||
}
|
||||
|
||||
public void setGmtCreate(String gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator == null ? "" : creator.trim();
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getModifier() {
|
||||
return modifier == null ? "" : modifier.trim();
|
||||
}
|
||||
|
||||
public void setModifier(String modifier) {
|
||||
this.modifier = modifier;
|
||||
}
|
||||
|
||||
public String getGmtModified() {
|
||||
return gmtModified == null ? "" : gmtModified.trim();
|
||||
}
|
||||
|
||||
public void setGmtModified(String gmtModified) {
|
||||
this.gmtModified = gmtModified;
|
||||
}
|
||||
|
||||
public Integer getIsDelete() {
|
||||
return isDelete == null ? 0 : isDelete;
|
||||
}
|
||||
|
||||
public void setIsDelete(Integer isDelete) {
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
package cn.com.tenlion.operator.pojo.vos.accountbank;
|
||||
|
||||
import ink.wgink.annotation.CheckEmptyAnnotation;
|
||||
import ink.wgink.annotation.CheckNumberAnnotation;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: AccountBankVO
|
||||
* @Description: 平台账户表
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:30:50
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@ApiModel
|
||||
public class AccountBankVO {
|
||||
|
||||
@ApiModelProperty(name = "bankName", value = "开户银行")
|
||||
@CheckEmptyAnnotation(name = "开户银行")
|
||||
private String bankName;
|
||||
@ApiModelProperty(name = "bankNumber", value = "银行账号")
|
||||
@CheckEmptyAnnotation(name = "银行账号")
|
||||
private String bankNumber;
|
||||
@ApiModelProperty(name = "bankAccountName", value = "公司名称")
|
||||
@CheckEmptyAnnotation(name = "公司名称")
|
||||
private String bankAccountName;
|
||||
@ApiModelProperty(name = "bankUnionpayNumber", value = "银行联行号")
|
||||
@CheckEmptyAnnotation(name = "银行联行号")
|
||||
private String bankUnionpayNumber;
|
||||
@ApiModelProperty(name = "bankRemark", value = "备注")
|
||||
private String bankRemark;
|
||||
@ApiModelProperty(name = "bankSwitch", value = "开关")
|
||||
@CheckEmptyAnnotation(name = "开关")
|
||||
private String bankSwitch;
|
||||
|
||||
public String getBankName() {
|
||||
return bankName == null ? "" : bankName.trim();
|
||||
}
|
||||
|
||||
public void setBankName(String bankName) {
|
||||
this.bankName = bankName;
|
||||
}
|
||||
|
||||
public String getBankNumber() {
|
||||
return bankNumber == null ? "" : bankNumber.trim();
|
||||
}
|
||||
|
||||
public void setBankNumber(String bankNumber) {
|
||||
this.bankNumber = bankNumber;
|
||||
}
|
||||
|
||||
public String getBankAccountName() {
|
||||
return bankAccountName == null ? "" : bankAccountName.trim();
|
||||
}
|
||||
|
||||
public void setBankAccountName(String bankAccountName) {
|
||||
this.bankAccountName = bankAccountName;
|
||||
}
|
||||
|
||||
public String getBankUnionpayNumber() {
|
||||
return bankUnionpayNumber == null ? "" : bankUnionpayNumber.trim();
|
||||
}
|
||||
|
||||
public void setBankUnionpayNumber(String bankUnionpayNumber) {
|
||||
this.bankUnionpayNumber = bankUnionpayNumber;
|
||||
}
|
||||
|
||||
public String getBankRemark() {
|
||||
return bankRemark == null ? "" : bankRemark.trim();
|
||||
}
|
||||
|
||||
public void setBankRemark(String bankRemark) {
|
||||
this.bankRemark = bankRemark;
|
||||
}
|
||||
|
||||
public String getBankSwitch() {
|
||||
return bankSwitch == null ? "" : bankSwitch.trim();
|
||||
}
|
||||
|
||||
public void setBankSwitch(String bankSwitch) {
|
||||
this.bankSwitch = bankSwitch;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -24,6 +24,17 @@ public class AccountItemOrderVO {
|
||||
@ApiModelProperty(name = "orderId", value = "订单ID")
|
||||
@CheckEmptyAnnotation(name = "订单ID")
|
||||
private String orderId;
|
||||
@ApiModelProperty(name = "code", value = "编码")
|
||||
@CheckEmptyAnnotation(name = "编码")
|
||||
private String code;
|
||||
|
||||
public String getCode() {
|
||||
return code == null ? "" : code.trim();
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId == null ? "" : userId.trim();
|
||||
|
@ -16,6 +16,8 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
@ApiModel
|
||||
public class AccountRechargeVO {
|
||||
|
||||
@ApiModelProperty(name = "userId", value = "用户ID")
|
||||
private String userId;
|
||||
@ApiModelProperty(name = "accountId", value = "关联的账户ID")
|
||||
private String accountId;
|
||||
@ApiModelProperty(name = "rechargeMoney", value = "充值金额")
|
||||
@ -52,6 +54,14 @@ public class AccountRechargeVO {
|
||||
@ApiModelProperty(name = "selfData", value = "平台账户")
|
||||
private String selfData;
|
||||
|
||||
public String getUserId() {
|
||||
return userId == null ? "" : userId.trim();
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getOrgName() {
|
||||
return orgName == null ? "" : orgName.trim();
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ public class AccountWithdrawalVO {
|
||||
@ApiModelProperty(name = "bankAccountName", value = "收款人银行卡户名")
|
||||
@CheckEmptyAnnotation(name = "收款人")
|
||||
private String bankAccountName;
|
||||
@ApiModelProperty(name = "bankNumber", value = "收款人银行卡号")
|
||||
@ApiModelProperty(name = "bankNumber", value = "收款人银行账号")
|
||||
@CheckEmptyAnnotation(name = "卡号")
|
||||
private String bankNumber;
|
||||
@ApiModelProperty(name = "bankName", value = "收款人银行卡开户行")
|
||||
|
@ -0,0 +1,72 @@
|
||||
package cn.com.tenlion.operator.pojo.vos.agreement;
|
||||
|
||||
import ink.wgink.annotation.CheckEmptyAnnotation;
|
||||
import ink.wgink.annotation.CheckNumberAnnotation;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: AgreementVO
|
||||
* @Description: 平台协议管理
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:32:44
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@ApiModel
|
||||
public class AgreementVO {
|
||||
|
||||
@ApiModelProperty(name = "agreementTitle", value = "协议标题")
|
||||
private String agreementTitle;
|
||||
@ApiModelProperty(name = "agreementType", value = "协议类型")
|
||||
private String agreementType;
|
||||
@ApiModelProperty(name = "agreementContent", value = "协议内容")
|
||||
private String agreementContent;
|
||||
@ApiModelProperty(name = "agreementSwitch", value = "协议开关")
|
||||
private String agreementSwitch;
|
||||
@ApiModelProperty(name = "agreementVersion", value = "协议版本")
|
||||
@CheckNumberAnnotation(name = "协议版本")
|
||||
private Double agreementVersion;
|
||||
|
||||
public String getAgreementTitle() {
|
||||
return agreementTitle == null ? "" : agreementTitle.trim();
|
||||
}
|
||||
|
||||
public void setAgreementTitle(String agreementTitle) {
|
||||
this.agreementTitle = agreementTitle;
|
||||
}
|
||||
|
||||
public String getAgreementType() {
|
||||
return agreementType == null ? "" : agreementType.trim();
|
||||
}
|
||||
|
||||
public void setAgreementType(String agreementType) {
|
||||
this.agreementType = agreementType;
|
||||
}
|
||||
|
||||
public String getAgreementContent() {
|
||||
return agreementContent == null ? "" : agreementContent.trim();
|
||||
}
|
||||
|
||||
public void setAgreementContent(String agreementContent) {
|
||||
this.agreementContent = agreementContent;
|
||||
}
|
||||
|
||||
public String getAgreementSwitch() {
|
||||
return agreementSwitch == null ? "" : agreementSwitch.trim();
|
||||
}
|
||||
|
||||
public void setAgreementSwitch(String agreementSwitch) {
|
||||
this.agreementSwitch = agreementSwitch;
|
||||
}
|
||||
|
||||
public Double getAgreementVersion() {
|
||||
return agreementVersion == null ? 0D : agreementVersion;
|
||||
}
|
||||
|
||||
public void setAgreementVersion(Double agreementVersion) {
|
||||
this.agreementVersion = agreementVersion;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -39,10 +39,8 @@ public class UserRegisterService implements IRegisterHandlerService, IRegisterWi
|
||||
if (roleDTO == null) {
|
||||
throw new SaveException("角色不存在");
|
||||
}
|
||||
String roleName = "个人";
|
||||
if(roleDTO.getRoleName().contains("企业")) {
|
||||
roleName = "企业";
|
||||
}else if(roleDTO.getRoleName().contains("代理商")) {
|
||||
String roleName = "普通用户";
|
||||
if(roleDTO.getRoleName().contains("代理商")) {
|
||||
roleName = "代理商";
|
||||
}
|
||||
// 1.修改用户的角色
|
||||
|
@ -0,0 +1,189 @@
|
||||
package cn.com.tenlion.operator.service.accountbank;
|
||||
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import cn.com.tenlion.operator.pojo.dtos.accountbank.AccountBankDTO;
|
||||
import cn.com.tenlion.operator.pojo.vos.accountbank.AccountBankVO;
|
||||
import cn.com.tenlion.operator.pojo.bos.accountbank.AccountBankBO;
|
||||
import cn.com.tenlion.operator.pojo.pos.accountbank.AccountBankPO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: IAccountBankService
|
||||
* @Description: 平台账户表
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:30:50
|
||||
* @Version: 3.0
|
||||
**/
|
||||
public interface IAccountBankService {
|
||||
|
||||
/**
|
||||
* 新增平台账户表
|
||||
*
|
||||
* @param accountBankVO
|
||||
* @return
|
||||
*/
|
||||
void save(AccountBankVO accountBankVO);
|
||||
|
||||
/**
|
||||
* 新增平台账户表
|
||||
*
|
||||
* @param token
|
||||
* @param accountBankVO
|
||||
* @return
|
||||
*/
|
||||
void save(String token, AccountBankVO accountBankVO);
|
||||
|
||||
/**
|
||||
* 新增平台账户表
|
||||
*
|
||||
* @param accountBankVO
|
||||
* @return accountBankId
|
||||
*/
|
||||
String saveReturnId(AccountBankVO accountBankVO);
|
||||
|
||||
/**
|
||||
* 新增平台账户表
|
||||
*
|
||||
* @param token
|
||||
* @param accountBankVO
|
||||
* @return accountBankId
|
||||
*/
|
||||
String saveReturnId(String token, AccountBankVO accountBankVO);
|
||||
|
||||
/**
|
||||
* 删除平台账户表
|
||||
*
|
||||
* @param ids id列表
|
||||
* @return
|
||||
*/
|
||||
void remove(List<String> ids);
|
||||
|
||||
|
||||
/**
|
||||
* 删除平台账户表
|
||||
*
|
||||
* @param token
|
||||
* @param ids id列表
|
||||
* @return
|
||||
*/
|
||||
void remove(String token, List<String> ids);
|
||||
|
||||
/**
|
||||
* 删除平台账户表(物理删除)
|
||||
*
|
||||
* @param ids id列表
|
||||
*/
|
||||
void delete(List<String> ids);
|
||||
|
||||
/**
|
||||
* 修改平台账户表
|
||||
*
|
||||
* @param accountBankId
|
||||
* @param accountBankVO
|
||||
* @return
|
||||
*/
|
||||
void update(String accountBankId, AccountBankVO accountBankVO);
|
||||
|
||||
/**
|
||||
* 修改平台账户表
|
||||
*
|
||||
* @param token
|
||||
* @param accountBankId
|
||||
* @param accountBankVO
|
||||
* @return
|
||||
*/
|
||||
void update(String token, String accountBankId, AccountBankVO accountBankVO);
|
||||
|
||||
/**
|
||||
* 平台账户表详情
|
||||
*
|
||||
* @param params 参数Map
|
||||
* @return
|
||||
*/
|
||||
AccountBankDTO get(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 平台账户表详情
|
||||
*
|
||||
* @param accountBankId
|
||||
* @return
|
||||
*/
|
||||
AccountBankDTO get(String accountBankId);
|
||||
|
||||
/**
|
||||
* 平台账户表详情
|
||||
*
|
||||
* @param params 参数Map
|
||||
* @return
|
||||
*/
|
||||
AccountBankBO getBO(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 平台账户表详情
|
||||
*
|
||||
* @param accountBankId
|
||||
* @return
|
||||
*/
|
||||
AccountBankBO getBO(String accountBankId);
|
||||
|
||||
/**
|
||||
* 平台账户表详情
|
||||
*
|
||||
* @param params 参数Map
|
||||
* @return
|
||||
*/
|
||||
AccountBankPO getPO(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 平台账户表详情
|
||||
*
|
||||
* @param accountBankId
|
||||
* @return
|
||||
*/
|
||||
AccountBankPO getPO(String accountBankId);
|
||||
|
||||
/**
|
||||
* 平台账户表列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<AccountBankDTO> list(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 平台账户表列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<AccountBankBO> listBO(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 平台账户表列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<AccountBankPO> listPO(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 平台账户表分页列表
|
||||
*
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
SuccessResultList<List<AccountBankDTO>> listPage(ListPage page);
|
||||
|
||||
/**
|
||||
* 平台账户表统计
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
Integer count(Map<String, Object> params);
|
||||
|
||||
AccountBankDTO getOpen();
|
||||
}
|
@ -0,0 +1,188 @@
|
||||
package cn.com.tenlion.operator.service.accountbank.impl;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.util.map.HashMapUtil;
|
||||
import ink.wgink.util.UUIDUtil;
|
||||
import cn.com.tenlion.operator.dao.accountbank.IAccountBankDao;
|
||||
import cn.com.tenlion.operator.pojo.dtos.accountbank.AccountBankDTO;
|
||||
import cn.com.tenlion.operator.pojo.vos.accountbank.AccountBankVO;
|
||||
import cn.com.tenlion.operator.pojo.bos.accountbank.AccountBankBO;
|
||||
import cn.com.tenlion.operator.pojo.pos.accountbank.AccountBankPO;
|
||||
import cn.com.tenlion.operator.service.accountbank.IAccountBankService;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @ClassName: AccountBankServiceImpl
|
||||
* @Description: 平台账户表
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:30:50
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Service
|
||||
public class AccountBankServiceImpl extends DefaultBaseService implements IAccountBankService {
|
||||
|
||||
@Autowired
|
||||
private IAccountBankDao accountBankDao;
|
||||
|
||||
@Override
|
||||
public void save(AccountBankVO accountBankVO) {
|
||||
saveReturnId(accountBankVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(String token, AccountBankVO accountBankVO) {
|
||||
saveReturnId(token, accountBankVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String saveReturnId(AccountBankVO accountBankVO) {
|
||||
return saveReturnId(null, accountBankVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String saveReturnId(String token, AccountBankVO accountBankVO) {
|
||||
String accountBankId = UUIDUtil.getUUID();
|
||||
Map<String, Object> params = HashMapUtil.beanToMap(accountBankVO);
|
||||
params.put("accountBankId", accountBankId);
|
||||
if (StringUtils.isBlank(token)) {
|
||||
setSaveInfo(params);
|
||||
} else {
|
||||
setAppSaveInfo(token, params);
|
||||
}
|
||||
if (accountBankVO.getBankSwitch().equals("1")) {
|
||||
Map<String, Object> updateParam = getHashMap(2);
|
||||
updateParam.put("bankSwitch", "0");
|
||||
accountBankDao.updateSwitch(updateParam);
|
||||
}
|
||||
accountBankDao.save(params);
|
||||
return accountBankId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(List<String> ids) {
|
||||
remove(null, ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(String token, List<String> ids) {
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
params.put("accountBankIds", ids);
|
||||
if (StringUtils.isBlank(token)) {
|
||||
setUpdateInfo(params);
|
||||
} else {
|
||||
setAppUpdateInfo(token, params);
|
||||
}
|
||||
accountBankDao.remove(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(List<String> ids) {
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
params.put("accountBankIds", ids);
|
||||
accountBankDao.delete(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(String accountBankId, AccountBankVO accountBankVO) {
|
||||
update(null, accountBankId, accountBankVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(String token, String accountBankId, AccountBankVO accountBankVO) {
|
||||
Map<String, Object> params = HashMapUtil.beanToMap(accountBankVO);
|
||||
params.put("accountBankId", accountBankId);
|
||||
if (StringUtils.isBlank(token)) {
|
||||
setUpdateInfo(params);
|
||||
} else {
|
||||
setAppUpdateInfo(token, params);
|
||||
}
|
||||
if (accountBankVO.getBankSwitch().equals("1")) {
|
||||
Map<String, Object> updateParam = getHashMap(2);
|
||||
updateParam.put("bankSwitch", "0");
|
||||
accountBankDao.updateSwitch(updateParam);
|
||||
}
|
||||
accountBankDao.update(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccountBankDTO get(Map<String, Object> params) {
|
||||
return accountBankDao.get(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccountBankDTO get(String accountBankId) {
|
||||
Map<String, Object> params = super.getHashMap(2);
|
||||
params.put("accountBankId", accountBankId);
|
||||
return get(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccountBankBO getBO(Map<String, Object> params) {
|
||||
return accountBankDao.getBO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccountBankBO getBO(String accountBankId) {
|
||||
Map<String, Object> params = super.getHashMap(2);
|
||||
params.put("accountBankId", accountBankId);
|
||||
return getBO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccountBankPO getPO(Map<String, Object> params) {
|
||||
return accountBankDao.getPO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccountBankPO getPO(String accountBankId) {
|
||||
Map<String, Object> params = super.getHashMap(2);
|
||||
params.put("accountBankId", accountBankId);
|
||||
return getPO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AccountBankDTO> list(Map<String, Object> params) {
|
||||
return accountBankDao.list(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AccountBankBO> listBO(Map<String, Object> params) {
|
||||
return accountBankDao.listBO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AccountBankPO> listPO(Map<String, Object> params) {
|
||||
return accountBankDao.listPO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<AccountBankDTO>> listPage(ListPage page) {
|
||||
PageHelper.startPage(page.getPage(), page.getRows());
|
||||
List<AccountBankDTO> accountBankDTOs = list(page.getParams());
|
||||
PageInfo<AccountBankDTO> pageInfo = new PageInfo<>(accountBankDTOs);
|
||||
return new SuccessResultList<>(accountBankDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer count(Map<String, Object> params) {
|
||||
Integer count = accountBankDao.count(params);
|
||||
return count == null ? 0 : count;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccountBankDTO getOpen() {
|
||||
Map<String, Object> params = super.getHashMap(2);
|
||||
AccountBankDTO open = accountBankDao.getOpen(params);
|
||||
return open;
|
||||
}
|
||||
|
||||
}
|
@ -1,12 +1,14 @@
|
||||
package cn.com.tenlion.operator.service.accountrecharge.impl;
|
||||
|
||||
import cn.com.tenlion.operator.pojo.dtos.account.AccountDTO;
|
||||
import cn.com.tenlion.operator.pojo.dtos.accountbank.AccountBankDTO;
|
||||
import cn.com.tenlion.operator.pojo.dtos.accountrecharge.AccountRechargePayDTO;
|
||||
import cn.com.tenlion.operator.pojo.dtos.accountrecharge.AccountRechargePayResultDTO;
|
||||
import cn.com.tenlion.operator.pojo.dtos.accountwithdrawal.AccountWithdrawalDTO;
|
||||
import cn.com.tenlion.operator.pojo.vos.accountitem.AccountItemVO;
|
||||
import cn.com.tenlion.operator.service.account.IAccountService;
|
||||
import cn.com.tenlion.operator.service.accountbank.IAccountBankService;
|
||||
import cn.com.tenlion.operator.service.accountitem.IAccountItemService;
|
||||
import cn.com.tenlion.operator.service.remote.IRemoteWangGengInvoiceService;
|
||||
import cn.com.tenlion.operator.util.UserUtil;
|
||||
import cn.com.tenlion.operator.util.pay.PayUtil;
|
||||
import cn.com.tenlion.projectconfig.util.ProjectConfigUtil;
|
||||
@ -16,8 +18,6 @@ import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.interfaces.user.IUserBaseService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.dtos.user.UserDTO;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.util.date.DateUtil;
|
||||
import ink.wgink.util.map.HashMapUtil;
|
||||
@ -32,6 +32,7 @@ import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@ -272,13 +273,14 @@ public class AccountRechargeServiceImpl extends DefaultBaseService implements IA
|
||||
|
||||
@Override
|
||||
public AccountRechargePayDTO saveAccount(String thirdParty, AccountRechargeVO accountRechargeVO) {
|
||||
String userId = StringUtils.isEmpty(accountRechargeVO.getUserId()) ? userUtil.getUserId(null) : accountRechargeVO.getUserId();
|
||||
// 查看该用户今日的记录, 超过50条不能再创建
|
||||
Integer count = accountRechargeDao.getTodayByAccountId(userUtil.getUserId(null));
|
||||
Integer count = accountRechargeDao.getTodayByAccountId(userId);
|
||||
if (count > 50) {
|
||||
throw new SaveException("禁止操作");
|
||||
}
|
||||
accountRechargeVO.setThirdParty(thirdParty);
|
||||
accountRechargeVO.setAccountId(userUtil.getUserId(null));
|
||||
accountRechargeVO.setAccountId(userId);
|
||||
accountRechargeVO.setRechargeCheck("0");
|
||||
accountRechargeVO.setReconciliationStatus("0");
|
||||
Integer totalMoney = PayUtil.buiderMoney(accountRechargeVO.getRechargeMoney());
|
||||
@ -294,7 +296,7 @@ public class AccountRechargeServiceImpl extends DefaultBaseService implements IA
|
||||
params.put("accountRechargeId", accountRechargeId);
|
||||
params.put("rechargeFinalTime", DateUtil.getTime());
|
||||
|
||||
String brcode = PayUtil.nativePay("AI平台充值", accountRechargeId, totalMoney);
|
||||
String brcode = PayUtil.nativePay(ProjectConfigUtil.getText("RechargePayTitle"), accountRechargeId, totalMoney);
|
||||
|
||||
payDTO.setAccountRechargeId(accountRechargeId);
|
||||
payDTO.setThirdParty(thirdParty);
|
||||
@ -307,7 +309,12 @@ public class AccountRechargeServiceImpl extends DefaultBaseService implements IA
|
||||
|
||||
payDTO.setAccountRechargeId(accountRechargeId);
|
||||
}
|
||||
setSaveInfo(params);
|
||||
String currentDate = DateUtil.getTime();
|
||||
params.put("creator", userId);
|
||||
params.put("gmtCreate", currentDate);
|
||||
params.put("modifier", userId);
|
||||
params.put("gmtModified", currentDate);
|
||||
params.put("isDelete", 0);
|
||||
accountRechargeDao.save(params);
|
||||
return payDTO;
|
||||
}
|
||||
@ -328,6 +335,9 @@ public class AccountRechargeServiceImpl extends DefaultBaseService implements IA
|
||||
return list;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private IAccountBankService iAccountBankService;
|
||||
|
||||
@Override
|
||||
public void updateOrgData(String accountRechargeId, AccountRechargeVO accountRechargeVO) {
|
||||
Map<String, Object> params = super.getHashMap(2);
|
||||
@ -338,7 +348,7 @@ public class AccountRechargeServiceImpl extends DefaultBaseService implements IA
|
||||
throw new SaveException("公司名称不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(accountRechargeVO.getOrgNumber())) {
|
||||
throw new SaveException("银行卡号不能为空");
|
||||
throw new SaveException("银行账号不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(accountRechargeVO.getRechargeFinalTime())) {
|
||||
throw new SaveException("打款时间不能为空");
|
||||
@ -352,10 +362,13 @@ public class AccountRechargeServiceImpl extends DefaultBaseService implements IA
|
||||
params.put("orgBank", accountRechargeVO.getOrgBank());
|
||||
params.put("orgNumber", accountRechargeVO.getOrgNumber());
|
||||
params.put("rechargeFinalTime", accountRechargeVO.getRechargeFinalTime());
|
||||
AccountDTO accountDTO = iAccountService.getByUserId("1");
|
||||
String selfData = " <p style=\"text-align: center;\"><span style=\"color: rgb(194, 79, 74);\">公司名称 : <span style=\"text-decoration: underline;\" id=\"bankAccountName\">" + accountDTO.getBankAccountName() + "</span></span></p>\n" +
|
||||
" <p style=\"text-align: center;\"><span style=\"color: rgb(194, 79, 74);\">开户银行 : <span style=\"text-decoration: underline;\" id=\"bankName\">" + accountDTO.getBankName() + "</span></span></p>\n" +
|
||||
" <p style=\"text-align: center;\"><span style=\"color: rgb(194, 79, 74);\">银行卡号 : <span style=\"text-decoration: underline;\" id=\"bankNumber\">" + accountDTO.getBankNumber() + "</span></span></p>";
|
||||
// AccountDTO accountDTO = iAccountService.getByUserId("1");
|
||||
AccountBankDTO bankDTO = iAccountBankService.getOpen();
|
||||
String selfData = " <p style=\"text-align: center;\"><span style=\"color: rgb(194, 79, 74);\">公司名称 : <span style=\"text-decoration: underline;\" id=\"bankAccountName\">" + bankDTO.getBankAccountName() + "</span></span></p>\n" +
|
||||
" <p style=\"text-align: center;\"><span style=\"color: rgb(194, 79, 74);\">开户银行 : <span style=\"text-decoration: underline;\" id=\"bankName\">" + bankDTO.getBankName() + "</span></span></p>\n" +
|
||||
" <p style=\"text-align: center;\"><span style=\"color: rgb(194, 79, 74);\">银行账号 : <span style=\"text-decoration: underline;\" id=\"bankNumber\">" + bankDTO.getBankNumber() + "</span></span></p>\n" +
|
||||
" <p style=\"text-align: center;\"><span style=\"color: rgb(194, 79, 74);\">银行联行号 : <span style=\"text-decoration: underline;\" id=\"bankUnionpayNumber\">" + bankDTO.getBankUnionpayNumber() + "</span></span></p>\n" +
|
||||
" <p style=\"text-align: center;\"><span style=\"color: rgb(194, 79, 74);\">备注内容 : <span style=\"text-decoration: underline;\" id=\"bankRemark\">" + bankDTO.getBankRemark() + "</span></span></p>";
|
||||
params.put("selfData", selfData);
|
||||
params.put("rechargeRemark", accountRechargeVO.getRechargeRemark());
|
||||
accountRechargeDao.update(params);
|
||||
@ -432,6 +445,9 @@ public class AccountRechargeServiceImpl extends DefaultBaseService implements IA
|
||||
}
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private IRemoteWangGengInvoiceService remoteWangGengInvoiceSerivceImpl;
|
||||
|
||||
@Override
|
||||
public synchronized void saveConfirmOnline(String id, String orderId, String successTime) {
|
||||
AccountRechargeDTO dto = get(id);
|
||||
@ -446,6 +462,8 @@ public class AccountRechargeServiceImpl extends DefaultBaseService implements IA
|
||||
String accountItemId = iAccountItemService.saveReturnId(vo);
|
||||
// 2. 修改状态为2
|
||||
updateCheck(dto.getAccountRechargeId(), "2", "线上充值", accountItemId, orderId, successTime);
|
||||
// 3. 调用第三方接口, 告知充值到账
|
||||
// remoteWangGengInvoiceSerivceImpl.paySuccess(dto.getAccountId());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,189 @@
|
||||
package cn.com.tenlion.operator.service.agreement;
|
||||
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import cn.com.tenlion.operator.pojo.dtos.agreement.AgreementDTO;
|
||||
import cn.com.tenlion.operator.pojo.vos.agreement.AgreementVO;
|
||||
import cn.com.tenlion.operator.pojo.bos.agreement.AgreementBO;
|
||||
import cn.com.tenlion.operator.pojo.pos.agreement.AgreementPO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: IAgreementService
|
||||
* @Description: 平台协议管理
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:32:44
|
||||
* @Version: 3.0
|
||||
**/
|
||||
public interface IAgreementService {
|
||||
|
||||
/**
|
||||
* 新增平台协议管理
|
||||
*
|
||||
* @param agreementVO
|
||||
* @return
|
||||
*/
|
||||
void save(AgreementVO agreementVO);
|
||||
|
||||
/**
|
||||
* 新增平台协议管理
|
||||
*
|
||||
* @param token
|
||||
* @param agreementVO
|
||||
* @return
|
||||
*/
|
||||
void save(String token, AgreementVO agreementVO);
|
||||
|
||||
/**
|
||||
* 新增平台协议管理
|
||||
*
|
||||
* @param agreementVO
|
||||
* @return agreementId
|
||||
*/
|
||||
String saveReturnId(AgreementVO agreementVO);
|
||||
|
||||
/**
|
||||
* 新增平台协议管理
|
||||
*
|
||||
* @param token
|
||||
* @param agreementVO
|
||||
* @return agreementId
|
||||
*/
|
||||
String saveReturnId(String token, AgreementVO agreementVO);
|
||||
|
||||
/**
|
||||
* 删除平台协议管理
|
||||
*
|
||||
* @param ids id列表
|
||||
* @return
|
||||
*/
|
||||
void remove(List<String> ids);
|
||||
|
||||
|
||||
/**
|
||||
* 删除平台协议管理
|
||||
*
|
||||
* @param token
|
||||
* @param ids id列表
|
||||
* @return
|
||||
*/
|
||||
void remove(String token, List<String> ids);
|
||||
|
||||
/**
|
||||
* 删除平台协议管理(物理删除)
|
||||
*
|
||||
* @param ids id列表
|
||||
*/
|
||||
void delete(List<String> ids);
|
||||
|
||||
/**
|
||||
* 修改平台协议管理
|
||||
*
|
||||
* @param agreementId
|
||||
* @param agreementVO
|
||||
* @return
|
||||
*/
|
||||
void update(String agreementId, AgreementVO agreementVO);
|
||||
|
||||
/**
|
||||
* 修改平台协议管理
|
||||
*
|
||||
* @param token
|
||||
* @param agreementId
|
||||
* @param agreementVO
|
||||
* @return
|
||||
*/
|
||||
void update(String token, String agreementId, AgreementVO agreementVO);
|
||||
|
||||
/**
|
||||
* 平台协议管理详情
|
||||
*
|
||||
* @param params 参数Map
|
||||
* @return
|
||||
*/
|
||||
AgreementDTO get(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 平台协议管理详情
|
||||
*
|
||||
* @param agreementId
|
||||
* @return
|
||||
*/
|
||||
AgreementDTO get(String agreementId);
|
||||
|
||||
/**
|
||||
* 平台协议管理详情
|
||||
*
|
||||
* @param params 参数Map
|
||||
* @return
|
||||
*/
|
||||
AgreementBO getBO(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 平台协议管理详情
|
||||
*
|
||||
* @param agreementId
|
||||
* @return
|
||||
*/
|
||||
AgreementBO getBO(String agreementId);
|
||||
|
||||
/**
|
||||
* 平台协议管理详情
|
||||
*
|
||||
* @param params 参数Map
|
||||
* @return
|
||||
*/
|
||||
AgreementPO getPO(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 平台协议管理详情
|
||||
*
|
||||
* @param agreementId
|
||||
* @return
|
||||
*/
|
||||
AgreementPO getPO(String agreementId);
|
||||
|
||||
/**
|
||||
* 平台协议管理列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<AgreementDTO> list(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 平台协议管理列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<AgreementBO> listBO(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 平台协议管理列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<AgreementPO> listPO(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 平台协议管理分页列表
|
||||
*
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
SuccessResultList<List<AgreementDTO>> listPage(ListPage page);
|
||||
|
||||
/**
|
||||
* 平台协议管理统计
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
Integer count(Map<String, Object> params);
|
||||
|
||||
AgreementDTO getByType(String type);
|
||||
}
|
@ -0,0 +1,176 @@
|
||||
package cn.com.tenlion.operator.service.agreement.impl;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.util.map.HashMapUtil;
|
||||
import ink.wgink.util.UUIDUtil;
|
||||
import cn.com.tenlion.operator.dao.agreement.IAgreementDao;
|
||||
import cn.com.tenlion.operator.pojo.dtos.agreement.AgreementDTO;
|
||||
import cn.com.tenlion.operator.pojo.vos.agreement.AgreementVO;
|
||||
import cn.com.tenlion.operator.pojo.bos.agreement.AgreementBO;
|
||||
import cn.com.tenlion.operator.pojo.pos.agreement.AgreementPO;
|
||||
import cn.com.tenlion.operator.service.agreement.IAgreementService;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @ClassName: AgreementServiceImpl
|
||||
* @Description: 平台协议管理
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-03-05 09:32:44
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Service
|
||||
public class AgreementServiceImpl extends DefaultBaseService implements IAgreementService {
|
||||
|
||||
@Autowired
|
||||
private IAgreementDao agreementDao;
|
||||
|
||||
@Override
|
||||
public void save(AgreementVO agreementVO) {
|
||||
saveReturnId(agreementVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(String token, AgreementVO agreementVO) {
|
||||
saveReturnId(token, agreementVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String saveReturnId(AgreementVO agreementVO) {
|
||||
return saveReturnId(null, agreementVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String saveReturnId(String token, AgreementVO agreementVO) {
|
||||
String agreementId = UUIDUtil.getUUID();
|
||||
Map<String, Object> params = HashMapUtil.beanToMap(agreementVO);
|
||||
params.put("agreementId", agreementId);
|
||||
if (StringUtils.isBlank(token)) {
|
||||
setSaveInfo(params);
|
||||
} else {
|
||||
setAppSaveInfo(token, params);
|
||||
}
|
||||
agreementDao.save(params);
|
||||
return agreementId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(List<String> ids) {
|
||||
remove(null, ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(String token, List<String> ids) {
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
params.put("agreementIds", ids);
|
||||
if (StringUtils.isBlank(token)) {
|
||||
setUpdateInfo(params);
|
||||
} else {
|
||||
setAppUpdateInfo(token, params);
|
||||
}
|
||||
agreementDao.remove(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(List<String> ids) {
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
params.put("agreementIds", ids);
|
||||
agreementDao.delete(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(String agreementId, AgreementVO agreementVO) {
|
||||
update(null, agreementId, agreementVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(String token, String agreementId, AgreementVO agreementVO) {
|
||||
Map<String, Object> params = HashMapUtil.beanToMap(agreementVO);
|
||||
params.put("agreementId", agreementId);
|
||||
if (StringUtils.isBlank(token)) {
|
||||
setUpdateInfo(params);
|
||||
} else {
|
||||
setAppUpdateInfo(token, params);
|
||||
}
|
||||
agreementDao.update(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AgreementDTO get(Map<String, Object> params) {
|
||||
return agreementDao.get(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AgreementDTO get(String agreementId) {
|
||||
Map<String, Object> params = super.getHashMap(2);
|
||||
params.put("agreementId", agreementId);
|
||||
return get(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AgreementBO getBO(Map<String, Object> params) {
|
||||
return agreementDao.getBO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AgreementBO getBO(String agreementId) {
|
||||
Map<String, Object> params = super.getHashMap(2);
|
||||
params.put("agreementId", agreementId);
|
||||
return getBO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AgreementPO getPO(Map<String, Object> params) {
|
||||
return agreementDao.getPO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AgreementPO getPO(String agreementId) {
|
||||
Map<String, Object> params = super.getHashMap(2);
|
||||
params.put("agreementId", agreementId);
|
||||
return getPO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AgreementDTO> list(Map<String, Object> params) {
|
||||
return agreementDao.list(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AgreementBO> listBO(Map<String, Object> params) {
|
||||
return agreementDao.listBO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AgreementPO> listPO(Map<String, Object> params) {
|
||||
return agreementDao.listPO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<AgreementDTO>> listPage(ListPage page) {
|
||||
PageHelper.startPage(page.getPage(), page.getRows());
|
||||
List<AgreementDTO> agreementDTOs = list(page.getParams());
|
||||
PageInfo<AgreementDTO> pageInfo = new PageInfo<>(agreementDTOs);
|
||||
return new SuccessResultList<>(agreementDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer count(Map<String, Object> params) {
|
||||
Integer count = agreementDao.count(params);
|
||||
return count == null ? 0 : count;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AgreementDTO getByType(String type) {
|
||||
return agreementDao.getByType(type);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
package cn.com.tenlion.operator.service.remote;
|
||||
|
||||
import ink.wgink.annotation.rpc.rest.RemoteService;
|
||||
import ink.wgink.annotation.rpc.rest.method.RemoteGetMethod;
|
||||
import ink.wgink.annotation.rpc.rest.method.RemotePutMethod;
|
||||
import ink.wgink.annotation.rpc.rest.params.RemoteJsonBodyParams;
|
||||
import ink.wgink.annotation.rpc.rest.params.RemotePathParams;
|
||||
import ink.wgink.annotation.rpc.rest.params.RemoteQueryParams;
|
||||
import ink.wgink.annotation.rpc.rest.params.RemoteServerParams;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 外部接口API
|
||||
*/
|
||||
@RemoteService
|
||||
public interface IRemoteWangGengInvoiceApi {
|
||||
|
||||
/**
|
||||
* @param serverPath 服务地址
|
||||
* @param accessToken accessToken
|
||||
* @return
|
||||
*/
|
||||
@RemoteGetMethod("resource/invoice/listpage")
|
||||
SuccessResultList<List<InvoiceDTO>> listPage(
|
||||
@RemoteServerParams String serverPath,
|
||||
@RemoteQueryParams("access_token") String accessToken,
|
||||
@RemoteQueryParams("page") int page,
|
||||
@RemoteQueryParams("rows") int rows,
|
||||
@RemoteQueryParams("keywords") String keywords,
|
||||
@RemoteQueryParams("startTime") String startTime,
|
||||
@RemoteQueryParams("endTime") String endTime,
|
||||
@RemoteQueryParams("invoiceStatus") String invoiceStatus
|
||||
);
|
||||
|
||||
/**
|
||||
* @param serverPath 服务地址
|
||||
* @param accessToken accessToken
|
||||
* @return
|
||||
*/
|
||||
@RemoteGetMethod("resource/invoice/get/{invoiceId}")
|
||||
InvoiceDTO get(
|
||||
@RemoteServerParams String serverPath,
|
||||
@RemoteQueryParams("access_token") String accessToken,
|
||||
@RemotePathParams("invoiceId") String invoiceId
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* @param serverPath 服务地址
|
||||
* @param accessToken accessToken
|
||||
* @return
|
||||
*/
|
||||
@RemotePutMethod("resource/invoice/update-examine/{invoiceId}")
|
||||
InvoiceDTO update(
|
||||
@RemoteServerParams String serverPath,
|
||||
@RemoteQueryParams("access_token") String accessToken,
|
||||
@RemotePathParams("invoiceId") String invoiceId,
|
||||
@RemoteJsonBodyParams() InvoiceExamineVO invoiceExamineVO
|
||||
);
|
||||
|
||||
/**
|
||||
* @param serverPath 服务地址
|
||||
* @param accessToken accessToken
|
||||
* @return
|
||||
*/
|
||||
@RemoteGetMethod("resource/sse/amount-received/user-id/{userId}")
|
||||
InvoiceDTO paySuccess(
|
||||
@RemoteServerParams String serverPath,
|
||||
@RemoteQueryParams("access_token") String accessToken,
|
||||
@RemotePathParams("userId") String userId
|
||||
);
|
||||
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package cn.com.tenlion.operator.service.remote;
|
||||
|
||||
import ink.wgink.annotation.rpc.rest.RemoteService;
|
||||
import ink.wgink.annotation.rpc.rest.method.RemoteGetMethod;
|
||||
import ink.wgink.annotation.rpc.rest.params.RemotePathParams;
|
||||
import ink.wgink.annotation.rpc.rest.params.RemoteQueryParams;
|
||||
import ink.wgink.annotation.rpc.rest.params.RemoteServerParams;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 外部接口API
|
||||
*/
|
||||
@RemoteService
|
||||
public interface IRemoteWangGengInvoiceService {
|
||||
|
||||
|
||||
/**
|
||||
* 客户申请的发票列表
|
||||
* @param page
|
||||
* @param invoiceStatus
|
||||
* @return
|
||||
*/
|
||||
SuccessResultList<List<InvoiceDTO>> listPage(ListPage page, String invoiceStatus);
|
||||
|
||||
/**
|
||||
* 客户申请的发票详情
|
||||
* @param invoiceId
|
||||
* @return
|
||||
*/
|
||||
InvoiceDTO get(String invoiceId);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param invoiceId
|
||||
* @param invoiceExamineVO
|
||||
*/
|
||||
void update(String invoiceId, InvoiceExamineVO invoiceExamineVO);
|
||||
|
||||
void paySuccess(String userId);
|
||||
|
||||
}
|
@ -0,0 +1,210 @@
|
||||
package cn.com.tenlion.operator.service.remote;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import javax.print.attribute.standard.MediaSize;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @ClassName: InvoiceDTO
|
||||
* @Description: 发票管理
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-02-23 16:07:36
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@ApiModel
|
||||
public class InvoiceDTO {
|
||||
|
||||
@ApiModelProperty(name = "invoiceId", value = "主键")
|
||||
private String invoiceId;
|
||||
@ApiModelProperty(name = "invoiceTitle", value = "名称")
|
||||
private String invoiceTitle;
|
||||
@ApiModelProperty(name = "invoiceNo", value = "纳税人识别号")
|
||||
private String invoiceNo;
|
||||
@ApiModelProperty(name = "invoiceAddress", value = "地址")
|
||||
private String invoiceAddress;
|
||||
@ApiModelProperty(name = "invoicePhone", value = "电话")
|
||||
private String invoicePhone;
|
||||
@ApiModelProperty(name = "invoiceBank", value = "开户行")
|
||||
private String invoiceBank;
|
||||
@ApiModelProperty(name = "invoiceAccount", value = "开户行账号")
|
||||
private String invoiceAccount;
|
||||
@ApiModelProperty(name = "invoiceAmount", value = "金额")
|
||||
private Integer invoiceAmount;
|
||||
@ApiModelProperty(name = "invoiceNote", value = "备注")
|
||||
private String invoiceNote;
|
||||
@ApiModelProperty(name = "invoiceStatus", value = "发票状态")
|
||||
private String invoiceStatus;
|
||||
@ApiModelProperty(name = "invoiceFiles", value = "发票文件")
|
||||
private String invoiceFiles;
|
||||
@ApiModelProperty(name = "invoiceFileList", value = "发票文件列表")
|
||||
private List<String> invoiceFileList;
|
||||
@ApiModelProperty(name = "gmtCreate", value = "创建时间")
|
||||
private String gmtCreate;
|
||||
@ApiModelProperty(name = "creator", value = "创建人")
|
||||
private String creator;
|
||||
@ApiModelProperty(name = "examineOpinion", value = "审核意见")
|
||||
private String examineOpinion;
|
||||
@ApiModelProperty(name = "examineUserId", value = "审核用户ID")
|
||||
private String examineUserId;
|
||||
@ApiModelProperty(name = "examineUserUsername", value = "审核用户名")
|
||||
private String examineUserUsername;
|
||||
@ApiModelProperty(name = "gmtExamine", value = "审核时间")
|
||||
private String gmtExamine;
|
||||
@ApiModelProperty(name = "orderIds", value = "订单列表")
|
||||
private List<String> orderIds;
|
||||
|
||||
public String getInvoiceId() {
|
||||
return invoiceId == null ? "" : invoiceId.trim();
|
||||
}
|
||||
|
||||
public void setInvoiceId(String invoiceId) {
|
||||
this.invoiceId = invoiceId;
|
||||
}
|
||||
|
||||
public String getInvoiceTitle() {
|
||||
return invoiceTitle == null ? "" : invoiceTitle.trim();
|
||||
}
|
||||
|
||||
public void setInvoiceTitle(String invoiceTitle) {
|
||||
this.invoiceTitle = invoiceTitle;
|
||||
}
|
||||
|
||||
public String getInvoiceNo() {
|
||||
return invoiceNo == null ? "" : invoiceNo.trim();
|
||||
}
|
||||
|
||||
public void setInvoiceNo(String invoiceNo) {
|
||||
this.invoiceNo = invoiceNo;
|
||||
}
|
||||
|
||||
public String getInvoiceAddress() {
|
||||
return invoiceAddress == null ? "" : invoiceAddress.trim();
|
||||
}
|
||||
|
||||
public void setInvoiceAddress(String invoiceAddress) {
|
||||
this.invoiceAddress = invoiceAddress;
|
||||
}
|
||||
|
||||
public String getInvoicePhone() {
|
||||
return invoicePhone == null ? "" : invoicePhone.trim();
|
||||
}
|
||||
|
||||
public void setInvoicePhone(String invoicePhone) {
|
||||
this.invoicePhone = invoicePhone;
|
||||
}
|
||||
|
||||
public String getInvoiceBank() {
|
||||
return invoiceBank == null ? "" : invoiceBank.trim();
|
||||
}
|
||||
|
||||
public void setInvoiceBank(String invoiceBank) {
|
||||
this.invoiceBank = invoiceBank;
|
||||
}
|
||||
|
||||
public String getInvoiceAccount() {
|
||||
return invoiceAccount == null ? "" : invoiceAccount.trim();
|
||||
}
|
||||
|
||||
public void setInvoiceAccount(String invoiceAccount) {
|
||||
this.invoiceAccount = invoiceAccount;
|
||||
}
|
||||
|
||||
public Integer getInvoiceAmount() {
|
||||
return invoiceAmount == null ? 0 : invoiceAmount;
|
||||
}
|
||||
|
||||
public void setInvoiceAmount(Integer invoiceAmount) {
|
||||
this.invoiceAmount = invoiceAmount;
|
||||
}
|
||||
|
||||
public String getInvoiceNote() {
|
||||
return invoiceNote == null ? "" : invoiceNote.trim();
|
||||
}
|
||||
|
||||
public void setInvoiceNote(String invoiceNote) {
|
||||
this.invoiceNote = invoiceNote;
|
||||
}
|
||||
|
||||
public String getInvoiceStatus() {
|
||||
return invoiceStatus == null ? "" : invoiceStatus.trim();
|
||||
}
|
||||
|
||||
public void setInvoiceStatus(String invoiceStatus) {
|
||||
this.invoiceStatus = invoiceStatus;
|
||||
}
|
||||
|
||||
public String getInvoiceFiles() {
|
||||
return invoiceFiles == null ? "" : invoiceFiles.trim();
|
||||
}
|
||||
|
||||
public void setInvoiceFiles(String invoiceFiles) {
|
||||
this.invoiceFiles = invoiceFiles;
|
||||
}
|
||||
|
||||
public List<String> getInvoiceFileList() {
|
||||
return invoiceFileList == null ? new ArrayList<>() : invoiceFileList;
|
||||
}
|
||||
|
||||
public void setInvoiceFileList(List<String> invoiceFileList) {
|
||||
this.invoiceFileList = invoiceFileList;
|
||||
}
|
||||
|
||||
public String getGmtCreate() {
|
||||
return gmtCreate == null ? "" : gmtCreate.trim();
|
||||
}
|
||||
|
||||
public void setGmtCreate(String gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator == null ? "" : creator.trim();
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getExamineOpinion() {
|
||||
return examineOpinion;
|
||||
}
|
||||
|
||||
public void setExamineOpinion(String examineOpinion) {
|
||||
this.examineOpinion = examineOpinion;
|
||||
}
|
||||
|
||||
public String getExamineUserId() {
|
||||
return examineUserId;
|
||||
}
|
||||
|
||||
public void setExamineUserId(String examineUserId) {
|
||||
this.examineUserId = examineUserId;
|
||||
}
|
||||
|
||||
public String getExamineUserUsername() {
|
||||
return examineUserUsername;
|
||||
}
|
||||
|
||||
public void setExamineUserUsername(String examineUserUsername) {
|
||||
this.examineUserUsername = examineUserUsername;
|
||||
}
|
||||
|
||||
public String getGmtExamine() {
|
||||
return gmtExamine;
|
||||
}
|
||||
|
||||
public void setGmtExamine(String gmtExamine) {
|
||||
this.gmtExamine = gmtExamine;
|
||||
}
|
||||
|
||||
public List<String> getOrderIds() {
|
||||
return orderIds;
|
||||
}
|
||||
|
||||
public void setOrderIds(List<String> orderIds) {
|
||||
this.orderIds = orderIds;
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package cn.com.tenlion.operator.service.remote;
|
||||
|
||||
import ink.wgink.annotation.CheckEmptyAnnotation;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
@ApiModel
|
||||
public class InvoiceExamineVO {
|
||||
|
||||
@ApiModelProperty(name = "status", value = "审核状态,COMPLETE:完成,FAILED:失败")
|
||||
@CheckEmptyAnnotation(name = "审核状态", types = {"COMPLETE", "FAILED"})
|
||||
private String status;
|
||||
@ApiModelProperty(name = "fileIds", value = "发票文件ID,多个逗号分隔,审核状态COMPLETE必填")
|
||||
private String fileIds;
|
||||
@ApiModelProperty(name = "opinion", value = "意见,审核状态FAILED必填")
|
||||
private String opinion;
|
||||
@ApiModelProperty(name = "userId", value = "审核人用户ID")
|
||||
private String userId;
|
||||
@ApiModelProperty(name = "username", value = "审核人用户名")
|
||||
private String username;
|
||||
|
||||
public String getStatus() {
|
||||
return status == null ? "" : status.trim();
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getFileIds() {
|
||||
return fileIds == null ? "" : fileIds.trim();
|
||||
}
|
||||
|
||||
public void setFileIds(String fileIds) {
|
||||
this.fileIds = fileIds;
|
||||
}
|
||||
|
||||
public String getOpinion() {
|
||||
return opinion == null ? "" : opinion.trim();
|
||||
}
|
||||
|
||||
public void setOpinion(String opinion) {
|
||||
this.opinion = opinion;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package cn.com.tenlion.operator.service.remote;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: OrderDTO
|
||||
* @Description: 用户订单
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-02-02 16:34:38
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@ApiModel
|
||||
public class OrderDTO {
|
||||
|
||||
@ApiModelProperty(name = "orderId", value = "订单ID")
|
||||
private String orderId;
|
||||
@ApiModelProperty(name = "orderTime", value = "订单时间")
|
||||
private Long orderTime;
|
||||
@ApiModelProperty(name = "orderNo", value = "订单号")
|
||||
private String orderNo;
|
||||
@ApiModelProperty(name = "orderStatus", value = "订单状态")
|
||||
private String orderStatus;
|
||||
@ApiModelProperty(name = "totalAmount", value = "总金额")
|
||||
private Integer totalAmount;
|
||||
@ApiModelProperty(name = "gmtCreate", value = "创建时间")
|
||||
private String gmtCreate;
|
||||
@ApiModelProperty(name = "creator", value = "创建人")
|
||||
private String creator;
|
||||
@ApiModelProperty(name = "isInvoiced", value = "是否开票")
|
||||
private Integer isInvoiced;
|
||||
|
||||
public String getOrderId() {
|
||||
return orderId == null ? "" : orderId.trim();
|
||||
}
|
||||
|
||||
public void setOrderId(String orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderTime() {
|
||||
return orderTime == null ? 0L : orderTime;
|
||||
}
|
||||
|
||||
public void setOrderTime(Long orderTime) {
|
||||
this.orderTime = orderTime;
|
||||
}
|
||||
|
||||
public String getOrderNo() {
|
||||
return orderNo == null ? "" : orderNo.trim();
|
||||
}
|
||||
|
||||
public void setOrderNo(String orderNo) {
|
||||
this.orderNo = orderNo;
|
||||
}
|
||||
|
||||
public String getOrderStatus() {
|
||||
return orderStatus == null ? "" : orderStatus.trim();
|
||||
}
|
||||
|
||||
public void setOrderStatus(String orderStatus) {
|
||||
this.orderStatus = orderStatus;
|
||||
}
|
||||
|
||||
public Integer getTotalAmount() {
|
||||
return totalAmount == null ? 0 : totalAmount;
|
||||
}
|
||||
|
||||
public void setTotalAmount(Integer totalAmount) {
|
||||
this.totalAmount = totalAmount;
|
||||
}
|
||||
|
||||
public String getGmtCreate() {
|
||||
return gmtCreate == null ? "" : gmtCreate.trim();
|
||||
}
|
||||
|
||||
public void setGmtCreate(String gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator == null ? "" : creator.trim();
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public Integer getIsInvoiced() {
|
||||
return isInvoiced;
|
||||
}
|
||||
|
||||
public void setIsInvoiced(Integer isInvoiced) {
|
||||
this.isInvoiced = isInvoiced;
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
package cn.com.tenlion.operator.service.remote.impl;
|
||||
|
||||
import cn.com.tenlion.operator.service.remote.IRemoteWangGengInvoiceApi;
|
||||
import cn.com.tenlion.operator.service.remote.IRemoteWangGengInvoiceService;
|
||||
import cn.com.tenlion.operator.service.remote.InvoiceDTO;
|
||||
import cn.com.tenlion.operator.service.remote.InvoiceExamineVO;
|
||||
import cn.com.tenlion.projectconfig.util.ProjectConfigUtil;
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.module.oauth2.manager.OAuth2ClientTokenManager;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 外部接口
|
||||
* @author : LY
|
||||
* @date :2024-1-23 17:24
|
||||
* @description :
|
||||
* @modyified By:
|
||||
*/
|
||||
@Service
|
||||
public class RemoteWangGengInvoiceSerivceImpl implements IRemoteWangGengInvoiceService {
|
||||
|
||||
@Autowired
|
||||
private IRemoteWangGengInvoiceApi iRemoteWangGengInvoiceApi;
|
||||
|
||||
/**
|
||||
* 获取accesstoken
|
||||
* @return
|
||||
*/
|
||||
private String getAccessToken(){
|
||||
String accessToken = OAuth2ClientTokenManager.getInstance().getToken().getAccessToken();
|
||||
if(StringUtils.isBlank(accessToken)){
|
||||
throw new SearchException("获取accesstoken失败");
|
||||
}
|
||||
return accessToken;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<InvoiceDTO>> listPage(ListPage page, String invoiceStatus) {
|
||||
String keyword = page.getParams().get("keywords") == null ? "" : page.getParams().get("keywords").toString();
|
||||
String startTime = page.getParams().get("startTime") == null ? "" : page.getParams().get("startTime").toString();
|
||||
String endTime = page.getParams().get("endTime") == null ? "" : page.getParams().get("endTime").toString();
|
||||
return iRemoteWangGengInvoiceApi.listPage(ProjectConfigUtil.getText("AiServerUrl"), this.getAccessToken(), page.getPage(), page.getRows(), keyword, startTime, endTime, invoiceStatus);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InvoiceDTO get(String invoiceId) {
|
||||
return iRemoteWangGengInvoiceApi.get(ProjectConfigUtil.getText("AiServerUrl"), this.getAccessToken(), invoiceId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(String invoiceId, InvoiceExamineVO invoiceExamineVO) {
|
||||
iRemoteWangGengInvoiceApi.update(ProjectConfigUtil.getText("AiServerUrl"), this.getAccessToken(), invoiceId, invoiceExamineVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void paySuccess(String userId) {
|
||||
iRemoteWangGengInvoiceApi.paySuccess(ProjectConfigUtil.getText("AiServerUrl"), this.getAccessToken(), userId);
|
||||
}
|
||||
|
||||
}
|
@ -1,16 +1,15 @@
|
||||
package cn.com.tenlion.operator.util;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.fasterxml.jackson.databind.JavaType;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.SecretKey;
|
||||
import javax.crypto.SecretKeyFactory;
|
||||
import javax.crypto.spec.DESKeySpec;
|
||||
import java.security.SecureRandom;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* DES加密解密工具类
|
||||
@ -26,6 +25,22 @@ public class EncryptUtil {
|
||||
private final static String CODE_TYPE = "UTF-8";
|
||||
private final static String KEY = "TENLIONS";
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
JSONObject j = new JSONObject();
|
||||
j.put("time", "2019-01-01 02:15:10");
|
||||
j.put("money", 52.3);
|
||||
j.put("userId", "2");
|
||||
j.put("orderId", "1");
|
||||
System.out.println(encode(j.toJSONString()));
|
||||
|
||||
// 加密记录
|
||||
String id1 = EncryptUtil.encode("2a039dea-e2ca-4600-a8aa-6c15713c5974");
|
||||
String id2 = EncryptUtil.encode("2a039dea-e2ca-4600-a8aa-6c15713c5974" + "_0" );
|
||||
System.out.println(id1);
|
||||
System.out.println(id2);
|
||||
}
|
||||
|
||||
/**
|
||||
* DES加密
|
||||
* @param datasource
|
||||
|
@ -12,6 +12,7 @@ import com.google.zxing.client.j2se.MatrixToImageWriter;
|
||||
import com.wechat.pay.java.core.Config;
|
||||
import com.wechat.pay.java.core.RSAAutoCertificateConfig;
|
||||
import com.wechat.pay.java.service.payments.model.Transaction;
|
||||
import com.wechat.pay.java.service.payments.model.TransactionAmount;
|
||||
import com.wechat.pay.java.service.payments.nativepay.NativePayService;
|
||||
import com.wechat.pay.java.service.payments.nativepay.model.*;
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
@ -132,6 +133,8 @@ public class PayUtil {
|
||||
Transaction response = service.queryOrderByOutTradeNo(request);
|
||||
String order = response.getTransactionId(); // 第三方订单号
|
||||
Transaction.TradeStateEnum status = response.getTradeState();
|
||||
TransactionAmount amount = response.getAmount();
|
||||
dto.setMoney(amount.getPayerTotal());
|
||||
String time = response.getSuccessTime();
|
||||
dto.setAccountRechargeId(rechargeOrderId);
|
||||
dto.setOrderSuccessTime(status.name().equals("SUCCESS") ? convertToFormattedString(time) : "");
|
||||
@ -143,10 +146,14 @@ public class PayUtil {
|
||||
return dto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取5分钟后超时时间
|
||||
* @return
|
||||
*/
|
||||
public static String getTimeExpire() {
|
||||
// 当前时间
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
// 15分钟前的时间
|
||||
// 5分钟前的时间
|
||||
LocalDateTime fifteenMinutesAgo = now.plusMinutes(5);
|
||||
// 获取时区信息(以北京时间为例)
|
||||
ZoneId zoneId = ZoneId.of("Asia/Shanghai"); // 东八区时区
|
||||
@ -159,6 +166,11 @@ public class PayUtil {
|
||||
return formattedDateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 时间格式转换
|
||||
* @param inputDateTime
|
||||
* @return
|
||||
*/
|
||||
public static String convertToFormattedString(String inputDateTime) {
|
||||
// 将字符串解析为ZonedDateTime对象
|
||||
ZonedDateTime zonedDateTime = ZonedDateTime.parse(inputDateTime);
|
||||
@ -191,7 +203,7 @@ public class PayUtil {
|
||||
request.setMchid("1609461201");
|
||||
request.setTimeExpire(getTimeExpire());
|
||||
request.setDescription(title);// 商品描述
|
||||
request.setNotifyUrl("http://121.36.71.250:58085/operator/api/account/pay/" + orderId);// 支付成功的回调地址
|
||||
request.setNotifyUrl(ProjectConfigUtil.getText("WechatPayCallbackUrl") + "api/account/pay/" + orderId);// 支付成功的回调地址
|
||||
request.setOutTradeNo(orderId);
|
||||
// 调用下单方法,得到应答
|
||||
try {
|
||||
@ -206,38 +218,38 @@ public class PayUtil {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将BufferdImage转为base64图片
|
||||
* @param image
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
public static String imageToBase64(BufferedImage image) throws IOException {
|
||||
// 将BufferedImage转换为字节数组
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ImageIO.write(image, "jpg", baos); // 或者使用 "png" 或 "bmp" 等其他图片格式
|
||||
byte[] imageBytes = baos.toByteArray();
|
||||
// 将字节数组转换为Base64编码的字符串
|
||||
String encodedImage = Base64.getEncoder().encodeToString(imageBytes);
|
||||
return "data:image/jpeg;base64," + encodedImage;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成二维码
|
||||
* @param text
|
||||
* @param width
|
||||
* @param height
|
||||
* @return
|
||||
* @throws WriterException
|
||||
*/
|
||||
public static BufferedImage generateQRCode(String text, int width, int height) throws WriterException {
|
||||
QRCodeWriter qrCodeWriter = new QRCodeWriter();
|
||||
Map<EncodeHintType, ErrorCorrectionLevel> hints = new HashMap<>();
|
||||
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H); // 设置错误纠正级别为H
|
||||
BitMatrix bitMatrix = qrCodeWriter.encode(text, BarcodeFormat.QR_CODE, width, height, hints);
|
||||
return MatrixToImageWriter.toBufferedImage(bitMatrix);
|
||||
|
||||
}
|
||||
/**
|
||||
* 将BufferdImage转为base64图片
|
||||
* @param image
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
public static String imageToBase64(BufferedImage image) throws IOException {
|
||||
// 将BufferedImage转换为字节数组
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ImageIO.write(image, "jpg", baos); // 或者使用 "png" 或 "bmp" 等其他图片格式
|
||||
byte[] imageBytes = baos.toByteArray();
|
||||
// 将字节数组转换为Base64编码的字符串
|
||||
String encodedImage = Base64.getEncoder().encodeToString(imageBytes);
|
||||
return "data:image/jpeg;base64," + encodedImage;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成二维码
|
||||
* @param text
|
||||
* @param width
|
||||
* @param height
|
||||
* @return
|
||||
* @throws WriterException
|
||||
*/
|
||||
public static BufferedImage generateQRCode(String text, int width, int height) throws WriterException {
|
||||
QRCodeWriter qrCodeWriter = new QRCodeWriter();
|
||||
Map<EncodeHintType, ErrorCorrectionLevel> hints = new HashMap<>();
|
||||
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H); // 设置错误纠正级别为H
|
||||
BitMatrix bitMatrix = qrCodeWriter.encode(text, BarcodeFormat.QR_CODE, width, height, hints);
|
||||
return MatrixToImageWriter.toBufferedImage(bitMatrix);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 二维码设置自定义的边框
|
||||
|
@ -0,0 +1,100 @@
|
||||
package cn.com.tenlion.operator.util.socket;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import javax.websocket.*;
|
||||
import javax.websocket.server.ServerEndpoint;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* @author WebSocketServer
|
||||
*/
|
||||
@ServerEndpoint("/socket")
|
||||
@Component
|
||||
public class MessageWebSocketServer {
|
||||
|
||||
private final static ConcurrentHashMap<String, SocketSession> SESSIONS = new ConcurrentHashMap<String, SocketSession>();
|
||||
|
||||
@OnOpen
|
||||
public void onOpen(Session session) {
|
||||
System.out.println("链接成功......");
|
||||
SocketSession socketSession = new SocketSession();
|
||||
socketSession.setSession(session);
|
||||
SESSIONS.put(session.getId(), socketSession);
|
||||
}
|
||||
|
||||
/**
|
||||
* 客户端关闭
|
||||
* @param session session
|
||||
*/
|
||||
@OnClose
|
||||
public void onClose(Session session) {
|
||||
System.out.println("链接关闭......" + session.toString());
|
||||
SESSIONS.remove(session.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 发生错误
|
||||
* @param error
|
||||
*/
|
||||
@OnError
|
||||
public void onError(Session session, Throwable error) {
|
||||
System.out.println("链接出错,关闭链接......");
|
||||
SESSIONS.remove(session.getId());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 收到客户端发来消息
|
||||
* @param message 消息对象
|
||||
*/
|
||||
@OnMessage
|
||||
public void onMessage(String message, Session session) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(message);
|
||||
String type = jsonObject.getString("type");
|
||||
if (!StringUtils.isEmpty(type)) {
|
||||
SocketSession socketSession = SESSIONS.get(session.getId());
|
||||
socketSession.setType(type);
|
||||
}
|
||||
System.out.println("服务端收到客户端发来的消息: " + message);
|
||||
}
|
||||
|
||||
/**
|
||||
* 群发消息
|
||||
* @param message 消息内容
|
||||
*/
|
||||
public synchronized void sendAll(String type, String message) {
|
||||
for (Map.Entry<String, SocketSession> sessionEntry : SESSIONS.entrySet()) {
|
||||
synchronized(sessionEntry) {
|
||||
SocketSession socketSession = sessionEntry.getValue();
|
||||
if(socketSession.getSession().isOpen() && socketSession.getType().equals(type)) {
|
||||
try {
|
||||
socketSession.getSession().getBasicRemote().sendText(message);
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 群发消息
|
||||
*/
|
||||
public synchronized Boolean exists(String type) {
|
||||
Map<String, SocketSession> map = new HashMap<>();
|
||||
for (Map.Entry<String, SocketSession> sessionEntry : SESSIONS.entrySet()) {
|
||||
synchronized(sessionEntry) {
|
||||
SocketSession socketSession = sessionEntry.getValue();
|
||||
if(socketSession.getSession().isOpen() && socketSession.getType().equals(type)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package cn.com.tenlion.operator.util.socket;
|
||||
|
||||
|
||||
import javax.websocket.Session;
|
||||
|
||||
public class SocketSession {
|
||||
|
||||
private Session session;
|
||||
|
||||
private String type;
|
||||
|
||||
public Session getSession() {
|
||||
return session;
|
||||
}
|
||||
|
||||
public void setSession(Session session) {
|
||||
this.session = session;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type == null ? "" : type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package cn.com.tenlion.operator.util.socket;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
||||
|
||||
/**
|
||||
* 开启WebSocket支持
|
||||
* @author zhengkai.blog.csdn.net
|
||||
*/
|
||||
@Configuration
|
||||
public class WebSocketConfig {
|
||||
|
||||
@Bean
|
||||
public ServerEndpointExporter serverEndpointExporter() {
|
||||
return new ServerEndpointExporter();
|
||||
}
|
||||
|
||||
}
|
@ -25,16 +25,22 @@ public class WxPayResultCheckTask {
|
||||
}
|
||||
|
||||
/**
|
||||
* 2分钟执行一次
|
||||
* 2分钟执行一次 | 关闭超时未付款的
|
||||
*/
|
||||
@Scheduled(fixedRate = 60*1000*2)
|
||||
public void close() {
|
||||
// 关闭10分钟之前(未到账)的订单
|
||||
List<AccountRechargeDTO> list = iAccountRechargeStaticService.getNotCloseRechargeList("微信");
|
||||
for(AccountRechargeDTO dto : list) {
|
||||
PayUtil.closeOrder(dto.getAccountRechargeId());
|
||||
// 修改状态
|
||||
iAccountRechargeStaticService.updateClose(dto.getAccountRechargeId());
|
||||
AccountRechargePayResultDTO payResultDTO = PayUtil.queryOrder(dto.getAccountRechargeId());
|
||||
// 成功
|
||||
if (payResultDTO.getOrderStatus().equals("1") && payResultDTO.getMoney().equals(PayUtil.buiderMoney(dto.getRechargeMoney()))) {
|
||||
iAccountRechargeStaticService.saveConfirmOnline(dto.getAccountRechargeId(), payResultDTO.getOrderId(), payResultDTO.getOrderSuccessTime());
|
||||
}else{
|
||||
PayUtil.closeOrder(dto.getAccountRechargeId());
|
||||
// 修改状态
|
||||
iAccountRechargeStaticService.updateClose(dto.getAccountRechargeId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,7 +54,7 @@ public class WxPayResultCheckTask {
|
||||
for(AccountRechargeDTO dto : list) {
|
||||
AccountRechargePayResultDTO payResultDTO = PayUtil.queryOrder(dto.getAccountRechargeId());
|
||||
// 成功
|
||||
if (payResultDTO.getOrderStatus().equals("1")) {
|
||||
if (payResultDTO.getOrderStatus().equals("1") && payResultDTO.getMoney().equals(dto.getRechargeMoney())) {
|
||||
iAccountRechargeStaticService.saveConfirmOnline(dto.getAccountRechargeId(), payResultDTO.getOrderId(), payResultDTO.getOrderSuccessTime());
|
||||
}
|
||||
}
|
||||
|
240
src/main/resources/application-lanproxy.yml
Normal file
240
src/main/resources/application-lanproxy.yml
Normal file
@ -0,0 +1,240 @@
|
||||
server:
|
||||
port: 8091
|
||||
url: http://121.36.71.250:58085/operator/
|
||||
ip: 192.168.0.115
|
||||
system-title: 运营平台
|
||||
system-sub-title: 运营平台
|
||||
default-index-page: route/systemuser/index
|
||||
servlet:
|
||||
context-path: /operator
|
||||
|
||||
access-control:
|
||||
# 跳过权限
|
||||
role-permission: false
|
||||
|
||||
spring:
|
||||
login-url: /route/systemuser/login
|
||||
login-failure: /route/systemuser/login?error
|
||||
login-process: /userlogin
|
||||
assets-matchers: /assets/**
|
||||
thymeleaf:
|
||||
prefix: classpath:/templates/
|
||||
suffix: .html
|
||||
mode: HTML5
|
||||
encoding: UTF-8
|
||||
cache: false
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 1GB
|
||||
max-request-size: 1GB
|
||||
datasource:
|
||||
druid:
|
||||
url: jdbc:mysql://192.168.0.151/db_system_operator?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&autoReconnect=true&failOverReadOnly=false&useSSL=false&serverTimezone=UTC&nullCatalogMeansCurrent=true
|
||||
db-type: mysql
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
username: root
|
||||
password: root
|
||||
initial-size: 2
|
||||
min-idle: 2
|
||||
max-active: 10
|
||||
# 配置获取连接等待超时的时间
|
||||
max-wait: 60000
|
||||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||
time-between-eviction-runs-millis: 60000
|
||||
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||
min-evictable-idle-time-millis: 300000
|
||||
validation-query: SELECT 1 FROM DUAL
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
# 打开PSCache,并且指定每个连接上PSCache的大小
|
||||
max-pool-prepared-statement-per-connection-size: 10
|
||||
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
|
||||
filter:
|
||||
commons-log:
|
||||
connection-logger-name: stat,wall,log4j
|
||||
stat:
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 2000
|
||||
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
|
||||
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
|
||||
# 合并多个DruidDataSource的监控数据
|
||||
use-global-data-source-stat: true
|
||||
|
||||
# 流程引擎
|
||||
activiti:
|
||||
# flase: 默认值。activiti在启动时,会对比数据库表中保存的版本,如果没有表或者版本不匹配,将抛出异常。
|
||||
# true: activiti会对数据库中所有表进行更新操作。如果表不存在,则自动创建。
|
||||
# create_drop: 在activiti启动时创建表,在关闭时删除表(必须手动关闭引擎,才能删除表)。
|
||||
# drop-create: 在activiti启动时删除原来的旧表,然后在创建新表(不需要手动关闭引擎)
|
||||
database-schema-update: true
|
||||
#检测历史表是否存在
|
||||
db-history-used: true
|
||||
# 记录历史等级 可配置的历史级别有none, acitivity, audit, all
|
||||
history-level: full
|
||||
# 检查流程定义
|
||||
check-process-definitions: false
|
||||
rest-api-enabled: true
|
||||
rest-api-servlet-name: activiti-swagger-document
|
||||
SpringProcessEngineConfiguration:
|
||||
activityFontName: 宋体
|
||||
labelFontName: 宋体
|
||||
dataSource: datasource
|
||||
data:
|
||||
mongodb:
|
||||
uri: mongodb://smartcity:smartcity@10.25.248.193:6011/smartcity
|
||||
redis:
|
||||
database: 6
|
||||
host: 192.168.0.156
|
||||
port: 6379
|
||||
password: 666
|
||||
timeout: 3000ms
|
||||
jedis:
|
||||
pool:
|
||||
max-active: 8
|
||||
max-wait: 1ms
|
||||
max-idle: 8
|
||||
min-idle: 0
|
||||
kafka-local:
|
||||
topics: tableSync
|
||||
bootstrap-servers: 192.168.0.156:9093
|
||||
#bootstrap-servers: 175.24.42.217:9096
|
||||
#bootstrap-servers: 49.233.36.36:58093
|
||||
producer:
|
||||
# 写入失败时,重试次数。当leader节点失效,一个repli节点会替代成为leader节点,此时可能出现写入失败,
|
||||
# 当retris为0时,produce不会重复。retirs重发,此时repli节点完全成为leader节点,不会产生消息丢失。
|
||||
retries: 0
|
||||
#procedure要求leader在考虑完成请求之前收到的确认数,用于控制发送记录在服务端的持久化,其值可以为如下:
|
||||
#acks = 0 如果设置为零,则生产者将不会等待来自服务器的任何确认,该记录将立即添加到套接字缓冲区并视为已发送。在这种情况下,无法保证服务器已收到记录,并且重试配置将不会生效(因为客户端通常不会知道任何故障),为每条记录返回的偏移量始终设置为-1。
|
||||
#acks = 1 这意味着leader会将记录写入其本地日志,但无需等待所有副本服务器的完全确认即可做出回应,在这种情况下,如果leader在确认记录后立即失败,但在将数据复制到所有的副本服务器之前,则记录将会丢失。
|
||||
#acks = all 这意味着leader将等待完整的同步副本集以确认记录,这保证了只要至少一个同步副本服务器仍然存活,记录就不会丢失,这是最强有力的保证,这相当于acks = -1的设置。
|
||||
#可以设置的值为:all, -1, 0, 1
|
||||
acks: 1
|
||||
consumer:
|
||||
group-id: SmartCity
|
||||
# smallest和largest才有效,如果smallest重新0开始读取,如果是largest从logfile的offset读取。一般情况下我们都是设置smallest
|
||||
auto-offset-reset: earliest
|
||||
# 设置自动提交offset
|
||||
enable-auto-commit: true
|
||||
# 如果'enable.auto.commit'为true,则消费者偏移自动提交给Kafka的频率(以毫秒为单位),默认值为5000。
|
||||
auto-commit-interval: 100
|
||||
max-poll-records: 5
|
||||
|
||||
mybatis:
|
||||
config-location: classpath:mybatis/mybatis-config.xml
|
||||
mapper-locations: classpath*:mybatis/mapper/**/*.xml
|
||||
|
||||
logging:
|
||||
level:
|
||||
root: error
|
||||
cn.com.tenlion: debug
|
||||
ink.wgink: debug
|
||||
org.springframework.web.client: debug
|
||||
|
||||
swagger:
|
||||
base-package-list: ink.wgink,cn.com.tenlion
|
||||
|
||||
# 文件上传管理
|
||||
file:
|
||||
# 文件的保存路径
|
||||
upload-path: D:/CF_work/ideaWorkSpace/uploadFiles/case
|
||||
# 图片类型
|
||||
image-types: png,jpg,jpeg,gif,blob
|
||||
# 视频类型
|
||||
video-types: mp4,rmvb
|
||||
# 音频类型
|
||||
audio-types: mp3,wmv
|
||||
# 文件类型
|
||||
file-types: doc,docx,xls,xlsx,ppt,pptx,txt,zip,rar,apk,pdf
|
||||
# 同时上传最大支持数
|
||||
max-file-count: 6
|
||||
# 图片输出压缩质量,大于0,默认0.4
|
||||
image-output-quality: 0.4
|
||||
# 媒体最大时长(单位:秒)
|
||||
media-max-duration:
|
||||
# 后台
|
||||
backend:
|
||||
video: 100
|
||||
audio: 600
|
||||
# 微信
|
||||
wechat:
|
||||
video: 100
|
||||
audio: 600
|
||||
# app
|
||||
app:
|
||||
video: 100
|
||||
audio: 600
|
||||
|
||||
# 安全
|
||||
security:
|
||||
oauth2:
|
||||
oauth-server: http://121.36.71.250:58085/operator
|
||||
oauth-logout: ${security.oauth2.oauth-server}/logout?redirect_uri=${server.url}
|
||||
client:
|
||||
client-id: 46c4715a2a504dd48398bda88b5c3a88
|
||||
client-secret: Rlc0WlBvWGRRZVlJbGdPb3BnMzZxVmU1ZFlOdVFLcHo1QnFCQ1UvVFAzSGxIdG9KZmEyTjJIRnI0dG1McEdEVA==
|
||||
user-authorization-uri: ${security.oauth2.oauth-server}/oauth2_client/authorize
|
||||
access-token-uri: ${security.oauth2.oauth-server}/oauth2_client/token
|
||||
grant-type: authorization_code
|
||||
resource:
|
||||
jwt:
|
||||
key-uri: ${security.oauth2.oauth-server}/oauth2_client/token_key
|
||||
token-info-uri: ${security.oauth2.oauth-server}/oauth2_client/check_token
|
||||
user-info-uri: ${security.oauth2.oauth-server}/user
|
||||
authorization:
|
||||
check-token-access: ${security.oauth2.oauth-server}/oauth2_client/token_key
|
||||
api-path:
|
||||
user-center: http://121.36.71.250:58085/operator/
|
||||
|
||||
#api-path:
|
||||
# user-center: http://192.168.0.155:7011/usercenter
|
||||
# user-center-2: http://${server.ip}/usercenter
|
||||
#
|
||||
#security:
|
||||
# oauth2:
|
||||
# oauth-server: ${api-path.user-center}
|
||||
# oauth-logout: ${security.oauth2.oauth-server}/logout?redirect_uri=${server.url}
|
||||
# client:
|
||||
# client-id: f7f93ed52a844d4aaf40eb5af22b401b
|
||||
# client-secret: U2Vkenl2MGg3cThhTlI3bGN6VXdyOExubFowTWhsVWJsbVBTTXovNmhZemxIdG9KZmEyTjJIRnI0dG1McEdEVA==
|
||||
# user-authorization-uri: ${security.oauth2.oauth-server}/oauth2_client/authorize
|
||||
# access-token-uri: ${security.oauth2.oauth-server}/oauth2_client/token
|
||||
# grant-type: authorization_code
|
||||
# resource:
|
||||
# jwt:
|
||||
# key-uri: ${security.oauth2.oauth-server}/oauth2_client/token_key
|
||||
# token-info-uri: ${security.oauth2.oauth-server}/oauth2_client/check_token
|
||||
# user-info-uri: ${security.oauth2.oauth-server}/user
|
||||
# authorization:
|
||||
# check-token-access: ${security.oauth2.oauth-server}/oauth2_client/token_key
|
||||
#
|
||||
#
|
||||
# 短信验证码服务
|
||||
sms:
|
||||
active: true
|
||||
type: default
|
||||
default-sms:
|
||||
account: xd001382
|
||||
password: xd001382136
|
||||
sign: 【AIXXX平台】
|
||||
template:
|
||||
verification-code: '{sign} 您的验证码为 {content}, 有效时间为120秒,若非本人操作,请忽略。'
|
||||
|
||||
wxpay:
|
||||
# 商户号
|
||||
mchId: 1609461201
|
||||
# 商户API证书序列号
|
||||
mchSerialNo: 2F16A068181C2998F3EE5271416F720AF0146293
|
||||
# 商户私钥文件
|
||||
# 注意:apiclient_key地址
|
||||
privateKeyPath: D:\AH\apiclient_key.pem
|
||||
# APIv3密钥
|
||||
apiV3Key: _TSKJ_0471_TSkj_0471_tsKJ_0471__
|
||||
# APPID 小程序id
|
||||
appid: wxe17874894f7ff27b
|
||||
# 微信服务器地址
|
||||
domain: https://api.mch.weixin.qq.com
|
||||
# 接收结果通知地址
|
||||
notifyUrl: xxx
|
@ -167,6 +167,27 @@ file:
|
||||
video: 100
|
||||
audio: 600
|
||||
|
||||
# 安全
|
||||
security:
|
||||
oauth2:
|
||||
oauth-server: http://192.168.0.115:8091/operator/
|
||||
oauth-logout: ${security.oauth2.oauth-server}/logout?redirect_uri=${server.url}
|
||||
client:
|
||||
client-id: 46c4715a2a504dd48398bda88b5c3a88
|
||||
client-secret: Rlc0WlBvWGRRZVlJbGdPb3BnMzZxVmU1ZFlOdVFLcHo1QnFCQ1UvVFAzSGxIdG9KZmEyTjJIRnI0dG1McEdEVA==
|
||||
user-authorization-uri: ${security.oauth2.oauth-server}/oauth2_client/authorize
|
||||
access-token-uri: ${security.oauth2.oauth-server}/oauth2_client/token
|
||||
grant-type: authorization_code
|
||||
resource:
|
||||
jwt:
|
||||
key-uri: ${security.oauth2.oauth-server}/oauth2_client/token_key
|
||||
token-info-uri: ${security.oauth2.oauth-server}/oauth2_client/check_token
|
||||
user-info-uri: ${security.oauth2.oauth-server}/user
|
||||
authorization:
|
||||
check-token-access: ${security.oauth2.oauth-server}/oauth2_client/token_key
|
||||
api-path:
|
||||
user-center: http://192.168.0.115:8091/operator/
|
||||
|
||||
#api-path:
|
||||
# user-center: http://192.168.0.155:7011/usercenter
|
||||
# user-center-2: http://${server.ip}/usercenter
|
||||
|
@ -0,0 +1,374 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.com.tenlion.operator.dao.accountbank.IAccountBankDao">
|
||||
|
||||
<resultMap id="accountBankDTO" type="cn.com.tenlion.operator.pojo.dtos.accountbank.AccountBankDTO">
|
||||
<result column="account_bank_id" property="accountBankId"/>
|
||||
<result column="bank_name" property="bankName"/>
|
||||
<result column="bank_number" property="bankNumber"/>
|
||||
<result column="bank_account_name" property="bankAccountName"/>
|
||||
<result column="bank_unionpay_number" property="bankUnionpayNumber"/>
|
||||
<result column="bank_remark" property="bankRemark"/>
|
||||
<result column="bank_switch" property="bankSwitch"/>
|
||||
<result column="gmt_create" property="gmtCreate"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="gmt_modified" property="gmtModified"/>
|
||||
<result column="modifier" property="modifier"/>
|
||||
<result column="is_delete" property="isDelete"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="accountBankBO" type="cn.com.tenlion.operator.pojo.bos.accountbank.AccountBankBO">
|
||||
<result column="account_bank_id" property="accountBankId"/>
|
||||
<result column="bank_name" property="bankName"/>
|
||||
<result column="bank_number" property="bankNumber"/>
|
||||
<result column="bank_account_name" property="bankAccountName"/>
|
||||
<result column="bank_unionpay_number" property="bankUnionpayNumber"/>
|
||||
<result column="bank_remark" property="bankRemark"/>
|
||||
<result column="bank_switch" property="bankSwitch"/>
|
||||
<result column="gmt_create" property="gmtCreate"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="gmt_modified" property="gmtModified"/>
|
||||
<result column="modifier" property="modifier"/>
|
||||
<result column="is_delete" property="isDelete"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="accountBankPO" type="cn.com.tenlion.operator.pojo.pos.accountbank.AccountBankPO">
|
||||
<result column="account_bank_id" property="accountBankId"/>
|
||||
<result column="bank_name" property="bankName"/>
|
||||
<result column="bank_number" property="bankNumber"/>
|
||||
<result column="bank_account_name" property="bankAccountName"/>
|
||||
<result column="bank_unionpay_number" property="bankUnionpayNumber"/>
|
||||
<result column="bank_remark" property="bankRemark"/>
|
||||
<result column="bank_switch" property="bankSwitch"/>
|
||||
<result column="gmt_create" property="gmtCreate"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="gmt_modified" property="gmtModified"/>
|
||||
<result column="modifier" property="modifier"/>
|
||||
<result column="is_delete" property="isDelete"/>
|
||||
</resultMap>
|
||||
|
||||
<update id="updateSwitch" parameterType="map">
|
||||
UPDATE
|
||||
operator_account_bank
|
||||
SET
|
||||
bank_switch = #{bankSwitch}
|
||||
WHERE
|
||||
1 = 1
|
||||
<if test="accountBankId != null and accountBankId != ''">
|
||||
AND account_bank_id = #{accountBankId}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<select id="getOpen" parameterType="map" resultMap="accountBankDTO">
|
||||
SELECT
|
||||
t1.bank_name,
|
||||
t1.bank_number,
|
||||
t1.bank_account_name,
|
||||
t1.bank_unionpay_number,
|
||||
t1.bank_remark,
|
||||
t1.bank_switch,
|
||||
t1.account_bank_id
|
||||
FROM
|
||||
operator_account_bank t1
|
||||
WHERE
|
||||
t1.is_delete = 0 AND t1.bank_switch = 1
|
||||
ORDER BY
|
||||
t1.id
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<!-- 新增平台账户表 -->
|
||||
<insert id="save" parameterType="map">
|
||||
INSERT INTO operator_account_bank(
|
||||
account_bank_id,
|
||||
bank_name,
|
||||
bank_number,
|
||||
bank_account_name,
|
||||
bank_unionpay_number,
|
||||
bank_remark,
|
||||
bank_switch,
|
||||
gmt_create,
|
||||
creator,
|
||||
gmt_modified,
|
||||
modifier,
|
||||
is_delete
|
||||
) VALUES(
|
||||
#{accountBankId},
|
||||
#{bankName},
|
||||
#{bankNumber},
|
||||
#{bankAccountName},
|
||||
#{bankUnionpayNumber},
|
||||
#{bankRemark},
|
||||
#{bankSwitch},
|
||||
#{gmtCreate},
|
||||
#{creator},
|
||||
#{gmtModified},
|
||||
#{modifier},
|
||||
#{isDelete}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除平台账户表 -->
|
||||
<update id="remove" parameterType="map">
|
||||
UPDATE
|
||||
operator_account_bank
|
||||
SET
|
||||
gmt_modified = #{gmtModified},
|
||||
modifier = #{modifier},
|
||||
is_delete = 1
|
||||
WHERE
|
||||
account_bank_id IN
|
||||
<foreach collection="accountBankIds" index="index" open="(" separator="," close=")">
|
||||
#{accountBankIds[${index}]}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 删除平台账户表(物理) -->
|
||||
<update id="delete" parameterType="map">
|
||||
DELETE FROM
|
||||
operator_account_bank
|
||||
WHERE
|
||||
account_bank_id IN
|
||||
<foreach collection="accountBankIds" index="index" open="(" separator="," close=")">
|
||||
#{accountBankIds[${index}]}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 修改平台账户表 -->
|
||||
<update id="update" parameterType="map">
|
||||
UPDATE
|
||||
operator_account_bank
|
||||
SET
|
||||
<if test="bankName != null and bankName != ''">
|
||||
bank_name = #{bankName},
|
||||
</if>
|
||||
<if test="bankNumber != null and bankNumber != ''">
|
||||
bank_number = #{bankNumber},
|
||||
</if>
|
||||
<if test="bankAccountName != null and bankAccountName != ''">
|
||||
bank_account_name = #{bankAccountName},
|
||||
</if>
|
||||
<if test="bankUnionpayNumber != null and bankUnionpayNumber != ''">
|
||||
bank_unionpay_number = #{bankUnionpayNumber},
|
||||
</if>
|
||||
<if test="bankRemark != null and bankRemark != ''">
|
||||
bank_remark = #{bankRemark},
|
||||
</if>
|
||||
<if test="bankSwitch != null and bankSwitch != ''">
|
||||
bank_switch = #{bankSwitch},
|
||||
</if>
|
||||
gmt_modified = #{gmtModified},
|
||||
modifier = #{modifier},
|
||||
account_bank_id = account_bank_id
|
||||
WHERE
|
||||
account_bank_id = #{accountBankId}
|
||||
</update>
|
||||
|
||||
<!-- 平台账户表详情 -->
|
||||
<select id="get" parameterType="map" resultMap="accountBankDTO">
|
||||
SELECT
|
||||
t1.bank_name,
|
||||
t1.bank_number,
|
||||
t1.bank_account_name,
|
||||
t1.bank_unionpay_number,
|
||||
t1.bank_remark,
|
||||
t1.bank_switch,
|
||||
t1.account_bank_id
|
||||
FROM
|
||||
operator_account_bank t1
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="accountBankId != null and accountBankId != ''">
|
||||
AND
|
||||
t1.account_bank_id = #{accountBankId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 平台账户表详情 -->
|
||||
<select id="getBO" parameterType="map" resultMap="accountBankBO">
|
||||
SELECT
|
||||
t1.account_bank_id,
|
||||
t1.bank_name,
|
||||
t1.bank_number,
|
||||
t1.bank_account_name,
|
||||
t1.bank_unionpay_number,
|
||||
t1.bank_remark,
|
||||
t1.bank_switch,
|
||||
t1.gmt_create,
|
||||
t1.creator,
|
||||
t1.gmt_modified,
|
||||
t1.modifier,
|
||||
t1.is_delete
|
||||
FROM
|
||||
operator_account_bank t1
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="accountBankId != null and accountBankId != ''">
|
||||
AND
|
||||
t1.account_bank_id = #{accountBankId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 平台账户表详情 -->
|
||||
<select id="getPO" parameterType="map" resultMap="accountBankPO">
|
||||
SELECT
|
||||
t1.account_bank_id,
|
||||
t1.bank_name,
|
||||
t1.bank_number,
|
||||
t1.bank_account_name,
|
||||
t1.bank_unionpay_number,
|
||||
t1.bank_remark,
|
||||
t1.bank_switch,
|
||||
t1.gmt_create,
|
||||
t1.creator,
|
||||
t1.gmt_modified,
|
||||
t1.modifier,
|
||||
t1.is_delete
|
||||
FROM
|
||||
operator_account_bank t1
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="accountBankId != null and accountBankId != ''">
|
||||
AND
|
||||
t1.account_bank_id = #{accountBankId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 平台账户表列表 -->
|
||||
<select id="list" parameterType="map" resultMap="accountBankDTO">
|
||||
SELECT
|
||||
t1.account_bank_id,
|
||||
t1.bank_name,
|
||||
t1.bank_number,
|
||||
t1.bank_account_name,
|
||||
t1.bank_unionpay_number,
|
||||
t1.bank_remark,
|
||||
t1.bank_switch,
|
||||
t1.gmt_create,
|
||||
t1.creator,
|
||||
t1.gmt_modified,
|
||||
t1.modifier,
|
||||
t1.is_delete,
|
||||
1
|
||||
FROM
|
||||
operator_account_bank t1
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND (
|
||||
<!-- 这里添加其他条件 -->
|
||||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND
|
||||
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND
|
||||
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
|
||||
</if>
|
||||
<if test="accountBankIds != null and accountBankIds.size > 0">
|
||||
AND
|
||||
t1.account_bank_id IN
|
||||
<foreach collection="accountBankIds" index="index" open="(" separator="," close=")">
|
||||
#{accountBankIds[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 平台账户表列表 -->
|
||||
<select id="listBO" parameterType="map" resultMap="accountBankBO">
|
||||
SELECT
|
||||
t1.account_bank_id,
|
||||
t1.bank_name,
|
||||
t1.bank_number,
|
||||
t1.bank_account_name,
|
||||
t1.bank_unionpay_number,
|
||||
t1.bank_remark,
|
||||
t1.bank_switch,
|
||||
t1.gmt_create,
|
||||
t1.creator,
|
||||
t1.gmt_modified,
|
||||
t1.modifier,
|
||||
t1.is_delete
|
||||
FROM
|
||||
operator_account_bank t1
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND (
|
||||
<!-- 这里添加其他条件 -->
|
||||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND
|
||||
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND
|
||||
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
|
||||
</if>
|
||||
<if test="accountBankIds != null and accountBankIds.size > 0">
|
||||
AND
|
||||
t1.account_bank_id IN
|
||||
<foreach collection="accountBankIds" index="index" open="(" separator="," close=")">
|
||||
#{accountBankIds[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 平台账户表列表 -->
|
||||
<select id="listPO" parameterType="map" resultMap="accountBankPO">
|
||||
SELECT
|
||||
t1.account_bank_id,
|
||||
t1.bank_name,
|
||||
t1.bank_number,
|
||||
t1.bank_account_name,
|
||||
t1.bank_unionpay_number,
|
||||
t1.bank_remark,
|
||||
t1.bank_switch,
|
||||
t1.gmt_create,
|
||||
t1.creator,
|
||||
t1.gmt_modified,
|
||||
t1.modifier,
|
||||
t1.is_delete
|
||||
FROM
|
||||
operator_account_bank t1
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND (
|
||||
<!-- 这里添加其他条件 -->
|
||||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND
|
||||
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND
|
||||
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
|
||||
</if>
|
||||
<if test="accountBankIds != null and accountBankIds.size > 0">
|
||||
AND
|
||||
t1.account_bank_id IN
|
||||
<foreach collection="accountBankIds" index="index" open="(" separator="," close=")">
|
||||
#{accountBankIds[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 平台账户表统计 -->
|
||||
<select id="count" parameterType="map" resultType="Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
operator_account_bank t1
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -244,7 +244,7 @@
|
||||
WHERE
|
||||
t1.account_id = #{accountId}
|
||||
ORDER BY
|
||||
t1.gmt_create DESC
|
||||
t1.id DESC
|
||||
</select>
|
||||
|
||||
<!-- 客户账户流水列表 -->
|
||||
|
@ -429,9 +429,9 @@
|
||||
<if test="rechargeType != null and rechargeType != '' and rechargeType == 2 ">
|
||||
AND t1.reconciliation_status = '1'
|
||||
</if>
|
||||
<if test="(accountId == null or accountId == '') and userId != 1 ">
|
||||
<!-- <if test="(accountId == null or accountId == '') and userId != '1' ">
|
||||
AND 1 = 0
|
||||
</if>
|
||||
</if>-->
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND (
|
||||
<!-- 这里添加其他条件 -->
|
||||
|
344
src/main/resources/mybatis/mapper/agreement/agreement-mapper.xml
Normal file
344
src/main/resources/mybatis/mapper/agreement/agreement-mapper.xml
Normal file
@ -0,0 +1,344 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.com.tenlion.operator.dao.agreement.IAgreementDao">
|
||||
|
||||
<resultMap id="agreementDTO" type="cn.com.tenlion.operator.pojo.dtos.agreement.AgreementDTO">
|
||||
<result column="agreement_id" property="agreementId"/>
|
||||
<result column="agreement_title" property="agreementTitle"/>
|
||||
<result column="agreement_type" property="agreementType"/>
|
||||
<result column="agreement_content" property="agreementContent"/>
|
||||
<result column="agreement_switch" property="agreementSwitch"/>
|
||||
<result column="agreement_version" property="agreementVersion"/>
|
||||
<result column="gmt_create" property="gmtCreate"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="modifier" property="modifier"/>
|
||||
<result column="gmt_modified" property="gmtModified"/>
|
||||
<result column="is_delete" property="isDelete"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="agreementBO" type="cn.com.tenlion.operator.pojo.bos.agreement.AgreementBO">
|
||||
<result column="agreement_id" property="agreementId"/>
|
||||
<result column="agreement_title" property="agreementTitle"/>
|
||||
<result column="agreement_type" property="agreementType"/>
|
||||
<result column="agreement_content" property="agreementContent"/>
|
||||
<result column="agreement_switch" property="agreementSwitch"/>
|
||||
<result column="agreement_version" property="agreementVersion"/>
|
||||
<result column="gmt_create" property="gmtCreate"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="modifier" property="modifier"/>
|
||||
<result column="gmt_modified" property="gmtModified"/>
|
||||
<result column="is_delete" property="isDelete"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="agreementPO" type="cn.com.tenlion.operator.pojo.pos.agreement.AgreementPO">
|
||||
<result column="agreement_id" property="agreementId"/>
|
||||
<result column="agreement_title" property="agreementTitle"/>
|
||||
<result column="agreement_type" property="agreementType"/>
|
||||
<result column="agreement_content" property="agreementContent"/>
|
||||
<result column="agreement_switch" property="agreementSwitch"/>
|
||||
<result column="agreement_version" property="agreementVersion"/>
|
||||
<result column="gmt_create" property="gmtCreate"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="modifier" property="modifier"/>
|
||||
<result column="gmt_modified" property="gmtModified"/>
|
||||
<result column="is_delete" property="isDelete"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 新增平台协议管理 -->
|
||||
<insert id="save" parameterType="map">
|
||||
INSERT INTO operator_agreement(
|
||||
agreement_id,
|
||||
agreement_title,
|
||||
agreement_type,
|
||||
agreement_content,
|
||||
agreement_switch,
|
||||
agreement_version,
|
||||
gmt_create,
|
||||
creator,
|
||||
modifier,
|
||||
gmt_modified,
|
||||
is_delete
|
||||
) VALUES(
|
||||
#{agreementId},
|
||||
#{agreementTitle},
|
||||
#{agreementType},
|
||||
#{agreementContent},
|
||||
#{agreementSwitch},
|
||||
#{agreementVersion},
|
||||
#{gmtCreate},
|
||||
#{creator},
|
||||
#{modifier},
|
||||
#{gmtModified},
|
||||
#{isDelete}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除平台协议管理 -->
|
||||
<update id="remove" parameterType="map">
|
||||
UPDATE
|
||||
operator_agreement
|
||||
SET
|
||||
gmt_modified = #{gmtModified},
|
||||
modifier = #{modifier},
|
||||
is_delete = 1
|
||||
WHERE
|
||||
agreement_id IN
|
||||
<foreach collection="agreementIds" index="index" open="(" separator="," close=")">
|
||||
#{agreementIds[${index}]}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 删除平台协议管理(物理) -->
|
||||
<update id="delete" parameterType="map">
|
||||
DELETE FROM
|
||||
operator_agreement
|
||||
WHERE
|
||||
agreement_id IN
|
||||
<foreach collection="agreementIds" index="index" open="(" separator="," close=")">
|
||||
#{agreementIds[${index}]}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 修改平台协议管理 -->
|
||||
<update id="update" parameterType="map">
|
||||
UPDATE
|
||||
operator_agreement
|
||||
SET
|
||||
<if test="agreementTitle != null and agreementTitle != ''">
|
||||
agreement_title = #{agreementTitle},
|
||||
</if>
|
||||
<if test="agreementContent != null and agreementContent != ''">
|
||||
agreement_content = #{agreementContent},
|
||||
</if>
|
||||
<if test="agreementSwitch != null and agreementSwitch != ''">
|
||||
agreement_switch = #{agreementSwitch},
|
||||
</if>
|
||||
<if test="agreementVersion != null">
|
||||
agreement_version = #{agreementVersion},
|
||||
</if>
|
||||
gmt_modified = #{gmtModified},
|
||||
modifier = #{modifier},
|
||||
agreement_id = agreement_id
|
||||
WHERE
|
||||
agreement_id = #{agreementId}
|
||||
</update>
|
||||
|
||||
<!-- 平台协议管理详情 -->
|
||||
<select id="get" parameterType="map" resultMap="agreementDTO">
|
||||
SELECT
|
||||
t1.agreement_title,
|
||||
t1.agreement_type,
|
||||
t1.agreement_content,
|
||||
t1.agreement_switch,
|
||||
t1.agreement_version,
|
||||
t1.agreement_id
|
||||
FROM
|
||||
operator_agreement t1
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="agreementId != null and agreementId != ''">
|
||||
AND
|
||||
t1.agreement_id = #{agreementId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 平台协议管理详情 -->
|
||||
<select id="getBO" parameterType="map" resultMap="agreementBO">
|
||||
SELECT
|
||||
t1.agreement_id,
|
||||
t1.agreement_title,
|
||||
t1.agreement_type,
|
||||
t1.agreement_content,
|
||||
t1.agreement_switch,
|
||||
t1.agreement_version,
|
||||
t1.gmt_create,
|
||||
t1.creator,
|
||||
t1.modifier,
|
||||
t1.gmt_modified,
|
||||
t1.is_delete
|
||||
FROM
|
||||
operator_agreement t1
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="agreementId != null and agreementId != ''">
|
||||
AND
|
||||
t1.agreement_id = #{agreementId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getByType" parameterType="java.lang.String" resultMap="agreementDTO">
|
||||
SELECT
|
||||
t1.agreement_title,
|
||||
t1.agreement_type,
|
||||
t1.agreement_content,
|
||||
t1.agreement_version
|
||||
FROM
|
||||
operator_agreement t1
|
||||
WHERE
|
||||
t1.is_delete = 0 AND t1.agreement_type = #{type}
|
||||
ORDER BY
|
||||
t1.agreement_version DESC
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 平台协议管理详情 -->
|
||||
<select id="getPO" parameterType="map" resultMap="agreementPO">
|
||||
SELECT
|
||||
t1.agreement_id,
|
||||
t1.agreement_title,
|
||||
t1.agreement_type,
|
||||
t1.agreement_content,
|
||||
t1.agreement_switch,
|
||||
t1.agreement_version,
|
||||
t1.gmt_create,
|
||||
t1.creator,
|
||||
t1.modifier,
|
||||
t1.gmt_modified,
|
||||
t1.is_delete
|
||||
FROM
|
||||
operator_agreement t1
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="agreementId != null and agreementId != ''">
|
||||
AND
|
||||
t1.agreement_id = #{agreementId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 平台协议管理列表 -->
|
||||
<select id="list" parameterType="map" resultMap="agreementDTO">
|
||||
SELECT
|
||||
t1.agreement_id,
|
||||
t1.agreement_title,
|
||||
t1.agreement_type,
|
||||
t1.agreement_content,
|
||||
t1.agreement_switch,
|
||||
t1.agreement_version,
|
||||
t1.gmt_create,
|
||||
t1.creator,
|
||||
t1.modifier,
|
||||
t1.gmt_modified,
|
||||
t1.is_delete,
|
||||
1
|
||||
FROM
|
||||
operator_agreement t1
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND (
|
||||
<!-- 这里添加其他条件 -->
|
||||
t1.agreement_title LIKE CONCAT('%', #{keywords}, '%')
|
||||
OR
|
||||
t1.agreement_content LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND
|
||||
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND
|
||||
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
|
||||
</if>
|
||||
<if test="agreementIds != null and agreementIds.size > 0">
|
||||
AND
|
||||
t1.agreement_id IN
|
||||
<foreach collection="agreementIds" index="index" open="(" separator="," close=")">
|
||||
#{agreementIds[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 平台协议管理列表 -->
|
||||
<select id="listBO" parameterType="map" resultMap="agreementBO">
|
||||
SELECT
|
||||
t1.agreement_id,
|
||||
t1.agreement_title,
|
||||
t1.agreement_type,
|
||||
t1.agreement_content,
|
||||
t1.agreement_switch,
|
||||
t1.agreement_version,
|
||||
t1.gmt_create,
|
||||
t1.creator,
|
||||
t1.modifier,
|
||||
t1.gmt_modified,
|
||||
t1.is_delete
|
||||
FROM
|
||||
operator_agreement t1
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND (
|
||||
<!-- 这里添加其他条件 -->
|
||||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND
|
||||
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND
|
||||
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
|
||||
</if>
|
||||
<if test="agreementIds != null and agreementIds.size > 0">
|
||||
AND
|
||||
t1.agreement_id IN
|
||||
<foreach collection="agreementIds" index="index" open="(" separator="," close=")">
|
||||
#{agreementIds[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 平台协议管理列表 -->
|
||||
<select id="listPO" parameterType="map" resultMap="agreementPO">
|
||||
SELECT
|
||||
t1.agreement_id,
|
||||
t1.agreement_title,
|
||||
t1.agreement_type,
|
||||
t1.agreement_content,
|
||||
t1.agreement_switch,
|
||||
t1.agreement_version,
|
||||
t1.gmt_create,
|
||||
t1.creator,
|
||||
t1.modifier,
|
||||
t1.gmt_modified,
|
||||
t1.is_delete
|
||||
FROM
|
||||
operator_agreement t1
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND (
|
||||
<!-- 这里添加其他条件 -->
|
||||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND
|
||||
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
AND
|
||||
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
|
||||
</if>
|
||||
<if test="agreementIds != null and agreementIds.size > 0">
|
||||
AND
|
||||
t1.agreement_id IN
|
||||
<foreach collection="agreementIds" index="index" open="(" separator="," close=")">
|
||||
#{agreementIds[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 平台协议管理统计 -->
|
||||
<select id="count" parameterType="map" resultType="Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
operator_agreement t1
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
</select>
|
||||
|
||||
</mapper>
|
9404
src/main/resources/static/assets/js/vendor/wangEditor/jquery-1.7.2.js
vendored
Normal file
9404
src/main/resources/static/assets/js/vendor/wangEditor/jquery-1.7.2.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
27
src/main/resources/static/assets/js/vendor/wangEditor/v4/wangEditor.css
vendored
Normal file
27
src/main/resources/static/assets/js/vendor/wangEditor/v4/wangEditor.css
vendored
Normal file
File diff suppressed because one or more lines are too long
24129
src/main/resources/static/assets/js/vendor/wangEditor/v4/wangEditor.min.js
vendored
Normal file
24129
src/main/resources/static/assets/js/vendor/wangEditor/v4/wangEditor.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
var editorObjectArr = {};
|
||||
@ -20,21 +20,27 @@ window.wangEditor.fullscreen = {
|
||||
},
|
||||
customInsert: function (insertImg, result, editor) {
|
||||
console.log(result);
|
||||
var url = 'http://192.168.0.104:8082/news/' + result.data[0];
|
||||
var locat = (window.location+'').split('/');
|
||||
var server = locat[0]+'//'+locat[2]+'/'+locat[3] + "/";
|
||||
console.log(server)
|
||||
var url = server + result.data[0];
|
||||
insertImg(url);
|
||||
}
|
||||
};
|
||||
editorObject.create();
|
||||
$(editorSelector + " .w-e-toolbar").append('<div class="w-e-menu"><a class="_wangEditor_btn_fullscreen" href="javascript:window.wangEditor.fullscreen.toggleFullscreen(\'' + editorSelector + '\')">全屏</a></div>');
|
||||
$(editorSelector + " .w-e-toolbar").append('<div class="w-e-menu"><a class="_wangEditor_btn_preview" href="javascript:window.wangEditor.fullscreen.preview(\'' + editorSelector + '\')">预览</a></div>');
|
||||
$(editorSelector + " .w-e-toolbar").append('<div class="w-e-menu"><a class="_wangEditor_btn_fullscreen" href="javascript:window.wangEditor.fullscreen.toggleFullscreen(\'' + editorSelector + '\')">全屏编辑</a></div>');
|
||||
$(editorSelector + " .w-e-toolbar").append('<div class="w-e-menu"><a class="_wangEditor_btn_preview" href="javascript:window.wangEditor.fullscreen.preview(\'' + editorSelector + '\')">效果预览</a></div>');
|
||||
$(editorSelector + " .w-e-toolbar").append('<div class="w-e-menu"><a class="_wangEditor_btn_preview" href="javascript:window.wangEditor.fullscreen.uploadVideo(\'' + editorSelector + '\')">上传视频</a></div>');
|
||||
editorObjectArr[editorSelector] = editorObject;
|
||||
},
|
||||
},
|
||||
toggleFullscreen: function(editorSelector){
|
||||
$(editorSelector).toggleClass('fullscreen-editor');
|
||||
if($(editorSelector + ' ._wangEditor_btn_fullscreen').text() == '全屏'){
|
||||
if($(editorSelector + ' ._wangEditor_btn_fullscreen').text() == '全屏编辑'){
|
||||
$(editorSelector + ' ._wangEditor_btn_fullscreen').text('退出全屏');
|
||||
$(".layui-layout-admin").hide();
|
||||
}else{
|
||||
$(editorSelector + ' ._wangEditor_btn_fullscreen').text('全屏');
|
||||
$(editorSelector + ' ._wangEditor_btn_fullscreen').text('全屏编辑');
|
||||
$(".layui-layout-admin").show();
|
||||
}
|
||||
},
|
||||
preview: function(editorSelector){
|
||||
@ -45,5 +51,110 @@ window.wangEditor.fullscreen = {
|
||||
content: html//通过编辑器的监听onchange事件把编辑器内容放到id为bBody的input里
|
||||
});
|
||||
layer.full(layIndex);
|
||||
},
|
||||
initUploadVideo: function(editId, editorSelector) {
|
||||
var self = this;
|
||||
$(editId + " .editorVideo").each(function(i, v) {
|
||||
self.initVideoRightKey("#" + $(v).attr("id"));
|
||||
});
|
||||
},
|
||||
initVideoRightKey: function(videoId){
|
||||
var input = '<form class="layui-form layui-form-pane" lay-filter="dataForm"><div class="layui-form-item layui-row">' +
|
||||
'<div class="layui-col-lg6">' +
|
||||
'<div class="layui-form-item">' +
|
||||
'<label class="layui-form-label">视频宽度<span style="color: red">*</span></label>' +
|
||||
'<div class="layui-input-block">' +
|
||||
'<input type="number" id="widthText" name="widthText" class="layui-input" value="widthTextValue" placeholder="请输入视频宽度" >' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'<div class="layui-col-lg6">' +
|
||||
'<div class="layui-form-item">' +
|
||||
'<label class="layui-form-label">视频高度<span style="color: red">*</span></label>' +
|
||||
'<div class="layui-input-block">' +
|
||||
'<input type="number" id="heightText" name="heightText" class="layui-input" value="heightTextValue" placeholder="请输入视频高度" >' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div></form>';
|
||||
var getData = function(id) {
|
||||
return {height: $(id).height(), width:$(id).width()};
|
||||
}
|
||||
var array = [
|
||||
{header: '视频操作'},
|
||||
{text: '尺寸修改', action: function(e){
|
||||
e.preventDefault();
|
||||
$(".dropdown-context").hide();
|
||||
layer.open({
|
||||
id: 1,
|
||||
type: 1,
|
||||
area: ['580px', '170px'],
|
||||
shade: 0,
|
||||
title: '更改高度与宽度',
|
||||
content: input.replace("heightTextValue", getData(videoId).height).replace("widthTextValue", getData(videoId).width),
|
||||
btn: ['更改尺寸', '<span style="color:green">左←</span>', '<span style="color:green">中↔</span>', '<span style="color:green">右→</span>', '关闭' ],
|
||||
btn1: function (index1, layero) {
|
||||
//获取输入框里面的值
|
||||
var heightText = $("#heightText").val();
|
||||
var widthText = $("#widthText").val();
|
||||
if(heightText) {
|
||||
$(videoId).css({height: heightText + "px"});
|
||||
}
|
||||
if(widthText) {
|
||||
$(videoId).css({width: widthText + "px"});
|
||||
}
|
||||
return false;
|
||||
},
|
||||
btn2: function (index1, layero) {
|
||||
$(videoId).parent().attr("align", "left");
|
||||
return false;
|
||||
},
|
||||
btn3: function (index1, layero) {
|
||||
$(videoId).parent().attr("align", "center");
|
||||
return false;
|
||||
},
|
||||
btn4: function (index1, layero) {
|
||||
$(videoId).parent().attr("align", "right");
|
||||
return false;
|
||||
},
|
||||
btn5: function (index, layero) {
|
||||
layer.close(index);
|
||||
}
|
||||
});
|
||||
}
|
||||
},{text: '删除视频', action: function(e){
|
||||
e.preventDefault();
|
||||
$(".dropdown-context").hide();
|
||||
$(videoId).remove();
|
||||
}
|
||||
},{text: '取消操作', action: function(e){
|
||||
e.preventDefault();
|
||||
$(".dropdown-context").hide();
|
||||
}
|
||||
},{divider: true}];
|
||||
//创建右键菜单
|
||||
context.attach(videoId, array);
|
||||
},
|
||||
uploadVideo: function(editorSelector){
|
||||
var self = this;
|
||||
top.dialog.file({
|
||||
type: 'video',
|
||||
title: '上传视频文件( * 右键调整位置、大小)',
|
||||
width: '400px',
|
||||
height: '460px',
|
||||
maxFileCount: '1',
|
||||
onClose: function() {
|
||||
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
||||
var locat = (window.location+'').split('/');
|
||||
var server = locat[0]+'//'+locat[2]+'/'+locat[3] + "/";
|
||||
var url = server + 'route/file/download/true/' + uploadFileArray[0].data;
|
||||
var id = '#' + uploadFileArray[0].data;
|
||||
if($(id).length > 0) {
|
||||
return;
|
||||
}
|
||||
editorObjectArr[editorSelector].cmd.do('insertHTML', '</p><p><br></p><p><video class="editorVideo" id="' + uploadFileArray[0].data + '" controls style="width:500px;height:500px; align:center; object-fit: fill" src="'+ url + '"></video></p><p><br>');
|
||||
self.initVideoRightKey(id);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
52
src/main/resources/static/assets/js/vendor/wangEditor/wangEditor-fullscreen-plugin4.js
vendored
Normal file
52
src/main/resources/static/assets/js/vendor/wangEditor/wangEditor-fullscreen-plugin4.js
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
var editorObjectArr = {};
|
||||
|
||||
window.wangEditor.fullscreen = {
|
||||
|
||||
// editor create之后调用
|
||||
init: function(editorSelector, editorObject){
|
||||
editorObject.custom.uploadImgHooks = {
|
||||
fail: function (xhr, editor, result) {
|
||||
top.dialog.msg('系统错误,图片上传失败');
|
||||
},
|
||||
error: function (xhr, editor) {
|
||||
top.dialog.msg('网络异常');
|
||||
},
|
||||
timeout: function (xhr, editor) {
|
||||
top.dialog.msg('网络请求超时');
|
||||
},
|
||||
customInsert: function (insertImg, result, editor) {
|
||||
console.log(result);
|
||||
var locat = (window.location+'').split('/');
|
||||
var server = locat[0]+'//'+locat[2]+'/'+locat[3] + "/";
|
||||
console.log(server)
|
||||
var url = server + result.data[0];
|
||||
insertImg(url);
|
||||
}
|
||||
};
|
||||
editorObject.create();
|
||||
$(editorSelector + " .w-e-toolbar").append('<div class="w-e-menu"><a class="_wangEditor_btn_fullscreen" href="javascript:window.wangEditor.fullscreen.toggleFullscreen(\'' + editorSelector + '\')">全屏</a></div>');
|
||||
$(editorSelector + " .w-e-toolbar").append('<div class="w-e-menu"><a class="_wangEditor_btn_preview" href="javascript:window.wangEditor.fullscreen.preview(\'' + editorSelector + '\')">预览</a></div>');
|
||||
editorObjectArr[editorSelector] = editorObject;
|
||||
},
|
||||
toggleFullscreen: function(editorSelector){
|
||||
$(editorSelector).toggleClass('fullscreen-editor');
|
||||
if($(editorSelector + ' ._wangEditor_btn_fullscreen').text() == '全屏'){
|
||||
$(editorSelector + ' ._wangEditor_btn_fullscreen').text('退出全屏');
|
||||
}else{
|
||||
$(editorSelector + ' ._wangEditor_btn_fullscreen').text('全屏');
|
||||
}
|
||||
},
|
||||
preview: function(editorSelector){
|
||||
var html = editorObjectArr[editorSelector].txt.html();
|
||||
var layIndex = layer.open({//layui的弹出层直接把获取到的编辑器html内容放到里面就可以显示
|
||||
title: '效果预览',
|
||||
btn: ['关闭预览'],
|
||||
content: html//通过编辑器的监听onchange事件把编辑器内容放到id为bBody的input里
|
||||
});
|
||||
layer.full(layIndex);
|
||||
}
|
||||
};
|
16
src/main/resources/static/assets/js/vendor/wangEditor/wangEditor4.js
vendored
Normal file
16
src/main/resources/static/assets/js/vendor/wangEditor/wangEditor4.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -18,7 +18,10 @@
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">开户行<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block layui-form" id="bankNameSelectTemplateBox" lay-filter="bankNameSelectTemplateBox"></div>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="bankName" name="bankName" class="layui-input" value="" placeholder="请输入开户行" maxlength="50">
|
||||
</div>
|
||||
<!-- <div class="layui-input-block layui-form" id="bankNameSelectTemplateBox" lay-filter="bankNameSelectTemplateBox"></div>
|
||||
<script id="bankNameSelectTemplate" type="text/html">
|
||||
<select id="bankName" name="bankName">
|
||||
<option value="">请选择开户行</option>
|
||||
@ -26,12 +29,12 @@
|
||||
<option value="{{item.dataName}}">{{item.dataName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
</script>-->
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">卡号<span style="color: red">*</span></label>
|
||||
<label class="layui-form-label">银行账号<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="bankNumber" name="bankNumber" class="layui-input" value="" placeholder="请输入卡号" maxlength="50">
|
||||
<input type="text" id="bankNumber" name="bankNumber" class="layui-input" value="" placeholder="请输入银行账号" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
@ -70,7 +73,7 @@
|
||||
var viewerObj = {};
|
||||
|
||||
// 初始化
|
||||
function initBankNameSelect(selectValue) {
|
||||
/* function initBankNameSelect(selectValue) {
|
||||
top.restAjax.get(top.restAjax.path('api/data/listbyparentid/e38e8c46-56f7-49d7-8f9c-a4c36f89d994', []), {}, null, function(code, data, args) {
|
||||
laytpl(document.getElementById('bankNameSelectTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('bankNameSelectTemplateBox').innerHTML = html;
|
||||
@ -83,7 +86,7 @@
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
*/
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
@ -101,7 +104,7 @@
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/account/get-byuser/[[${userId}]]', []), {}, null, function(code, data) {
|
||||
top.restAjax.get(top.restAjax.path('api/account/get-byuser/1', []), {}, null, function(code, data) {
|
||||
var dataFormData = {};
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i] +'';
|
||||
@ -109,7 +112,7 @@
|
||||
dataFormData['accountMoneyDouble'] = data.accountMoneyDouble + "元";
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
initBankNameSelect(data.bankName);
|
||||
// initBankNameSelect(data.bankName);
|
||||
accountId = data.accountId;
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
@ -126,7 +129,7 @@
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
top.restAjax.put(top.restAjax.path('api/account/update/{accountId}', [accountId]), formData.field, null, function(code, data) {
|
||||
top.restAjax.put(top.restAjax.path('api/account/update/1', []), formData.field, null, function(code, data) {
|
||||
window.location.reload();
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
|
@ -26,6 +26,12 @@
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
|
||||
</div>
|
||||
<div class="layui-inline layui-form search-item" >
|
||||
<select id="accountRole" name="accountRole">
|
||||
<option value="代理商">代理商</option>
|
||||
<option value="普通用户">普通用户</option>
|
||||
</select>
|
||||
</div>
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
@ -164,7 +170,8 @@
|
||||
where: {
|
||||
keywords: $('#keywords').val(),
|
||||
startTime: $('#startTime').val(),
|
||||
endTime: $('#endTime').val()
|
||||
endTime: $('#endTime').val(),
|
||||
accountRole: $('#accountRole').val()
|
||||
},
|
||||
page: {
|
||||
curr: currentPage
|
||||
|
278
src/main/resources/templates/accountbank/list.html
Normal file
278
src/main/resources/templates/accountbank/list.html
Normal file
@ -0,0 +1,278 @@
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<base th:href="${#request.getContextPath() + '/'}">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="startTime" class="layui-input search-item" placeholder="开始时间" readonly>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
|
||||
</div>
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
<!-- 表头按钮组 -->
|
||||
<script type="text/html" id="headerToolBar">
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
|
||||
<i class="fa fa-lg fa-plus"></i> 新增
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
|
||||
<i class="fa fa-lg fa-edit"></i> 编辑
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
||||
<i class="fa fa-lg fa-trash"></i> 删除
|
||||
</button>
|
||||
</div>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'table', 'laydate', 'common'], function() {
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var table = layui.table;
|
||||
var admin = layui.admin;
|
||||
var laydate = layui.laydate;
|
||||
var common = layui.common;
|
||||
var resizeTimeout = null;
|
||||
var tableUrl = 'api/accountbank/listpage';
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
table.render({
|
||||
elem: '#dataTable',
|
||||
id: 'dataTable',
|
||||
url: top.restAjax.path(tableUrl, []),
|
||||
width: admin.screen() > 1 ? '100%' : '',
|
||||
height: $win.height() - 90,
|
||||
limit: 20,
|
||||
limits: [20, 40, 60, 80, 100, 200],
|
||||
toolbar: '#headerToolBar',
|
||||
defaultToolbar: [],
|
||||
request: {
|
||||
pageName: 'page',
|
||||
limitName: 'rows'
|
||||
},
|
||||
cols: [
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field: 'bankAccountName', width: 180, title: '公司名称', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'bankName', width: 280, title: '开户银行', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'bankNumber', width: 180, title: '银行账号', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'bankUnionpayNumber', width: 180, title: '银行联行号', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'bankRemark', width: 180, title: '备注', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'bankSwitch', width: 180, title: '开关状态', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
if(rowData == 1) {
|
||||
return "<b style='color:green'>开启</b>";
|
||||
}else {
|
||||
return "<b style='color:red'>关闭</b>";
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
page: true,
|
||||
parseData: function(data) {
|
||||
return {
|
||||
'code': 0,
|
||||
'msg': '',
|
||||
'count': data.total,
|
||||
'data': data.rows
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
// 重载表格
|
||||
function reloadTable(currentPage) {
|
||||
table.reload('dataTable', {
|
||||
url: top.restAjax.path(tableUrl, []),
|
||||
where: {
|
||||
keywords: $('#keywords').val(),
|
||||
startTime: $('#startTime').val(),
|
||||
endTime: $('#endTime').val()
|
||||
},
|
||||
page: {
|
||||
curr: currentPage
|
||||
},
|
||||
height: $win.height() - 90,
|
||||
});
|
||||
}
|
||||
// 初始化日期
|
||||
function initDate() {
|
||||
// 日期选择
|
||||
laydate.render({
|
||||
elem: '#startTime',
|
||||
format: 'yyyy-MM-dd'
|
||||
});
|
||||
laydate.render({
|
||||
elem: '#endTime',
|
||||
format: 'yyyy-MM-dd'
|
||||
});
|
||||
}
|
||||
// 删除
|
||||
function removeData(ids) {
|
||||
top.dialog.msg(top.dataMessage.delete, {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||
shade: 0.3,
|
||||
yes: function (index) {
|
||||
top.dialog.close(index);
|
||||
var layIndex;
|
||||
top.restAjax.delete(top.restAjax.path('api/accountbank/remove/{ids}', [ids]), {}, null, function (code, data) {
|
||||
top.dialog.msg(top.dataMessage.deleteSuccess, {time: 1000});
|
||||
reloadTable();
|
||||
}, function (code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function () {
|
||||
layIndex = top.dialog.msg(top.dataMessage.deleting, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function () {
|
||||
top.dialog.close(layIndex);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
initTable();
|
||||
initDate();
|
||||
// 事件 - 页面变化
|
||||
$win.on('resize', function() {
|
||||
clearTimeout(resizeTimeout);
|
||||
resizeTimeout = setTimeout(function() {
|
||||
reloadTable();
|
||||
}, 500);
|
||||
});
|
||||
// 事件 - 搜索
|
||||
$(document).on('click', '#search', function() {
|
||||
reloadTable(1);
|
||||
});
|
||||
// 事件 - 增删改
|
||||
table.on('toolbar(dataTable)', function(obj) {
|
||||
var layEvent = obj.event;
|
||||
var checkStatus = table.checkStatus('dataTable');
|
||||
var checkDatas = checkStatus.data;
|
||||
if(layEvent === 'saveEvent') {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/accountbank/save', []),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
} else if(layEvent === 'updateEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
} else {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/accountbank/update?accountBankId={accountBankId}', [checkDatas[0].accountBankId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if(layEvent === 'removeEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectDelete);
|
||||
} else {
|
||||
var ids = '';
|
||||
for(var i = 0, item; item = checkDatas[i++];) {
|
||||
if(i > 1) {
|
||||
ids += '_';
|
||||
}
|
||||
ids += item['accountBankId'];
|
||||
}
|
||||
removeData(ids);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
191
src/main/resources/templates/accountbank/save.html
Normal file
191
src/main/resources/templates/accountbank/save.html
Normal file
@ -0,0 +1,191 @@
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<base th:href="${#request.getContextPath() + '/'}">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
|
||||
<a href="javascript:void(0);"><cite>新增内容</cite></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">公司名称<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="bankAccountName" name="bankAccountName" class="layui-input" value="" placeholder="请输入公司名称" maxlength="100">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">开户银行<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="bankName" name="bankName" class="layui-input" value="" placeholder="请输入开户银行" maxlength="200">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">银行账号<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="bankNumber" name="bankNumber" class="layui-input" value="" placeholder="请输入银行账号" maxlength="100">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">银行联行号<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="bankUnionpayNumber" name="bankUnionpayNumber" class="layui-input" value="" placeholder="请输入银行联行号" maxlength="100">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">备注<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="bankRemark" name="bankRemark" class="layui-input" value="" placeholder="请输入备注" maxlength="500">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane="">
|
||||
<label class="layui-form-label">开关<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="bankSwitch" value="1" title="开启">
|
||||
<input type="radio" name="bankSwitch" value="0" title="关闭" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交新增</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
|
||||
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var laytpl = layui.laytpl;
|
||||
var laydate = layui.laydate;
|
||||
var wangEditor = window.wangEditor;
|
||||
var wangEditorObj = {};
|
||||
var viewerObj = {};
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
function refreshDownloadTemplet(fileName, file) {
|
||||
var dataRander = {};
|
||||
dataRander[fileName] = file;
|
||||
|
||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化文件列表
|
||||
function initFileList(fileName, ids, callback) {
|
||||
var dataForm = {};
|
||||
dataForm[fileName] = ids;
|
||||
form.val('dataForm', dataForm);
|
||||
|
||||
if(!ids) {
|
||||
refreshDownloadTemplet(fileName, []);
|
||||
if(callback) {
|
||||
callback(fileName, []);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
top.restAjax.get(top.restAjax.path('api/file/list', []), {
|
||||
ids: ids
|
||||
}, null, function(code, data) {
|
||||
refreshDownloadTemplet(fileName, data);
|
||||
if(callback) {
|
||||
callback(fileName, data);
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化视频
|
||||
function initVideo(fileName, data) {
|
||||
for(var i = 0, item; item = data[i++];) {
|
||||
var player = new ckplayer({
|
||||
container: '#'+ fileName + i,
|
||||
variable: 'player',
|
||||
flashplayer: false,
|
||||
video: {
|
||||
file: 'route/file/download/true/'+ item.fileId,
|
||||
type: 'video/mp4'
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
}
|
||||
initData();
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
top.restAjax.post(top.restAjax.path('api/accountbank/save', []), formData.field, null, function(code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||
shade: 0.3,
|
||||
yes: function(index) {
|
||||
top.dialog.close(index);
|
||||
window.location.reload();
|
||||
},
|
||||
btn2: function() {
|
||||
closeBox();
|
||||
}
|
||||
});
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
208
src/main/resources/templates/accountbank/update.html
Normal file
208
src/main/resources/templates/accountbank/update.html
Normal file
@ -0,0 +1,208 @@
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<base th:href="${#request.getContextPath() + '/'}">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
|
||||
<a href="javascript:void(0);"><cite>编辑内容</cite></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">公司名称<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="bankAccountName" name="bankAccountName" class="layui-input" value="" placeholder="请输入公司名称" maxlength="100">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">开户银行<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="bankName" name="bankName" class="layui-input" value="" placeholder="请输入开户银行" maxlength="200">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">银行账号<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="bankNumber" name="bankNumber" class="layui-input" value="" placeholder="请输入银行账号" maxlength="100">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">银行联行号<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="bankUnionpayNumber" name="bankUnionpayNumber" class="layui-input" value="" placeholder="请输入银行联行号" maxlength="100">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">备注<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="bankRemark" name="bankRemark" class="layui-input" value="" placeholder="请输入备注" maxlength="500">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane="">
|
||||
<label class="layui-form-label">开关<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="bankSwitch" value="1" title="开启">
|
||||
<input type="radio" name="bankSwitch" value="0" title="关闭" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交编辑</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
|
||||
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var laytpl = layui.laytpl;
|
||||
var laydate = layui.laydate;
|
||||
var accountBankId = top.restAjax.params(window.location.href).accountBankId;
|
||||
|
||||
var wangEditor = window.wangEditor;
|
||||
var wangEditorObj = {};
|
||||
var viewerObj = {};
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
function refreshDownloadTemplet(fileName, file) {
|
||||
var dataRander = {};
|
||||
dataRander[fileName] = file;
|
||||
|
||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化文件列表
|
||||
function initFileList(fileName, ids, callback) {
|
||||
var dataForm = {};
|
||||
dataForm[fileName] = ids;
|
||||
form.val('dataForm', dataForm);
|
||||
|
||||
if(!ids) {
|
||||
refreshDownloadTemplet(fileName, []);
|
||||
if(callback) {
|
||||
callback(fileName, []);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
top.restAjax.get(top.restAjax.path('api/file/list', []), {
|
||||
ids: ids
|
||||
}, null, function(code, data) {
|
||||
refreshDownloadTemplet(fileName, data);
|
||||
if(callback) {
|
||||
callback(fileName, data);
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化视频
|
||||
function initVideo(fileName, data) {
|
||||
for(var i = 0, item; item = data[i++];) {
|
||||
var player = new ckplayer({
|
||||
container: '#'+ fileName + i,
|
||||
variable: 'player',
|
||||
flashplayer: false,
|
||||
video: {
|
||||
file: 'route/file/download/true/'+ item.fileId,
|
||||
type: 'video/mp4'
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/accountbank/get/{accountBankId}', [accountBankId]), {}, null, function(code, data) {
|
||||
var dataFormData = {};
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i] +'';
|
||||
}
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
initData();
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
top.restAjax.put(top.restAjax.path('api/accountbank/update/{accountBankId}', [accountBankId]), formData.field, null, function(code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.updateSuccess, {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||
shade: 0.3,
|
||||
yes: function(index) {
|
||||
top.dialog.close(index);
|
||||
window.location.reload();
|
||||
},
|
||||
btn2: function() {
|
||||
closeBox();
|
||||
}
|
||||
});
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -1,7 +1,7 @@
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<base th:href="${#request.getContextPath() + '/'}">
|
||||
<base id="ibase" th:href="${#request.getContextPath() + '/'} ">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
@ -43,7 +43,7 @@
|
||||
<div class="layui-form-item" pane="">
|
||||
<label class="layui-form-label">付款方式<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="thirdParty" lay-verify="required" value="微信" lay-filter="thirdParty" title="微信">
|
||||
<input type="radio" name="thirdParty" lay-skin="primary" lay-verify="required" value="微信" lay-filter="thirdParty" title="微信">
|
||||
<input type="radio" name="thirdParty" value="支付宝" disabled lay-filter="thirdParty" title="支付宝">
|
||||
<input type="radio" name="thirdParty" value="银联" disabled lay-filter="thirdParty" title="银联">
|
||||
<input type="radio" name="thirdParty" value="对公转账" lay-filter="thirdParty" title="对公转账">
|
||||
@ -53,7 +53,7 @@
|
||||
<blockquote class="layui-elem-quote">收款方信息</blockquote>
|
||||
<p style="text-align: center;"><span style="color: rgb(194, 79, 74);">公司名称 : <span style="text-decoration: underline;" id="bankAccountName"></span></span></p>
|
||||
<p style="text-align: center;"><span style="color: rgb(194, 79, 74);">开户银行 : <span style="text-decoration: underline;" id="bankName"></span></span></p>
|
||||
<p style="text-align: center;"><span style="color: rgb(194, 79, 74);">银行卡号 : <span style="text-decoration: underline;" id="bankNumber"></span></span></p>
|
||||
<p style="text-align: center;"><span style="color: rgb(194, 79, 74);">银行账号 : <span style="text-decoration: underline;" id="bankNumber"></span></span></p>
|
||||
<blockquote class="layui-elem-quote">付款方信息</blockquote>
|
||||
<div class=" layui-row ">
|
||||
<div class="layui-col-lg6 layui-col-md6" >
|
||||
@ -74,9 +74,9 @@
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6" >
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">银行卡号<span style="color: red">*</span></label>
|
||||
<label class="layui-form-label">银行账号<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="orgNumber" name="orgNumber" class="layui-input" value="" placeholder="请输入银行卡号" >
|
||||
<input type="text" id="orgNumber" name="orgNumber" class="layui-input" value="" placeholder="请输入银行账号" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -181,6 +181,17 @@
|
||||
});
|
||||
}
|
||||
|
||||
document.getElementById('rechargeMoney').addEventListener('input',function(){
|
||||
// 使用jQuery选择器选择所有单选框
|
||||
$("input[name='thirdParty']").each(function() {
|
||||
// 移除checked属性
|
||||
$(this).prop('checked', false);
|
||||
form.render();
|
||||
});
|
||||
$("#onLinePay").hide();
|
||||
$("#orgPay").hide();
|
||||
});
|
||||
|
||||
// 初始化文件列表
|
||||
function initFileList(fileName, ids, callback) {
|
||||
var dataForm = {};
|
||||
@ -266,6 +277,10 @@
|
||||
layer.msg("充值金额不能为空");
|
||||
return false;
|
||||
}
|
||||
if ($('#rechargeMoney').val() > 2000) {
|
||||
layer.msg("单次充值最多2000");
|
||||
return false;
|
||||
}
|
||||
restAjax.post(restAjax.path('[[${operatorServerUrl}]]api/accountrecharge/save-account/{thirdParty}', [data.value]), {rechargeMoney: $('#rechargeMoney').val()}, null, function(code, data) {
|
||||
$('#accountRechargeId').val(data.accountRechargeId);
|
||||
if(selectValue != '对公转账') {
|
||||
@ -274,6 +289,7 @@
|
||||
$("#orgPay").hide();
|
||||
$("#onLinePay").show();
|
||||
qrCodeTimeOut();
|
||||
socket.send('{"type":"' + data.accountRechargeId + '"}');
|
||||
}else{
|
||||
$("#onLinePay").hide();
|
||||
$("#orgPay").show();
|
||||
@ -314,6 +330,36 @@
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
var path = $("#ibase").attr("href");
|
||||
var location = window.location.href + "";
|
||||
var socketUrl = (location.substring(0, location.indexOf(path) + path.length)).replace("https://", "wss:///").replace("http://", "ws:///") + "socket";
|
||||
|
||||
var socket;
|
||||
if(typeof(WebSocket) == "undefined") {
|
||||
console.log("您的浏览器不支持WebSocket");
|
||||
}else{
|
||||
console.log("您的浏览器支持WebSocket");
|
||||
//实现化WebSocket对象,指定要连接的服务器地址与端口 建立连接
|
||||
socket = new WebSocket(socketUrl);
|
||||
//打开事件
|
||||
socket.onopen = function() {
|
||||
console.log("Socket 已打开");
|
||||
};
|
||||
//获得消息事件
|
||||
socket.onmessage = function(msg) {
|
||||
console.log(msg);
|
||||
if(msg.data == 'success') {
|
||||
layer.alert("您已付款成功");
|
||||
}
|
||||
};
|
||||
//关闭事件
|
||||
socket.onclose = function() {
|
||||
};
|
||||
//发生了错误事件
|
||||
socket.onerror = function() {
|
||||
}
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
if (formData.field["accountRechargeId"]) {
|
||||
|
@ -55,7 +55,7 @@
|
||||
</div>
|
||||
<p style="text-align: center;"><span style="color: rgb(194, 79, 74);">公司名称 : <span style="text-decoration: underline;" id="bankAccountName"></span></span></p>
|
||||
<p style="text-align: center;"><span style="color: rgb(194, 79, 74);">开户银行 : <span style="text-decoration: underline;" id="bankName"></span></span></p>
|
||||
<p style="text-align: center;"><span style="color: rgb(194, 79, 74);">银行卡号 : <span style="text-decoration: underline;" id="bankNumber"></span></span></p>
|
||||
<p style="text-align: center;"><span style="color: rgb(194, 79, 74);">银行账号 : <span style="text-decoration: underline;" id="bankNumber"></span></span></p>
|
||||
<div class="layui-form-item" style="background-color:#2aabd2;color:#FFF;text-align: center;width:100% !important;font-size: 17px">
|
||||
<h3>付款方信息</h3>
|
||||
</div>
|
||||
@ -72,9 +72,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">银行卡号<span style="color: red">*</span></label>
|
||||
<label class="layui-form-label">银行账号<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="orgNumber" name="orgNumber" class="layui-input" value="" placeholder="请输入银行卡号" >
|
||||
<input type="text" id="orgNumber" name="orgNumber" class="layui-input" value="" placeholder="请输入银行账号" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
|
@ -92,7 +92,7 @@
|
||||
</div>
|
||||
<div class="layui-col-lg6" >
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">银行卡号:</label>
|
||||
<label class="layui-form-label">银行账号:</label>
|
||||
<div class="layui-input-block">
|
||||
<span id="orgNumber" th:text="${ dto.orgNumber }"></span>
|
||||
</div>
|
||||
@ -119,7 +119,7 @@
|
||||
<label class="layui-form-label">打款凭证:</label>
|
||||
<div class="upload-image-box" style="padding: 0px 0px;" th:each="list,iterStat : ${#strings.listSplit(dto.rechargeVoucher,',')}" >
|
||||
<span class="upload-image-span">
|
||||
<img th:src="${'route/file/download/false/' + list}" />
|
||||
<img th:src="${ AiServerUrl + 'route/file/download/false/' + list}" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -26,7 +26,7 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">卡号<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="bankNumber" name="bankNumber" class="layui-input" value="" lay-verify="required" placeholder="请输入收款人银行卡号" maxlength="50">
|
||||
<input type="text" id="bankNumber" name="bankNumber" class="layui-input" value="" lay-verify="required" placeholder="请输入收款人银行账号" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
|
@ -26,7 +26,7 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">卡号<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="bankNumber" name="bankNumber" class="layui-input" value="" lay-verify="required" placeholder="请输入收款人银行卡号" maxlength="50">
|
||||
<input type="text" id="bankNumber" name="bankNumber" class="layui-input" value="" lay-verify="required" placeholder="请输入收款人银行账号" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
|
@ -39,7 +39,7 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">卡号<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="bankNumber" name="bankNumber" class="layui-input" value="" lay-verify="required" placeholder="请输入收款人银行卡号" maxlength="50">
|
||||
<input type="text" id="bankNumber" name="bankNumber" class="layui-input" value="" lay-verify="required" placeholder="请输入收款人银行账号" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
|
@ -89,9 +89,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">收款人银行卡号</label>
|
||||
<label class="layui-form-label">收款人银行账号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="bankNumber" name="bankNumber" class="layui-input" value="" placeholder="请输入收款人银行卡号" maxlength="50">
|
||||
<input type="text" id="bankNumber" name="bankNumber" class="layui-input" value="" placeholder="请输入收款人银行账号" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
|
@ -32,7 +32,7 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">卡号</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="bankNumber" readonly name="bankNumber" class="layui-input" value="" placeholder="请输入收款人银行卡号" maxlength="50">
|
||||
<input type="text" id="bankNumber" readonly name="bankNumber" class="layui-input" value="" placeholder="请输入收款人银行账号" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
|
@ -29,9 +29,9 @@
|
||||
.layui-input{
|
||||
border-style: hidden;
|
||||
padding-left: 0px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
.layui-form-text .layui-form-label{
|
||||
background-color: #FFFFFF !important;
|
||||
border:none !important;
|
||||
@ -49,6 +49,10 @@
|
||||
border-radius: 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.layui-form-pane .layui-form-label{
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -70,17 +74,27 @@
|
||||
<div class="layui-row layui-col-space12">
|
||||
<div class="layui-col-md3">
|
||||
<div class="layui-form-item" style="text-align: center;">
|
||||
<img id="logoImage" src="assets/images/profile-photo.jpg" title="点击修改头像">
|
||||
<img id="logoImage" src="assets/images/profile-photo.jpg">
|
||||
<input type="hidden" id="basicsLogo" name="basicsLogo">
|
||||
<div class="layui-btn-container" id="basicsLogoFileBox" style="border: 1px solid #e6e6e6;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md9">
|
||||
<div class="layui-row">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">审核状态:</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" class="layui-input from-field" value="待审核" style="color: blue">
|
||||
<div class="layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">审核状态:</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input readonly type="text" id="auditStatus" name="" value="待审核" style="color: blue" class="layui-input" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md6">
|
||||
<textarea id="basicsIntro" style="display: none" name="basicsIntro" lay-verify="basicsIntro"></textarea>
|
||||
<label class="layui-form-label layui-form-label-new">机构简介:</label>
|
||||
<div class="layui-input-block-new layui-input-block">
|
||||
<a style="line-height: 36px;height: 36px;color:blue" href="javascript:void(0)" id="editBasicsIntro" >点此查看</a>
|
||||
<!-- <button type="button" class="layui-btn layui-btn-xs" id="editBasicsIntro" style="line-height: 34px;height: 34px;">点此编辑简介【编辑后需提交修改】</button>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -120,15 +134,25 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-row layui-col-space12">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">简介</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea id="basicsIntro" readonly name="basicsIntro" class="layui-textarea from-field" placeholder="请输入简介" ></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="layui-row layui-col-space12">-->
|
||||
<!-- <div class="layui-form-item layui-form-text">-->
|
||||
<!-- <label class="layui-form-label">简介</label>-->
|
||||
<!-- <div class="layui-input-block">-->
|
||||
<!-- <textarea id="basicsIntro" readonly name="basicsIntro" class="layui-textarea from-field" placeholder="请输入简介" ></textarea>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <div class="layui-input-block">
|
||||
<textarea id="basicsIntro" style="display: none" name="basicsIntro" lay-verify="basicsIntro"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<div class="layui-input-block">
|
||||
<button type="button" class="layui-btn" id="editBasicsIntro">点此查看简介</button>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<div class="layui-row layui-col-space12">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">资质图片</label>
|
||||
@ -155,9 +179,9 @@
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitYesForm">通过</button>
|
||||
<button type="button" class="layui-btn layui-btn-danger" lay-submit lay-filter="submitNoForm">不通过</button>
|
||||
<button type="button" class="layui-btn close" >返回</button>
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitYesForm">审核通过</button>
|
||||
<button type="button" class="layui-btn layui-btn-danger" lay-submit lay-filter="submitNoForm">审核不通过</button>
|
||||
<button type="button" class="layui-btn close" >返回列表</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -204,14 +228,6 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
|
||||
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
|
||||
@ -231,6 +247,17 @@
|
||||
|
||||
var basicsId = top.restAjax.params(window.location.href).basicsId;
|
||||
|
||||
|
||||
$("#editBasicsIntro").click(function() {
|
||||
var html = $("#basicsIntro").val();
|
||||
var layIndex = top.layer.open({//layui的弹出层直接把获取到的编辑器html内容放到里面就可以显示
|
||||
title: '代理商简介',
|
||||
type: 1,
|
||||
area: ['85%', '85%'],
|
||||
content: html//通过编辑器的监听onchange事件把编辑器内容放到id为bBody的input里
|
||||
});
|
||||
});
|
||||
|
||||
$(".layui-input").prop("readonly", true);
|
||||
$(".layui-textarea").prop("readonly", true);
|
||||
function closeBox() {
|
||||
|
@ -26,12 +26,29 @@
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
|
||||
</div>
|
||||
<div class="layui-inline layui-form search-item" >
|
||||
<select id="auditStatus" name="auditStatus">
|
||||
<option value="">审核状态</option>
|
||||
<option value="AWAIT">待审核</option>
|
||||
<option value="YES">审核通过</option>
|
||||
<option value="NO">审核未通过</option>
|
||||
</select>
|
||||
</div>
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
|
||||
<script type="text/html" id="headerToolBar">
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="showEvent">
|
||||
<i class="fa fa-lg fa-plus"></i> 代理商信息
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="itemEvent">
|
||||
<i class="fa fa-lg fa-edit"></i> 代理商流水
|
||||
</button>
|
||||
</div>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -63,14 +80,13 @@
|
||||
width: admin.screen() > 1 ? '100%' : '',
|
||||
height: $win.height() - 90,
|
||||
limit: 20,
|
||||
defaultToolbar: [],
|
||||
toolbar: '#headerToolBar',
|
||||
limits: [20, 40, 60, 80, 100, 200],
|
||||
request: {
|
||||
pageName: 'page',
|
||||
limitName: 'rows'
|
||||
},
|
||||
where:{
|
||||
auditStatus: 'AWAIT'
|
||||
},
|
||||
cols: [
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
@ -117,7 +133,13 @@
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return '待审核';
|
||||
if(rowData == 'AWAIT') {
|
||||
return '<b style="color: orange">待审核</b>';
|
||||
}else if(rowData == 'YES') {
|
||||
return '<b style="color: green">审核通过</b>';
|
||||
}else if(rowData == 'NO') {
|
||||
return '<b style="color: red">审核未通过</b>';
|
||||
}
|
||||
}
|
||||
},
|
||||
{field: 'gmtCreate', width: 180, title: '申请时间', align:'center',
|
||||
@ -131,8 +153,12 @@
|
||||
},
|
||||
{field: 'cz', width: 180, title: '操作', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData1 = row['auditStatus'];
|
||||
if(rowData1 != 'AWAIT') {
|
||||
return "-";
|
||||
}
|
||||
var rowData = '<div class="layui-btn-group">';
|
||||
rowData += ' <button type="button" class="layui-btn layui-btn-xs layui-btn-warm" lay-event="auditEvent">审核</button>';
|
||||
rowData += ' <button type="button" class="layui-btn layui-btn-warm" style="height: 28px;line-height: 28px;" lay-event="auditEvent">点此进行审核</button>';
|
||||
rowData += '</div>';
|
||||
return rowData;
|
||||
}
|
||||
@ -157,7 +183,8 @@
|
||||
where: {
|
||||
keywords: $('#keywords').val(),
|
||||
startTime: $('#startTime').val(),
|
||||
endTime: $('#endTime').val()
|
||||
endTime: $('#endTime').val(),
|
||||
auditStatus: $('#auditStatus').val()
|
||||
},
|
||||
page: {
|
||||
curr: currentPage
|
||||
@ -231,6 +258,51 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// 事件 - 增删改
|
||||
table.on('toolbar(dataTable)', function(obj) {
|
||||
var layEvent = obj.event;
|
||||
var checkStatus = table.checkStatus('dataTable');
|
||||
var checkDatas = checkStatus.data;
|
||||
if (layEvent === 'showEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
} else {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/agentcheck/show?basicsId={basicsId}', [checkDatas[0].basicsId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if(layEvent === 'itemEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
} else {
|
||||
top.layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 1,
|
||||
area: ['80%', '90%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/accountitem/list?accountId={accountId}', [checkDatas[0].creator]),
|
||||
end: function() {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
@ -34,7 +34,7 @@
|
||||
<script type="text/html" id="headerToolBar">
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="showEvent">
|
||||
<i class="fa fa-lg fa-shower"></i> 详情
|
||||
<i class="fa fa-lg fa-plus"></i> 查看
|
||||
</button>
|
||||
</div>
|
||||
</script>
|
||||
|
@ -26,6 +26,7 @@
|
||||
.layui-input{
|
||||
border-style: hidden;
|
||||
padding-left: 0px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.layui-form-text .layui-form-label{
|
||||
@ -48,6 +49,9 @@
|
||||
.layui-rate li i.layui-icon {
|
||||
font-size: 16px;
|
||||
}
|
||||
.layui-form-pane .layui-form-label{
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@ -60,7 +64,7 @@
|
||||
<a class="close" href="javascript:void(0);">基本信息</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-card-body" style="height: 80vh;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md7"></div>
|
||||
@ -75,10 +79,20 @@
|
||||
</div>
|
||||
<div class="layui-col-md9">
|
||||
<div class="layui-row">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">审核状态:</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input readonly type="text" id="auditStatus" class="layui-input" maxlength="50">
|
||||
<div class="layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">审核状态:</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input readonly type="text" id="auditStatus" class="layui-input" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md6">
|
||||
<textarea id="basicsIntro" style="display: none" name="basicsIntro" lay-verify="basicsIntro"></textarea>
|
||||
<label class="layui-form-label layui-form-label-new">机构简介:</label>
|
||||
<div class="layui-input-block-new layui-input-block">
|
||||
<a style="line-height: 36px;height: 36px;color:blue" href="javascript:void(0)" id="editBasicsIntro" >点此查看</a>
|
||||
<!-- <button type="button" class="layui-btn layui-btn-xs" id="editBasicsIntro" style="line-height: 34px;height: 34px;">点此编辑简介【编辑后需提交修改】</button>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -145,7 +159,7 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">机构名称:</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="basicsName" name="basicsName" class="layui-input from-field" value="" placeholder="请输入机构名称" maxlength="50" lay-verify="basicsName">
|
||||
<input type="text" id="basicsName" name="basicsName" class="layui-input from-field" value="" readonly placeholder="请输入机构名称" maxlength="50" lay-verify="basicsName">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -153,7 +167,7 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">机构地址:</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="basicsAddresss" name="basicsAddresss" class="layui-input from-field" value="" placeholder="请输入机构地址" maxlength="100" lay-verify="basicsAddresss">
|
||||
<input type="text" id="basicsAddresss" name="basicsAddresss" class="layui-input from-field" readonly value="" placeholder="请输入机构地址" maxlength="100" lay-verify="basicsAddresss">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -163,7 +177,7 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">联系人:</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="basicsContactPerson" name="basicsContactPerson" class="layui-input from-field" value="" placeholder="请输入联系人" maxlength="50" lay-verify="basicsContactPerson">
|
||||
<input type="text" id="basicsContactPerson" name="basicsContactPerson" readonly class="layui-input from-field" value="" placeholder="请输入联系人" maxlength="50" lay-verify="basicsContactPerson">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -171,22 +185,32 @@
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">联系电话:</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="basicsContactNumber" name="basicsContactNumber" class="layui-input from-field" value="" placeholder="请输入联系电话" maxlength="20" lay-verify="basicsContactNumber">
|
||||
<input type="text" id="basicsContactNumber" name="basicsContactNumber" readonly class="layui-input from-field" value="" placeholder="请输入联系电话" maxlength="20" lay-verify="basicsContactNumber">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-row layui-col-space12">
|
||||
<!-- <div class="layui-row layui-col-space12">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">简介</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea id="basicsIntro" readonly name="basicsIntro" class="layui-textarea from-field" placeholder="请输入简介" lay-verify="basicsIntro"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<!-- <div class="layui-input-block">
|
||||
<textarea id="basicsIntro" style="display: none" name="basicsIntro" lay-verify="basicsIntro"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<div class="layui-input-block">
|
||||
<button type="button" class="layui-btn" id="editBasicsIntro">点此查看简介</button>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<div class="layui-row layui-col-space12">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">资质图片</label>
|
||||
@ -209,15 +233,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0; width: 61.4rem">
|
||||
<button type="button" class="layui-btn close" >返回</button>
|
||||
<div class="layui-footer" style="left: 0; width: 100%;">
|
||||
<button type="button" class="layui-btn close" >返回列表</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
@ -227,7 +249,7 @@
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||
<a class="close" href="javascript:void(0);">代理价格</a>
|
||||
<a class="" href="javascript:void(0);">代理价格</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
@ -241,27 +263,27 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>类型</th>
|
||||
<th>代理价格</th>
|
||||
<th>对外发布价格(单位:元)</th>
|
||||
<th>平台佣金</th>
|
||||
<th>对外发布价格</th>
|
||||
<th>代理商收益</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>普通件</td>
|
||||
<td>
|
||||
<input type="number" id="basicsNormalPrice" name="basicsNormalPrice" class="layui-input" value="" placeholder="请输入价格" maxlength="20">
|
||||
<input type="text" readonly id="basicsNormalPrice" name="basicsNormalPrice" class="layui-input" value="" placeholder="未设置价格" maxlength="20">
|
||||
</td>
|
||||
<td>20%</td>
|
||||
<td>=代理商价格+代理商价格*0.2</td>
|
||||
<td>= 对外发布价格 - 对外发布价格 * 0.2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>加急件</td>
|
||||
<td>
|
||||
<input type="number" id="basicsUrgentPrice" name="basicsUrgentPrice" class="layui-input" value="" placeholder="请输入价格" maxlength="20">
|
||||
<input type="text" readonly id="basicsUrgentPrice" name="basicsUrgentPrice" class="layui-input" value="" placeholder="未设置价格" maxlength="20">
|
||||
</td>
|
||||
<td>20%</td>
|
||||
<td>=代理商价格+代理商价格*0.2</td>
|
||||
<td>= 对外发布价格 - 对外发布价格 * 0.2</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -269,6 +291,39 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-card" style="overflow-y: auto">
|
||||
<div class="layui-card-header">
|
||||
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||
<a class="" href="javascript:void(0);">审核日志</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" id="app" v-cloak style="height:54vh; overflow: auto;">
|
||||
<div class="layui-row">
|
||||
<ul class="layui-timeline">
|
||||
<li class="layui-timeline-item" v-for="data in logList">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<div class="layui-timeline-title">
|
||||
<span>{{ data.gmtCreate }}</span>
|
||||
</div>
|
||||
<div class="log-content">
|
||||
<p>
|
||||
<span>{{ data.creatorName }} - </span>
|
||||
<span v-if="data.auditLogType == 'AUDIT_SUBMIT'">提交审核</span>
|
||||
<span v-if="data.auditLogType == 'AUDIT_YES'">审核通过</span>
|
||||
<span v-if="data.auditLogType == 'AUDIT_NO'">审核未通过</span>
|
||||
</p>
|
||||
<p>
|
||||
{{ data.auditLogExplain }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -278,6 +333,7 @@
|
||||
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script src="assets/js/vue.min.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
@ -292,6 +348,17 @@
|
||||
var viewerObj = {};
|
||||
var basicsId = top.restAjax.params(window.location.href).basicsId;
|
||||
var auditStatus;
|
||||
|
||||
$("#editBasicsIntro").click(function() {
|
||||
var html = $("#basicsIntro").val();
|
||||
var layIndex = top.layer.open({//layui的弹出层直接把获取到的编辑器html内容放到里面就可以显示
|
||||
title: '代理商简介',
|
||||
type: 1,
|
||||
area: ['85%', '85%'],
|
||||
content: html//通过编辑器的监听onchange事件把编辑器内容放到id为bBody的input里
|
||||
});
|
||||
});
|
||||
|
||||
$('#logoImage').on('click', function() {
|
||||
top.dialog.open({
|
||||
url: '[[${AgentServerUrl}]]route/file/uploadimage?fileId='+ $('#basicsLogo').val(),
|
||||
@ -308,6 +375,33 @@
|
||||
})
|
||||
});
|
||||
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
logList: [],
|
||||
},
|
||||
methods: {
|
||||
/* 审核日志*/
|
||||
initLogList: function(){
|
||||
var self = this;
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('[[${AgentServerUrl}]]api/auditlog/list/{auditServiceId}', [basicsId]), {
|
||||
}, null, function(code, data) {
|
||||
self.logList = data;
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted: function () {
|
||||
var self = this;
|
||||
self.initLogList();
|
||||
}
|
||||
});
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
@ -470,6 +564,15 @@
|
||||
}else{
|
||||
alert('系统错误')
|
||||
}
|
||||
var arr = data.priceDTOS;
|
||||
for(var i = 0 ; i < arr.length ; i++) {
|
||||
if(arr[i].priceType == 'NORMAL') {
|
||||
$("#basicsNormalPrice").val((parseFloat(arr[i].typePrice) / 100).toFixed(2));
|
||||
}
|
||||
if(arr[i].priceType == 'URGENT') {
|
||||
$("#basicsUrgentPrice").val((parseFloat(arr[i].typePrice) / 100).toFixed(2));
|
||||
}
|
||||
}
|
||||
$('#logoImage').attr('src', '[[${AgentServerUrl}]]route/file/download/false/' + data.basicsLogo);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
|
268
src/main/resources/templates/agreement/list.html
Normal file
268
src/main/resources/templates/agreement/list.html
Normal file
@ -0,0 +1,268 @@
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<base th:href="${#request.getContextPath() + '/'}">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="startTime" class="layui-input search-item" placeholder="开始时间" readonly>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
|
||||
</div>
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
<!-- 表头按钮组 -->
|
||||
<script type="text/html" id="headerToolBar">
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
|
||||
<i class="fa fa-lg fa-plus"></i> 新增
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
|
||||
<i class="fa fa-lg fa-edit"></i> 编辑
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
||||
<i class="fa fa-lg fa-trash"></i> 删除
|
||||
</button>
|
||||
</div>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'table', 'laydate', 'common'], function() {
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var table = layui.table;
|
||||
var admin = layui.admin;
|
||||
var laydate = layui.laydate;
|
||||
var common = layui.common;
|
||||
var resizeTimeout = null;
|
||||
var tableUrl = 'api/agreement/listpage';
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
table.render({
|
||||
elem: '#dataTable',
|
||||
id: 'dataTable',
|
||||
url: top.restAjax.path(tableUrl, []),
|
||||
width: admin.screen() > 1 ? '100%' : '',
|
||||
height: $win.height() - 90,
|
||||
limit: 20,
|
||||
limits: [20, 40, 60, 80, 100, 200],
|
||||
toolbar: '#headerToolBar',
|
||||
request: {
|
||||
pageName: 'page',
|
||||
limitName: 'rows'
|
||||
},
|
||||
cols: [
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field: 'agreementTitle', width: 280, title: '协议标题', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'agreementType', width: 180, title: '协议类型', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'agreementVersion', width: 180, title: '协议版本', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
/* {field: 'agreementSwitch', width: 180, title: '协议开关', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
if(rowData == 1) {
|
||||
return "<b style='color:green'>开启</b>";
|
||||
}else {
|
||||
return "<b style='color:red'>关闭</b>";
|
||||
}
|
||||
}
|
||||
},*/
|
||||
{field: 'gmtCreate', width: 180, title: '创建时间', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
page: true,
|
||||
parseData: function(data) {
|
||||
return {
|
||||
'code': 0,
|
||||
'msg': '',
|
||||
'count': data.total,
|
||||
'data': data.rows
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
// 重载表格
|
||||
function reloadTable(currentPage) {
|
||||
table.reload('dataTable', {
|
||||
url: top.restAjax.path(tableUrl, []),
|
||||
where: {
|
||||
keywords: $('#keywords').val(),
|
||||
startTime: $('#startTime').val(),
|
||||
endTime: $('#endTime').val()
|
||||
},
|
||||
page: {
|
||||
curr: currentPage
|
||||
},
|
||||
height: $win.height() - 90,
|
||||
});
|
||||
}
|
||||
// 初始化日期
|
||||
function initDate() {
|
||||
// 日期选择
|
||||
laydate.render({
|
||||
elem: '#startTime',
|
||||
format: 'yyyy-MM-dd'
|
||||
});
|
||||
laydate.render({
|
||||
elem: '#endTime',
|
||||
format: 'yyyy-MM-dd'
|
||||
});
|
||||
}
|
||||
// 删除
|
||||
function removeData(ids) {
|
||||
top.dialog.msg(top.dataMessage.delete, {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||
shade: 0.3,
|
||||
yes: function (index) {
|
||||
top.dialog.close(index);
|
||||
var layIndex;
|
||||
top.restAjax.delete(top.restAjax.path('api/agreement/remove/{ids}', [ids]), {}, null, function (code, data) {
|
||||
top.dialog.msg(top.dataMessage.deleteSuccess, {time: 1000});
|
||||
reloadTable();
|
||||
}, function (code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function () {
|
||||
layIndex = top.dialog.msg(top.dataMessage.deleting, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function () {
|
||||
top.dialog.close(layIndex);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
initTable();
|
||||
initDate();
|
||||
// 事件 - 页面变化
|
||||
$win.on('resize', function() {
|
||||
clearTimeout(resizeTimeout);
|
||||
resizeTimeout = setTimeout(function() {
|
||||
reloadTable();
|
||||
}, 500);
|
||||
});
|
||||
// 事件 - 搜索
|
||||
$(document).on('click', '#search', function() {
|
||||
reloadTable(1);
|
||||
});
|
||||
// 事件 - 增删改
|
||||
table.on('toolbar(dataTable)', function(obj) {
|
||||
var layEvent = obj.event;
|
||||
var checkStatus = table.checkStatus('dataTable');
|
||||
var checkDatas = checkStatus.data;
|
||||
if(layEvent === 'saveEvent') {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/agreement/save', []),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
} else if(layEvent === 'updateEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
} else {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/agreement/update?agreementId={agreementId}', [checkDatas[0].agreementId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if(layEvent === 'removeEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectDelete);
|
||||
} else {
|
||||
var ids = '';
|
||||
for(var i = 0, item; item = checkDatas[i++];) {
|
||||
if(i > 1) {
|
||||
ids += '_';
|
||||
}
|
||||
ids += item['agreementId'];
|
||||
}
|
||||
removeData(ids);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
236
src/main/resources/templates/agreement/save.html
Normal file
236
src/main/resources/templates/agreement/save.html
Normal file
@ -0,0 +1,236 @@
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<base th:href="${#request.getContextPath() + '/'}">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/wangEditor/wangEditor-fullscreen-plugin.css">
|
||||
|
||||
<script type="text/javascript" src="assets/js/vendor/safety/js/jquery.min.js" ></script>
|
||||
<script type="text/javascript" src="assets/js/vendor/safety/js/context.js"></script>
|
||||
<script type="text/javascript" src="assets/js/vendor/safety/js/drag.js" ></script>
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/safety/css/context.standalone.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
|
||||
<a href="javascript:void(0);"><cite>新增内容</cite></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">协议标题<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="agreementTitle" name="agreementTitle" class="layui-input" value="" placeholder="请输入协议标题" maxlength="500">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">协议类型<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="agreementType" name="agreementType" class="layui-input" value="" placeholder="请输入协议类型" maxlength="500">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">协议内容<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<div id="agreementContent"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">协议版本<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="number" id="agreementVersion" name="agreementVersion" class="layui-input" value="" placeholder="请输入协议版本" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="layui-form-item" pane="">
|
||||
<label class="layui-form-label">协议开关<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="agreementSwitch" value="1" title="开启">
|
||||
<input type="radio" name="agreementSwitch" value="0" title="关闭" >
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交新增</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/js/vendor/wangEditor/jquery-1.7.2.js"></script>
|
||||
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
|
||||
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
|
||||
<script src="assets/js/vendor/wangEditor/wangEditor-fullscreen-plugin.js"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var laytpl = layui.laytpl;
|
||||
var laydate = layui.laydate;
|
||||
var wangEditor = window.wangEditor;
|
||||
var wangEditorObj = {};
|
||||
var viewerObj = {};
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
// 初始化
|
||||
function initContentRichText(value) {
|
||||
var editor = new wangEditor('#agreementContent');
|
||||
// 自定义菜单配置
|
||||
editor.customConfig.menus = [
|
||||
'head', // 标题
|
||||
'bold', // 粗体
|
||||
// 'fontSize', // 字号
|
||||
// 'fontName', // 字体
|
||||
// 'italic', // 斜体
|
||||
'underline', // 下划线
|
||||
'strikeThrough', // 删除线
|
||||
'foreColor', // 文字颜色
|
||||
// 'backColor', // 背景颜色
|
||||
'link', // 插入链接
|
||||
// 'list', // 列表
|
||||
'justify', // 对齐方式
|
||||
// 'quote', // 引用
|
||||
// 'emoticon', // 表情
|
||||
'image', // 插入图片
|
||||
// 'table', // 表格
|
||||
'video', // 插入视频
|
||||
// 'code', // 插入代码
|
||||
'undo', // 撤销
|
||||
'redo' // 重复
|
||||
];
|
||||
editor.customConfig.zIndex = 100;
|
||||
editor.customConfig.uploadImgMaxSize = 100 * 1024 * 1024;
|
||||
editor.customConfig.uploadImgParamsWithUrl = true;
|
||||
editor.customConfig.uploadImgMaxLength = 1;
|
||||
editor.customConfig.uploadFileName = 'image';
|
||||
editor.customConfig.uploadImgServer = 'api/file/wangeditorimage';
|
||||
// 创建 & 全屏 & 预览 & 图片加url wangEditor-fullscreen-plugin.js
|
||||
wangEditor.fullscreen.init('#agreementContent', editor);
|
||||
editor.txt.html(value);
|
||||
wangEditorObj['agreementContent'] = editor;
|
||||
wangEditor.fullscreen.initUploadVideo('#agreementContent', editor);// 初始化视频
|
||||
}
|
||||
|
||||
initContentRichText();
|
||||
|
||||
function refreshDownloadTemplet(fileName, file) {
|
||||
var dataRander = {};
|
||||
dataRander[fileName] = file;
|
||||
|
||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化文件列表
|
||||
function initFileList(fileName, ids, callback) {
|
||||
var dataForm = {};
|
||||
dataForm[fileName] = ids;
|
||||
form.val('dataForm', dataForm);
|
||||
|
||||
if(!ids) {
|
||||
refreshDownloadTemplet(fileName, []);
|
||||
if(callback) {
|
||||
callback(fileName, []);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
top.restAjax.get(top.restAjax.path('api/file/list', []), {
|
||||
ids: ids
|
||||
}, null, function(code, data) {
|
||||
refreshDownloadTemplet(fileName, data);
|
||||
if(callback) {
|
||||
callback(fileName, data);
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化视频
|
||||
function initVideo(fileName, data) {
|
||||
for(var i = 0, item; item = data[i++];) {
|
||||
var player = new ckplayer({
|
||||
container: '#'+ fileName + i,
|
||||
variable: 'player',
|
||||
flashplayer: false,
|
||||
video: {
|
||||
file: 'route/file/download/true/'+ item.fileId,
|
||||
type: 'video/mp4'
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
}
|
||||
initData();
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
formData.field["agreementContent"] = wangEditorObj['agreementContent'].txt.html();
|
||||
top.restAjax.post(top.restAjax.path('api/agreement/save', []), formData.field, null, function(code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||
shade: 0.3,
|
||||
yes: function(index) {
|
||||
top.dialog.close(index);
|
||||
window.location.reload();
|
||||
},
|
||||
btn2: function() {
|
||||
closeBox();
|
||||
}
|
||||
});
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
252
src/main/resources/templates/agreement/update.html
Normal file
252
src/main/resources/templates/agreement/update.html
Normal file
@ -0,0 +1,252 @@
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<base th:href="${#request.getContextPath() + '/'}">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/wangEditor/wangEditor-fullscreen-plugin.css">
|
||||
|
||||
<script type="text/javascript" src="assets/js/vendor/safety/js/jquery.min.js" ></script>
|
||||
<script type="text/javascript" src="assets/js/vendor/safety/js/context.js"></script>
|
||||
<script type="text/javascript" src="assets/js/vendor/safety/js/drag.js" ></script>
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/safety/css/context.standalone.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
|
||||
<a href="javascript:void(0);"><cite>编辑内容</cite></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">协议标题<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="agreementTitle" name="agreementTitle" class="layui-input" value="" placeholder="请输入协议标题" maxlength="500">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">协议类型<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="agreementType" disabled name="agreementType" class="layui-input" value="" placeholder="请输入协议类型" maxlength="500">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">协议内容<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<div id="agreementContent"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">协议版本<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="number" id="agreementVersion" name="agreementVersion" class="layui-input" value="" placeholder="请输入协议版本" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="layui-form-item" pane="">
|
||||
<label class="layui-form-label">协议开关<span style="color: red">*</span></label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="agreementSwitch" value="1" title="开启">
|
||||
<input type="radio" name="agreementSwitch" value="0" title="关闭" >
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交编辑</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/js/vendor/wangEditor/jquery-1.7.2.js"></script>
|
||||
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
|
||||
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
|
||||
<script src="assets/js/vendor/wangEditor/wangEditor-fullscreen-plugin.js"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var laytpl = layui.laytpl;
|
||||
var laydate = layui.laydate;
|
||||
var agreementId = top.restAjax.params(window.location.href).agreementId;
|
||||
|
||||
var wangEditor = window.wangEditor;
|
||||
var wangEditorObj = {};
|
||||
var viewerObj = {};
|
||||
|
||||
// 初始化
|
||||
function initContentRichText(value) {
|
||||
var editor = new wangEditor('#agreementContent');
|
||||
// 自定义菜单配置
|
||||
editor.customConfig.menus = [
|
||||
'head', // 标题
|
||||
'bold', // 粗体
|
||||
// 'fontSize', // 字号
|
||||
// 'fontName', // 字体
|
||||
// 'italic', // 斜体
|
||||
'underline', // 下划线
|
||||
'strikeThrough', // 删除线
|
||||
'foreColor', // 文字颜色
|
||||
// 'backColor', // 背景颜色
|
||||
'link', // 插入链接
|
||||
// 'list', // 列表
|
||||
'justify', // 对齐方式
|
||||
// 'quote', // 引用
|
||||
// 'emoticon', // 表情
|
||||
'image', // 插入图片
|
||||
// 'table', // 表格
|
||||
'video', // 插入视频
|
||||
// 'code', // 插入代码
|
||||
'undo', // 撤销
|
||||
'redo' // 重复
|
||||
];
|
||||
editor.customConfig.zIndex = 100;
|
||||
editor.customConfig.uploadImgMaxSize = 100 * 1024 * 1024;
|
||||
editor.customConfig.uploadImgParamsWithUrl = true;
|
||||
editor.customConfig.uploadImgMaxLength = 1;
|
||||
editor.customConfig.uploadFileName = 'image';
|
||||
editor.customConfig.uploadImgServer = 'api/file/wangeditorimage';
|
||||
// 创建 & 全屏 & 预览 & 图片加url wangEditor-fullscreen-plugin.js
|
||||
wangEditor.fullscreen.init('#agreementContent', editor);
|
||||
editor.txt.html(value);
|
||||
wangEditorObj['agreementContent'] = editor;
|
||||
wangEditor.fullscreen.initUploadVideo('#agreementContent', editor);// 初始化视频
|
||||
}
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
function refreshDownloadTemplet(fileName, file) {
|
||||
var dataRander = {};
|
||||
dataRander[fileName] = file;
|
||||
|
||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化文件列表
|
||||
function initFileList(fileName, ids, callback) {
|
||||
var dataForm = {};
|
||||
dataForm[fileName] = ids;
|
||||
form.val('dataForm', dataForm);
|
||||
|
||||
if(!ids) {
|
||||
refreshDownloadTemplet(fileName, []);
|
||||
if(callback) {
|
||||
callback(fileName, []);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
top.restAjax.get(top.restAjax.path('api/file/list', []), {
|
||||
ids: ids
|
||||
}, null, function(code, data) {
|
||||
refreshDownloadTemplet(fileName, data);
|
||||
if(callback) {
|
||||
callback(fileName, data);
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化视频
|
||||
function initVideo(fileName, data) {
|
||||
for(var i = 0, item; item = data[i++];) {
|
||||
var player = new ckplayer({
|
||||
container: '#'+ fileName + i,
|
||||
variable: 'player',
|
||||
flashplayer: false,
|
||||
video: {
|
||||
file: 'route/file/download/true/'+ item.fileId,
|
||||
type: 'video/mp4'
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/agreement/get/{agreementId}', [agreementId]), {}, null, function(code, data) {
|
||||
var dataFormData = {};
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i] +'';
|
||||
}
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
initContentRichText(data.agreementContent);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
initData();
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
formData.field["agreementContent"] = wangEditorObj['agreementContent'].txt.html();
|
||||
top.restAjax.put(top.restAjax.path('api/agreement/update/{agreementId}', [agreementId]), formData.field, null, function(code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.updateSuccess, {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||
shade: 0.3,
|
||||
yes: function(index) {
|
||||
top.dialog.close(index);
|
||||
window.location.reload();
|
||||
},
|
||||
btn2: function() {
|
||||
closeBox();
|
||||
}
|
||||
});
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -158,7 +158,8 @@
|
||||
}
|
||||
|
||||
#loginBox .btnlist {
|
||||
display: block;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
/*display: none;*/
|
||||
width: 330px;
|
||||
height: 50px;
|
||||
@ -181,23 +182,47 @@
|
||||
text-align: center;
|
||||
/* margin-right: 30px; */
|
||||
border: none;
|
||||
border-bottom: 5px solid #fda633;
|
||||
/*border-bottom: 5px solid #fda633;*/
|
||||
background-color: transparent;
|
||||
cursor: pointer;
|
||||
}
|
||||
#loginBox #change span {
|
||||
display: block;
|
||||
width: 40px;
|
||||
height: 5px;
|
||||
margin-left: 15px;
|
||||
background-color: #fda633;
|
||||
}
|
||||
|
||||
#loginBox .btnlist button {
|
||||
font-size: 18px;
|
||||
margin-right: 30px;
|
||||
border: none;
|
||||
/*border-bottom: 5px solid #fda633;*/
|
||||
margin-bottom: 5px;
|
||||
background-color: transparent;
|
||||
cursor: pointer;
|
||||
}
|
||||
#loginBox .btnlist div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
#loginBox .btnlist div:first-child span {
|
||||
display: block;
|
||||
width: 40px;
|
||||
height: 5px;
|
||||
margin-left: 15px;
|
||||
background-color: #fda633;
|
||||
|
||||
}
|
||||
#loginBox .btnlist div:last-child span {
|
||||
display: none;
|
||||
width: 40px;
|
||||
height: 5px;
|
||||
margin-left: 20px;
|
||||
background-color: #fda633;
|
||||
|
||||
#loginBox .btnlist button:first-child {
|
||||
font-weight: 700;
|
||||
border-bottom: 5px solid #fda633;
|
||||
}
|
||||
.forget-username-password {
|
||||
position: absolute;
|
||||
@ -368,7 +393,7 @@
|
||||
<div v-cloak th:if="${customLoginForm eq null}">
|
||||
<div class="nav">
|
||||
<div class="sign">
|
||||
<h2>Shortness</h2>
|
||||
<h2>腾狮科技</h2>
|
||||
<p>AI人工智能软著申请</p>
|
||||
</div>
|
||||
<div class="go-page">
|
||||
@ -378,11 +403,19 @@
|
||||
</div>
|
||||
<div id="loginBox" class="layadmin-user-login-main">
|
||||
<div class="btnlist">
|
||||
<button id="zhanghaomima">账号密码</button>
|
||||
<button id="yzmlongin">验证码登录</button>
|
||||
<div>
|
||||
<button id="zhanghaomima">账号密码</button>
|
||||
<span class="span1"></span>
|
||||
</div>
|
||||
<div>
|
||||
<button id="yzmlongin">验证码登录</button>
|
||||
<span class="span2"></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="change">
|
||||
<h3 id="changeCode">修改密码</h3>
|
||||
<span></span>
|
||||
</div>
|
||||
<div class="layadmin-user-login-box layadmin-user-login-header">
|
||||
<img class="system-logo" :src="'route/file/download/true/'+ pageParams.systemLogo" v-if="pageParams.systemLogo">
|
||||
@ -686,12 +719,16 @@
|
||||
let bixuan = document.querySelector('.bixuan')
|
||||
let zhanghaomima = document.querySelector('#zhanghaomima')
|
||||
let yzmlongin = document.querySelector('#yzmlongin')
|
||||
let span1 = document.querySelector('.span1')
|
||||
let span2 = document.querySelector('.span2')
|
||||
|
||||
// // 账号密码登录
|
||||
document.querySelector('#zhanghaomima').addEventListener('click', function () {
|
||||
// alert(11)
|
||||
zhanghaomima.style.fontWeight = 700
|
||||
zhanghaomima.style.borderBottom = '5px solid #fda633'
|
||||
// zhanghaomima.style.borderBottom = '5px solid #fda633'
|
||||
span1.style.display = 'block'
|
||||
span2.style.display = 'none'
|
||||
yzmlongin.style.fontWeight = 400
|
||||
yzmlongin.style.borderBottom = '0'
|
||||
mima.style.display = 'block'
|
||||
@ -702,7 +739,9 @@
|
||||
// 验证码登录
|
||||
document.querySelector('#yzmlongin').addEventListener('click', function () {
|
||||
yzmlongin.style.fontWeight = 700
|
||||
yzmlongin.style.borderBottom = '5px solid #fda633'
|
||||
// yzmlongin.style.borderBottom = '5px solid #fda633'
|
||||
span1.style.display = 'none'
|
||||
span2.style.display = 'block'
|
||||
zhanghaomima.style.fontWeight = 400
|
||||
zhanghaomima.style.borderBottom = '0'
|
||||
mima.style.display = 'none'
|
||||
@ -734,7 +773,7 @@
|
||||
|
||||
// 去登录
|
||||
document.querySelector('#goLogin').addEventListener('click', function () {
|
||||
btnList.style.display = 'block'
|
||||
btnList.style.display = 'flex'
|
||||
change.style.display = 'none'
|
||||
dengLu.style.display = 'block'
|
||||
changePassword.style.display = 'none'
|
||||
|
322
src/main/resources/templates/wg/list-check.html
Normal file
322
src/main/resources/templates/wg/list-check.html
Normal file
@ -0,0 +1,322 @@
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<base th:href="${#request.getContextPath() + '/'}">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="startTime" class="layui-input search-item" placeholder="开始时间" readonly>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
|
||||
</div>
|
||||
<div class="layui-inline layui-form search-item" >
|
||||
<select id="invoiceStatus" name="invoiceStatus" style="">
|
||||
<option value="">开票状态</option>
|
||||
<option value="PENDING">等待</option>
|
||||
<option value="COMPLETE">完成</option>
|
||||
<option value="FAILED">失败</option>
|
||||
</select>
|
||||
</div>
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
<!-- 表头按钮组 -->
|
||||
<script type="text/html" id="headerToolBar">
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="updateEvent">
|
||||
<i class="fa fa-lg fa-check"></i> 查看审核
|
||||
</button>
|
||||
</div>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'table', 'laydate', 'common'], function() {
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var table = layui.table;
|
||||
var admin = layui.admin;
|
||||
var laydate = layui.laydate;
|
||||
var common = layui.common;
|
||||
var resizeTimeout = null;
|
||||
// var invoiceStatus = top.restAjax.params(window.location.href).invoiceStatus;
|
||||
var tableUrl = 'api/wg-invoice/listpage';
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
table.render({
|
||||
elem: '#dataTable',
|
||||
id: 'dataTable',
|
||||
url: top.restAjax.path(tableUrl, []),
|
||||
width: admin.screen() > 1 ? '100%' : '',
|
||||
height: $win.height() - 90,
|
||||
limit: 20,
|
||||
limits: [20, 40, 60, 80, 100, 200],
|
||||
// toolbar: '#headerToolBar',
|
||||
defaultToolbar: [],
|
||||
request: {
|
||||
pageName: 'page',
|
||||
limitName: 'rows'
|
||||
},
|
||||
cols: [
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field: 'invoiceAmount', width: 100, title: '金额', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return (rowData/ 100) + "元";
|
||||
}
|
||||
},
|
||||
{field: 'invoiceTitle', width: 180, title: '名称', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'invoiceNo', width: 180, title: '纳税人识别号', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
/* {field: 'invoiceAddress', width: 180, title: '地址', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'invoicePhone', width: 180, title: '电话', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'invoiceBank', width: 180, title: '开户行', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'invoiceAccount', width: 180, title: '开户行账号', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},*/
|
||||
{field: 'invoiceNote', width: 180, title: '备注', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'invoiceStatus', width: 100, title: '开票状态', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
if(rowData === 'PENDING') {
|
||||
return '等待';
|
||||
}
|
||||
if(rowData === 'COMPLETE') {
|
||||
return '完成';
|
||||
}
|
||||
if(rowData === 'FAILED') {
|
||||
return '失败';
|
||||
}
|
||||
if(rowData === 'CANCEL') {
|
||||
return '已取消';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'gmtCreate', width: 180, title: '发起时间', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'cz', width: 180, title: '操作', align:'center', fixed: "right",
|
||||
templet: function(row) {
|
||||
var status = row['invoiceStatus'];
|
||||
var rowData = ' <div class="layui-btn-group">';
|
||||
rowData += '<button type="button" class="layui-btn layui-btn-xs" lay-event="showEvent">发票详情</button>'
|
||||
if(status === 'PENDING'){
|
||||
rowData += '<button type="button" class="layui-btn layui-btn-xs layui-btn-normal" lay-event="checkEvent"><i class="fa fa-lg fa-check"></i>查看审核</button>'
|
||||
}
|
||||
rowData += '</div>'
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
]
|
||||
],
|
||||
page: true,
|
||||
parseData: function(data) {
|
||||
return {
|
||||
'code': 0,
|
||||
'msg': '',
|
||||
'count': data.total,
|
||||
'data': data.rows
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 事件 - 增删改
|
||||
table.on('tool(dataTable)', function(obj) {
|
||||
var layEvent = obj.event;
|
||||
var data = obj.data;
|
||||
if(layEvent === 'showEvent') {
|
||||
top.layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['80%', '90%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/wg/show?invoiceId={invoiceId}', [data.invoiceId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}else if(layEvent === 'checkEvent'){
|
||||
top.layer.open({
|
||||
type: 2,
|
||||
title: "审核开票",
|
||||
closeBtn: 0,
|
||||
area: ['80%', '90%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/wg/update?invoiceId={invoiceId}', [data.invoiceId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// 重载表格
|
||||
function reloadTable(currentPage) {
|
||||
table.reload('dataTable', {
|
||||
where: {
|
||||
keywords: $('#keywords').val(),
|
||||
startTime: $('#startTime').val(),
|
||||
endTime: $('#endTime').val(),
|
||||
invoiceStatus: $('#invoiceStatus').val(),
|
||||
},
|
||||
page: {
|
||||
curr: currentPage
|
||||
},
|
||||
});
|
||||
}
|
||||
// 初始化日期
|
||||
function initDate() {
|
||||
// 日期选择
|
||||
laydate.render({
|
||||
elem: '#startTime',
|
||||
format: 'yyyy-MM-dd'
|
||||
});
|
||||
laydate.render({
|
||||
elem: '#endTime',
|
||||
format: 'yyyy-MM-dd'
|
||||
});
|
||||
}
|
||||
initTable();
|
||||
initDate();
|
||||
// 事件 - 页面变化
|
||||
$win.on('resize', function() {
|
||||
clearTimeout(resizeTimeout);
|
||||
resizeTimeout = setTimeout(function() {
|
||||
reloadTable();
|
||||
}, 500);
|
||||
});
|
||||
// 事件 - 搜索
|
||||
$(document).on('click', '#search', function() {
|
||||
reloadTable(1);
|
||||
});
|
||||
// 事件 - 增删改
|
||||
table.on('toolbar(dataTable)', function(obj) {
|
||||
var layEvent = obj.event;
|
||||
var checkStatus = table.checkStatus('dataTable');
|
||||
var checkDatas = checkStatus.data;
|
||||
if(layEvent === 'updateEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
} else {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/wg/update?invoiceId={invoiceId}', [checkDatas[0].invoiceId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
267
src/main/resources/templates/wg/list.html
Normal file
267
src/main/resources/templates/wg/list.html
Normal file
@ -0,0 +1,267 @@
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<base th:href="${#request.getContextPath() + '/'}">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-row">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="startTime" class="layui-input search-item" placeholder="开始时间" readonly>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
|
||||
</div>
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||
<!-- 表头按钮组 -->
|
||||
<script type="text/html" id="headerToolBar">
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="updateEvent">
|
||||
<i class="fa fa-lg fa-plus"></i> 查看
|
||||
</button>
|
||||
</div>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/'
|
||||
}).extend({
|
||||
index: 'lib/index'
|
||||
}).use(['index', 'table', 'laydate', 'common'], function() {
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var table = layui.table;
|
||||
var admin = layui.admin;
|
||||
var laydate = layui.laydate;
|
||||
var common = layui.common;
|
||||
var resizeTimeout = null;
|
||||
var invoiceStatus = top.restAjax.params(window.location.href).invoiceStatus;
|
||||
var tableUrl = 'api/wg-invoice/listpage?invoiceStatus=' + invoiceStatus;
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
table.render({
|
||||
elem: '#dataTable',
|
||||
id: 'dataTable',
|
||||
url: top.restAjax.path(tableUrl, []),
|
||||
width: admin.screen() > 1 ? '100%' : '',
|
||||
height: $win.height() - 90,
|
||||
limit: 20,
|
||||
limits: [20, 40, 60, 80, 100, 200],
|
||||
toolbar: '#headerToolBar',
|
||||
defaultToolbar: [],
|
||||
request: {
|
||||
pageName: 'page',
|
||||
limitName: 'rows'
|
||||
},
|
||||
cols: [
|
||||
[
|
||||
{type:'checkbox', fixed: 'left'},
|
||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||
{field: 'invoiceAmount', width: 100, title: '金额', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return (parseFloat(rowData) / 100).toFixed(2);
|
||||
}
|
||||
},
|
||||
{field: 'invoiceTitle', width: 180, title: '名称', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'invoiceNo', width: 180, title: '纳税人识别号', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
/* {field: 'invoiceAddress', width: 180, title: '地址', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'invoicePhone', width: 180, title: '电话', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'invoiceBank', width: 180, title: '开户行', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'invoiceAccount', width: 180, title: '开户行账号', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},*/
|
||||
{field: 'invoiceNote', width: 180, title: '备注', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'invoiceStatus', width: 100, title: '开票状态', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
if(rowData === 'PENDING') {
|
||||
return '等待';
|
||||
}
|
||||
if(rowData === 'COMPLETE') {
|
||||
return '完成';
|
||||
}
|
||||
if(rowData === 'FAILED') {
|
||||
return '失败';
|
||||
}
|
||||
if(rowData === 'CANCEL') {
|
||||
return '已取消';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'gmtCreate', width: 180, title: '发起时间', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
page: true,
|
||||
parseData: function(data) {
|
||||
return {
|
||||
'code': 0,
|
||||
'msg': '',
|
||||
'count': data.total,
|
||||
'data': data.rows
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
// 重载表格
|
||||
function reloadTable(currentPage) {
|
||||
table.reload('dataTable', {
|
||||
where: {
|
||||
keywords: $('#keywords').val(),
|
||||
startTime: $('#startTime').val(),
|
||||
endTime: $('#endTime').val()
|
||||
},
|
||||
page: {
|
||||
curr: currentPage
|
||||
},
|
||||
});
|
||||
}
|
||||
// 初始化日期
|
||||
function initDate() {
|
||||
// 日期选择
|
||||
laydate.render({
|
||||
elem: '#startTime',
|
||||
format: 'yyyy-MM-dd'
|
||||
});
|
||||
laydate.render({
|
||||
elem: '#endTime',
|
||||
format: 'yyyy-MM-dd'
|
||||
});
|
||||
}
|
||||
initTable();
|
||||
initDate();
|
||||
// 事件 - 页面变化
|
||||
$win.on('resize', function() {
|
||||
clearTimeout(resizeTimeout);
|
||||
resizeTimeout = setTimeout(function() {
|
||||
reloadTable();
|
||||
}, 500);
|
||||
});
|
||||
// 事件 - 搜索
|
||||
$(document).on('click', '#search', function() {
|
||||
reloadTable(1);
|
||||
});
|
||||
// 事件 - 增删改
|
||||
table.on('toolbar(dataTable)', function(obj) {
|
||||
var layEvent = obj.event;
|
||||
var checkStatus = table.checkStatus('dataTable');
|
||||
var checkDatas = checkStatus.data;
|
||||
if(layEvent === 'updateEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
} else {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/wg/show?invoiceId={invoiceId}', [checkDatas[0].invoiceId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
363
src/main/resources/templates/wg/show.html
Normal file
363
src/main/resources/templates/wg/show.html
Normal file
@ -0,0 +1,363 @@
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<base th:href="${#request.getContextPath() + '/'}">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<blockquote class="layui-elem-quote">开票信息</blockquote>
|
||||
<div class=" layui-row ">
|
||||
<div class="layui-col-lg6 layui-col-md6" >
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">开票金额</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="invoiceAmount" readonly name="invoiceAmount" class="layui-input" value="" placeholder="" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6" >
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">名称</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="invoiceTitle" readonly name="invoiceTitle" class="layui-input" value="" placeholder="" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6" >
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">税号</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" readonly id="invoiceNo" name="invoiceNo" class="layui-input" value="" placeholder="" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6" >
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">地址</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" readonly id="invoiceAddress" name="invoiceAddress" class="layui-input" value="" placeholder="" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">电话</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="invoicePhone" readonly name="invoicePhone" class="layui-input" value="" placeholder="" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">开户行</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="invoiceBank" readonly name="invoiceBank" class="layui-input" value="" placeholder="" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">开户行账号</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="invoiceAccount" readonly name="invoiceAccount" class="layui-input" value="" placeholder="" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">当前进度</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="invoiceStatus" readonly name="invoiceStatus" class="layui-input" value="" placeholder="" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg12 layui-col-md12">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">备注</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="invoiceNote" readonly name="invoiceNote" class="layui-input" value="" placeholder="" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<blockquote class="layui-elem-quote" id="fapiao1" style="display: none">发票信息</blockquote>
|
||||
<div class="layui-form-item layui-form-text" id="fapiao2" style="display: none">
|
||||
<label class="layui-form-label">票据文件</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="fileId" name="fileId">
|
||||
<div class="layui-btn-container" id="fileIdFileBox" style="border: 1px solid #e6e6e6;"></div>
|
||||
<script id="fileIdFileDownload" type="text/html">
|
||||
{{# var fileName = 'fileId'; }}
|
||||
{{# if(d[fileName] != '') { }}
|
||||
{{# var files = d[fileName];}}
|
||||
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
||||
<span class="layui-btn-group">
|
||||
<div class="upload-file-box">
|
||||
<a class="upload-file-a" onclick="window.open('route/file/download/true/{{item.fileId}}')" href="javascript:void(0)" title="{{item.fileName}} - 点击下载">
|
||||
{{# if(item.fileType == 'doc' || item.fileType == 'docx') { }}
|
||||
<img src="assets/images/filetype/word.png"/>
|
||||
{{# } else if(item.fileType == 'xls' || item.fileType == 'xlsx') { }}
|
||||
<img src="assets/images/filetype/excel.png"/>
|
||||
{{# } else if(item.fileType == 'ppt' || item.fileType == 'pptx') { }}
|
||||
<img src="assets/images/filetype/ppt.png"/>
|
||||
{{# } else if(item.fileType == 'apk') { }}
|
||||
<img src="assets/images/filetype/apk.png"/>
|
||||
{{# } else if(item.fileType == 'pdf') { }}
|
||||
<img src="assets/images/filetype/pdf.png"/>
|
||||
{{# } else if(item.fileType == 'rar') { }}
|
||||
<img src="assets/images/filetype/rar.png"/>
|
||||
{{# } else if(item.fileType == 'zip') { }}
|
||||
<img src="assets/images/filetype/zip.png"/>
|
||||
{{# } else if(item.fileType == 'txt') { }}
|
||||
<img src="assets/images/filetype/txt.png"/>
|
||||
{{# } else { }}
|
||||
<img src="assets/images/filetype/file.png"/>
|
||||
{{# } }}
|
||||
</a>
|
||||
<span class="upload-file-title">{{item.fileName}}</span>
|
||||
</div>
|
||||
</span>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
{{# if(d[fileName].length < 1) { }}
|
||||
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
||||
<a href="javascript:void(0);" lay-form-button data-explain="平台打款凭证" data-name="fileId" lay-filter="fileIdUploadFile">
|
||||
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
||||
</a>
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">审核说明</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="checkRemark" name="checkRemark" class="layui-input" value="" placeholder="" maxlength="300">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
|
||||
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var laytpl = layui.laytpl;
|
||||
var laydate = layui.laydate;
|
||||
var invoiceId = top.restAjax.params(window.location.href).invoiceId;
|
||||
var AgentServerUrl = "[[${AgentServerUrl}]]";
|
||||
var wangEditor = window.wangEditor;
|
||||
var wangEditorObj = {};
|
||||
var viewerObj = {};
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
function refreshDownloadTemplet(fileName, file) {
|
||||
var dataRander = {};
|
||||
dataRander[fileName] = file;
|
||||
dataRander["AgentServerUrl"] = "[[${AgentServerUrl}]]";
|
||||
|
||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化文件列表
|
||||
function initFileList(fileName, ids, callback) {
|
||||
var dataForm = {};
|
||||
dataForm[fileName] = ids;
|
||||
dataForm["AgentServerUrl"] = "[[${AgentServerUrl}]]";
|
||||
form.val('dataForm', dataForm);
|
||||
|
||||
if(!ids) {
|
||||
refreshDownloadTemplet(fileName, []);
|
||||
if(callback) {
|
||||
callback(fileName, []);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
top.restAjax.get(top.restAjax.path( (fileName == 'fileId' ? '' : AgentServerUrl) + 'api/file/list', []), {
|
||||
ids: ids
|
||||
}, null, function(code, data) {
|
||||
refreshDownloadTemplet(fileName, data);
|
||||
if(callback) {
|
||||
callback(fileName, data);
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化票据类型文件上传
|
||||
function initFileIdUploadFile() {
|
||||
var files = $('#fileId').val();
|
||||
initFileList('fileId', files, function(fileName) {
|
||||
});
|
||||
form.on('button(fileIdUploadFile)', function(obj) {
|
||||
var name = this.dataset.name;
|
||||
var explain = this.dataset.explain;
|
||||
top.dialog.file({
|
||||
type: 'file',
|
||||
title: '上传'+ explain,
|
||||
width: '400px',
|
||||
height: '420px',
|
||||
maxFileCount: '1',
|
||||
onClose: function() {
|
||||
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
||||
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
||||
var files = $('#'+ name).val();
|
||||
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
||||
if(files.length > 0) {
|
||||
files += ',';
|
||||
}
|
||||
files += file.data;
|
||||
}
|
||||
initFileList(name, files, function(fileName) {
|
||||
viewerObj[fileName].update();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
form.on('button(fileIdRemoveFile)', function(obj) {
|
||||
var name = this.dataset.name;
|
||||
var id = this.dataset.id;
|
||||
var files = $('#'+ name).val().replace(id, '');
|
||||
files = files.replace(/\,+/g, ',');
|
||||
if(files.charAt(0) == ',') {
|
||||
files = files.substring(1);
|
||||
}
|
||||
if(files.charAt(files.length - 1) == ',') {
|
||||
files = files.substring(0, files.length - 1);
|
||||
}
|
||||
initFileList(name, files, function(fileName) {
|
||||
viewerObj[fileName].update();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化票据文件文件上传
|
||||
function initInvoiceFileUploadFile() {
|
||||
var files = $('#invoiceFile').val();
|
||||
initFileList('invoiceFile', files);
|
||||
|
||||
form.on('button(invoiceFileUploadFile)', function(obj) {
|
||||
var name = this.dataset.name;
|
||||
var explain = this.dataset.explain;
|
||||
top.dialog.file({
|
||||
type: 'file',
|
||||
title: '上传'+ explain,
|
||||
width: '400px',
|
||||
height: '420px',
|
||||
maxFileCount: '1',
|
||||
onClose: function() {
|
||||
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
||||
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
||||
var files = $('#'+ name).val();
|
||||
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
||||
if(files.length > 0) {
|
||||
files += ',';
|
||||
}
|
||||
files += file.data;
|
||||
}
|
||||
initFileList(name, files, function() {});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
form.on('button(invoiceFileRemoveFile)', function(obj) {
|
||||
var name = this.dataset.name;
|
||||
var id = this.dataset.id;
|
||||
var files = $('#'+ name).val().replace(id, '');
|
||||
files = files.replace(/\,+/g, ',');
|
||||
if(files.charAt(0) == ',') {
|
||||
files = files.substring(1);
|
||||
}
|
||||
if(files.charAt(files.length - 1) == ',') {
|
||||
files = files.substring(0, files.length - 1);
|
||||
}
|
||||
initFileList(name, files);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/wg-invoice/get/{invoiceId}', [invoiceId]), {}, null, function(code, data) {
|
||||
if(data.invoiceStatus === 'PENDING') {
|
||||
data.invoiceStatus = '等待';
|
||||
}
|
||||
if(data.invoiceStatus === 'COMPLETE') {
|
||||
data.invoiceStatus = '完成';
|
||||
}
|
||||
if(data.invoiceStatus === 'FAILED') {
|
||||
data.invoiceStatus = '失败';
|
||||
}
|
||||
if(data.invoiceStatus === 'CANCEL') {
|
||||
data.invoiceStatus = '已取消';
|
||||
}
|
||||
var dataFormData = {};
|
||||
data.fileId = data.invoiceFiles;
|
||||
data.checkRemark = data.examineOpinion;
|
||||
data.invoiceAmount = (data.invoiceAmount / 100) + "元";
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i] +'';
|
||||
}
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
initFileIdUploadFile();
|
||||
if (data.invoiceStatus == '完成') {
|
||||
$("#fapiao1").show();
|
||||
$("#fapiao2").show();
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
initData();
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
392
src/main/resources/templates/wg/update.html
Normal file
392
src/main/resources/templates/wg/update.html
Normal file
@ -0,0 +1,392 @@
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<base th:href="${#request.getContextPath() + '/'}">
|
||||
<meta charset="utf-8">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<blockquote class="layui-elem-quote">开票信息</blockquote>
|
||||
<div class=" layui-row ">
|
||||
<div class="layui-col-lg6 layui-col-md6" >
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">开票金额</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="invoiceAmount" readonly name="invoiceAmount" class="layui-input" value="" placeholder="" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6" >
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">名称</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="invoiceTitle" readonly name="invoiceTitle" class="layui-input" value="" placeholder="" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6" >
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">纳税人识别号</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" readonly id="invoiceNo" name="invoiceNo" class="layui-input" value="" placeholder="" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6" >
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">地址</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" readonly id="invoiceAddress" name="invoiceAddress" class="layui-input" value="" placeholder="" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">电话</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="invoicePhone" readonly name="invoicePhone" class="layui-input" value="" placeholder="" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">开户行</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="invoiceBank" readonly name="invoiceBank" class="layui-input" value="" placeholder="" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">开户行账号</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="invoiceAccount" readonly name="invoiceAccount" class="layui-input" value="" placeholder="" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">备注</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="invoiceNote" readonly name="invoiceNote" class="layui-input" value="" placeholder="" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<blockquote class="layui-elem-quote">发票信息</blockquote>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">票据文件</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="fileId" name="fileId">
|
||||
<div class="layui-btn-container" id="fileIdFileBox" style="border: 1px solid #e6e6e6;"></div>
|
||||
<script id="fileIdFileDownload" type="text/html">
|
||||
{{# var fileName = 'fileId'; }}
|
||||
{{# if(d[fileName] != '') { }}
|
||||
{{# var files = d[fileName];}}
|
||||
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
||||
<span class="layui-btn-group">
|
||||
<div class="upload-file-box">
|
||||
<a class="upload-file-a" onclick="window.open('route/file/download/true/{{item.fileId}}')" href="javascript:void(0)" title="{{item.fileName}} - 点击下载">
|
||||
{{# if(item.fileType == 'doc' || item.fileType == 'docx') { }}
|
||||
<img src="assets/images/filetype/word.png"/>
|
||||
{{# } else if(item.fileType == 'xls' || item.fileType == 'xlsx') { }}
|
||||
<img src="assets/images/filetype/excel.png"/>
|
||||
{{# } else if(item.fileType == 'ppt' || item.fileType == 'pptx') { }}
|
||||
<img src="assets/images/filetype/ppt.png"/>
|
||||
{{# } else if(item.fileType == 'apk') { }}
|
||||
<img src="assets/images/filetype/apk.png"/>
|
||||
{{# } else if(item.fileType == 'pdf') { }}
|
||||
<img src="assets/images/filetype/pdf.png"/>
|
||||
{{# } else if(item.fileType == 'rar') { }}
|
||||
<img src="assets/images/filetype/rar.png"/>
|
||||
{{# } else if(item.fileType == 'zip') { }}
|
||||
<img src="assets/images/filetype/zip.png"/>
|
||||
{{# } else if(item.fileType == 'txt') { }}
|
||||
<img src="assets/images/filetype/txt.png"/>
|
||||
{{# } else { }}
|
||||
<img src="assets/images/filetype/file.png"/>
|
||||
{{# } }}
|
||||
</a>
|
||||
<span class="upload-file-title">{{item.fileName}}</span>
|
||||
<a class="layui-btn layui-btn-xs layui-btn-danger text-danger remove-file" href="javascript:void(0);" lay-form-button data-id="{{item.fileId}}" data-name="{{fileName}}" lay-filter="fileIdRemoveFile">
|
||||
<i class="fa fa-trash-o"></i>
|
||||
</a>
|
||||
</div>
|
||||
</span>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
{{# if(d[fileName].length < 1) { }}
|
||||
<div class="upload-image-box" style="width: auto; height: auto; padding: 5px;">
|
||||
<a href="javascript:void(0);" lay-form-button data-explain="平台打款凭证" data-name="fileId" lay-filter="fileIdUploadFile">
|
||||
<i class="fa fa-plus-square-o" style="font-size: 70px;"></i>
|
||||
</a>
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">审核说明</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="checkRemark" name="checkRemark" class="layui-input" value="" placeholder="请输入审核说明" maxlength="300">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">确认已开票</button>
|
||||
<button type="button" class="layui-btn layui-btn-danger" lay-submit lay-filter="submitForm2">开票不通过</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
|
||||
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
|
||||
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var laytpl = layui.laytpl;
|
||||
var laydate = layui.laydate;
|
||||
var invoiceId = top.restAjax.params(window.location.href).invoiceId;
|
||||
var AgentServerUrl = "[[${AgentServerUrl}]]";
|
||||
var wangEditor = window.wangEditor;
|
||||
var wangEditorObj = {};
|
||||
var viewerObj = {};
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
function refreshDownloadTemplet(fileName, file) {
|
||||
var dataRander = {};
|
||||
dataRander[fileName] = file;
|
||||
dataRander["AgentServerUrl"] = "[[${AgentServerUrl}]]";
|
||||
|
||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化文件列表
|
||||
function initFileList(fileName, ids, callback) {
|
||||
var dataForm = {};
|
||||
dataForm[fileName] = ids;
|
||||
dataForm["AgentServerUrl"] = "[[${AgentServerUrl}]]";
|
||||
form.val('dataForm', dataForm);
|
||||
|
||||
if(!ids) {
|
||||
refreshDownloadTemplet(fileName, []);
|
||||
if(callback) {
|
||||
callback(fileName, []);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
top.restAjax.get(top.restAjax.path( (fileName == 'fileId' ? '' : AgentServerUrl) + 'api/file/list', []), {
|
||||
ids: ids
|
||||
}, null, function(code, data) {
|
||||
refreshDownloadTemplet(fileName, data);
|
||||
if(callback) {
|
||||
callback(fileName, data);
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化票据类型文件上传
|
||||
function initFileIdUploadFile() {
|
||||
var files = $('#fileId').val();
|
||||
initFileList('fileId', files, function(fileName) {
|
||||
});
|
||||
form.on('button(fileIdUploadFile)', function(obj) {
|
||||
var name = this.dataset.name;
|
||||
var explain = this.dataset.explain;
|
||||
top.dialog.file({
|
||||
type: 'file',
|
||||
title: '上传'+ explain,
|
||||
width: '400px',
|
||||
height: '420px',
|
||||
maxFileCount: '1',
|
||||
onClose: function() {
|
||||
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
||||
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
||||
var files = $('#'+ name).val();
|
||||
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
||||
if(files.length > 0) {
|
||||
files += ',';
|
||||
}
|
||||
files += file.data;
|
||||
}
|
||||
initFileList(name, files, function(fileName) {
|
||||
viewerObj[fileName].update();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
form.on('button(fileIdRemoveFile)', function(obj) {
|
||||
var name = this.dataset.name;
|
||||
var id = this.dataset.id;
|
||||
var files = $('#'+ name).val().replace(id, '');
|
||||
files = files.replace(/\,+/g, ',');
|
||||
if(files.charAt(0) == ',') {
|
||||
files = files.substring(1);
|
||||
}
|
||||
if(files.charAt(files.length - 1) == ',') {
|
||||
files = files.substring(0, files.length - 1);
|
||||
}
|
||||
initFileList(name, files, function(fileName) {
|
||||
viewerObj[fileName].update();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化票据文件文件上传
|
||||
function initInvoiceFileUploadFile() {
|
||||
var files = $('#invoiceFile').val();
|
||||
initFileList('invoiceFile', files);
|
||||
|
||||
form.on('button(invoiceFileUploadFile)', function(obj) {
|
||||
var name = this.dataset.name;
|
||||
var explain = this.dataset.explain;
|
||||
top.dialog.file({
|
||||
type: 'file',
|
||||
title: '上传'+ explain,
|
||||
width: '400px',
|
||||
height: '420px',
|
||||
maxFileCount: '1',
|
||||
onClose: function() {
|
||||
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
||||
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
||||
var files = $('#'+ name).val();
|
||||
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
||||
if(files.length > 0) {
|
||||
files += ',';
|
||||
}
|
||||
files += file.data;
|
||||
}
|
||||
initFileList(name, files, function() {});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
form.on('button(invoiceFileRemoveFile)', function(obj) {
|
||||
var name = this.dataset.name;
|
||||
var id = this.dataset.id;
|
||||
var files = $('#'+ name).val().replace(id, '');
|
||||
files = files.replace(/\,+/g, ',');
|
||||
if(files.charAt(0) == ',') {
|
||||
files = files.substring(1);
|
||||
}
|
||||
if(files.charAt(files.length - 1) == ',') {
|
||||
files = files.substring(0, files.length - 1);
|
||||
}
|
||||
initFileList(name, files);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/wg-invoice/get/{invoiceId}', [invoiceId]), {}, null, function(code, data) {
|
||||
var dataFormData = {};
|
||||
data.invoiceAmount = (parseFloat(data.invoiceAmount) / 100).toFixed(2);
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i] +'';
|
||||
}
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
initFileIdUploadFile();
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
initData();
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm2)', function(formData) {
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
$('#submit').attr("disabled", "disabled");
|
||||
$('#submit').addClass("layui-btn-disabled");
|
||||
var data1 = {status : 'FAILED' , opinion : formData.field["checkRemark"]};
|
||||
var loadLayerIndex;
|
||||
top.restAjax.put(top.restAjax.path('api/wg-invoice/update/{invoiceId}', [invoiceId]), data1, null, function(code, data) {
|
||||
closeBox();
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
$('#submit').removeAttr("disabled");
|
||||
$('#submit').removeClass("layui-btn-disabled");
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
if (formData.field["fileId"].length < 1) {
|
||||
layer.msg("票据文件不能为空");
|
||||
return;
|
||||
}
|
||||
$('#submit').attr("disabled", "disabled");
|
||||
$('#submit').addClass("layui-btn-disabled");
|
||||
var data1 = {status : 'COMPLETE' , opinion : formData.field["checkRemark"], fileIds : formData.field["fileId"] };
|
||||
var loadLayerIndex;
|
||||
top.restAjax.put(top.restAjax.path('api/wg-invoice/update/{invoiceId}', [invoiceId]), data1, null, function(code, data) {
|
||||
closeBox();
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
$('#submit').removeAttr("disabled");
|
||||
$('#submit').removeClass("layui-btn-disabled");
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -9,6 +9,11 @@
|
||||
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
<style>
|
||||
.search-item .layui-form-select .layui-input {
|
||||
width: 200px!important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||
@ -26,6 +31,17 @@
|
||||
<div class="layui-inline">
|
||||
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
|
||||
</div>
|
||||
<div class="layui-inline layui-form search-item" >
|
||||
<select id="status" name="status" style="">
|
||||
<option value="">提现状态</option>
|
||||
<option value="APPLY">申请待审核</option>
|
||||
<option value="APPLY_YES">已同意提现</option>
|
||||
<option value="APPLY_NO">申请被拒绝</option>
|
||||
<option value="UPLOAD_TICKET">票据待审核</option>
|
||||
<option value="UPLOAD_TICKET_NO">票据未通过</option>
|
||||
<option value="FINISH">资金到账</option>
|
||||
</select>
|
||||
</div>
|
||||
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||
<i class="fa fa-lg fa-search"></i> 搜索
|
||||
</button>
|
||||
@ -34,9 +50,9 @@
|
||||
<!-- 表头按钮组 -->
|
||||
<script type="text/html" id="headerToolBar">
|
||||
<div class="layui-btn-group">
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="updateEvent">
|
||||
<!-- <button type="button" class="layui-btn layui-btn-sm" lay-event="updateEvent">
|
||||
<i class="fa fa-lg fa-check"></i> 查看审核
|
||||
</button>
|
||||
</button>-->
|
||||
<!-- <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="closeEvent">-->
|
||||
<!-- <i class="fa fa-lg fa-edit"></i> 关闭提现-->
|
||||
<!-- </button>-->
|
||||
@ -62,7 +78,7 @@
|
||||
var laydate = layui.laydate;
|
||||
var common = layui.common;
|
||||
var resizeTimeout = null;
|
||||
var tableUrl = '[[${AgentServerUrl}]]api/withdraw/listpage-audit';
|
||||
var tableUrl = '[[${AgentServerUrl}]]api/withdraw/listpage';
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
@ -74,7 +90,7 @@
|
||||
height: $win.height() - 90,
|
||||
limit: 20,
|
||||
limits: [20, 40, 60, 80, 100, 200],
|
||||
toolbar: '#headerToolBar',
|
||||
// toolbar: '#headerToolBar',
|
||||
defaultToolbar: [],
|
||||
request: {
|
||||
pageName: 'page',
|
||||
@ -102,7 +118,7 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'accountMoney', width: 180, title: '提现前账户余额', align:'center',
|
||||
{field: 'accountMoney', width: 130, title: '提现前账户余额', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -111,7 +127,7 @@
|
||||
return (rowData / 100) + "元";
|
||||
}
|
||||
},
|
||||
{field: 'withdawMoney', width: 180, title: '本次提现金额', align:'center',
|
||||
{field: 'withdawMoney', width: 130, title: '本次提现金额', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
@ -129,13 +145,13 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'statusText', width: 180, title: '状态', align:'center',
|
||||
{field: 'statusText', width: 120, title: '状态', align:'center',
|
||||
templet: function(row) {
|
||||
var rowData = row[this.field];
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
return "<b>" + rowData + "</b>";
|
||||
}
|
||||
},
|
||||
{field: 'gmtCreate', width: 180, title: '申请时间', align:'center',
|
||||
@ -147,6 +163,25 @@
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
{field: 'cz', width: 180, title: '操作', align:'center', fixed: "right",
|
||||
templet: function(row) {
|
||||
var status = row['status'];
|
||||
console.log(status);
|
||||
var remitInvoiceDTO = row['remitInvoiceDTO'];
|
||||
var withdawInvoiceDTO = row['withdawInvoiceDTO'];
|
||||
console.log(withdawInvoiceDTO);
|
||||
var rowData = ' <div class="layui-btn-group">';
|
||||
rowData += '<button type="button" class="layui-btn layui-btn-xs" lay-event="showEvent">提现详情</button>'
|
||||
if(status === 'APPLY'){
|
||||
rowData += '<button type="button" class="layui-btn layui-btn-xs layui-btn-normal" lay-event="checkEvent"><i class="fa fa-lg fa-check"></i>提现审核</button>'
|
||||
}
|
||||
if(status === 'UPLOAD_TICKET'){
|
||||
rowData += '<button type="button" class="layui-btn layui-btn-xs layui-btn-warm" lay-event="checkInvoiceEvent"><i class="fa fa-lg fa-check"></i>发票审核</button>'
|
||||
}
|
||||
rowData += '</div>'
|
||||
return rowData;
|
||||
}
|
||||
},
|
||||
]
|
||||
],
|
||||
page: true,
|
||||
@ -167,7 +202,8 @@
|
||||
where: {
|
||||
keywords: $('#keywords').val(),
|
||||
startTime: $('#startTime').val(),
|
||||
endTime: $('#endTime').val()
|
||||
endTime: $('#endTime').val(),
|
||||
status: $('#status').val()
|
||||
},
|
||||
page: {
|
||||
curr: currentPage
|
||||
@ -187,6 +223,55 @@
|
||||
format: 'yyyy-MM-dd'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 事件 - 增删改
|
||||
table.on('tool(dataTable)', function(obj) {
|
||||
var layEvent = obj.event;
|
||||
var data = obj.data;
|
||||
if(layEvent === 'showEvent') {
|
||||
top.layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['80%', '90%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/withdrawcheck/show?withdrawId={withdrawId}&basicsName={basicsName}', [data.withdrawId, data.basicsName]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}else if(layEvent === 'checkEvent'){
|
||||
top.layer.open({
|
||||
type: 2,
|
||||
title: "提现审核",
|
||||
closeBtn: 0,
|
||||
area: ['80%', '90%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/withdrawcheck/update?withdrawId={withdrawId}&basicsName={basicsName}', [data.withdrawId, data.basicsName]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}else if(layEvent === 'checkInvoiceEvent'){
|
||||
top.layer.open({
|
||||
type: 2,
|
||||
title: "发票审核",
|
||||
closeBtn: 0,
|
||||
area: ['80%', '90%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/withdrawinvoice/update?withdrawInvoiceId={withdrawInvoiceId}&basicsName={basicsName}', [data.withdawInvoiceDTO.withdrawInvoiceId, data.basicsName]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// 删除
|
||||
function removeData(ids) {
|
||||
top.dialog.msg(top.dataMessage.delete, {
|
||||
|
@ -37,6 +37,9 @@
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="updateEvent">
|
||||
<i class="fa fa-lg fa-plus"></i> 查看
|
||||
</button>
|
||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="checkEvent">
|
||||
<i class="fa fa-lg fa-check"></i> 审核
|
||||
</button>
|
||||
<!-- <button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="closeEvent">-->
|
||||
<!-- <i class="fa fa-lg fa-edit"></i> 关闭提现-->
|
||||
<!-- </button>-->
|
||||
@ -135,7 +138,7 @@
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
return "<b>" + rowData + "</b>";
|
||||
}
|
||||
},
|
||||
{field: 'gmtCreate', width: 180, title: '申请时间', align:'center',
|
||||
@ -246,6 +249,25 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if(layEvent === 'checkEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
} else {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/withdrawcheck/update?withdrawId={withdrawId}&basicsName={basicsName}', [checkDatas[0].withdrawId, checkDatas[0].basicsName]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if(layEvent === 'removeEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectDelete);
|
||||
|
@ -68,14 +68,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">当前状态</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="statusText" readonly name="statusText" class="layui-input" value="" placeholder="状态" maxlength="20">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-col-lg6 layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">提现户名</label>
|
||||
@ -94,15 +87,31 @@
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">银行卡号</label>
|
||||
<label class="layui-form-label layui-form-label-new">银行账号</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="withdawAccount" readonly name="withdawAccount" class="layui-input" value="" placeholder="银行卡号" maxlength="50">
|
||||
<input type="text" id="withdawAccount" readonly name="withdawAccount" class="layui-input" value="" placeholder="银行账号" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">当前进度</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="statusText" readonly name="statusText" class="layui-input" value="" placeholder="" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">审核记录</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="statusRemark" readonly name="statusRemark" class="layui-input" value="" placeholder="" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<blockquote class="layui-elem-quote">平台开票信息</blockquote>
|
||||
<div class=" layui-row ">
|
||||
<blockquote class="layui-elem-quote" id="kaiPiaoXinxi1" style="display: none">平台开票信息</blockquote>
|
||||
<div class=" layui-row " id="kaiPiaoXinxi2" style="display: none">
|
||||
<div class="layui-col-lg6 layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">名称</label>
|
||||
@ -152,10 +161,79 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item" pane="">
|
||||
<label class="layui-form-label">审核说明</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" readonly id="checkRemark" name="checkRemark" class="layui-input" value="" placeholder="审核说明" maxlength="300">
|
||||
<div id="kaiPiao" style="display: none">
|
||||
<blockquote class="layui-elem-quote">票据信息</blockquote>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">票据文件</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="invoiceFile" name="invoiceFile">
|
||||
<div class="layui-btn-container" id="invoiceFileFileBox" style="border: 1px solid #e6e6e6;"></div>
|
||||
<script id="invoiceFileFileDownload" type="text/html">
|
||||
{{# var fileName = 'invoiceFile'; }}
|
||||
{{# if(d[fileName] != '') { }}
|
||||
{{# var files = d[fileName];}}
|
||||
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
||||
<span class="layui-btn-group">
|
||||
<div class="upload-file-box">
|
||||
<a class="upload-file-a" onclick="window.open('{{d.AgentServerUrl}}route/file/download/true/{{item.fileId}}')" href="javascript:void(0)" title="{{item.fileName}} - 点击下载">
|
||||
{{# if(item.fileType == 'doc' || item.fileType == 'docx') { }}
|
||||
<img src="assets/images/filetype/word.png"/>
|
||||
{{# } else if(item.fileType == 'xls' || item.fileType == 'xlsx') { }}
|
||||
<img src="assets/images/filetype/excel.png"/>
|
||||
{{# } else if(item.fileType == 'ppt' || item.fileType == 'pptx') { }}
|
||||
<img src="{{d.AgentServerUrl}}assets/images/filetype/ppt.png"/>
|
||||
{{# } else if(item.fileType == 'apk') { }}
|
||||
<img src="assets/images/filetype/apk.png"/>
|
||||
{{# } else if(item.fileType == 'pdf') { }}
|
||||
<img src="{{d.AgentServerUrl}}assets/images/filetype/pdf.png"/>
|
||||
{{# } else if(item.fileType == 'rar') { }}
|
||||
<img src="assets/images/filetype/rar.png"/>
|
||||
{{# } else if(item.fileType == 'zip') { }}
|
||||
<img src="assets/images/filetype/zip.png"/>
|
||||
{{# } else if(item.fileType == 'txt') { }}
|
||||
<img src="assets/images/filetype/txt.png"/>
|
||||
{{# } else { }}
|
||||
<img src="assets/images/filetype/file.png"/>
|
||||
{{# } }}
|
||||
</a>
|
||||
<span class="upload-file-title">{{item.fileName}}</span>
|
||||
</div>
|
||||
</span>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">审核记录</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="auditExplain" name="auditExplain" class="layui-input" readonly value="" placeholder="暂无" maxlength="300">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="daKuan" style="display: none">
|
||||
<blockquote class="layui-elem-quote">打款信息</blockquote>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">平台打款凭证</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="hidden" id="fileId" name="fileId">
|
||||
<div class="layui-btn-container" id="fileIdFileBox" style="border: 1px solid #e6e6e6;"></div>
|
||||
<script id="fileIdFileDownload" type="text/html">
|
||||
{{# var fileName = 'fileId'; }}
|
||||
{{# if(d[fileName] != '') { }}
|
||||
{{# var files = d[fileName];}}
|
||||
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
||||
<span class="layui-btn-group">
|
||||
<div class="upload-image-box">
|
||||
<span class="upload-image-span">
|
||||
<img src="route/file/download/false/{{item.fileId}}" align="加载失败">
|
||||
</span>
|
||||
</div>
|
||||
</span>
|
||||
{{# } }}
|
||||
{{# } }}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
@ -193,6 +271,7 @@
|
||||
$(".layui-card").height( (document.documentElement.clientHeight - 95) + "px");
|
||||
|
||||
// 初始化
|
||||
/*
|
||||
function initInvoiceSelect() {
|
||||
top.restAjax.get(top.restAjax.path('api/invoice/list', []), {}, null, function(code, data, args) {
|
||||
laytpl(document.getElementById('invoiceSelectTemplate').innerHTML).render(data, function(html) {
|
||||
@ -205,6 +284,7 @@
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
*/
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
@ -219,10 +299,21 @@
|
||||
});
|
||||
}
|
||||
|
||||
function refreshDownloadTemplet(fileName, file) {
|
||||
var dataRander = {};
|
||||
dataRander[fileName] = file;
|
||||
dataRander["AgentServerUrl"] = "[[${AgentServerUrl}]]";
|
||||
|
||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化文件列表
|
||||
function initFileList(fileName, ids, callback) {
|
||||
var dataForm = {};
|
||||
dataForm[fileName] = ids;
|
||||
dataForm["AgentServerUrl"] = "[[${AgentServerUrl}]]";
|
||||
form.val('dataForm', dataForm);
|
||||
|
||||
if(!ids) {
|
||||
@ -233,7 +324,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
top.restAjax.get(top.restAjax.path('api/file/list', []), {
|
||||
top.restAjax.get(top.restAjax.path( (fileName == 'fileId' ? '' : "[[${AgentServerUrl}]]") + 'api/file/list', []), {
|
||||
ids: ids
|
||||
}, null, function(code, data) {
|
||||
refreshDownloadTemplet(fileName, data);
|
||||
@ -245,6 +336,100 @@
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化票据类型文件上传
|
||||
function initFileIdUploadFile() {
|
||||
var files = $('#fileId').val();
|
||||
initFileList('fileId', files, function(fileName) {
|
||||
var viewer = new Viewer(document.getElementById(fileName +'FileBox'), {navbar: false});
|
||||
viewerObj[fileName] = viewer;
|
||||
});
|
||||
form.on('button(fileIdUploadFile)', function(obj) {
|
||||
var name = this.dataset.name;
|
||||
var explain = this.dataset.explain;
|
||||
top.dialog.file({
|
||||
type: 'image',
|
||||
title: '上传'+ explain,
|
||||
width: '400px',
|
||||
height: '420px',
|
||||
maxFileCount: '1',
|
||||
onClose: function() {
|
||||
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
||||
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
||||
var files = $('#'+ name).val();
|
||||
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
||||
if(files.length > 0) {
|
||||
files += ',';
|
||||
}
|
||||
files += file.data;
|
||||
}
|
||||
initFileList(name, files, function(fileName) {
|
||||
viewerObj[fileName].update();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
form.on('button(fileIdRemoveFile)', function(obj) {
|
||||
var name = this.dataset.name;
|
||||
var id = this.dataset.id;
|
||||
var files = $('#'+ name).val().replace(id, '');
|
||||
files = files.replace(/\,+/g, ',');
|
||||
if(files.charAt(0) == ',') {
|
||||
files = files.substring(1);
|
||||
}
|
||||
if(files.charAt(files.length - 1) == ',') {
|
||||
files = files.substring(0, files.length - 1);
|
||||
}
|
||||
initFileList(name, files, function(fileName) {
|
||||
viewerObj[fileName].update();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化票据文件文件上传
|
||||
function initInvoiceFileUploadFile() {
|
||||
var files = $('#invoiceFile').val();
|
||||
initFileList('invoiceFile', files);
|
||||
|
||||
form.on('button(invoiceFileUploadFile)', function(obj) {
|
||||
var name = this.dataset.name;
|
||||
var explain = this.dataset.explain;
|
||||
top.dialog.file({
|
||||
type: 'file',
|
||||
title: '上传'+ explain,
|
||||
width: '400px',
|
||||
height: '420px',
|
||||
maxFileCount: '1',
|
||||
onClose: function() {
|
||||
var uploadFileArray = top.dialog.dialogData.uploadFileArray;
|
||||
if(typeof(uploadFileArray) != 'undefined' && uploadFileArray.length > 0) {
|
||||
var files = $('#'+ name).val();
|
||||
for(var j = 0, file = uploadFileArray[j]; file = uploadFileArray[j++];) {
|
||||
if(files.length > 0) {
|
||||
files += ',';
|
||||
}
|
||||
files += file.data;
|
||||
}
|
||||
initFileList(name, files, function() {});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
form.on('button(invoiceFileRemoveFile)', function(obj) {
|
||||
var name = this.dataset.name;
|
||||
var id = this.dataset.id;
|
||||
var files = $('#'+ name).val().replace(id, '');
|
||||
files = files.replace(/\,+/g, ',');
|
||||
if(files.charAt(0) == ',') {
|
||||
files = files.substring(1);
|
||||
}
|
||||
if(files.charAt(files.length - 1) == ',') {
|
||||
files = files.substring(0, files.length - 1);
|
||||
}
|
||||
initFileList(name, files);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
var loadLayerIndex;
|
||||
@ -258,21 +443,41 @@
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
$("#basicsName").val(basicsName);
|
||||
initInvoiceSelect();
|
||||
top.restAjax.get(top.restAjax.path('[[${AgentServerUrl}]]api/withdrawtaxpayer/get-by-withdrawid/{withdrawId}', [withdrawId]), {}, null, function(code, data) {
|
||||
var dataFormData = {};
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i] +'';
|
||||
}
|
||||
// initInvoiceSelect();
|
||||
if (data.withdawInvoiceDTO != null) {
|
||||
dataFormData['invoiceFile'] = data.withdawInvoiceDTO.invoiceFile;
|
||||
dataFormData['auditExplain'] = data.withdawInvoiceDTO.auditExplain
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
initInvoiceFileUploadFile();
|
||||
$("#kaiPiao").show();
|
||||
}
|
||||
if (data.remitInvoiceDTO != null) {
|
||||
dataFormData['fileId'] = data.remitInvoiceDTO.invoiceFile
|
||||
dataFormData['auditExplain'] = data.remitInvoiceDTO.auditExplain
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
initFileIdUploadFile();
|
||||
$("#daKuan").show();
|
||||
}
|
||||
if (data.withdrawTaxpayerDTO != null) {
|
||||
top.restAjax.get(top.restAjax.path('[[${AgentServerUrl}]]api/withdrawtaxpayer/get-by-withdrawid/{withdrawId}', [withdrawId]), {}, null, function (code, data) {
|
||||
var dataFormData = {};
|
||||
for (var i in data) {
|
||||
dataFormData[i] = data[i] + '';
|
||||
}
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
$("#kaiPiaoXinxi1").show();
|
||||
$("#kaiPiaoXinxi2").show();
|
||||
}, function (code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function () {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function () {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
|
@ -94,9 +94,9 @@
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">银行卡号</label>
|
||||
<label class="layui-form-label layui-form-label-new">银行账号</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="withdawAccount" readonly name="withdawAccount" class="layui-input" value="" placeholder="请输入银行卡号" maxlength="50">
|
||||
<input type="text" id="withdawAccount" readonly name="withdawAccount" class="layui-input" value="" placeholder="请输入银行账号" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -132,7 +132,7 @@
|
||||
</div>
|
||||
<div class="layui-col-xs3">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">银行卡号</label>
|
||||
<label class="layui-form-label layui-form-label-new">银行账号</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" value="{{item.invoiceBanknumber}}" readonly class="layui-input">
|
||||
</div>
|
||||
@ -141,7 +141,7 @@
|
||||
</div>
|
||||
{{# } }}
|
||||
</script>
|
||||
<div class="layui-form-item" pane="">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">审核说明</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="text" id="checkRemark" name="checkRemark" class="layui-input" value="" placeholder="请输入审核说明" maxlength="300">
|
||||
|
@ -117,7 +117,7 @@
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
return "<b>" + rowData + "</b>";
|
||||
}
|
||||
},
|
||||
{field: 'gmtCreate', width: 180, title: '创建时间', align:'center',
|
||||
|
@ -117,7 +117,7 @@
|
||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||
return '-';
|
||||
}
|
||||
return rowData;
|
||||
return "<b>" + rowData + "</b>";
|
||||
}
|
||||
},
|
||||
{field: 'gmtCreate', width: 180, title: '创建时间', align:'center',
|
||||
|
@ -36,7 +36,7 @@
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6" >
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">账户余额</label>
|
||||
<label class="layui-form-label layui-form-label-new">提现时余额</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" readonly id="accountMoney" name="accountMoney" class="layui-input" value="" placeholder="" lay-verify="required">
|
||||
</div>
|
||||
@ -68,9 +68,9 @@
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">银行卡号</label>
|
||||
<label class="layui-form-label layui-form-label-new">银行账号</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="withdawAccount" readonly name="withdawAccount" class="layui-input" value="" placeholder="银行卡号" maxlength="50">
|
||||
<input type="text" id="withdawAccount" readonly name="withdawAccount" class="layui-input" value="" placeholder="银行账号" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -392,19 +392,22 @@
|
||||
}
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
top.restAjax.get(top.restAjax.path('[[${AgentServerUrl}]]api/withdrawinvoice/getRemitTicket/{withdrawId}', [data.withdrawId]), {}, null, function(code, data2) {
|
||||
dataFormData.fileId = data2.invoiceFile;
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
$("#basicsName").val(basicsName);
|
||||
initFileIdUploadFile();
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
initFileIdUploadFile();
|
||||
if (data.remitInvoiceDTO != null) {
|
||||
top.restAjax.get(top.restAjax.path('[[${AgentServerUrl}]]api/withdrawinvoice/getRemitTicket/{withdrawId}', [data.withdrawId]), {}, null, function(code, data2) {
|
||||
dataFormData.fileId = data2.invoiceFile;
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
$("#basicsName").val(basicsName);
|
||||
initFileIdUploadFile();
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
|
@ -36,7 +36,7 @@
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6" >
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">账户余额</label>
|
||||
<label class="layui-form-label layui-form-label-new">提现时余额</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" readonly id="accountMoney" name="accountMoney" class="layui-input" value="" placeholder="" lay-verify="required">
|
||||
</div>
|
||||
@ -68,9 +68,9 @@
|
||||
</div>
|
||||
<div class="layui-col-lg6 layui-col-md6">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label layui-form-label-new">银行卡号</label>
|
||||
<label class="layui-form-label layui-form-label-new">银行账号</label>
|
||||
<div class="layui-input-block layui-input-block-new">
|
||||
<input type="text" id="withdawAccount" readonly name="withdawAccount" class="layui-input" value="" placeholder="请输入银行卡号" maxlength="50">
|
||||
<input type="text" id="withdawAccount" readonly name="withdawAccount" class="layui-input" value="" placeholder="请输入银行账号" maxlength="50">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -387,12 +387,13 @@
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i] +'';
|
||||
}
|
||||
console.log(data.withdrawTaxpayerDTO);
|
||||
dataFormData['taxpayerBank'] = data.withdrawTaxpayerDTO.taxpayerBank;
|
||||
dataFormData['taxpayerName'] = data.withdrawTaxpayerDTO.taxpayerName;
|
||||
dataFormData['taxpayerAddress'] = data.withdrawTaxpayerDTO.taxpayerAddress;
|
||||
dataFormData['taxpayerPhone'] = data.withdrawTaxpayerDTO.taxpayerPhone;
|
||||
dataFormData['taxpayerAccount'] = data.withdrawTaxpayerDTO.taxpayerAccount;
|
||||
dataFormData['taxpayerNumber'] = data.withdrawTaxpayerDTO.taxpayerNumber;
|
||||
dataFormData['taxpayerName'] = data.withdrawTaxpayerDTO.taxpayerName;
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
initFileIdUploadFile();
|
||||
@ -401,7 +402,9 @@
|
||||
data1.accountMoney = (data1.accountMoney / 100.00) + "元";
|
||||
data1.withdawMoney = (data1.withdawMoney / 100.00) + "元";
|
||||
for(var i in data1) {
|
||||
dataFormData[i] = data1[i] +'';
|
||||
if (i != 'taxpayerNumber' && i != 'taxpayerName') {
|
||||
dataFormData[i] = data1[i] +'';
|
||||
}
|
||||
}
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
|
Loading…
Reference in New Issue
Block a user