Explorar o código

讲师demo删除

wzy hai 2 meses
pai
achega
e41f0c690a

+ 0 - 42
mjava-jiangshi/src/main/java/com/malk/jiangshi/controller/JiangshiController.java

@@ -1,42 +0,0 @@
-package com.malk.jiangshi.controller;
-
-import com.malk.jiangshi.entity.Product;
-import com.malk.jiangshi.service.JiangshiService;
-import com.malk.server.common.McR;
-import lombok.extern.slf4j.Slf4j;
-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.RequestBody;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.List;
-import java.util.Map;
-
-@RestController
-@Slf4j
-public class JiangshiController {
-    @Autowired
-    private JiangshiService jiangshiService;
-
-    @GetMapping("/test")
-    public McR test() {
-        log.info("test");
-        return McR.success();
-    }
-
-
-    @PostMapping("/addProduct")
-    public McR addProduct(@RequestBody Product product) {
-        log.info("addProduct");
-        jiangshiService.addProduct(product);
-        return McR.success();
-    }
-
-    @PostMapping("/updateProduct")
-    public McR updateProduct(@RequestBody Map map) {
-        log.info("updateProduct");
-        jiangshiService.updateProduct(map);
-        return McR.success();
-    }
-}

+ 0 - 33
mjava-jiangshi/src/main/java/com/malk/jiangshi/entity/Product.java

@@ -1,33 +0,0 @@
-package com.malk.jiangshi.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-@Data
-@TableName(value = "jiangshi_product")
-public class Product {
-    @TableId(value = "id", type = IdType.AUTO)
-    private String id;
-
-    private String name;
-
-    private String code;
-
-    private String specification;
-
-    private String model;
-
-    private int num;
-
-    private String warningNum;
-
-    private int price;
-
-    private String company;
-
-    private String companyPhone;
-
-    private String validFlag;
-}

+ 0 - 9
mjava-jiangshi/src/main/java/com/malk/jiangshi/mapper/ProductMapper.java

@@ -1,9 +0,0 @@
-package com.malk.jiangshi.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.malk.jiangshi.entity.Product;
-import org.apache.ibatis.annotations.Mapper;
-
-@Mapper
-public interface ProductMapper extends BaseMapper<Product> {
-}

+ 0 - 14
mjava-jiangshi/src/main/java/com/malk/jiangshi/service/JiangshiService.java

@@ -1,14 +0,0 @@
-package com.malk.jiangshi.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.malk.jiangshi.entity.Product;
-
-import java.util.List;
-import java.util.Map;
-
-public interface JiangshiService extends IService<Product> {
-
-    void addProduct(Product product);
-
-    void updateProduct(Map map);
-}

+ 0 - 44
mjava-jiangshi/src/main/java/com/malk/jiangshi/service/impl/JiangshiServiceImpl.java

@@ -1,44 +0,0 @@
-package com.malk.jiangshi.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.malk.jiangshi.entity.Product;
-import com.malk.jiangshi.mapper.ProductMapper;
-import com.malk.jiangshi.service.JiangshiService;
-import org.checkerframework.checker.units.qual.A;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-import java.util.Map;
-
-@Service
-public class JiangshiServiceImpl extends ServiceImpl<ProductMapper, Product> implements JiangshiService {
-    @Autowired
-    private ProductMapper productMapper;
-
-
-    @Override
-    public void addProduct(Product product) {
-        productMapper.insert(product);
-
-    }
-
-    @Override
-    public void updateProduct(Map map) {
-        String code = String.valueOf(map.get("code"));
-        int num = Integer.parseInt(String.valueOf(map.get("num")));
-        String type = String.valueOf(map.get("type"));
-        LambdaQueryWrapper<Product> productLambdaQueryWrapper = new LambdaQueryWrapper<>();
-        productLambdaQueryWrapper.eq(Product::getCode, code)
-                        .eq(Product::getValidFlag,"1");
-        Product product = productMapper.selectOne(productLambdaQueryWrapper);
-        if (type.equals("add")){
-            product.setNum(product.getNum()+num);
-        }else if (type.equals("sub")){
-            product.setNum(product.getNum()-num);
-        }
-
-        productMapper.updateById(product);
-    }
-}

+ 0 - 59
mjava-jiangshi/src/main/resources/application-dev.yml

