parent
7c3425ee9b
commit
3f03e309da
Binary file not shown.
@ -0,0 +1,2 @@
|
|||||||
|
@Echo Off
|
||||||
|
start D:\tools_2022\work\nacos-server-2.0.4\nacos\bin\startup.cmd -m standalone
|
@ -0,0 +1,99 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>ruoyi</artifactId>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<version>3.4.0</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>ruoyi-modules-xjt</artifactId>
|
||||||
|
<description>
|
||||||
|
ruoyi-modules-xjt系统模块
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<!-- SpringCloud Alibaba Nacos -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- SpringCloud Alibaba Nacos Config -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- SpringCloud Alibaba Sentinel -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- SpringBoot Actuator -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Swagger UI -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.springfox</groupId>
|
||||||
|
<artifactId>springfox-swagger-ui</artifactId>
|
||||||
|
<version>${swagger.fox.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Mysql Connector -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- RuoYi Common DataSource -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-common-datasource</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- RuoYi Common DataScope -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-common-datascope</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- RuoYi Common Log -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-common-log</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- RuoYi Common Swagger -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-common-swagger</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
@ -0,0 +1,34 @@
|
|||||||
|
package com.ruoyi.xjt;
|
||||||
|
|
||||||
|
import com.ruoyi.common.security.annotation.EnableCustomConfig;
|
||||||
|
import com.ruoyi.common.security.annotation.EnableRyFeignClients;
|
||||||
|
import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统模块
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
@EnableCustomConfig
|
||||||
|
@EnableCustomSwagger2
|
||||||
|
@EnableRyFeignClients
|
||||||
|
@SpringBootApplication
|
||||||
|
public class RuoYiXjtApplication
|
||||||
|
{
|
||||||
|
public static void main(String[] args)
|
||||||
|
{
|
||||||
|
SpringApplication.run(RuoYiXjtApplication.class, args);
|
||||||
|
System.out.println("(♥◠‿◠)ノ゙ 系统模块启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||||
|
" .-------. ____ __ \n" +
|
||||||
|
" | _ _ \\ \\ \\ / / \n" +
|
||||||
|
" | ( ' ) | \\ _. / ' \n" +
|
||||||
|
" |(_ o _) / _( )_ .' \n" +
|
||||||
|
" | (_,_).' __ ___(_ o _)' \n" +
|
||||||
|
" | |\\ \\ | || |(_,_)' \n" +
|
||||||
|
" | | \\ `' /| `-' / \n" +
|
||||||
|
" | | \\ / \\ / \n" +
|
||||||
|
" ''-' `'-' `-..-' ");
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,105 @@
|
|||||||
|
package com.ruoyi.xjt.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.io.IOException;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ruoyi.common.log.annotation.Log;
|
||||||
|
import com.ruoyi.common.log.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||||
|
import com.ruoyi.xjt.domain.TMoney;
|
||||||
|
import com.ruoyi.xjt.service.ITMoneyService;
|
||||||
|
import com.ruoyi.common.core.web.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支出或收入详情Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-04-01
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/money")
|
||||||
|
public class TMoneyController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ITMoneyService tMoneyService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询支出或收入详情列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("xjt:money:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(TMoney tMoney)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<TMoney> list = tMoneyService.selectTMoneyList(tMoney);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出支出或收入详情列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("xjt:money:export")
|
||||||
|
@Log(title = "支出或收入详情", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, TMoney tMoney)
|
||||||
|
{
|
||||||
|
List<TMoney> list = tMoneyService.selectTMoneyList(tMoney);
|
||||||
|
ExcelUtil<TMoney> util = new ExcelUtil<TMoney>(TMoney.class);
|
||||||
|
util.exportExcel(response, list, "支出或收入详情数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取支出或收入详情详细信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("xjt:money:query")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(tMoneyService.selectTMoneyById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增支出或收入详情
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("xjt:money:add")
|
||||||
|
@Log(title = "支出或收入详情", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody TMoney tMoney)
|
||||||
|
{
|
||||||
|
return toAjax(tMoneyService.insertTMoney(tMoney));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改支出或收入详情
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("xjt:money:edit")
|
||||||
|
@Log(title = "支出或收入详情", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody TMoney tMoney)
|
||||||
|
{
|
||||||
|
return toAjax(tMoneyService.updateTMoney(tMoney));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除支出或收入详情
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("xjt:money:remove")
|
||||||
|
@Log(title = "支出或收入详情", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(tMoneyService.deleteTMoneyByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,105 @@
|
|||||||
|
package com.ruoyi.xjt.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.io.IOException;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import com.ruoyi.common.log.annotation.Log;
|
||||||
|
import com.ruoyi.common.log.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||||
|
import com.ruoyi.xjt.domain.TOrder;
|
||||||
|
import com.ruoyi.xjt.service.ITOrderService;
|
||||||
|
import com.ruoyi.common.core.web.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缴费订单Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-04-01
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/order")
|
||||||
|
public class TOrderController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ITOrderService tOrderService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询缴费订单列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("xjt:order:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(TOrder tOrder)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<TOrder> list = tOrderService.selectTOrderList(tOrder);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出缴费订单列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("xjt:order:export")
|
||||||
|
@Log(title = "缴费订单", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, TOrder tOrder)
|
||||||
|
{
|
||||||
|
List<TOrder> list = tOrderService.selectTOrderList(tOrder);
|
||||||
|
ExcelUtil<TOrder> util = new ExcelUtil<TOrder>(TOrder.class);
|
||||||
|
util.exportExcel(response, list, "缴费订单数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取缴费订单详细信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("xjt:order:query")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(tOrderService.selectTOrderById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增缴费订单
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("xjt:order:add")
|
||||||
|
@Log(title = "缴费订单", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody TOrder tOrder)
|
||||||
|
{
|
||||||
|
return toAjax(tOrderService.insertTOrder(tOrder));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改缴费订单
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("xjt:order:edit")
|
||||||
|
@Log(title = "缴费订单", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody TOrder tOrder)
|
||||||
|
{
|
||||||
|
return toAjax(tOrderService.updateTOrder(tOrder));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除缴费订单
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("xjt:order:remove")
|
||||||
|
@Log(title = "缴费订单", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(tOrderService.deleteTOrderByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,38 @@
|
|||||||
|
package com.ruoyi.xjt.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||||
|
import com.ruoyi.common.security.utils.SecurityUtils;
|
||||||
|
import com.ruoyi.system.api.model.LoginUser;
|
||||||
|
import com.ruoyi.xjt.service.XjtUserService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user")
|
||||||
|
public class XjtUserController {
|
||||||
|
@Autowired
|
||||||
|
private XjtUserService xjtUserService;
|
||||||
|
/**
|
||||||
|
* 根据角色编号获取详细信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:role:query")
|
||||||
|
@GetMapping(value = "/{username}")
|
||||||
|
public AjaxResult getInfo(@PathVariable String username)
|
||||||
|
{
|
||||||
|
System.out.println("用户username:"+username);
|
||||||
|
R<Map<String,Object>> userinfo= xjtUserService.getUserInfo(username, SecurityConstants.INNER);
|
||||||
|
System.out.println("用户信息:"+JSON.toJSONString(userinfo));
|
||||||
|
LoginUser loginuser = SecurityUtils.getLoginUser();
|
||||||
|
System.out.println("登录用户信息"+JSON.toJSONString(loginuser));
|
||||||
|
return AjaxResult.success(userinfo);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.xjt.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.xjt.domain.TMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支出或收入详情Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-04-01
|
||||||
|
*/
|
||||||
|
public interface TMoneyMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询支出或收入详情
|
||||||
|
*
|
||||||
|
* @param id 支出或收入详情主键
|
||||||
|
* @return 支出或收入详情
|
||||||
|
*/
|
||||||
|
public TMoney selectTMoneyById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询支出或收入详情列表
|
||||||
|
*
|
||||||
|
* @param tMoney 支出或收入详情
|
||||||
|
* @return 支出或收入详情集合
|
||||||
|
*/
|
||||||
|
public List<TMoney> selectTMoneyList(TMoney tMoney);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增支出或收入详情
|
||||||
|
*
|
||||||
|
* @param tMoney 支出或收入详情
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertTMoney(TMoney tMoney);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改支出或收入详情
|
||||||
|
*
|
||||||
|
* @param tMoney 支出或收入详情
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateTMoney(TMoney tMoney);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除支出或收入详情
|
||||||
|
*
|
||||||
|
* @param id 支出或收入详情主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteTMoneyById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除支出或收入详情
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteTMoneyByIds(Long[] ids);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.xjt.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.xjt.domain.TOrder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缴费订单Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-04-01
|
||||||
|
*/
|
||||||
|
public interface TOrderMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询缴费订单
|
||||||
|
*
|
||||||
|
* @param id 缴费订单主键
|
||||||
|
* @return 缴费订单
|
||||||
|
*/
|
||||||
|
public TOrder selectTOrderById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询缴费订单列表
|
||||||
|
*
|
||||||
|
* @param tOrder 缴费订单
|
||||||
|
* @return 缴费订单集合
|
||||||
|
*/
|
||||||
|
public List<TOrder> selectTOrderList(TOrder tOrder);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增缴费订单
|
||||||
|
*
|
||||||
|
* @param tOrder 缴费订单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertTOrder(TOrder tOrder);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改缴费订单
|
||||||
|
*
|
||||||
|
* @param tOrder 缴费订单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateTOrder(TOrder tOrder);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除缴费订单
|
||||||
|
*
|
||||||
|
* @param id 缴费订单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteTOrderById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除缴费订单
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteTOrderByIds(Long[] ids);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.xjt.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.xjt.domain.TMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支出或收入详情Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-04-01
|
||||||
|
*/
|
||||||
|
public interface ITMoneyService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询支出或收入详情
|
||||||
|
*
|
||||||
|
* @param id 支出或收入详情主键
|
||||||
|
* @return 支出或收入详情
|
||||||
|
*/
|
||||||
|
public TMoney selectTMoneyById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询支出或收入详情列表
|
||||||
|
*
|
||||||
|
* @param tMoney 支出或收入详情
|
||||||
|
* @return 支出或收入详情集合
|
||||||
|
*/
|
||||||
|
public List<TMoney> selectTMoneyList(TMoney tMoney);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增支出或收入详情
|
||||||
|
*
|
||||||
|
* @param tMoney 支出或收入详情
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertTMoney(TMoney tMoney);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改支出或收入详情
|
||||||
|
*
|
||||||
|
* @param tMoney 支出或收入详情
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateTMoney(TMoney tMoney);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除支出或收入详情
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的支出或收入详情主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteTMoneyByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除支出或收入详情信息
|
||||||
|
*
|
||||||
|
* @param id 支出或收入详情主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteTMoneyById(Long id);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.xjt.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.xjt.domain.TOrder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缴费订单Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-04-01
|
||||||
|
*/
|
||||||
|
public interface ITOrderService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询缴费订单
|
||||||
|
*
|
||||||
|
* @param id 缴费订单主键
|
||||||
|
* @return 缴费订单
|
||||||
|
*/
|
||||||
|
public TOrder selectTOrderById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询缴费订单列表
|
||||||
|
*
|
||||||
|
* @param tOrder 缴费订单
|
||||||
|
* @return 缴费订单集合
|
||||||
|
*/
|
||||||
|
public List<TOrder> selectTOrderList(TOrder tOrder);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增缴费订单
|
||||||
|
*
|
||||||
|
* @param tOrder 缴费订单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertTOrder(TOrder tOrder);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改缴费订单
|
||||||
|
*
|
||||||
|
* @param tOrder 缴费订单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateTOrder(TOrder tOrder);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除缴费订单
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的缴费订单主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteTOrderByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除缴费订单信息
|
||||||
|
*
|
||||||
|
* @param id 缴费订单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteTOrderById(Long id);
|
||||||
|
}
|
@ -0,0 +1,41 @@
|
|||||||
|
package com.ruoyi.xjt.service;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||||
|
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.xjt.service.factory.XjtUserServiceFallbackFactory;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户服务
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@FeignClient(contextId = "xjtUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = XjtUserServiceFallbackFactory.class)
|
||||||
|
public interface XjtUserService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 通过用户名查询用户信息
|
||||||
|
*
|
||||||
|
* @param username 用户名
|
||||||
|
* @param source 请求来源
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@GetMapping("/user/info/{username}")
|
||||||
|
public R<Map<String,Object>> getUserInfo(@PathVariable("username") String username, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 注册用户信息
|
||||||
|
*
|
||||||
|
* @param sysUser 用户信息
|
||||||
|
* @param source 请求来源
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/user/register")
|
||||||
|
public R<Boolean> registerUserInfo(@RequestBody Map<String,Object> sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
package com.ruoyi.xjt.service.factory;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.xjt.service.XjtUserService;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
@Component
|
||||||
|
public class XjtUserServiceFallbackFactory implements FallbackFactory<XjtUserService> {
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(XjtUserServiceFallbackFactory.class);
|
||||||
|
@Override
|
||||||
|
public XjtUserService create(Throwable throwable) {
|
||||||
|
log.error("用户服务调用失败:{}", throwable.getMessage());
|
||||||
|
return new XjtUserService()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public R<Map<String,Object>> getUserInfo(String username, String source)
|
||||||
|
{
|
||||||
|
return R.fail("获取用户失败:" + throwable.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<Boolean> registerUserInfo(Map<String,Object> sysUser, String source)
|
||||||
|
{
|
||||||
|
return R.fail("注册用户失败:" + throwable.getMessage());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,93 @@
|
|||||||
|
package com.ruoyi.xjt.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.xjt.mapper.TMoneyMapper;
|
||||||
|
import com.ruoyi.xjt.domain.TMoney;
|
||||||
|
import com.ruoyi.xjt.service.ITMoneyService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支出或收入详情Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-04-01
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TMoneyServiceImpl implements ITMoneyService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private TMoneyMapper tMoneyMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询支出或收入详情
|
||||||
|
*
|
||||||
|
* @param id 支出或收入详情主键
|
||||||
|
* @return 支出或收入详情
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TMoney selectTMoneyById(Long id)
|
||||||
|
{
|
||||||
|
return tMoneyMapper.selectTMoneyById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询支出或收入详情列表
|
||||||
|
*
|
||||||
|
* @param tMoney 支出或收入详情
|
||||||
|
* @return 支出或收入详情
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<TMoney> selectTMoneyList(TMoney tMoney)
|
||||||
|
{
|
||||||
|
return tMoneyMapper.selectTMoneyList(tMoney);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增支出或收入详情
|
||||||
|
*
|
||||||
|
* @param tMoney 支出或收入详情
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertTMoney(TMoney tMoney)
|
||||||
|
{
|
||||||
|
return tMoneyMapper.insertTMoney(tMoney);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改支出或收入详情
|
||||||
|
*
|
||||||
|
* @param tMoney 支出或收入详情
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateTMoney(TMoney tMoney)
|
||||||
|
{
|
||||||
|
return tMoneyMapper.updateTMoney(tMoney);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除支出或收入详情
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的支出或收入详情主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteTMoneyByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return tMoneyMapper.deleteTMoneyByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除支出或收入详情信息
|
||||||
|
*
|
||||||
|
* @param id 支出或收入详情主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteTMoneyById(Long id)
|
||||||
|
{
|
||||||
|
return tMoneyMapper.deleteTMoneyById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,93 @@
|
|||||||
|
package com.ruoyi.xjt.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.xjt.mapper.TOrderMapper;
|
||||||
|
import com.ruoyi.xjt.domain.TOrder;
|
||||||
|
import com.ruoyi.xjt.service.ITOrderService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缴费订单Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2022-04-01
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TOrderServiceImpl implements ITOrderService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private TOrderMapper tOrderMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询缴费订单
|
||||||
|
*
|
||||||
|
* @param id 缴费订单主键
|
||||||
|
* @return 缴费订单
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TOrder selectTOrderById(Long id)
|
||||||
|
{
|
||||||
|
return tOrderMapper.selectTOrderById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询缴费订单列表
|
||||||
|
*
|
||||||
|
* @param tOrder 缴费订单
|
||||||
|
* @return 缴费订单
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<TOrder> selectTOrderList(TOrder tOrder)
|
||||||
|
{
|
||||||
|
return tOrderMapper.selectTOrderList(tOrder);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增缴费订单
|
||||||
|
*
|
||||||
|
* @param tOrder 缴费订单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertTOrder(TOrder tOrder)
|
||||||
|
{
|
||||||
|
return tOrderMapper.insertTOrder(tOrder);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改缴费订单
|
||||||
|
*
|
||||||
|
* @param tOrder 缴费订单
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateTOrder(TOrder tOrder)
|
||||||
|
{
|
||||||
|
return tOrderMapper.updateTOrder(tOrder);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除缴费订单
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的缴费订单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteTOrderByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return tOrderMapper.deleteTOrderByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除缴费订单信息
|
||||||
|
*
|
||||||
|
* @param id 缴费订单主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteTOrderById(Long id)
|
||||||
|
{
|
||||||
|
return tOrderMapper.deleteTOrderById(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
Spring Boot Version: ${spring-boot.version}
|
||||||
|
Spring Application Name: ${spring.application.name}
|
||||||
|
_ _
|
||||||
|
(_) | |
|
||||||
|
_ __ _ _ ___ _ _ _ ______ ___ _ _ ___ | |_ ___ _ __ ___
|
||||||
|
| '__|| | | | / _ \ | | | || ||______|/ __|| | | |/ __|| __| / _ \| '_ ` _ \
|
||||||
|
| | | |_| || (_) || |_| || | \__ \| |_| |\__ \| |_ | __/| | | | | |
|
||||||
|
|_| \__,_| \___/ \__, ||_| |___/ \__, ||___/ \__| \___||_| |_| |_|
|
||||||
|
__/ | __/ |
|
||||||
|
|___/ |___/
|
@ -0,0 +1,25 @@
|
|||||||
|
# Tomcat
|
||||||
|
server:
|
||||||
|
port: 9208
|
||||||
|
|
||||||
|
# Spring
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
# 应用名称
|
||||||
|
name: ruoyi-xjt
|
||||||
|
profiles:
|
||||||
|
# 环境配置
|
||||||
|
active: dev
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
discovery:
|
||||||
|
# 服务注册地址
|
||||||
|
server-addr: 127.0.0.1:8848
|
||||||
|
config:
|
||||||
|
# 配置中心地址
|
||||||
|
server-addr: 127.0.0.1:8848
|
||||||
|
# 配置文件格式
|
||||||
|
file-extension: yml
|
||||||
|
# 共享配置
|
||||||
|
shared-configs:
|
||||||
|
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
@ -0,0 +1,74 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||||
|
<!-- 日志存放路径 -->
|
||||||
|
<property name="log.path" value="logs/ruoyi-xjt" />
|
||||||
|
<!-- 日志输出格式 -->
|
||||||
|
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||||
|
|
||||||
|
<!-- 控制台输出 -->
|
||||||
|
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 系统日志输出 -->
|
||||||
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${log.path}/info.log</file>
|
||||||
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 日志文件名格式 -->
|
||||||
|
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<!-- 日志最大的历史 60天 -->
|
||||||
|
<maxHistory>60</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
</encoder>
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<!-- 过滤的级别 -->
|
||||||
|
<level>INFO</level>
|
||||||
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${log.path}/error.log</file>
|
||||||
|
<!-- 循环政策:基于时间创建日志文件 -->
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<!-- 日志文件名格式 -->
|
||||||
|
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<!-- 日志最大的历史 60天 -->
|
||||||
|
<maxHistory>60</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern}</pattern>
|
||||||
|
</encoder>
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<!-- 过滤的级别 -->
|
||||||
|
<level>ERROR</level>
|
||||||
|
<!-- 匹配时的操作:接收(记录) -->
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 系统模块日志级别控制 -->
|
||||||
|
<logger name="com.ruoyi" level="info" />
|
||||||
|
<!-- Spring日志级别控制 -->
|
||||||
|
<logger name="org.springframework" level="warn" />
|
||||||
|
|
||||||
|
<root level="info">
|
||||||
|
<appender-ref ref="console" />
|
||||||
|
</root>
|
||||||
|
|
||||||
|
<!--系统操作日志-->
|
||||||
|
<root level="info">
|
||||||
|
<appender-ref ref="file_info" />
|
||||||
|
<appender-ref ref="file_error" />
|
||||||
|
</root>
|
||||||
|
</configuration>
|
@ -0,0 +1,101 @@
|
|||||||
|
<?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="com.ruoyi.xjt.mapper.TMoneyMapper">
|
||||||
|
|
||||||
|
<resultMap type="TMoney" id="TMoneyResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="userid" column="userid" />
|
||||||
|
<result property="money" column="money" />
|
||||||
|
<result property="tradetype" column="tradetype" />
|
||||||
|
<result property="tradedate" column="tradedate" />
|
||||||
|
<result property="type" column="type" />
|
||||||
|
<result property="note" column="note" />
|
||||||
|
<result property="leftmoney" column="leftmoney" />
|
||||||
|
<result property="orderid" column="orderid" />
|
||||||
|
<result property="state" column="state" />
|
||||||
|
<result property="bbsmallorderid" column="bbsmallorderid" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectTMoneyVo">
|
||||||
|
select id, userid, money, tradetype, tradedate, type, note, leftmoney, orderid, state, bbsmallorderid from t_money
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectTMoneyList" parameterType="TMoney" resultMap="TMoneyResult">
|
||||||
|
<include refid="selectTMoneyVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="userid != null "> and userid = #{userid}</if>
|
||||||
|
<if test="money != null "> and money = #{money}</if>
|
||||||
|
<if test="tradetype != null "> and tradetype = #{tradetype}</if>
|
||||||
|
<if test="tradedate != null "> and tradedate = #{tradedate}</if>
|
||||||
|
<if test="type != null "> and type = #{type}</if>
|
||||||
|
<if test="note != null and note != ''"> and note = #{note}</if>
|
||||||
|
<if test="leftmoney != null "> and leftmoney = #{leftmoney}</if>
|
||||||
|
<if test="orderid != null "> and orderid = #{orderid}</if>
|
||||||
|
<if test="state != null "> and state = #{state}</if>
|
||||||
|
<if test="bbsmallorderid != null "> and bbsmallorderid = #{bbsmallorderid}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectTMoneyById" parameterType="Long" resultMap="TMoneyResult">
|
||||||
|
<include refid="selectTMoneyVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertTMoney" parameterType="TMoney" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into t_money
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="userid != null">userid,</if>
|
||||||
|
<if test="money != null">money,</if>
|
||||||
|
<if test="tradetype != null">tradetype,</if>
|
||||||
|
<if test="tradedate != null">tradedate,</if>
|
||||||
|
<if test="type != null">type,</if>
|
||||||
|
<if test="note != null">note,</if>
|
||||||
|
<if test="leftmoney != null">leftmoney,</if>
|
||||||
|
<if test="orderid != null">orderid,</if>
|
||||||
|
<if test="state != null">state,</if>
|
||||||
|
<if test="bbsmallorderid != null">bbsmallorderid,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="userid != null">#{userid},</if>
|
||||||
|
<if test="money != null">#{money},</if>
|
||||||
|
<if test="tradetype != null">#{tradetype},</if>
|
||||||
|
<if test="tradedate != null">#{tradedate},</if>
|
||||||
|
<if test="type != null">#{type},</if>
|
||||||
|
<if test="note != null">#{note},</if>
|
||||||
|
<if test="leftmoney != null">#{leftmoney},</if>
|
||||||
|
<if test="orderid != null">#{orderid},</if>
|
||||||
|
<if test="state != null">#{state},</if>
|
||||||
|
<if test="bbsmallorderid != null">#{bbsmallorderid},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateTMoney" parameterType="TMoney">
|
||||||
|
update t_money
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="userid != null">userid = #{userid},</if>
|
||||||
|
<if test="money != null">money = #{money},</if>
|
||||||
|
<if test="tradetype != null">tradetype = #{tradetype},</if>
|
||||||
|
<if test="tradedate != null">tradedate = #{tradedate},</if>
|
||||||
|
<if test="type != null">type = #{type},</if>
|
||||||
|
<if test="note != null">note = #{note},</if>
|
||||||
|
<if test="leftmoney != null">leftmoney = #{leftmoney},</if>
|
||||||
|
<if test="orderid != null">orderid = #{orderid},</if>
|
||||||
|
<if test="state != null">state = #{state},</if>
|
||||||
|
<if test="bbsmallorderid != null">bbsmallorderid = #{bbsmallorderid},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteTMoneyById" parameterType="Long">
|
||||||
|
delete from t_money where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteTMoneyByIds" parameterType="String">
|
||||||
|
delete from t_money where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
@ -0,0 +1,176 @@
|
|||||||
|
<?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="com.ruoyi.xjt.mapper.TOrderMapper">
|
||||||
|
|
||||||
|
<resultMap type="TOrder" id="TOrderResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="companyid" column="companyid" />
|
||||||
|
<result property="khuserid" column="khuserid" />
|
||||||
|
<result property="fwsuserid" column="fwsuserid" />
|
||||||
|
<result property="money" column="money" />
|
||||||
|
<result property="yuepay" column="yuepay" />
|
||||||
|
<result property="fundpay" column="fundpay" />
|
||||||
|
<result property="wxorcftpay" column="wxorcftpay" />
|
||||||
|
<result property="tradetype" column="tradetype" />
|
||||||
|
<result property="ordernum" column="ordernum" />
|
||||||
|
<result property="paytime" column="paytime" />
|
||||||
|
<result property="createdate" column="createdate" />
|
||||||
|
<result property="paytype" column="paytype" />
|
||||||
|
<result property="paystate" column="paystate" />
|
||||||
|
<result property="tradeNo" column="trade_no" />
|
||||||
|
<result property="mchId" column="mch_id" />
|
||||||
|
<result property="tradeStatus" column="trade_status" />
|
||||||
|
<result property="cuid" column="cuid" />
|
||||||
|
<result property="cumoney" column="cumoney" />
|
||||||
|
<result property="refundAuditUserid" column="refund_audit_userid" />
|
||||||
|
<result property="refundMoney" column="refund_money" />
|
||||||
|
<result property="refundNote" column="refund_note" />
|
||||||
|
<result property="refundNo" column="refund_no" />
|
||||||
|
<result property="refundState" column="refund_state" />
|
||||||
|
<result property="refundTime" column="refund_time" />
|
||||||
|
<result property="refundSuccesstime" column="refund_successtime" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectTOrderVo">
|
||||||
|
select id, companyid, khuserid, fwsuserid, money, yuepay, fundpay, wxorcftpay, tradetype, ordernum, paytime, createdate, paytype, paystate, trade_no, mch_id, trade_status, cuid, cumoney, refund_audit_userid, refund_money, refund_note, refund_no, refund_state, refund_time, refund_successtime from t_order
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectTOrderList" parameterType="TOrder" resultMap="TOrderResult">
|
||||||
|
<include refid="selectTOrderVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="companyid != null "> and companyid = #{companyid}</if>
|
||||||
|
<if test="khuserid != null "> and khuserid = #{khuserid}</if>
|
||||||
|
<if test="fwsuserid != null "> and fwsuserid = #{fwsuserid}</if>
|
||||||
|
<if test="money != null "> and money = #{money}</if>
|
||||||
|
<if test="yuepay != null "> and yuepay = #{yuepay}</if>
|
||||||
|
<if test="fundpay != null "> and fundpay = #{fundpay}</if>
|
||||||
|
<if test="wxorcftpay != null "> and wxorcftpay = #{wxorcftpay}</if>
|
||||||
|
<if test="tradetype != null "> and tradetype = #{tradetype}</if>
|
||||||
|
<if test="ordernum != null and ordernum != ''"> and ordernum = #{ordernum}</if>
|
||||||
|
<if test="paytime != null "> and paytime = #{paytime}</if>
|
||||||
|
<if test="createdate != null "> and createdate = #{createdate}</if>
|
||||||
|
<if test="paytype != null "> and paytype = #{paytype}</if>
|
||||||
|
<if test="paystate != null "> and paystate = #{paystate}</if>
|
||||||
|
<if test="tradeNo != null and tradeNo != ''"> and trade_no = #{tradeNo}</if>
|
||||||
|
<if test="mchId != null and mchId != ''"> and mch_id = #{mchId}</if>
|
||||||
|
<if test="tradeStatus != null and tradeStatus != ''"> and trade_status = #{tradeStatus}</if>
|
||||||
|
<if test="cuid != null "> and cuid = #{cuid}</if>
|
||||||
|
<if test="cumoney != null "> and cumoney = #{cumoney}</if>
|
||||||
|
<if test="refundAuditUserid != null "> and refund_audit_userid = #{refundAuditUserid}</if>
|
||||||
|
<if test="refundMoney != null "> and refund_money = #{refundMoney}</if>
|
||||||
|
<if test="refundNote != null and refundNote != ''"> and refund_note = #{refundNote}</if>
|
||||||
|
<if test="refundNo != null and refundNo != ''"> and refund_no = #{refundNo}</if>
|
||||||
|
<if test="refundState != null "> and refund_state = #{refundState}</if>
|
||||||
|
<if test="refundTime != null "> and refund_time = #{refundTime}</if>
|
||||||
|
<if test="refundSuccesstime != null "> and refund_successtime = #{refundSuccesstime}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectTOrderById" parameterType="Long" resultMap="TOrderResult">
|
||||||
|
<include refid="selectTOrderVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertTOrder" parameterType="TOrder" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into t_order
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="companyid != null">companyid,</if>
|
||||||
|
<if test="khuserid != null">khuserid,</if>
|
||||||
|
<if test="fwsuserid != null">fwsuserid,</if>
|
||||||
|
<if test="money != null">money,</if>
|
||||||
|
<if test="yuepay != null">yuepay,</if>
|
||||||
|
<if test="fundpay != null">fundpay,</if>
|
||||||
|
<if test="wxorcftpay != null">wxorcftpay,</if>
|
||||||
|
<if test="tradetype != null">tradetype,</if>
|
||||||
|
<if test="ordernum != null and ordernum != ''">ordernum,</if>
|
||||||
|
<if test="paytime != null">paytime,</if>
|
||||||
|
<if test="createdate != null">createdate,</if>
|
||||||
|
<if test="paytype != null">paytype,</if>
|
||||||
|
<if test="paystate != null">paystate,</if>
|
||||||
|
<if test="tradeNo != null">trade_no,</if>
|
||||||
|
<if test="mchId != null">mch_id,</if>
|
||||||
|
<if test="tradeStatus != null">trade_status,</if>
|
||||||
|
<if test="cuid != null">cuid,</if>
|
||||||
|
<if test="cumoney != null">cumoney,</if>
|
||||||
|
<if test="refundAuditUserid != null">refund_audit_userid,</if>
|
||||||
|
<if test="refundMoney != null">refund_money,</if>
|
||||||
|
<if test="refundNote != null">refund_note,</if>
|
||||||
|
<if test="refundNo != null">refund_no,</if>
|
||||||
|
<if test="refundState != null">refund_state,</if>
|
||||||
|
<if test="refundTime != null">refund_time,</if>
|
||||||
|
<if test="refundSuccesstime != null">refund_successtime,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="companyid != null">#{companyid},</if>
|
||||||
|
<if test="khuserid != null">#{khuserid},</if>
|
||||||
|
<if test="fwsuserid != null">#{fwsuserid},</if>
|
||||||
|
<if test="money != null">#{money},</if>
|
||||||
|
<if test="yuepay != null">#{yuepay},</if>
|
||||||
|
<if test="fundpay != null">#{fundpay},</if>
|
||||||
|
<if test="wxorcftpay != null">#{wxorcftpay},</if>
|
||||||
|
<if test="tradetype != null">#{tradetype},</if>
|
||||||
|
<if test="ordernum != null and ordernum != ''">#{ordernum},</if>
|
||||||
|
<if test="paytime != null">#{paytime},</if>
|
||||||
|
<if test="createdate != null">#{createdate},</if>
|
||||||
|
<if test="paytype != null">#{paytype},</if>
|
||||||
|
<if test="paystate != null">#{paystate},</if>
|
||||||
|
<if test="tradeNo != null">#{tradeNo},</if>
|
||||||
|
<if test="mchId != null">#{mchId},</if>
|
||||||
|
<if test="tradeStatus != null">#{tradeStatus},</if>
|
||||||
|
<if test="cuid != null">#{cuid},</if>
|
||||||
|
<if test="cumoney != null">#{cumoney},</if>
|
||||||
|
<if test="refundAuditUserid != null">#{refundAuditUserid},</if>
|
||||||
|
<if test="refundMoney != null">#{refundMoney},</if>
|
||||||
|
<if test="refundNote != null">#{refundNote},</if>
|
||||||
|
<if test="refundNo != null">#{refundNo},</if>
|
||||||
|
<if test="refundState != null">#{refundState},</if>
|
||||||
|
<if test="refundTime != null">#{refundTime},</if>
|
||||||
|
<if test="refundSuccesstime != null">#{refundSuccesstime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateTOrder" parameterType="TOrder">
|
||||||
|
update t_order
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="companyid != null">companyid = #{companyid},</if>
|
||||||
|
<if test="khuserid != null">khuserid = #{khuserid},</if>
|
||||||
|
<if test="fwsuserid != null">fwsuserid = #{fwsuserid},</if>
|
||||||
|
<if test="money != null">money = #{money},</if>
|
||||||
|
<if test="yuepay != null">yuepay = #{yuepay},</if>
|
||||||
|
<if test="fundpay != null">fundpay = #{fundpay},</if>
|
||||||
|
<if test="wxorcftpay != null">wxorcftpay = #{wxorcftpay},</if>
|
||||||
|
<if test="tradetype != null">tradetype = #{tradetype},</if>
|
||||||
|
<if test="ordernum != null and ordernum != ''">ordernum = #{ordernum},</if>
|
||||||
|
<if test="paytime != null">paytime = #{paytime},</if>
|
||||||
|
<if test="createdate != null">createdate = #{createdate},</if>
|
||||||
|
<if test="paytype != null">paytype = #{paytype},</if>
|
||||||
|
<if test="paystate != null">paystate = #{paystate},</if>
|
||||||
|
<if test="tradeNo != null">trade_no = #{tradeNo},</if>
|
||||||
|
<if test="mchId != null">mch_id = #{mchId},</if>
|
||||||
|
<if test="tradeStatus != null">trade_status = #{tradeStatus},</if>
|
||||||
|
<if test="cuid != null">cuid = #{cuid},</if>
|
||||||
|
<if test="cumoney != null">cumoney = #{cumoney},</if>
|
||||||
|
<if test="refundAuditUserid != null">refund_audit_userid = #{refundAuditUserid},</if>
|
||||||
|
<if test="refundMoney != null">refund_money = #{refundMoney},</if>
|
||||||
|
<if test="refundNote != null">refund_note = #{refundNote},</if>
|
||||||
|
<if test="refundNo != null">refund_no = #{refundNo},</if>
|
||||||
|
<if test="refundState != null">refund_state = #{refundState},</if>
|
||||||
|
<if test="refundTime != null">refund_time = #{refundTime},</if>
|
||||||
|
<if test="refundSuccesstime != null">refund_successtime = #{refundSuccesstime},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteTOrderById" parameterType="Long">
|
||||||
|
delete from t_order where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteTOrderByIds" parameterType="String">
|
||||||
|
delete from t_order where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询支出或收入详情列表
|
||||||
|
export function listMoney(query) {
|
||||||
|
return request({
|
||||||
|
url: '/xjt/money/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询支出或收入详情详细
|
||||||
|
export function getMoney(id) {
|
||||||
|
return request({
|
||||||
|
url: '/xjt/money/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增支出或收入详情
|
||||||
|
export function addMoney(data) {
|
||||||
|
return request({
|
||||||
|
url: '/xjt/money',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改支出或收入详情
|
||||||
|
export function updateMoney(data) {
|
||||||
|
return request({
|
||||||
|
url: '/xjt/money',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除支出或收入详情
|
||||||
|
export function delMoney(id) {
|
||||||
|
return request({
|
||||||
|
url: '/xjt/money/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询缴费订单列表
|
||||||
|
export function listOrder(query) {
|
||||||
|
return request({
|
||||||
|
url: '/xjt/order/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询缴费订单详细
|
||||||
|
export function getOrder(id) {
|
||||||
|
return request({
|
||||||
|
url: '/xjt/order/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增缴费订单
|
||||||
|
export function addOrder(data) {
|
||||||
|
return request({
|
||||||
|
url: '/xjt/order',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改缴费订单
|
||||||
|
export function updateOrder(data) {
|
||||||
|
return request({
|
||||||
|
url: '/xjt/order',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除缴费订单
|
||||||
|
export function delOrder(id) {
|
||||||
|
return request({
|
||||||
|
url: '/xjt/order/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
Loading…
Reference in new issue