代码完善

This commit is contained in:
HMY 2024-09-11 15:42:03 +08:00
parent a0ab50c656
commit 9d6cc08560
23 changed files with 390 additions and 50 deletions

View File

@ -44,6 +44,15 @@
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/com.alipay.sdk/alipay-easysdk -->
<dependency>
<groupId>com.alipay.sdk</groupId>
<artifactId>alipay-sdk-java</artifactId>
<version>4.9.28.ALL</version>
</dependency>
<!-- SpringBoot Websocket -->
<dependency>
<groupId>org.springframework.boot</groupId>

View File

@ -43,15 +43,16 @@ public class RyTask
//定时任务每15s对设备进行一次检测超过30s未运行返回异常信息给前端同时将该设备运行状态改为停用
public void reportCurrentTime1() {
// System.out.println("11");
long l = System.currentTimeMillis();
Map<Integer, Long> upsMap = Util1.upsMap;
for (Map.Entry<Integer, Long> entry : upsMap.entrySet()) {
if(l-entry.getValue()>=30000){
System.out.println(entry.getKey());
//更新设备状态
pupuEquipmentService.updateEquipmentStatus(entry.getKey(),1);
WsServerEndpoint wsServerEndpoint=new WsServerEndpoint();
// WsServerEndpoint wsServerEndpoint=new WsServerEndpoint();
try {
//向前端传输异常信息
wsServerEndpoint.sendAllUser("id"+entry.getKey()+"设备异常");
} catch (Exception e) {
e.printStackTrace();

View File

@ -15,16 +15,37 @@ public class PupuEquipmentController extends BaseController {
@Autowired
private PupuEquipmentService pupuEquipmentService;
@PutMapping("/add")
public AjaxResult add(@RequestBody PupuEquipment pupuEquipment){
return toAjax(pupuEquipmentService.add(pupuEquipment));
/**
* 设备新增
* @param pupuEquipment
* @param userId 用户id用于日志生成时记录操作人员
* @return
*/
@PutMapping("/add/{userId}")
public AjaxResult add(
@RequestBody PupuEquipment pupuEquipment,
@PathVariable(value = "userId") Integer userId){
return toAjax(pupuEquipmentService.add(pupuEquipment,userId));
}
@DeleteMapping("/del/{equipmentId}")
public AjaxResult del(@PathVariable(value = "equipmentId") Integer equipmentId){
return toAjax(pupuEquipmentService.del(equipmentId));
/**
* 设备删除
* @param equipmentId
* @param userId 用户id用于记录执行删除操作的用户id
* @return
*/
@DeleteMapping("/del/{equipmentId}/{userId}")
public AjaxResult del(
@PathVariable(value = "equipmentId") Integer equipmentId,
@PathVariable(value = "userId")Integer userId){
return toAjax(pupuEquipmentService.del(equipmentId,userId));
}
/**
* 获取当前门店的设备信息
* @param storeId
* @return
*/
@GetMapping("/selectByStoreId/{storeId}")
public AjaxResult selectByStoreId(@PathVariable(value = "storeId") Integer storeId){
List<PupuEquipment> pupuEquipments = pupuEquipmentService.selectByStoreId(storeId);

View File

@ -20,23 +20,29 @@ public class PupuStoreController extends BaseController {
private PupuStoreService pupuStoreService;
/**
* 新增门店
* 门店新增
* @param pupuStore
* @param userId执行新增操作的用户id
* @return
*/
@PutMapping("/add")
public AjaxResult add(@Validated @RequestBody PupuStore pupuStore){
return toAjax(pupuStoreService.add(pupuStore));
@PutMapping("/add/{userId}")
public AjaxResult add(
@Validated @RequestBody PupuStore pupuStore,
@PathVariable(value = "userId") Integer userId){
return toAjax(pupuStoreService.add(pupuStore,userId));
}
/**
* 删除门店
* @param storeId
* @param userId (执行删除操作的用户id
* @return
*/
@DeleteMapping("/del/{storeId}")
public AjaxResult del(@PathVariable(value = "storeId")Integer storeId){
return toAjax(pupuStoreService.del(storeId));
@DeleteMapping("/del/{storeId}/{userId}")
public AjaxResult del(
@PathVariable(value = "storeId")Integer storeId,
@PathVariable(value = "userId")Integer userId){
return toAjax(pupuStoreService.del(storeId,userId));
}

View File

@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@RestController
@RequestMapping("/hit/user")
@ -39,8 +39,9 @@ public class PupuUserController extends BaseController {
String token = JwtUtil.generateToken(userLoginVO.getUserName());
// System.out.println("登录token:"+token);
// redisTemplate.opsForValue().set(token,loginer.toString(),60,TimeUnit.MINUTES);
Map<String,String> map=new HashMap<>();
Map<String,Object> map=new HashMap<>();
map.put("Token",token);
map.put("userId",loginer.getUserId());
return AjaxResult.success(map);
}else {
return AjaxResult.error("账号或密码错误");

View File

@ -22,6 +22,8 @@ public class PupuLog implements Serializable {
@TableField(fill = FieldFill.INSERT)
private Date time;
private Integer userId;
private static final long serialVersionUID = 1L;
public PupuLog(String logEvent, Integer logSort, Date time) {
@ -29,4 +31,11 @@ public class PupuLog implements Serializable {
this.logSort = logSort;
this.time = time;
}
public PupuLog(String logEvent, Integer logSort, Date time, Integer userId) {
this.logEvent = logEvent;
this.logSort = logSort;
this.time = time;
this.userId = userId;
}
}

View File

@ -2,6 +2,7 @@ package com.ruoyi.project.hit.mapper;
import com.ruoyi.project.hit.domain.PupuEquipment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Options;
/**
* @author HP
@ -9,8 +10,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @createDate 2024-09-05 16:50:18
* @Entity com.ruoyi.project.hit.domain.PupuEquipment
*/
public interface PupuEquipmentMapper extends BaseMapper<PupuEquipment> {
@Options(useGeneratedKeys = true, keyProperty = "equipmentId")
int insertAndReturnId(PupuEquipment pupuEquipment);
}

View File

@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @Entity com.ruoyi.project.hit.domain.PupuStore
*/
public interface PupuStoreMapper extends BaseMapper<PupuStore> {
int insertReturnId(PupuStore pupuStore);
}

View File

@ -12,9 +12,9 @@ import java.util.List;
*/
public interface PupuEquipmentService extends IService<PupuEquipment> {
int add(PupuEquipment pupuEquipment);
int add(PupuEquipment pupuEquipment, Integer userId);
int del(Integer equipmentId);
int del(Integer equipmentId, Integer userId);
List<PupuEquipment> selectByStoreId(Integer storeId);

View File

@ -13,9 +13,9 @@ import java.util.Map;
*/
public interface PupuStoreService extends IService<PupuStore> {
int add(PupuStore pupuStore);
int add(PupuStore pupuStore, Integer userId);
int del(Integer storeId);
int del(Integer storeId, Integer userId);
List<Map<String, Object>> select();
}

View File

@ -5,12 +5,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.exception.CustomException;
import com.ruoyi.project.hit.domain.PupuEquipment;
import com.ruoyi.project.hit.domain.PupuLog;
import com.ruoyi.project.hit.domain.PupuStore;
import com.ruoyi.project.hit.mapper.PupuStoreMapper;
import com.ruoyi.project.hit.service.PupuEquipmentService;
import com.ruoyi.project.hit.mapper.PupuEquipmentMapper;
import com.ruoyi.project.hit.service.PupuLogService;
import com.ruoyi.project.hit.service.PupuStoreService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@ -34,7 +32,7 @@ public class PupuEquipmentServiceImpl extends ServiceImpl<PupuEquipmentMapper, P
private PupuStoreMapper pupuStoreMapper;
@Override
public int add(PupuEquipment pupuEquipment) {
public int add(PupuEquipment pupuEquipment, Integer userId) {
if(pupuStoreMapper.selectById(pupuEquipment.getStoreId())==null){
throw new CustomException("该门店不存在");
}
@ -43,16 +41,20 @@ public class PupuEquipmentServiceImpl extends ServiceImpl<PupuEquipmentMapper, P
if(pupuEquipmentMapper.selectOne(wrapper)!=null){
throw new CustomException("标识码重复");
};
pupuLogService.add(new PupuLog("设备新增",1,new Date()));
return pupuEquipmentMapper.insert(pupuEquipment);
int i=0;
i = pupuEquipmentMapper.insertAndReturnId(pupuEquipment);
if(i>0){
pupuLogService.add(new PupuLog("设备"+pupuEquipment.getEquipmentId()+"新增",1,new Date(),userId));
}
return i;
}
@Override
public int del(Integer equipmentId) {
public int del(Integer equipmentId, Integer userId) {
if(pupuEquipmentMapper.selectById(equipmentId)==null){
throw new CustomException("该设备不存在");
}
pupuLogService.add(new PupuLog("设备删除",2,new Date()));
pupuLogService.add(new PupuLog("设备"+equipmentId+"删除",2,new Date(),userId));
return pupuEquipmentMapper.deleteById(equipmentId);
}

View File

@ -1,6 +1,7 @@
package com.ruoyi.project.hit.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.exception.CustomException;
import com.ruoyi.project.hit.domain.PupuLog;
import com.ruoyi.project.hit.domain.vo.SelectLogVO;
import com.ruoyi.project.hit.service.PupuLogService;
@ -24,6 +25,9 @@ public class PupuLogServiceImpl extends ServiceImpl<PupuLogMapper, PupuLog>
@Override
public int add(PupuLog pupuLog) {
if(pupuLog.getUserId()==0){
throw new CustomException("日志生成异常未捕获操作用户的id");
}
return pupuLogMapper.insert(pupuLog);
}

View File

@ -2,8 +2,11 @@ package com.ruoyi.project.hit.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.exception.CustomException;
import com.ruoyi.project.hit.domain.PupuEquipment;
import com.ruoyi.project.hit.domain.PupuLog;
import com.ruoyi.project.hit.domain.PupuStore;
import com.ruoyi.project.hit.mapper.PupuEquipmentMapper;
import com.ruoyi.project.hit.service.PupuLogService;
import com.ruoyi.project.hit.service.PupuStoreService;
import com.ruoyi.project.hit.mapper.PupuStoreMapper;
@ -25,17 +28,39 @@ public class PupuStoreServiceImpl extends ServiceImpl<PupuStoreMapper, PupuStore
private PupuStoreMapper pupuStoreMapper;
@Resource
private PupuLogService pupuLogService;
@Resource
private PupuEquipmentMapper pupuEquipmentMapper;
@Override
public int add(PupuStore pupuStore) {
pupuLogService.add(new PupuLog("门店新增",1,new Date()));
return pupuStoreMapper.insert(pupuStore);
public int add(PupuStore pupuStore, Integer userId) {
int i=0;
i = pupuStoreMapper.insertReturnId(pupuStore);
if(i>0){
pupuLogService.add(new PupuLog("门店"+pupuStore.getStoreId()+"新增",1,new Date(),userId));
}
return i;
}
@Override
public int del(Integer storeId) {
pupuLogService.add(new PupuLog("门店删除",2,new Date()));
return pupuStoreMapper.deleteById(storeId);
public int del(Integer storeId, Integer userId) {
LambdaQueryWrapper<PupuEquipment> wrapper=new LambdaQueryWrapper<>();
wrapper.eq(PupuEquipment::getStoreId,storeId);
try {
pupuEquipmentMapper.delete(wrapper);
}catch (Exception e){
throw new CustomException("门店设备删除异常");
}
int i=pupuStoreMapper.deleteById(storeId);
if(i>0){
pupuLogService.add(new PupuLog("门店"+storeId+"删除",2,new Date(),userId));
}
return i;
}
@Override

View File

@ -0,0 +1,76 @@
package com.ruoyi.project.hit.test;
//import com.alipay.easysdk.factory.Factory;
import com.alipay.api.AlipayApiException;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;
/**
* 支付宝接口
*/
@RestController
@RequestMapping("/alipay")
public class AliPayController {
@Resource
AlipayTemplate alipayTemplate;
@GetMapping(value = "/pay", produces = "text/html")
@ResponseBody
public String pay(@RequestParam long id) throws AlipayApiException {
Order order = new Order();
order.setId(120948748372234L);
order.setUserId(129904058947L);
order.setInterfaceInfoId(294389472934L);
order.setMoney(10.0);
order.setPaymentMethod("支付宝");
return alipayTemplate.pay(order);
}
@PostMapping("/notify") // 注意这里必须是POST接口
public String payNotify(HttpServletRequest request) throws Exception {
if (request.getParameter("trade_status").equals("TRADE_SUCCESS")) {
System.out.println("=========支付宝异步回调========");
Map<String, String> params = new HashMap<>();
Map<String, String[]> requestParams = request.getParameterMap();
for (String name : requestParams.keySet()) {
params.put(name, request.getParameter(name));
// System.out.println(name + " = " + request.getParameter(name));
}
String tradeNo = params.get("out_trade_no");
String gmtPayment = params.get("gmt_payment");
String alipayTradeNo = params.get("trade_no");
// 支付宝验签
// if (Factory.Payment.Common().verifyNotify(params)) {
// // 验签通过
// System.out.println("交易名称: " + params.get("subject"));
// System.out.println("交易状态: " + params.get("trade_status"));
// System.out.println("支付宝交易凭证号: " + params.get("trade_no"));
// System.out.println("商户订单号: " + params.get("out_trade_no"));
// System.out.println("交易金额: " + params.get("total_amount"));
// System.out.println("买家在支付宝唯一id: " + params.get("buyer_id"));
// System.out.println("买家付款时间: " + params.get("gmt_payment"));
// System.out.println("买家付款金额: " + params.get("buyer_pay_amount"));
// // 更新订单状态
// }
}
return "success";
}
}

View File

@ -0,0 +1,85 @@
package com.ruoyi.project.hit.test;
import com.alipay.api.AlipayApiException;
import com.alipay.api.AlipayClient;
import com.alipay.api.DefaultAlipayClient;
import com.alipay.api.request.AlipayTradePagePayRequest;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
@ConfigurationProperties(prefix = "alipay")
@Component
@Data
public class AlipayTemplate {
// 应用ID,您的APPID收款账号既是您的APPID对应支付宝账号
@Value("{alipay.appId}")
public String appId;
// 应用私钥就是工具生成的应用私钥
@Value("{alipay.merchantPrivateKey}")
public String merchantPrivateKey;
// 支付宝公钥,对应APPID下的支付宝公钥
@Value("{alipay.alipayPublicKey}")
public String alipayPublicKey;
// 支付宝会悄悄的给我们发送一个请求告诉我们支付成功的信息
@Value("{alipay.notifyUrl}")
public String notifyUrl;
//同步通知支付成功一般跳转到成功页
@Value("{alipay.returnUrl}")
public String returnUrl;
// 签名方式
@Value("{alipay.signType}")
private String signType;
// 字符编码格式
@Value("{alipay.charset}")
private String charset;
//订单超时时间
private String timeout = "1m";
// 支付宝网关https://openapi-sandbox.dl.alipaydev.com/gateway.do
@Value("{alipay.gatewayUrl}")
public String gatewayUrl;
public String pay(Order order) throws
AlipayApiException {
//1根据支付宝的配置生成一个支付客户端
AlipayClient alipayClient = new
DefaultAlipayClient(gatewayUrl, appId, merchantPrivateKey,
"json", charset, alipayPublicKey, signType);
//2创建一个支付请求并设置请求参数
AlipayTradePagePayRequest alipayRequest = new AlipayTradePagePayRequest();
alipayRequest.setReturnUrl(returnUrl);
alipayRequest.setNotifyUrl(notifyUrl);
Long id = order.getId();
Long interfaceInfoId = order.getInterfaceInfoId();
Double money = order.getMoney();
String paymentMethod = order.getPaymentMethod();
alipayRequest.setBizContent(" {\"out_trade_no\":\"" + id + "\","
+ "\"total_amount\":\"" + money + "\","
+ "\"subject\":\"" + interfaceInfoId
+ "\","
+ "\"body\":\"" + paymentMethod + "\","
+
"\"timeout_express\":\"" + timeout + "\","
+
"\"product_code\":\"FAST_INSTANT_TRADE_PAY\"}");
String result = alipayClient.pageExecute(alipayRequest).getBody();
//会收到支付宝的响应响应的是一个页面只要浏览器显示这个页面就会自动来到支付宝的收银台页面
System.out.println("支付宝的响应:" + result);
return result;
}
}

View File

@ -0,0 +1,69 @@
package com.ruoyi.project.hit.test;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 接口次数订单表
* @TableName order
*/
@TableName(value ="`order`")
@Data
public class Order implements Serializable {
/**
* 订单Id
*/
@TableId(type = IdType.ASSIGN_UUID)
private Long id;
/**
* 用户Id
*/
private Long userId;
/**
* 接口Id
*/
private Long interfaceInfoId;
/**
* 支付金额
*/
private Double money;
/**
* 支付方式
*/
private String paymentMethod;
/**
* 0 - 未支付 1 - 已支付
*/
private Integer status;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 是否删除
*/
private Integer isDelete;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}

View File

@ -18,7 +18,6 @@ public class AESUtil {
/**
* 生成AES密钥
*
* @return SecretKey AES密钥
* @throws NoSuchAlgorithmException 当AES算法不可用时抛出
*/
@ -37,7 +36,6 @@ public class AESUtil {
public static SecretKey generateFixAESKey(){
// 定义一个16字节字符串key
String fixedKey = "gpnknbndfdgzgwhh";
// 使用固定的字节数组(128位)创建DES密钥
return new SecretKeySpec(fixedKey.getBytes(StandardCharsets.UTF_8), "AES");
}

View File

@ -42,7 +42,7 @@ public class HitInterceptor implements HandlerInterceptor {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
String path = request.getRequestURI();
if (path.startsWith("/hit/log/select") && !"/hit/user/register".equals(path) && !"/hit/user/login".equals(path)) {
if (path.startsWith("/hit") && !"/hit/user/register".equals(path) && !"/hit/user/login".equals(path)) {
System.out.println("拦截");
String token = request.getHeader("Token");
System.out.println(token);

View File

@ -11,11 +11,11 @@ public class WebConfig implements WebMvcConfigurer {
@Autowired
private HitInterceptor hitInterceptor;
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(hitInterceptor)
.addPathPatterns("/hit/log/select") // 拦截所有/hit开头的请求
.excludePathPatterns("/hit/user/register")
.excludePathPatterns("/hit/user/login"); // 但不拦截/hit/user
}
// @Override
// public void addInterceptors(InterceptorRegistry registry) {
// registry.addInterceptor(hitInterceptor)
// .addPathPatterns("/hit") // 拦截所有/hit开头的请求
// .excludePathPatterns("/hit/user/register")
// .excludePathPatterns("/hit/user/login"); // 但不拦截/hit/user
// }
}

View File

@ -147,4 +147,15 @@ minio:
endpoint: http://60.205.214.35:9090
accessKey: minioadmin
secretKey: minioadmin
bucketName: meiyanshe
bucketName: meiyanshe
alipay:
appId: 9021000140665155
merchantPrivateKey: MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCeszWzeW3hcNTgJCPisg3AEDTfgSulgg6g5ui/s9eKgeC53zYm8XNyOwEJZoHRz1dk1ekxSHOUYmQbdOVyfqRvdOd5V5xMY3ihvtOIsY1EjrIgU1VzJOpuiWJ1egxsUyc4nDUA00+5YXfeXyTI60Ro5+mQukq4MS6Q3FConQwa8LxLJhWOVuIT/laQpKu6hskldUcgYcWS1pYMo2Z+mnnt1qLkKMRmiFnpo+p4tx3XuN8Uy5o/ZhTxD0WZC+SPqgJ0osfcp/KDFMtUklOefuHlCGc1dBvo2TTnsLl54bGXHQ8HvgN4W4HXRWvPfLbyXsg3ULWaYMmuOkTgQgbZK3NjAgMBAAECggEAfnPVilhrUYMSXDbv0SaHBk7jkmPeX1auSU80jevDBz5Nzk0pXQZvMsoJHXBsaL2JqXM5CGfukIGFusr+OKjoZVcFSg6hH8zyxg7DhtvS8JmzHUbJg6IamlEl/u1tELOBQP5WzX2SvOgJF0tAiEfOjribxxJpjzLBI/Qo4PGiP6PhFiT/A6Dm3U6Qz8G4s168hRsIqXwrpmtYG4vc2acLeUg1Dc3jD4wHZFN0WQbYhKcY7e1xoKiIsYG/MJVKNemMRMPQxmPVLJ4Q3scMRNCYcrEDfj78QryTCUOVKY0Vo7Wx2T6H1CEgjeXHzBjE4zsdqFPE4gSVZ6t43AXQIpTHwQKBgQD9CTYUHaTfnk4zIfLKV5nTEIREV4q0g6b6JDO6uyxrLhnT5Dz2mMFvNtA+Oso65vzc6mxi8uhXCD5SmmmJzPtJ6VBsT4V3A6gg5dpZHassKXlEEWZZ58zE4aCWBbaL8w5GqWcR8X83/ijuSjSpnzQaAWS0D4Kd4F/I4gA1XBtVawKBgQCgjxwU7cilbBKMHYT0Aoxnxw4pS3Qw1Vfk0ij/Np2f1kAo/ylaeWcIRIep5/E7cJbXS2HnmJqjroZ4MISc8ihs5k8EOFdF3S4z4850nH3VmfEJOI2PKxE7smqVoik6sohfYqHYjRJtMFyGsEgvOrvEBNox3ugEkIfeGemsbMhf6QKBgG+b34GR7cZAwkdlgvzjFNN3JpAqeODUbRNKYpLLunTwGa5PruAqUq/mYoYAUnEWr5QVxocCk57H4Q14VHLWukRIqBOOI9VyBHe2StAh+P16saVnc1jWmIiC6N0jWfhy1eovEGpmtfGRpqYsjvv+X/HUiYGukbNnY3hszyC6JshPAoGATQR49v0dC2Ts/LNITHhQe5N7kol0QdyE3emF6u566+otOr0zTAgCSW/+F52AFQAsCzhIzXxhaXTVYh/77QEoLRzI+IBCNOwlNpTnOv66SdUfT0oGdY+2I4mxIPf5iQOM8RxyAFujZCcXqzAyYB1vZlbhh5yidVYTJpINij1gXMkCgYEA7kP3hmFOXqbPcMwWL5FEBc1u+NK/v4dj1FURNj19IkRw15d53pY8/orPHfIFt05NYCyl4jXJhozuEihGw5YwJLi8t2kPAwHX3u2yxrSeI5MrqVhyWD1Nf2HD4VBt1iuGgGj6xoiISc83cKw5ZiJT4I2plq5UIPHRiEM9wcuOeYE=
alipayPublicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnrM1s3lt4XDU4CQj4rINwBA034ErpYIOoObov7PXioHgud82JvFzcjsBCWaB0c9XZNXpMUhzlGJkG3Tlcn6kb3TneVecTGN4ob7TiLGNRI6yIFNVcyTqbolidXoMbFMnOJw1ANNPuWF33l8kyOtEaOfpkLpKuDEukNxQqJ0MGvC8SyYVjlbiE/5WkKSruobJJXVHIGHFktaWDKNmfpp57dai5CjEZohZ6aPqeLcd17jfFMuaP2YU8Q9FmQvkj6oCdKLH3KfygxTLVJJTnn7h5QhnNXQb6Nk057C5eeGxlx0PB74DeFuB10Vrz3y28l7IN1C1mmDJrjpE4EIG2StzYwIDAQAB
notifyUrl: http://内网穿透地址/api/alipay/notify
returnUrl: http://member.zyz.com/memberOrder.html
signType: RSA2
charset: utf-8
# 我的支付宝网关地址
gatewayUrl: https://openapi-sandbox.dl.alipaydev.com/gateway.do

View File

@ -17,4 +17,10 @@
equipment_id,serial_number,create_time,
status
</sql>
<insert id="insertAndReturnId" useGeneratedKeys="true" keyProperty="equipmentId">
INSERT INTO `ry-vue`.`pupu_equipment` ( `equipment_id`, `serial_number`, `store_id`, `create_time`, `update_time`,`status` )
VALUES
( DEFAULT, #{serialNumber}, #{storeId},#{createTime},#{updateTime}, DEFAULT );
</insert>
</mapper>

View File

@ -8,6 +8,7 @@
<id property="logId" column="log_id" jdbcType="INTEGER"/>
<result property="logEvent" column="log_event" jdbcType="VARCHAR"/>
<result property="logSort" column="log_sort" jdbcType="INTEGER"/>
<result property="userId" column="user_id" jdbcType="INTEGER"/>
<result property="time" column="time" jdbcType="TIMESTAMP"/>
</resultMap>
@ -17,16 +18,22 @@
</sql>
<select id="select" resultType="java.util.HashMap">
SELECT
pupu_log_sort.sort_name AS sortName,
pupu_log.log_id AS logId,
pupu_log.log_event AS logEvent,
pupu_log.user_id AS userId,
pupu_log.time,
pupu_log_sort.sort_name AS sortName
pupu_user.user_name AS userName
FROM
pupu_log_sort
INNER JOIN
pupu_log
INNER JOIN
pupu_log_sort
ON
pupu_log_sort.sort_id = pupu_log.log_sort
pupu_log.log_sort = pupu_log_sort.sort_id
INNER JOIN
pupu_user
ON
pupu_log.user_id = pupu_user.user_id
<where>
<if test="sortId!=null">
pupu_log.log_sort = #{sortId}

View File

@ -19,4 +19,10 @@
store_id,store_name,longitude,
dimensionality,status
</sql>
<insert id="insertReturnId" useGeneratedKeys="true" keyProperty="storeId">
INSERT INTO `ry-vue`.`pupu_store` ( `store_id`, `store_name`, `longitude`, `latitude`, `province`, `city`, `district`, `status` )
VALUES
( default , #{storeName}, #{longitude}, #{latitude}, #{province}, #{city}, #{district}, default );
</insert>
</mapper>