@@ -1,59 +0,0 @@
-server:
-  port: 8115
-  servlet:
-    context-path: /jiangshi
-
-spring:
-  datasource:
-    url: jdbc:mysql://47.97.181.40:3306/dingtalk?serverTimezone=GMT%2B8
-    username: root
-    password: cp-root@2022++
-    driver-class-name: com.mysql.cj.jdbc.Driver
-enable:
-  scheduling: false
-logging:
-  config: classpath:logback-spring.xml
-  path: /home/server/jiangshi/log/
-  level:
-    com.malk.*: debug
-
-mybatis-plus:
-  configuration:
-    #开启驼峰命名自动映射
-    map-underscore-to-camel-case: true
-    #开启日志打印
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-  type-aliases-package: com.malk.jiangshi.entity
-  #扫描mapper文件
-  mapper-locations: classpath:mapper/*.xml
-
-
-
-# dingtalk
-dingtalk:
-  agentId: 3088485347
-  appKey: dingryt7ulefpiziveoj
-  appSecret: qBdVqoK1UP9J3yN0ulaKuBmse4nrZPfNbVxjLGjaODGoRqbtws0__f3A5GpD5bLz
-  corpId: ding2c2e3f1dbf2b3ffebc961a6cb783455b
-  aesKey: uCSTfCFVU18QJjECfZTBWyC9mi10qqY1Spuqjl4ghct
-  token: Adib7WsRXHYrLGkOAUNcgl6gLY9nBIIaeprkhfmxGg6ca6atYWWKDkuE
-
-  #poc
-  #agentId: 2995824312
-  #appKey: ding3ap1jk1tg44tz3s2
-  #appSecret: PaWTDG-FiX-RW5fnV9r8CzEmR-9QlJpubC88txhprL_Z_iREO62B-iRW6w7gkA_K
-  #corpId: ding321c72787fffc78b35c2f4657eb6378f
-  #aesKey: LSIc7r5uHAP0dd6v23J3LWRmjECMNzbkIcxAwdx63RE
-  #token: yqXHMHaK4oHYvjyQshU4zFqgrHFq7PcBxVSqGo1BAQk0
-
-
-# teambition
-teambition:
-  AppID:
-  AppSecret:
-  TenantId:
-  OperatorId:    # 公共账号, 需要有操作权限 [牧语]
-# aliwork
-aliwork:
-  appType:
-  systemToken:

+ 0 - 49
mjava-jiangshi/src/main/resources/application-prod.yml

@@ -1,49 +0,0 @@
-server:
-  port: 8115
-  servlet:
-    context-path: /jiangshi
-
-spring:
-  datasource:
-    url: jdbc:mysql://127.0.0.1:3306/shantai?serverTimezone=GMT%2B8
-    username: root
-    password: ST-cloudpure2024
-    driver-class-name: com.mysql.cj.jdbc.Driver
-enable:
-  scheduling: false
-logging:
-  config: classpath:logback-spring.xml
-  path: /home/server/jiangshi/log/
-  level:
-    com.malk.*: debug
-
-mybatis-plus:
-  configuration:
-    #开启驼峰命名自动映射
-    map-underscore-to-camel-case: true
-    #开启日志打印
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-  type-aliases-package: com.malk.jiangshi.entity
-  #扫描mapper文件
-  mapper-locations: classpath:mapper/*.xml
-
-
-
-# dingtalk
-dingtalk:
-  agentId: 3088485347
-  appKey: dingryt7ulefpiziveoj
-  appSecret: qBdVqoK1UP9J3yN0ulaKuBmse4nrZPfNbVxjLGjaODGoRqbtws0__f3A5GpD5bLz
-  corpId: ding2c2e3f1dbf2b3ffebc961a6cb783455b
-  aesKey: uCSTfCFVU18QJjECfZTBWyC9mi10qqY1Spuqjl4ghct
-  token: Adib7WsRXHYrLGkOAUNcgl6gLY9nBIIaeprkhfmxGg6ca6atYWWKDkuE
-# teambition
-teambition:
-  AppID:
-  AppSecret:
-  TenantId:
-  OperatorId:    # 公共账号, 需要有操作权限 [牧语]
-# aliwork
-aliwork:
-  appType:
-  systemToken:

+ 0 - 8
mjava-jiangshi/src/main/resources/mapper/ProductMapper.xml

@@ -1,8 +0,0 @@
-<?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.malk.jiangshi.mapper.ProductMapper">
-
-
-</mapper>
-