运营平台/客户业务系统(完善)

master
Jiang Peng 2024-06-01 20:47:21 +08:00
parent 425c2b6ff1
commit 6f6f8ade92
62 changed files with 4316 additions and 226 deletions

View File

@ -0,0 +1,33 @@
package com.muyu.net.working.domain;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* @ClassDescription:
* @JdkVersion: 17
* @Author: zhangxu
* @Created: 2024/5/25 9:03
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class AddService extends BaseEntity {
/**
*id
* */
private Long id;
/**
*
* */
private Integer addValue;
}

View File

@ -0,0 +1,38 @@
package com.muyu.net.working.domain;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* @ClassDescription:
* @JdkVersion: 17
* @Author: zhangxu
* @Created: 2024/5/25 9:05
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class Certification extends BaseEntity {
/**
*id
* **/
private Long id;
/**
*
* **/
private String auditor;
/**
*
* **/
private String stat;
/**
*
* **/
private String auditReason;
}

View File

@ -0,0 +1,227 @@
package com.muyu.net.working.domain;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
/**
* @ClassDescription:
* @JdkVersion: 17
* @Author: zhangxu
* @Created: 2024/5/25 8:51
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Enterprise extends BaseEntity {
/**
*qid
* **/
private Long id;
/**
*
* **/
private String enterpriseName;
/**
*
* **/
private String legalPerson;
/**
*
* **/
private String businessLicenseNumber;
/**
*
* **/
private Date establishmentDate;
/**
*
* **/
private String businessScope;
/**
*
* **/
private String address;
/**
*
* **/
private String contactPhone;
/**
*
* **/
private String email;
/**
*
* **/
private String status;
/**
*
* **/
private Date registrationDate;
/**
*
* **/
private String certification;
/**
*id
* **/
private Long openServiceId;
/**
*id
* **/
private Integer addServiceId;
/***
*
* */
private String openAdd;
public String getOpenAdd() {
return openAdd;
}
public void setOpenAdd(String openAdd) {
this.openAdd = openAdd;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public String getLegalPerson() {
return legalPerson;
}
public void setLegalPerson(String legalPerson) {
this.legalPerson = legalPerson;
}
public String getBusinessLicenseNumber() {
return businessLicenseNumber;
}
public void setBusinessLicenseNumber(String businessLicenseNumber) {
this.businessLicenseNumber = businessLicenseNumber;
}
public Date getEstablishmentDate() {
return establishmentDate;
}
public void setEstablishmentDate(Date establishmentData) {
this.establishmentDate = establishmentData;
}
public String getBusinessScope() {
return businessScope;
}
public void setBusinessScope(String businessScope) {
this.businessScope = businessScope;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getContactPhone() {
return contactPhone;
}
public void setContactPhone(String contactPhone) {
this.contactPhone = contactPhone;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Date getRegistrationDate() {
return registrationDate;
}
public void setRegistrationDate(Date registrationDate) {
this.registrationDate = registrationDate;
}
public String getCertification() {
return certification;
}
public void setCertification(String certification) {
this.certification = certification;
}
public Long getOpenServiceId() {
return openServiceId;
}
public void setOpenServiceId(Long openServiceId) {
this.openServiceId = openServiceId;
}
public Integer getAddServiceId() {
return addServiceId;
}
public void setAddServiceId(Integer addServiceId) {
this.addServiceId = addServiceId;
}
@Override
public String toString(){
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id",getId())
.append("enterpriseName",getEnterpriseName())
.append("legalPerson",getLegalPerson())
.append("businessLicenseNumber",getBusinessLicenseNumber())
.append("establishmentDate",getEstablishmentDate())
.append("businessScope",getBusinessScope())
.append("address",getAddress())
.append("contactPhone",getContactPhone())
.append("email",getEmail())
.append("status",getStatus())
.append("registrationDate",getRegistrationDate())
.append("certification",getCertification())
.append("openServiceId",getOpenServiceId())
.append("addServiceId",getAddServiceId())
.toString();
}
}

View File

@ -0,0 +1,33 @@
package com.muyu.net.working.domain;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @ClassDescription:
* @JdkVersion: 17
* @Author: zhangxu
* @Created: 2024/5/31 15:16
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class FenceGroups extends BaseEntity {
/**
*id
* */
private Long id;
/**
*
* */
private String groupName;
/**
*
* */
private List<Fences> fencesList;
}

View File

@ -0,0 +1,60 @@
package com.muyu.net.working.domain;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* @ClassDescription:
* @JdkVersion: 17
* @Author: zhangxu
* @Created: 2024/5/31 15:11
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class Fences extends BaseEntity {
/**
*
*id
* **/
private Long id;
/**
*id
*
* **/
private String groupId;
/**
*
*
* **/
private String fenceName;
/**
*
*
* **/
private String fenceType;
/**
*
*
* **/
private Double radius;
/**
*
*
* **/
private String eventType;
/**
*
*
* **/
private String staut;
/**
*
*
* **/
private String polygonPoints;
}

View File

@ -0,0 +1,161 @@
package com.muyu.net.working.domain;
import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
*
*
* @author ruoyi
* @date 2024-05-27
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class Information extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 车辆vin */
@Excel(name = "车辆vin")
private String number;
/** 车辆类型 */
@Excel(name = "车辆类型")
private Long typeId;
/** 电子围栏id */
@Excel(name = "电子围栏id")
private Long electronicId;
/** 电机厂商 */
@Excel(name = "电机厂商")
private String motor;
/** 电池厂商 */
@Excel(name = "电池厂商")
private String battery;
/** 电机编号 */
@Excel(name = "电机编号")
private String motorNumber;
/** 电池编号 */
@Excel(name = "电池编号")
private String batteryNumber;
/** 企业id */
@Excel(name = "企业id")
private Long enterpriseId;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setNumber(String number)
{
this.number = number;
}
public String getNumber()
{
return number;
}
public void setTypeId(Long typeId)
{
this.typeId = typeId;
}
public Long getTypeId()
{
return typeId;
}
public void setElectronicId(Long electronicId)
{
this.electronicId = electronicId;
}
public Long getElectronicId()
{
return electronicId;
}
public void setMotor(String motor)
{
this.motor = motor;
}
public String getMotor()
{
return motor;
}
public void setBattery(String battery)
{
this.battery = battery;
}
public String getBattery()
{
return battery;
}
public void setMotorNumber(String motorNumber)
{
this.motorNumber = motorNumber;
}
public String getMotorNumber()
{
return motorNumber;
}
public void setBatteryNumber(String batteryNumber)
{
this.batteryNumber = batteryNumber;
}
public String getBatteryNumber()
{
return batteryNumber;
}
public void setEnterpriseId(Long enterpriseId)
{
this.enterpriseId = enterpriseId;
}
public Long getEnterpriseId()
{
return enterpriseId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("number", getNumber())
.append("typeId", getTypeId())
.append("electronicId", getElectronicId())
.append("motor", getMotor())
.append("battery", getBattery())
.append("motorNumber", getMotorNumber())
.append("batteryNumber", getBatteryNumber())
.append("enterpriseId", getEnterpriseId())
.append("remark", getRemark())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.toString();
}
}

View File

@ -0,0 +1,31 @@
package com.muyu.net.working.domain;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* @ClassDescription:
* @JdkVersion: 17
* @Author: zhangxu
* @Created: 2024/5/25 9:35
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class ModeOfPayment extends BaseEntity {
/***
* id
* */
private Long id;
/***
* /
* */
private String payment;
}

View File

@ -0,0 +1,34 @@
package com.muyu.net.working.domain;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* @ClassDescription:
* @JdkVersion: 17
* @Author: zhangxu
* @Created: 2024/5/26 9:19
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class OpenServiceAdd extends BaseEntity {
/**
*
*id
* */
private Long id;
/**
*1 2
*
* */
private String ActivateTheService;
}

View File

@ -0,0 +1,37 @@
package com.muyu.net.working.domain;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* @ClassDescription:
* @JdkVersion: 17
* @Author: zhangxu
* @Created: 2024/5/25 9:33
*/
@Data
@AllArgsConstructor
@NoArgsConstructor@SuperBuilder
public class PayOf extends BaseEntity {
/**
* id
* */
private Long id;
/**
* id
* */
private Long enterpriseId;
/**
* /id
* */
private Long modeOfPaymentId;
/**
*
* */
private Double price;
}

View File

@ -0,0 +1,64 @@
package com.muyu.net.working.domain;
import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
*
*
* @author ruoyi
* @date 2024-05-27
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class Type extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 车辆类型 */
@Excel(name = "车辆类型")
private String typeName;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setTypeName(String typeName)
{
this.typeName = typeName;
}
public String getTypeName()
{
return typeName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("typeName", getTypeName())
.append("remark", getRemark())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("updateBy", getUpdateBy())
.toString();
}
}

View File

@ -0,0 +1,35 @@
package com.muyu.net.working.domain;
import com.muyu.common.core.web.domain.BaseEntity;
import java.util.Date;
/**
* @ClassDescription:
* @JdkVersion: 17
* @Author: zhangxu
* @Created: 2024/5/26 20:31
*/
public class Vehicle extends BaseEntity {
private Long id;
// 车辆唯一标识
private String vin;
// 车辆识别号码VIN
private String brand;// 品牌
private String model;
private int manufactureYear; // 生产年份
private String bodyType; // 车身类型,例如"Sedan", "SUV"
private String color; // 车身颜色
private double engineCapacity;
// 发动机排量,单位升
private String fuelType; // 燃油类型,例如"Petrol", "Diesel", "Electric"
private String transmission;// 变速器类型,例如"Automatic", "Manual"
private String driveType; // 驱动方式,例如"FWD", "RWD", "AWD"
private long mileage; // 行驶里程,单位公
private Date registrationDate; // 注册日期
private String registrationNumber; // 车牌号码
private String ownerId;
}

View File

@ -1,29 +0,0 @@
package com.muyu.net.working.domain.remote;
import com.muyu.common.core.constant.ServiceNameConstants;
import com.muyu.common.core.domain.Result;
import com.muyu.common.system.domain.SysFile;
import com.muyu.common.system.remote.factory.RemoteFileFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
/**
*
*
* @author muyu
*/
@FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class)
public interface RemoteFileService {
/**
*
*
* @param file
*
* @return
*/
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public Result<SysFile> upload (@RequestPart(value = "file") MultipartFile file);
}

View File

@ -1,42 +0,0 @@
package com.muyu.net.working.domain.remote;
import com.muyu.common.core.constant.SecurityConstants;
import com.muyu.common.core.constant.ServiceNameConstants;
import com.muyu.common.core.domain.Result;
import com.muyu.common.system.domain.SysLogininfor;
import com.muyu.common.system.domain.SysOperLog;
import com.muyu.common.system.remote.factory.RemoteLogFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
/**
*
*
* @author muyu
*/
@FeignClient(contextId = "remoteLogService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteLogFallbackFactory.class)
public interface RemoteLogService {
/**
*
*
* @param sysOperLog
* @param source
*
* @return
*/
@PostMapping("/operlog")
public Result<Boolean> saveLog (@RequestBody SysOperLog sysOperLog, @RequestHeader(SecurityConstants.FROM_SOURCE) String source) throws Exception;
/**
* 访
*
* @param sysLogininfor 访
* @param source
*
* @return
*/
@PostMapping("/logininfor")
public Result<Boolean> saveLogininfor (@RequestBody SysLogininfor sysLogininfor, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}

View File

@ -1,46 +0,0 @@
package com.muyu.net.working.domain.remote;
import com.muyu.common.core.constant.SecurityConstants;
import com.muyu.common.core.constant.ServiceNameConstants;
import com.muyu.common.core.domain.Result;
import com.muyu.common.system.domain.LoginUser;
import com.muyu.common.system.domain.SysUser;
import com.muyu.common.system.remote.factory.RemoteUserFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
/**
*
*
* @author muyu
*/
@FeignClient(contextId = "remoteUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
public interface RemoteUserService {
/**
*
*
* @param username
* @param source
*
* @return
*/
@GetMapping("/user/info/{username}")
public Result<LoginUser> getUserInfo (@PathVariable("username") String username, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
@PostMapping("/user")
public Result add (@Validated @RequestBody SysUser user);
/**
*
*
* @param sysUser
* @param source
*
* @return
*/
@PostMapping("/user/register")
public Result<Boolean> registerUserInfo (@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}

View File

@ -1,31 +0,0 @@
package com.muyu.net.working.domain.remote.factory;
import com.muyu.common.core.domain.Result;
import com.muyu.common.system.domain.SysFile;
import com.muyu.common.system.remote.RemoteFileService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;
/**
*
*
* @author muyu
*/
@Component
public class RemoteFileFallbackFactory implements FallbackFactory<RemoteFileService> {
private static final Logger log = LoggerFactory.getLogger(RemoteFileFallbackFactory.class);
@Override
public RemoteFileService create (Throwable throwable) {
log.error("文件服务调用失败:{}", throwable.getMessage());
return new RemoteFileService() {
@Override
public Result<SysFile> upload (MultipartFile file) {
return Result.error("上传文件失败:" + throwable.getMessage());
}
};
}
}

View File

@ -1,37 +0,0 @@
package com.muyu.net.working.domain.remote.factory;
import com.muyu.common.core.domain.Result;
import com.muyu.common.system.domain.SysLogininfor;
import com.muyu.common.system.domain.SysOperLog;
import com.muyu.common.system.remote.RemoteLogService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
/**
*
*
* @author muyu
*/
@Component
public class RemoteLogFallbackFactory implements FallbackFactory<RemoteLogService> {
private static final Logger log = LoggerFactory.getLogger(RemoteLogFallbackFactory.class);
@Override
public RemoteLogService create (Throwable throwable) {
log.error("日志服务调用失败:{}", throwable.getMessage());
return new RemoteLogService() {
@Override
public Result<Boolean> saveLog (SysOperLog sysOperLog, String source) {
return Result.error("保存操作日志失败:" + throwable.getMessage());
}
@Override
public Result<Boolean> saveLogininfor (SysLogininfor sysLogininfor, String source) {
return Result.error("保存登录日志失败:" + throwable.getMessage());
}
};
}
}

View File

@ -1,41 +0,0 @@
package com.muyu.net.working.domain.remote.factory;
import com.muyu.common.core.domain.Result;
import com.muyu.common.system.domain.LoginUser;
import com.muyu.common.system.domain.SysUser;
import com.muyu.common.system.remote.RemoteUserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
/**
*
*
* @author muyu
*/
@Component
public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserService> {
private static final Logger log = LoggerFactory.getLogger(RemoteUserFallbackFactory.class);
@Override
public RemoteUserService create (Throwable throwable) {
log.error("用户服务调用失败:{}", throwable.getMessage());
return new RemoteUserService() {
@Override
public Result<LoginUser> getUserInfo (String username, String source) {
return Result.error("获取用户失败:" + throwable.getMessage());
}
@Override
public Result add(SysUser user) {
return Result.error("获取用户失败:{}", throwable.getMessage());
}
@Override
public Result<Boolean> registerUserInfo (SysUser sysUser, String source) {
return Result.error("注册用户失败:" + throwable.getMessage());
}
};
}
}

View File

@ -0,0 +1,23 @@
package com.muyu.networking;
import com.muyu.common.security.annotation.EnableCustomConfig;
import com.muyu.common.security.annotation.EnableMyFeignClients;
import com.muyu.common.swagger.annotation.EnableCustomSwagger2;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* @ClassDescription:
* @JdkVersion: 17
* @Author: zhangxu
* @Created: 2024/5/25 8:45
*/
@EnableCustomConfig
@EnableCustomSwagger2
@EnableMyFeignClients
@SpringBootApplication
public class NetworkingApplication {
public static void main(String[] args) {
SpringApplication.run(NetworkingApplication.class, args);
}
}

View File

@ -0,0 +1,98 @@
package com.muyu.networking.controller;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.web.page.TableDataInfo;
import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.domain.AddService;
import com.muyu.networking.service.AddServiceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
* @author ruoyi
* @date 2024-05-25
*/
@RestController
@RequestMapping("/addService")
public class AddServiceController extends BaseController
{
@Autowired
private AddServiceService addServiceService;
/**
*
*/
@RequiresPermissions("system:service:list")
@GetMapping("/list")
public Result<TableDataInfo<AddService>> list(AddService addService)
{
startPage();
List<AddService> list = addServiceService.selectAddServiceList(addService);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:service:export")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, AddService addService)
{
List<AddService> list = addServiceService.selectAddServiceList(addService);
ExcelUtil<AddService> util = new ExcelUtil<AddService>(AddService.class);
util.exportExcel(response, list, "【请填写功能名称】数据");
}
/**
*
*/
@RequiresPermissions("system:service:query")
@GetMapping(value = "/{id}")
public Result getInfo(@PathVariable("id") Long id)
{
return success(addServiceService.selectAddServiceById(id));
}
/**
*
*/
@RequiresPermissions("system:service:add")
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
@PostMapping
public Result add(@RequestBody AddService addService)
{
return toAjax(addServiceService.insertAddService(addService));
}
/**
*
*/
@RequiresPermissions("system:service:edit")
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping
public Result edit(@RequestBody AddService addService)
{
return toAjax(addServiceService.updateAddService(addService));
}
/**
*
*/
@RequiresPermissions("system:service:remove")
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public Result remove(@PathVariable Long[] ids)
{
return toAjax(addServiceService.deleteAddServiceByIds(ids));
}
}

View File

@ -0,0 +1,98 @@
package com.muyu.networking.controller;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.web.page.TableDataInfo;
import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.domain.Certification;
import com.muyu.networking.service.CertificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
* @author ruoyi
* @date 2024-05-25
*/
@RestController
@RequestMapping("/certification")
public class CertificationController extends BaseController
{
@Autowired
private CertificationService certificationService;
/**
*
*/
@RequiresPermissions("system:certification:list")
@GetMapping("/list")
public Result<TableDataInfo<Certification>> list(Certification certification)
{
startPage();
List<Certification> list = certificationService.selectCertificationList(certification);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:certification:export")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Certification certification)
{
List<Certification> list = certificationService.selectCertificationList(certification);
ExcelUtil<Certification> util = new ExcelUtil<Certification>(Certification.class);
util.exportExcel(response, list, "【请填写功能名称】数据");
}
/**
*
*/
@RequiresPermissions("system:certification:query")
@GetMapping(value = "/{id}")
public Result getInfo(@PathVariable("id") Long id)
{
return success(certificationService.selectCertificationById(id));
}
/**
*
*/
@RequiresPermissions("system:certification:add")
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
@PostMapping
public Result add(@RequestBody Certification certification)
{
return toAjax(certificationService.insertCertification(certification));
}
/**
*
*/
@RequiresPermissions("system:certification:edit")
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping
public Result edit(@RequestBody Certification certification)
{
return toAjax(certificationService.updateCertification(certification));
}
/**
*
*/
@RequiresPermissions("system:certification:remove")
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public Result remove(@PathVariable Long[] ids)
{
return toAjax(certificationService.deleteCertificationByIds(ids));
}
}

View File

@ -0,0 +1,100 @@
package com.muyu.networking.controller;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.web.page.TableDataInfo;
import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.domain.Enterprise;
import com.muyu.networking.service.EnterpriseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
* @author ruoyi
* @date 2024-05-25
*/
@RestController
@RequestMapping("/enterprise")
public class EnterpriseController extends BaseController
{
@Autowired
private EnterpriseService enterpriseService;
/**
*
*/
@RequiresPermissions("system:enterprise:list")
@GetMapping("/list")
public Result<TableDataInfo<Enterprise>> list(Enterprise enterprise)
{
startPage();
List<Enterprise> list = enterpriseService.selectEnterpriseList(enterprise);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:enterprise:export")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Enterprise enterprise)
{
List<Enterprise> list = enterpriseService.selectEnterpriseList(enterprise);
ExcelUtil<Enterprise> util = new ExcelUtil<Enterprise>(Enterprise.class);
util.exportExcel(response, list, "【请填写功能名称】数据");
}
/**
*
*/
@RequiresPermissions("system:enterprise:query")
@GetMapping(value = "/{id}")
public Result getInfo(@PathVariable("id") Long id)
{
return success(enterpriseService.selectEnterpriseById(id));
}
/**
*
*/
@RequiresPermissions("system:enterprise:add")
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
@PostMapping
public Result add(@RequestBody Enterprise enterprise)
{
return toAjax(enterpriseService.insertEnterprise(enterprise));
}
/**
*
*/
@RequiresPermissions("system:enterprise:edit")
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping
public Result edit(@RequestBody Enterprise enterprise)
{
return toAjax(enterpriseService.updateEnterprise(enterprise));
}
/**
*
*/
@RequiresPermissions("system:enterprise:remove")
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public Result remove(@PathVariable Long[] ids)
{
return toAjax(enterpriseService.deleteEnterpriseByIds(ids));
}
}

View File

@ -0,0 +1,98 @@
package com.muyu.networking.controller;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.web.page.TableDataInfo;
import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType;
import com.muyu.domain.Information;
import com.muyu.networking.service.IInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
* @author ruoyi
* @date 2024-05-27
*/
@RestController
@RequestMapping("/information")
public class InformationController extends BaseController
{
@Autowired
private IInformationService informationService;
/**
*
*/
@GetMapping("/list")
public Result<TableDataInfo<Information>> list(Information information)
{
startPage();
List<Information> list = informationService.selectInformationList(information);
return getDataTable(list);
}
/**
*
*/
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Information information)
{
List<Information> list = informationService.selectInformationList(information);
ExcelUtil<Information> util = new ExcelUtil<Information>(Information.class);
util.exportExcel(response, list, "【请填写功能名称】数据");
}
/**
*
*/
@GetMapping(value = "/{id}")
public Result getInfo(@PathVariable("id") Long id)
{
return success(informationService.selectInformationById(id));
}
/**
*
*/
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
@PostMapping
public Result add(@RequestBody Information information)
{
return toAjax(informationService.insertInformation(information));
}
/**
*
*/
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping
public Result edit(@RequestBody Information information)
{
return toAjax(informationService.updateInformation(information));
}
/**
*
*/
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public Result remove(@PathVariable Long[] ids)
{
return toAjax(informationService.deleteInformationByIds(ids));
}
}

View File

@ -0,0 +1,98 @@
package com.muyu.networking.controller;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.web.page.TableDataInfo;
import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.domain.ModeOfPayment;
import com.muyu.networking.service.ModeOfPaymentIdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
* @author ruoyi
* @date 2024-05-25
*/
@RestController
@RequestMapping("/id")
public class ModeOfPaymentIdController extends BaseController
{
@Autowired
private ModeOfPaymentIdService modeOfPaymentIdService;
/**
*
*/
@RequiresPermissions("system:id:list")
@GetMapping("/list")
public Result<TableDataInfo<ModeOfPayment>> list(ModeOfPayment modeOfPaymentId)
{
startPage();
List<ModeOfPayment> list = modeOfPaymentIdService.selectModeOfPaymentIdList(modeOfPaymentId);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:id:export")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, ModeOfPayment modeOfPaymentId)
{
List<ModeOfPayment> list = modeOfPaymentIdService.selectModeOfPaymentIdList(modeOfPaymentId);
ExcelUtil<ModeOfPayment> util = new ExcelUtil<ModeOfPayment>(ModeOfPayment.class);
util.exportExcel(response, list, "【请填写功能名称】数据");
}
/**
*
*/
@RequiresPermissions("system:id:query")
@GetMapping(value = "/{id}")
public Result getInfo(@PathVariable("id") Long id)
{
return success(modeOfPaymentIdService.selectModeOfPaymentIdById(id));
}
/**
*
*/
@RequiresPermissions("system:id:add")
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
@PostMapping
public Result add(@RequestBody ModeOfPayment modeOfPaymentId)
{
return toAjax(modeOfPaymentIdService.insertModeOfPaymentId(modeOfPaymentId));
}
/**
*
*/
@RequiresPermissions("system:id:edit")
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping
public Result edit(@RequestBody ModeOfPayment modeOfPaymentId)
{
return toAjax(modeOfPaymentIdService.updateModeOfPaymentId(modeOfPaymentId));
}
/**
*
*/
@RequiresPermissions("system:id:remove")
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public Result remove(@PathVariable Long[] ids)
{
return toAjax(modeOfPaymentIdService.deleteModeOfPaymentIdByIds(ids));
}
}

View File

@ -0,0 +1,98 @@
package com.muyu.networking.controller;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.web.page.TableDataInfo;
import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.domain.OpenServiceAdd;
import com.muyu.networking.service.OpenServiceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
* @author ruoyi
* @date 2024-05-25
*/
@RestController
@RequestMapping("/service")
public class OpenServiceController extends BaseController
{
@Autowired
private OpenServiceService openServiceService;
/**
*
*/
@RequiresPermissions("system:service:list")
@GetMapping("/list")
public Result<TableDataInfo<OpenServiceAdd>> list(OpenServiceAdd openService)
{
startPage();
List<OpenServiceAdd> list = openServiceService.selectOpenServiceList(openService);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:service:export")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, OpenServiceAdd openService)
{
List<OpenServiceAdd> list = openServiceService.selectOpenServiceList(openService);
ExcelUtil<OpenServiceAdd> util = new ExcelUtil<OpenServiceAdd>(OpenServiceAdd.class);
util.exportExcel(response, list, "【请填写功能名称】数据");
}
/**
*
*/
@RequiresPermissions("system:service:query")
@GetMapping(value = "/{id}")
public Result getInfo(@PathVariable("id") Long id)
{
return success(openServiceService.selectOpenServiceById(id));
}
/**
*
*/
@RequiresPermissions("system:service:add")
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
@PostMapping
public Result add(@RequestBody OpenServiceAdd openService)
{
return toAjax(openServiceService.insertOpenService(openService));
}
/**
*
*/
@RequiresPermissions("system:service:edit")
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping
public Result edit(@RequestBody OpenServiceAdd openService)
{
return toAjax(openServiceService.updateOpenService(openService));
}
/**
*
*/
@RequiresPermissions("system:service:remove")
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public Result remove(@PathVariable Long[] ids)
{
return toAjax(openServiceService.deleteOpenServiceByIds(ids));
}
}

View File

@ -0,0 +1,98 @@
package com.muyu.networking.controller;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.web.page.TableDataInfo;
import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.domain.PayOf;
import com.muyu.networking.service.PayOfService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
* @author ruoyi
* @date 2024-05-25
*/
@RestController
@RequestMapping("/for")
public class PayForController extends BaseController
{
@Autowired
private PayOfService payForService;
/**
*
*/
@RequiresPermissions("system:for:list")
@GetMapping("/list")
public Result<TableDataInfo<PayOf>> list(PayOf payFor)
{
startPage();
List<PayOf> list = payForService.selectPayOfList(payFor);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:for:export")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, PayOf payFor)
{
List<PayOf> list = payForService.selectPayOfList(payFor);
ExcelUtil<PayOf> util = new ExcelUtil<PayOf>(PayOf.class);
util.exportExcel(response, list, "【请填写功能名称】数据");
}
/**
*
*/
@RequiresPermissions("system:for:query")
@GetMapping(value = "/{id}")
public Result getInfo(@PathVariable("id") Long id)
{
return success(payForService.selectPayOfById(id));
}
/**
*
*/
@RequiresPermissions("system:for:add")
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
@PostMapping
public Result add(@RequestBody PayOf payFor)
{
return toAjax(payForService.insertPayOf(payFor));
}
/**
*
*/
@RequiresPermissions("system:for:edit")
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping
public Result edit(@RequestBody PayOf payFor)
{
return toAjax(payForService.updatePayOf(payFor));
}
/**
*
*/
@RequiresPermissions("system:for:remove")
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public Result remove(@PathVariable Long[] ids)
{
return toAjax(payForService.deletePayOfByIds(ids));
}
}

View File

@ -0,0 +1,99 @@
package com.muyu.networking.controller;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.web.page.TableDataInfo;
import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.domain.Type;
import com.muyu.networking.service.ITypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* Controller
*
* @author ruoyi
* @date 2024-05-27
*/
@RestController
@RequestMapping("/type")
public class TypeController extends BaseController
{
@Autowired
private ITypeService typeService;
/**
*
*/
@RequiresPermissions("system:type:list")
@GetMapping("/list")
public Result<TableDataInfo<Type>> list(Type type)
{
startPage();
List<Type> list = typeService.selectTypeList(type);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:type:export")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Type type)
{
List<Type> list = typeService.selectTypeList(type);
ExcelUtil<Type> util = new ExcelUtil<Type>(Type.class);
util.exportExcel(response, list, "【请填写功能名称】数据");
}
/**
*
*/
@RequiresPermissions("system:type:query")
@GetMapping(value = "/{id}")
public Result getInfo(@PathVariable("id") Long id)
{
return success(typeService.selectTypeById(id));
}
/**
*
*/
@RequiresPermissions("system:type:add")
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
@PostMapping
public Result add(@RequestBody Type type)
{
return toAjax(typeService.insertType(type));
}
/**
*
*/
@RequiresPermissions("system:type:edit")
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping
public Result edit(@RequestBody Type type)
{
return toAjax(typeService.updateType(type));
}
/**
*
*/
@RequiresPermissions("system:type:remove")
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public Result remove(@PathVariable Long[] ids)
{
return toAjax(typeService.deleteTypeByIds(ids));
}
}

View File

@ -0,0 +1,63 @@
package com.muyu.networking.mapper;
import com.muyu.domain.AddService;
import java.util.List;
/**
* Mapper
*
* @author ruoyi
* @date 2024-05-25
*/
public interface AddServiceMapper
{
/**
*
*
* @param id
* @return
*/
public AddService selectAddServiceById(Long id);
/**
*
*
* @param addService
* @return
*/
public List<AddService> selectAddServiceList(AddService addService);
/**
*
*
* @param addService
* @return
*/
public int insertAddService(AddService addService);
/**
*
*
* @param addService
* @return
*/
public int updateAddService(AddService addService);
/**
*
*
* @param id
* @return
*/
public int deleteAddServiceById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteAddServiceByIds(Long[] ids);
}

View File

@ -0,0 +1,63 @@
package com.muyu.networking.mapper;
import com.muyu.domain.Certification;
import java.util.List;
/**
* Mapper
*
* @author ruoyi
* @date 2024-05-25
*/
public interface CertificationMapper
{
/**
*
*
* @param id
* @return
*/
public Certification selectCertificationById(Long id);
/**
*
*
* @param certification
* @return
*/
public List<Certification> selectCertificationList(Certification certification);
/**
*
*
* @param certification
* @return
*/
public int insertCertification(Certification certification);
/**
*
*
* @param certification
* @return
*/
public int updateCertification(Certification certification);
/**
*
*
* @param id
* @return
*/
public int deleteCertificationById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteCertificationByIds(Long[] ids);
}

View File

@ -0,0 +1,70 @@
package com.muyu.networking.mapper;
import com.muyu.domain.Enterprise;
import java.util.List;
/**
* Mapper
*
* @author ruoyi
* @date 2024-05-25
*/
public interface EnterpriseMapper
{
/**
*
*
* @param id
* @return
*/
public Enterprise selectEnterpriseById(Long id);
/**
*
*
* @param enterprise
* @return
*/
public List<Enterprise> selectEnterpriseList(Enterprise enterprise);
/**
*
*
* @param enterprise
* @return
*/
public int insertEnterprise(Enterprise enterprise);
/**
*
*
* @param enterprise
* @return
*/
public int updateEnterprise(Enterprise enterprise);
/**
*
*
* @param id
* @return
*/
public int deleteEnterpriseById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteEnterpriseByIds(Long[] ids);
/**
*
* */
public int updateEnterpriseStatus(Long id,String openAdd);
}

View File

@ -0,0 +1,18 @@
package com.muyu.networking.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.domain.Fences;
import org.apache.ibatis.annotations.Mapper;
/**
* @ClassDescription:
* @JdkVersion: 17
* @Author: zhangxu
* @Created: 2024/5/31 16:21
*/
@Mapper
public interface FenceMapper extends BaseMapper<Fences> {
int addFeace(Fences fences);
}

View File

@ -0,0 +1,63 @@
package com.muyu.networking.mapper;
import com.muyu.domain.Information;
import java.util.List;
/**
* Mapper
*
* @author ruoyi
* @date 2024-05-27
*/
public interface InformationMapper
{
/**
*
*
* @param id
* @return
*/
public Information selectInformationById(Long id);
/**
*
*
* @param information
* @return
*/
public List<Information> selectInformationList(Information information);
/**
*
*
* @param information
* @return
*/
public int insertInformation(Information information);
/**
*
*
* @param information
* @return
*/
public int updateInformation(Information information);
/**
*
*
* @param id
* @return
*/
public int deleteInformationById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteInformationByIds(Long[] ids);
}

View File

@ -0,0 +1,63 @@
package com.muyu.networking.mapper;
import com.muyu.domain.ModeOfPayment;
import java.util.List;
/**
* Mapper
*
* @author ruoyi
* @date 2024-05-25
*/
public interface ModeOfPaymentIdMapper
{
/**
*
*
* @param id
* @return
*/
public ModeOfPayment selectModeOfPaymentIdById(Long id);
/**
*
*
* @param modeOfPaymentId
* @return
*/
public List<ModeOfPayment> selectModeOfPaymentIdList(ModeOfPayment modeOfPaymentId);
/**
*
*
* @param modeOfPaymentId
* @return
*/
public int insertModeOfPaymentId(ModeOfPayment modeOfPaymentId);
/**
*
*
* @param modeOfPaymentId
* @return
*/
public int updateModeOfPaymentId(ModeOfPayment modeOfPaymentId);
/**
*
*
* @param id
* @return
*/
public int deleteModeOfPaymentIdById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteModeOfPaymentIdByIds(Long[] ids);
}

View File

@ -0,0 +1,63 @@
package com.muyu.networking.mapper;
import com.muyu.domain.OpenServiceAdd;
import java.util.List;
/**
* Mapper
*
* @author ruoyi
* @date 2024-05-25
*/
public interface OpenServiceMapper
{
/**
*
*
* @param id
* @return
*/
public OpenServiceAdd selectOpenServiceById(Long id);
/**
*
*
* @param openService
* @return
*/
public List<OpenServiceAdd> selectOpenServiceList(OpenServiceAdd openService);
/**
*
*
* @param openService
* @return
*/
public int insertOpenService(OpenServiceAdd openService);
/**
*
*
* @param openService
* @return
*/
public int updateOpenService(OpenServiceAdd openService);
/**
*
*
* @param id
* @return
*/
public int deleteOpenServiceById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteOpenServiceByIds(Long[] ids);
}

View File

@ -0,0 +1,62 @@
package com.muyu.networking.mapper;
import com.muyu.domain.PayOf;
import java.util.List;
/**
* Mapper
*
* @author ruoyi
* @date 2024-05-25
*/
public interface PayOfMapper
{
/**
*
*
* @param id
* @return
*/
public PayOf selectPayOfById(Long id);
/**
*
*
* @param PayOf
* @return
*/
public List<PayOf> selectPayOfList(PayOf PayOf);
/**
*
*
* @param PayOf
* @return
*/
public int insertPayOf(PayOf PayOf);
/**
*
*
* @param PayOf
* @return
*/
public int updatePayOf(PayOf PayOf);
/**
*
*
* @param id
* @return
*/
public int deletePayOfById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deletePayOfByIds(Long[] ids);
}

View File

@ -0,0 +1,62 @@
package com.muyu.networking.mapper;
import com.muyu.domain.Type;
import java.util.List;
/**
* Mapper
*
* @author ruoyi
* @date 2024-05-27
*/
public interface TypeMapper
{
/**
*
*
* @param id
* @return
*/
public Type selectTypeById(Long id);
/**
*
*
* @param type
* @return
*/
public List<Type> selectTypeList(Type type);
/**
*
*
* @param type
* @return
*/
public int insertType(Type type);
/**
*
*
* @param type
* @return
*/
public int updateType(Type type);
/**
*
*
* @param id
* @return
*/
public int deleteTypeById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteTypeByIds(Long[] ids);
}

View File

@ -0,0 +1,21 @@
package com.muyu.networking.opFen;
import com.muyu.common.core.domain.Result;
import com.muyu.common.system.domain.SysUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* @ClassDescription:
* @JdkVersion: 17
* @Author: zhangxu
* @Created: 2024/5/27 15:11
*/
@FeignClient("muyu-system")
public interface SysUserNet {
@PostMapping("/system/user")
public Result add (@Validated @RequestBody SysUser user);
}

View File

@ -0,0 +1,63 @@
package com.muyu.networking.service;
import com.muyu.domain.AddService;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2024-05-25
*/
public interface AddServiceService
{
/**
*
*
* @param id
* @return
*/
public AddService selectAddServiceById(Long id);
/**
*
*
* @param addService
* @return
*/
public List<AddService> selectAddServiceList(AddService addService);
/**
*
*
* @param addService
* @return
*/
public int insertAddService(AddService addService);
/**
*
*
* @param addService
* @return
*/
public int updateAddService(AddService addService);
/**
*
*
* @param ids
* @return
*/
public int deleteAddServiceByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteAddServiceById(Long id);
}

View File

@ -0,0 +1,63 @@
package com.muyu.networking.service;
import com.muyu.domain.Certification;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2024-05-25
*/
public interface CertificationService
{
/**
*
*
* @param id
* @return
*/
public Certification selectCertificationById(Long id);
/**
*
*
* @param certification
* @return
*/
public List<Certification> selectCertificationList(Certification certification);
/**
*
*
* @param certification
* @return
*/
public int insertCertification(Certification certification);
/**
*
*
* @param certification
* @return
*/
public int updateCertification(Certification certification);
/**
*
*
* @param ids
* @return
*/
public int deleteCertificationByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteCertificationById(Long id);
}

View File

@ -0,0 +1,70 @@
package com.muyu.networking.service;
import com.muyu.domain.Enterprise;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2024-05-25
*/
public interface EnterpriseService
{
/**
*
*
* @param id
* @return
*/
public Enterprise selectEnterpriseById(Long id);
/**
*
*
* @param enterprise
* @return
*/
public List<Enterprise> selectEnterpriseList(Enterprise enterprise);
/**
*
*
* @param enterprise
* @return
*/
public int insertEnterprise(Enterprise enterprise);
/**
*
*
* @param enterprise
* @return
*/
public int updateEnterprise(Enterprise enterprise);
/**
*
*
* @param ids
* @return
*/
public int deleteEnterpriseByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteEnterpriseById(Long id);
/**
*
* **/
public int updateEnterpriseStatus(Long id,String openAdd);
}

View File

@ -0,0 +1,16 @@
package com.muyu.networking.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.muyu.domain.Fences;
/**
* @ClassDescription:
* @JdkVersion: 17
* @Author: zhangxu
* @Created: 2024/5/31 16:22
*/
public interface FenceService extends IService<Fences> {
int insertFence(Fences fences);
}

View File

@ -0,0 +1,64 @@
package com.muyu.networking.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.muyu.domain.Information;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2024-05-27
*/
public interface IInformationService extends IService<Information>
{
/**
*
*
* @param id
* @return
*/
public Information selectInformationById(Long id);
/**
*
*
* @param information
* @return
*/
public List<Information> selectInformationList(Information information);
/**
*
*
* @param information
* @return
*/
public int insertInformation(Information information);
/**
*
*
* @param information
* @return
*/
public int updateInformation(Information information);
/**
*
*
* @param ids
* @return
*/
public int deleteInformationByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteInformationById(Long id);
}

View File

@ -0,0 +1,63 @@
package com.muyu.networking.service;
import com.muyu.domain.Type;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2024-05-27
*/
public interface ITypeService
{
/**
*
*
* @param id
* @return
*/
public Type selectTypeById(Long id);
/**
*
*
* @param type
* @return
*/
public List<Type> selectTypeList(Type type);
/**
*
*
* @param type
* @return
*/
public int insertType(Type type);
/**
*
*
* @param type
* @return
*/
public int updateType(Type type);
/**
*
*
* @param ids
* @return
*/
public int deleteTypeByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteTypeById(Long id);
}

View File

@ -0,0 +1,63 @@
package com.muyu.networking.service;
import com.muyu.domain.ModeOfPayment;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2024-05-25
*/
public interface ModeOfPaymentIdService
{
/**
*
*
* @param id
* @return
*/
public ModeOfPayment selectModeOfPaymentIdById(Long id);
/**
*
*
* @param modeOfPaymentId
* @return
*/
public List<ModeOfPayment> selectModeOfPaymentIdList(ModeOfPayment modeOfPaymentId);
/**
*
*
* @param modeOfPaymentId
* @return
*/
public int insertModeOfPaymentId(ModeOfPayment modeOfPaymentId);
/**
*
*
* @param modeOfPaymentId
* @return
*/
public int updateModeOfPaymentId(ModeOfPayment modeOfPaymentId);
/**
*
*
* @param ids
* @return
*/
public int deleteModeOfPaymentIdByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteModeOfPaymentIdById(Long id);
}

View File

@ -0,0 +1,63 @@
package com.muyu.networking.service;
import com.muyu.domain.OpenServiceAdd;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2024-05-25
*/
public interface OpenServiceService
{
/**
*
*
* @param id
* @return
*/
public OpenServiceAdd selectOpenServiceById(Long id);
/**
*
*
* @param openService
* @return
*/
public List<OpenServiceAdd> selectOpenServiceList(OpenServiceAdd openService);
/**
*
*
* @param openService
* @return
*/
public int insertOpenService(OpenServiceAdd openService);
/**
*
*
* @param openService
* @return
*/
public int updateOpenService(OpenServiceAdd openService);
/**
*
*
* @param ids
* @return
*/
public int deleteOpenServiceByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteOpenServiceById(Long id);
}

View File

@ -0,0 +1,63 @@
package com.muyu.networking.service;
import com.muyu.domain.PayOf;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2024-05-25
*/
public interface PayOfService
{
/**
*
*
* @param id
* @return
*/
public PayOf selectPayOfById(Long id);
/**
*
*
* @param PayOf
* @return
*/
public List<PayOf> selectPayOfList(PayOf PayOf);
/**
*
*
* @param PayOf
* @return
*/
public int insertPayOf(PayOf PayOf);
/**
*
*
* @param PayOf
* @return
*/
public int updatePayOf(PayOf PayOf);
/**
*
*
* @param ids
* @return
*/
public int deletePayOfByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deletePayOfById(Long id);
}

View File

@ -0,0 +1,97 @@
package com.muyu.networking.service.impl;
import com.muyu.common.core.utils.DateUtils;
import com.muyu.domain.AddService;
import com.muyu.networking.mapper.AddServiceMapper;
import com.muyu.networking.service.AddServiceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2024-05-25
*/
@Service
public class AddServiceServiceImpl implements AddServiceService
{
@Autowired
private AddServiceMapper addServiceMapper;
/**
*
*
* @param id
* @return
*/
@Override
public AddService selectAddServiceById(Long id)
{
return addServiceMapper.selectAddServiceById(id);
}
/**
*
*
* @param addService
* @return
*/
@Override
public List<AddService> selectAddServiceList(AddService addService)
{
return addServiceMapper.selectAddServiceList(addService);
}
/**
*
*
* @param addService
* @return
*/
@Override
public int insertAddService(AddService addService)
{
addService.setCreateTime(DateUtils.getNowDate());
return addServiceMapper.insertAddService(addService);
}
/**
*
*
* @param addService
* @return
*/
@Override
public int updateAddService(AddService addService)
{
addService.setUpdateTime(DateUtils.getNowDate());
return addServiceMapper.updateAddService(addService);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteAddServiceByIds(Long[] ids)
{
return addServiceMapper.deleteAddServiceByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteAddServiceById(Long id)
{
return addServiceMapper.deleteAddServiceById(id);
}
}

View File

@ -0,0 +1,99 @@
package com.muyu.networking.service.impl;
import com.muyu.common.core.utils.DateUtils;
import com.muyu.domain.Certification;
import com.muyu.networking.mapper.CertificationMapper;
import com.muyu.networking.service.CertificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2024-05-25
*/
@Service
public class CertificationServiceImpl implements CertificationService
{
@Autowired
private CertificationMapper certificationMapper;
/**
*
*
* @param id
* @return
*/
@Override
public Certification selectCertificationById(Long id)
{
return certificationMapper.selectCertificationById(id);
}
/**
*
*
* @param certification
* @return
*/
@Override
public List<Certification> selectCertificationList(Certification certification)
{
return certificationMapper.selectCertificationList(certification);
}
/**
*
*
* @param certification
* @return
*/
@Override
public int insertCertification(Certification certification)
{
certification.setCreateTime(DateUtils.getNowDate());
return certificationMapper.insertCertification(certification);
}
/**
*
*
* @param certification
* @return
*/
@Override
public int updateCertification(Certification certification)
{
certification.setUpdateTime(DateUtils.getNowDate());
return certificationMapper.updateCertification(certification);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteCertificationByIds(Long[] ids)
{
return certificationMapper.deleteCertificationByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteCertificationById(Long id)
{
return certificationMapper.deleteCertificationById(id);
}
}

View File

@ -0,0 +1,247 @@
package com.muyu.networking.service.impl;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.DateUtils;
import com.muyu.common.security.utils.SecurityUtils;
import com.muyu.common.system.domain.SysUser;
import com.muyu.common.system.remote.RemoteUserService;
import com.muyu.domain.Enterprise;
import com.muyu.networking.mapper.EnterpriseMapper;
import com.muyu.networking.service.EnterpriseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.UUID;
/**
* Service
*
* @author ruoyi
* @date 2024-05-25
*/
@Service
public class EnterpriseServiceImpl implements EnterpriseService
{
@Autowired
private EnterpriseMapper enterpriseMapper;
/**
*
*
* @param id
* @return
*/
@Override
public Enterprise selectEnterpriseById(Long id)
{
return enterpriseMapper.selectEnterpriseById(id);
}
/**
*
*
* @param enterprise
* @return
*/
@Override
public List<Enterprise> selectEnterpriseList(Enterprise enterprise)
{
return enterpriseMapper.selectEnterpriseList(enterprise);
}
@Autowired
private RemoteUserService remoteUserService;
/**
*
*
* @param enterprise
* @return
*/
@Override
public int insertEnterprise(Enterprise enterprise)
{
enterprise.setCreateBy(SecurityUtils.getUsername());
enterprise.setCreateTime(DateUtils.getNowDate());
enterprise.setBusinessLicenseNumber(UUID.randomUUID().toString().replaceAll("-",""));
enterprise.setStatus("1");
enterprise.setCertification("1");
enterprise.setOpenAdd("0");
SysUser sysUser = SysUser.builder().userName(enterprise.getEnterpriseName())
.password("admin")
.nickName(enterprise.getEnterpriseName()).
userType(String.valueOf(enterprise.getId()))
.build();
Result add = remoteUserService.add(sysUser);
return enterpriseMapper.insertEnterprise(enterprise);
}
/**
*
*
* @param enterprise
* @return
*/
@Override
public int updateEnterprise(Enterprise enterprise)
{
enterprise.setUpdateTime(DateUtils.getNowDate());
return enterpriseMapper.updateEnterprise(enterprise);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteEnterpriseByIds(Long[] ids)
{
return enterpriseMapper.deleteEnterpriseByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteEnterpriseById(Long id)
{
return enterpriseMapper.deleteEnterpriseById(id);
}
@Override
public int updateEnterpriseStatus(Long id, String openAdd) {
if (enterpriseMapper.updateEnterpriseStatus(id, openAdd) > 0) {
return 1;
}
return 0;
}
//public void DockerMySQLExample() throws IOException {
// //配置docker 客户端配置
// DefaultDockerClientConfig.createDefaultConfigBuilder()
// .withDockerHost("tcp://115.159.67.205:3306") // 使用Docker守护进程地址
// .build();
// DockerClient dockerClient = DockerClientBuilder.getInstance().build();
//
// try {
// CreateContainerCmd createContainerCmd = dockerClient.createContainerCmd("mysql:latest")
// .withName("my-mysql-container")
// .withEnv("MYSQL_ROOT_PASSWORD=my-secret-pw");
// CreateContainerResponse container = createContainerCmd.exec();
// System.out.println("Created container " + container.getId());
// dockerClient.startContainerCmd(container.getId()).exec();
// InspectContainerResponse inspectContainerResponse = dockerClient.inspectContainerCmd(container.getId()).exec();
// System.out.println("Started container " + container.getId());
// System.out.println("Container started, inspecting logs:");
// InputStream logs = dockerClient.logContainerCmd(container.getId())
// .withStdErr(true)
// .withStdOut(true)
// .withFollowStream(true)
// .exec();
// try (BufferedReader reader = new BufferedReader(new InputStreamReader(logs))) {
// String line;
// while ((line = reader.readLine()) != null) {
// System.out.println(line);
// }
// }
// ExecCreateCmdResponse execCreateCmdResponse = dockerClient.execCreateCmd(container.getId())
// .withCmd("mysql", "-u", "root", "-p", "my-secret-pw", "my_database")
// .exec();
// }
// catch (Exception e) {
// e.printStackTrace();
// }
// dockerClient.close();
//}
// public void DockerMySQLExample() throws IOException {
// // 配置Docker客户端
// DefaultDockerClientConfig config = DefaultDockerClientConfig.createDefaultConfigBuilder()
// .withDockerHost("tcp://115.159.67.205:3306") // 使用Docker守护进程地址
// .build();
// DockerClient dockerClient = DockerClientBuilder.getInstance(config).build();
//
// try {
// // 创建新的MySQL容器
// CreateContainerCmd createContainerCmd = dockerClient.createContainerCmd("mysql:latest")
// .withName("my-mysql-container")
// .withEnv("MYSQL_ROOT_PASSWORD=my-secret-pw");
//
// CreateContainerResponse container = createContainerCmd.exec();
// System.out.println("Created container " + container.getId());
//
// // 启动MySQL容器
// dockerClient.startContainerCmd(container.getId()).exec();
//
// // 执行初始化脚本
// String initScript = "CREATE DATABASE IF NOT EXISTS mydb;\n" +
// "GRANT ALL PRIVILEGES ON mydb.* TO 'myuser' IDENTIFIED BY 'mypass';";
//
// // 获取容器的进程信息
// InspectContainerResponse inspectContainerResponse = dockerClient.inspectContainerCmd(container.getId()).exec();
// String containerId = inspectContainerResponse.getId();
//
// // 将初始化脚本通过stdin传递给MySQL
// String execId = dockerClient.execCreateCmd(containerId, "/bin/bash", "-c", "mysql -u root -p$MYSQL_ROOT_PASSWORD")
// .withAttachStdout(true)
// .withAttachStdin(true)
// .exec()
// .getId();
//
// try (ExecStartResultCallback callback = new ExecStartResultCallback()) {
//
// InputStream execStream = dockerClient.execStartCmd(execId).withDetach(false)
// .withTty(false)
// .withCmd(initScript)
// .exec()
// .getExecResult()
// .getStdout();
//
// // 读取并打印脚本执行结果
// BufferedReader reader = new BufferedReader(new InputStreamReader(execStream));
// String line;
// while ((line = reader.readLine()) != null) {
// System.out.println(line);
// }
// }
// } catch (Exception e) {
// e.printStackTrace();
// } finally {
// // 清理资源,移除容器
// dockerClient.close();
// }
// }
}

View File

@ -0,0 +1,21 @@
package com.muyu.networking.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.muyu.domain.Fences;
import com.muyu.networking.mapper.FenceMapper;
import com.muyu.networking.service.FenceService;
/**
* @ClassDescription:
* @JdkVersion: 17
* @Author: zhangxu
* @Created: 2024/5/31 16:23
*/
public class FenceServiceImpl extends ServiceImpl<FenceMapper, Fences> implements FenceService {
@Override
public int insertFence(Fences fences) {
return 0;
}
}

View File

@ -0,0 +1,100 @@
package com.muyu.networking.service.impl;
import com.muyu.common.core.utils.DateUtils;
import com.muyu.domain.Information;
import com.muyu.networking.mapper.InformationMapper;
import com.muyu.networking.service.IInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2024-05-27
*/
@Service
public class InformationServiceImpl implements IInformationService
{
@Autowired
private InformationMapper informationMapper;
/**
*
*
* @param id
* @return
*/
@Override
public Information selectInformationById(Long id)
{
return informationMapper.selectInformationById(id);
}
/**
*
*
* @param information
* @return
*/
@Override
public List<Information> selectInformationList(Information information)
{
return informationMapper.selectInformationList(information);
}
/**
*
*
* @param information
* @return
*/
@Override
public int insertInformation(Information information)
{
information.setCreateTime(DateUtils.getNowDate());
return informationMapper.insertInformation(information);
}
/**
*
*
* @param information
* @return
*/
@Override
public int updateInformation(Information information)
{
information.setUpdateTime(DateUtils.getNowDate());
return informationMapper.updateInformation(information);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteInformationByIds(Long[] ids)
{
return informationMapper.deleteInformationByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteInformationById(Long id)
{
return informationMapper.deleteInformationById(id);
}
}

View File

@ -0,0 +1,99 @@
package com.muyu.networking.service.impl;
import com.muyu.common.core.utils.DateUtils;
import com.muyu.domain.ModeOfPayment;
import com.muyu.networking.mapper.ModeOfPaymentIdMapper;
import com.muyu.networking.service.ModeOfPaymentIdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2024-05-25
*/
@Service
public class ModeOfPaymentIdServiceImpl implements ModeOfPaymentIdService
{
@Autowired
private ModeOfPaymentIdMapper modeOfPaymentIdMapper;
/**
*
*
* @param id
* @return
*/
@Override
public ModeOfPayment selectModeOfPaymentIdById(Long id)
{
return modeOfPaymentIdMapper.selectModeOfPaymentIdById(id);
}
/**
*
*
* @param modeOfPaymentId
* @return
*/
@Override
public List<ModeOfPayment> selectModeOfPaymentIdList(ModeOfPayment modeOfPaymentId)
{
return modeOfPaymentIdMapper.selectModeOfPaymentIdList(modeOfPaymentId);
}
/**
*
*
* @param modeOfPaymentId
* @return
*/
@Override
public int insertModeOfPaymentId(ModeOfPayment modeOfPaymentId)
{
modeOfPaymentId.setCreateTime(DateUtils.getNowDate());
return modeOfPaymentIdMapper.insertModeOfPaymentId(modeOfPaymentId);
}
/**
*
*
* @param modeOfPaymentId
* @return
*/
@Override
public int updateModeOfPaymentId(ModeOfPayment modeOfPaymentId)
{
modeOfPaymentId.setUpdateTime(DateUtils.getNowDate());
return modeOfPaymentIdMapper.updateModeOfPaymentId(modeOfPaymentId);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteModeOfPaymentIdByIds(Long[] ids)
{
return modeOfPaymentIdMapper.deleteModeOfPaymentIdByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteModeOfPaymentIdById(Long id)
{
return modeOfPaymentIdMapper.deleteModeOfPaymentIdById(id);
}
}

View File

@ -0,0 +1,98 @@
package com.muyu.networking.service.impl;
import com.muyu.common.core.utils.DateUtils;
import com.muyu.domain.OpenServiceAdd;
import com.muyu.networking.mapper.OpenServiceMapper;
import com.muyu.networking.service.OpenServiceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2024-05-25
*/
@Service
public class OpenServiceServiceImpl implements OpenServiceService
{
@Autowired
private OpenServiceMapper openServiceMapper;
/**
*
*
* @param id
* @return
*/
@Override
public OpenServiceAdd selectOpenServiceById(Long id)
{
return openServiceMapper.selectOpenServiceById(id);
}
/**
*
*
* @param openService
* @return
*/
@Override
public List<OpenServiceAdd> selectOpenServiceList(OpenServiceAdd openService)
{
return openServiceMapper.selectOpenServiceList(openService);
}
/**
*
*
* @param openService
* @return
*/
@Override
public int insertOpenService(OpenServiceAdd openService)
{
openService.setCreateTime(DateUtils.getNowDate());
return openServiceMapper.insertOpenService(openService);
}
/**
*
*
* @param openService
* @return
*/
@Override
public int updateOpenService(OpenServiceAdd openService)
{
openService.setUpdateTime(DateUtils.getNowDate());
return openServiceMapper.updateOpenService(openService);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteOpenServiceByIds(Long[] ids)
{
return openServiceMapper.deleteOpenServiceByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteOpenServiceById(Long id)
{
return openServiceMapper.deleteOpenServiceById(id);
}
}

View File

@ -0,0 +1,98 @@
package com.muyu.networking.service.impl;
import com.muyu.common.core.utils.DateUtils;
import com.muyu.domain.PayOf;
import com.muyu.networking.mapper.PayOfMapper;
import com.muyu.networking.service.PayOfService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2024-05-25
*/
@Service
public class PayOfServiceImpl implements PayOfService
{
@Autowired
private PayOfMapper payOfMapper;
/**
*
*
* @param id
* @return
*/
@Override
public PayOf selectPayOfById(Long id)
{
return payOfMapper.selectPayOfById(id);
}
/**
*
*
* @param PayOf
* @return
*/
@Override
public List<PayOf> selectPayOfList(PayOf PayOf)
{
return payOfMapper.selectPayOfList(PayOf);
}
/**
*
*
* @param PayOf
* @return
*/
@Override
public int insertPayOf(PayOf PayOf)
{
PayOf.setCreateTime(DateUtils.getNowDate());
return payOfMapper.insertPayOf(PayOf);
}
/**
*
*
* @param PayOf
* @return
*/
@Override
public int updatePayOf(PayOf PayOf)
{
PayOf.setUpdateTime(DateUtils.getNowDate());
return payOfMapper.updatePayOf(PayOf);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deletePayOfByIds(Long[] ids)
{
return payOfMapper.deletePayOfByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deletePayOfById(Long id)
{
return payOfMapper.deletePayOfById(id);
}
}

View File

@ -0,0 +1,99 @@
package com.muyu.networking.service.impl;
import com.muyu.common.core.utils.DateUtils;
import com.muyu.domain.Type;
import com.muyu.networking.mapper.TypeMapper;
import com.muyu.networking.service.ITypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2024-05-27
*/
@Service
public class TypeServiceImpl implements ITypeService
{
@Autowired
private TypeMapper typeMapper;
/**
*
*
* @param id
* @return
*/
@Override
public Type selectTypeById(Long id)
{
return typeMapper.selectTypeById(id);
}
/**
*
*
* @param type
* @return
*/
@Override
public List<Type> selectTypeList(Type type)
{
return typeMapper.selectTypeList(type);
}
/**
*
*
* @param type
* @return
*/
@Override
public int insertType(Type type)
{
type.setCreateTime(DateUtils.getNowDate());
return typeMapper.insertType(type);
}
/**
*
*
* @param type
* @return
*/
@Override
public int updateType(Type type)
{
type.setUpdateTime(DateUtils.getNowDate());
return typeMapper.updateType(type);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteTypeByIds(Long[] ids)
{
return typeMapper.deleteTypeByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteTypeById(Long id)
{
return typeMapper.deleteTypeById(id);
}
}

View File

@ -0,0 +1,76 @@
<?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.muyu.networking.mapper.AddServiceMapper">
<resultMap type="com.muyu.domain.AddService" id="AddServiceResult">
<result property="id" column="id" />
<result property="addValue" column="add_value" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
</resultMap>
<sql id="selectAddServiceVo">
select id, add_value, remark, create_by, create_time, update_time, update_by from add_service
</sql>
<select id="selectAddServiceList" parameterType="com.muyu.domain.AddService" resultMap="AddServiceResult">
<include refid="selectAddServiceVo"/>
<where>
<if test="addValue != null and addValue != ''"> and add_value = #{addValue}</if>
</where>
</select>
<select id="selectAddServiceById" parameterType="Long" resultMap="AddServiceResult">
<include refid="selectAddServiceVo"/>
where id = #{id}
</select>
<insert id="insertAddService" parameterType="com.muyu.domain.AddService" useGeneratedKeys="true" keyProperty="id">
insert into add_service
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="addValue != null">add_value,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="addValue != null">#{addValue},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
</trim>
</insert>
<update id="updateAddService" parameterType="com.muyu.domain.AddService">
update add_service
<trim prefix="SET" suffixOverrides=",">
<if test="addValue != null">add_value = #{addValue},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAddServiceById" parameterType="Long">
delete from add_service where id = #{id}
</delete>
<delete id="deleteAddServiceByIds" parameterType="String">
delete from add_service where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,86 @@
<?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.muyu.networking.mapper.CertificationMapper">
<resultMap type="com.muyu.domain.Certification" id="CertificationResult">
<result property="id" column="id" />
<result property="auditor" column="auditor" />
<result property="stat" column="stat" />
<result property="auditReason" column="audit_reason" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectCertificationVo">
select id, auditor, stat, audit_reason, remark, create_by, create_time, update_by, update_time from certification
</sql>
<select id="selectCertificationList" parameterType="com.muyu.domain.Certification" resultMap="CertificationResult">
<include refid="selectCertificationVo"/>
<where>
<if test="auditor != null and auditor != ''"> and auditor = #{auditor}</if>
<if test="stat != null and stat != ''"> and stat = #{stat}</if>
<if test="auditReason != null and auditReason != ''"> and audit_reason = #{auditReason}</if>
</where>
</select>
<select id="selectCertificationById" parameterType="Long" resultMap="CertificationResult">
<include refid="selectCertificationVo"/>
where id = #{id}
</select>
<insert id="insertCertification" parameterType="com.muyu.domain.Certification" useGeneratedKeys="true" keyProperty="id">
insert into certification
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="auditor != null">auditor,</if>
<if test="stat != null">stat,</if>
<if test="auditReason != null">audit_reason,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="auditor != null">#{auditor},</if>
<if test="stat != null">#{stat},</if>
<if test="auditReason != null">#{auditReason},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateCertification" parameterType="com.muyu.domain.Certification">
update certification
<trim prefix="SET" suffixOverrides=",">
<if test="auditor != null">auditor = #{auditor},</if>
<if test="stat != null">stat = #{stat},</if>
<if test="auditReason != null">audit_reason = #{auditReason},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteCertificationById" parameterType="Long">
delete from certification where id = #{id}
</delete>
<delete id="deleteCertificationByIds" parameterType="String">
delete from certification where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,134 @@
<?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.muyu.networking.mapper.EnterpriseMapper">
<resultMap type="com.muyu.domain.Enterprise" id="EnterpriseResult">
<result property="id" column="id" />
<result property="enterpriseName" column="enterprise_name" />
<result property="legalPerson" column="legal_person" />
<result property="businessLicenseNumber" column="business_license_number" />
<result property="openAdd" column="open_add" />
<result property="establishmentDate" column="establishment_date" />
<result property="businessScope" column="business_scope" />
<result property="address" column="address" />
<result property="contactPhone" column="contact_phone" />
<result property="email" column="email" />
<result property="status" column="status" />
<result property="registrationDate" column="registration_date" />
<result property="certification" column="certification" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
</resultMap>
<sql id="selectEnterpriseVo">
select id, enterprise_name,open_add, legal_person, business_license_number, establishment_date, business_scope, address, contact_phone, email, status, registration_date, certification, remark, create_by, create_time, update_time, update_by from enterprise
</sql>
<select id="selectEnterpriseList" parameterType="com.muyu.domain.Enterprise" resultMap="EnterpriseResult">
<include refid="selectEnterpriseVo"/>
<where>
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="legalPerson != null and legalPerson != ''"> and legal_person = #{legalPerson}</if>
<if test="businessLicenseNumber != null and businessLicenseNumber != ''"> and business_license_number = #{businessLicenseNumber}</if>
<if test="establishmentDate != null "> and establishment_date = #{establishmentDate}</if>
<if test="businessScope != null and businessScope != ''"> and business_scope = #{businessScope}</if>
<if test="address != null and address != ''"> and address = #{address}</if>
<if test="contactPhone != null and contactPhone != ''"> and contact_phone = #{contactPhone}</if>
<if test="email != null and email != ''"> and email = #{email}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="registrationDate != null "> and registration_date = #{registrationDate}</if>
<if test="certification != null "> and certification = #{certification}</if>
<if test="openAdd != null "> and open_add = #{openAdd}</if>
</where>
</select>
<select id="selectEnterpriseById" parameterType="Long" resultMap="EnterpriseResult">
<include refid="selectEnterpriseVo"/>
where id = #{id}
</select>
<insert id="insertEnterprise" parameterType="com.muyu.domain.Enterprise" useGeneratedKeys="true" keyProperty="id">
insert into enterprise
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseName != null">enterprise_name,</if>
<if test="legalPerson != null">legal_person,</if>
<if test="businessLicenseNumber != null">business_license_number,</if>
<if test="establishmentDate != null">establishment_date,</if>
<if test="businessScope != null">business_scope,</if>
<if test="address != null">address,</if>
<if test="contactPhone != null">contact_phone,</if>
<if test="email != null">email,</if>
<if test="status != null">status,</if>
<if test="registrationDate != null">registration_date,</if>
<if test="certification != null">certification,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="openAdd != null">open_add,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseName != null">#{enterpriseName},</if>
<if test="legalPerson != null">#{legalPerson},</if>
<if test="businessLicenseNumber != null">#{businessLicenseNumber},</if>
<if test="establishmentDate != null">#{establishmentDate},</if>
<if test="businessScope != null">#{businessScope},</if>
<if test="address != null">#{address},</if>
<if test="contactPhone != null">#{contactPhone},</if>
<if test="email != null">#{email},</if>
<if test="status != null">#{status},</if>
<if test="registrationDate != null">#{registrationDate},</if>
<if test="certification != null">#{certification},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="openAdd != null">#{openAdd},</if>
</trim>
</insert>
<update id="updateEnterprise" parameterType="com.muyu.domain.Enterprise">
update enterprise
<trim prefix="SET" suffixOverrides=",">
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
<if test="legalPerson != null">legal_person = #{legalPerson},</if>
<if test="businessLicenseNumber != null">business_license_number = #{businessLicenseNumber},</if>
<if test="establishmentDate != null">establishment_date = #{establishmentDate},</if>
<if test="businessScope != null">business_scope = #{businessScope},</if>
<if test="address != null">address = #{address},</if>
<if test="contactPhone != null">contact_phone = #{contactPhone},</if>
<if test="email != null">email = #{email},</if>
<if test="status != null">status = #{status},</if>
<if test="registrationDate != null">registration_date = #{registrationDate},</if>
<if test="certification != null">certification = #{certification},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="openAdd != null">open_add = #{openAdd},</if>
</trim>
where id = #{id}
</update>
<update id="updateEnterpriseStatus">
update enterprise set open_add = #{openAdd} where id = #{id}
</update>
<delete id="deleteEnterpriseById" parameterType="Long">
delete from enterprise where id = #{id}
</delete>
<delete id="deleteEnterpriseByIds" parameterType="String">
delete from enterprise where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,107 @@
<?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.muyu.networking.mapper.InformationMapper">
<resultMap type="com.muyu.domain.Information" id="InformationResult">
<result property="id" column="id" />
<result property="number" column="number" />
<result property="typeId" column="type_id" />
<result property="electronicId" column="electronic_id" />
<result property="motor" column="motor" />
<result property="battery" column="battery" />
<result property="motorNumber" column="motor_number" />
<result property="batteryNumber" column="battery_number" />
<result property="enterpriseId" column="enterprise_id" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectInformationVo">
select id, number, type_id, electronic_id, motor, battery, motor_number, battery_number, enterprise_id, remark, create_by, create_time, update_time from information
</sql>
<select id="selectInformationList" parameterType="com.muyu.domain.Information" resultMap="InformationResult">
<include refid="selectInformationVo"/>
<where>
<if test="number != null and number != ''"> and number = #{number}</if>
<if test="typeId != null "> and type_id = #{typeId}</if>
<if test="electronicId != null "> and electronic_id = #{electronicId}</if>
<if test="motor != null and motor != ''"> and motor = #{motor}</if>
<if test="battery != null and battery != ''"> and battery = #{battery}</if>
<if test="motorNumber != null and motorNumber != ''"> and motor_number = #{motorNumber}</if>
<if test="batteryNumber != null and batteryNumber != ''"> and battery_number = #{batteryNumber}</if>
<if test="enterpriseId != null "> and enterprise_id = #{enterpriseId}</if>
</where>
</select>
<select id="selectInformationById" parameterType="Long" resultMap="InformationResult">
<include refid="selectInformationVo"/>
where id = #{id}
</select>
<insert id="insertInformation" parameterType="com.muyu.domain.Information" useGeneratedKeys="true" keyProperty="id">
insert into information
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="number != null">number,</if>
<if test="typeId != null">type_id,</if>
<if test="electronicId != null">electronic_id,</if>
<if test="motor != null">motor,</if>
<if test="battery != null">battery,</if>
<if test="motorNumber != null">motor_number,</if>
<if test="batteryNumber != null">battery_number,</if>
<if test="enterpriseId != null">enterprise_id,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="number != null">#{number},</if>
<if test="typeId != null">#{typeId},</if>
<if test="electronicId != null">#{electronicId},</if>
<if test="motor != null">#{motor},</if>
<if test="battery != null">#{battery},</if>
<if test="motorNumber != null">#{motorNumber},</if>
<if test="batteryNumber != null">#{batteryNumber},</if>
<if test="enterpriseId != null">#{enterpriseId},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateInformation" parameterType="com.muyu.domain.Information">
update information
<trim prefix="SET" suffixOverrides=",">
<if test="number != null">number = #{number},</if>
<if test="typeId != null">type_id = #{typeId},</if>
<if test="electronicId != null">electronic_id = #{electronicId},</if>
<if test="motor != null">motor = #{motor},</if>
<if test="battery != null">battery = #{battery},</if>
<if test="motorNumber != null">motor_number = #{motorNumber},</if>
<if test="batteryNumber != null">battery_number = #{batteryNumber},</if>
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteInformationById" parameterType="Long">
delete from information where id = #{id}
</delete>
<delete id="deleteInformationByIds" parameterType="String">
delete from information where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,76 @@
<?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.muyu.networking.mapper.ModeOfPaymentIdMapper">
<resultMap type="com.muyu.domain.ModeOfPayment" id="ModeOfPaymentIdResult">
<result property="id" column="id" />
<result property="payment" column="payment" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
</resultMap>
<sql id="selectModeOfPaymentIdVo">
select id, payment, remark, create_by, create_time, update_time, update_by from mode_of_payment_id
</sql>
<select id="selectModeOfPaymentIdList" parameterType="com.muyu.domain.ModeOfPayment" resultMap="ModeOfPaymentIdResult">
<include refid="selectModeOfPaymentIdVo"/>
<where>
<if test="payment != null and payment != ''"> and payment = #{payment}</if>
</where>
</select>
<select id="selectModeOfPaymentIdById" parameterType="Long" resultMap="ModeOfPaymentIdResult">
<include refid="selectModeOfPaymentIdVo"/>
where id = #{id}
</select>
<insert id="insertModeOfPaymentId" parameterType="com.muyu.domain.ModeOfPayment" useGeneratedKeys="true" keyProperty="id">
insert into mode_of_payment_id
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="payment != null">payment,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="payment != null">#{payment},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
</trim>
</insert>
<update id="updateModeOfPaymentId" parameterType="com.muyu.domain.ModeOfPayment">
update mode_of_payment_id
<trim prefix="SET" suffixOverrides=",">
<if test="payment != null">payment = #{payment},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteModeOfPaymentIdById" parameterType="Long">
delete from mode_of_payment_id where id = #{id}
</delete>
<delete id="deleteModeOfPaymentIdByIds" parameterType="String">
delete from mode_of_payment_id where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,76 @@
<?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.muyu.networking.mapper.OpenServiceMapper">
<resultMap type="com.muyu.domain.OpenServiceAdd" id="OpenServiceResult">
<result property="id" column="id" />
<result property="activateTheService" column="activate_the_service" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
</resultMap>
<sql id="selectOpenServiceVo">
select id, activate_the_service, remark, create_by, create_time, update_time, update_by from open_service
</sql>
<select id="selectOpenServiceList" parameterType="com.muyu.domain.OpenServiceAdd" resultMap="OpenServiceResult">
<include refid="selectOpenServiceVo"/>
<where>
<if test="activateTheService != null and activateTheService != ''"> and activate_the_service = #{activateTheService}</if>
</where>
</select>
<select id="selectOpenServiceById" parameterType="Long" resultMap="OpenServiceResult">
<include refid="selectOpenServiceVo"/>
where id = #{id}
</select>
<insert id="insertOpenService" parameterType="com.muyu.domain.OpenServiceAdd" useGeneratedKeys="true" keyProperty="id">
insert into open_service
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="activateTheService != null">activate_the_service,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="activateTheService != null">#{activateTheService},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
</trim>
</insert>
<update id="updateOpenService" parameterType="com.muyu.domain.OpenServiceAdd">
update open_service
<trim prefix="SET" suffixOverrides=",">
<if test="activateTheService != null">activate_the_service = #{activateTheService},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteOpenServiceById" parameterType="Long">
delete from open_service where id = #{id}
</delete>
<delete id="deleteOpenServiceByIds" parameterType="String">
delete from open_service where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,86 @@
<?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.muyu.networking.mapper.PayOfMapper">
<resultMap type="com.muyu.domain.PayOf" id="PayForResult">
<result property="id" column="id" />
<result property="enterpriseId" column="enterprise_id" />
<result property="modeOfPaymentId" column="mode_of_payment_id" />
<result property="price" column="price" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
</resultMap>
<sql id="selectPayForVo">
select id, enterprise_id, mode_of_payment_id, price, remark, create_by, create_time, update_time, update_by from pay_for
</sql>
<select id="selectPayOfList" parameterType="com.muyu.domain.PayOf" resultMap="PayForResult">
<include refid="selectPayForVo"/>
<where>
<if test="enterpriseId != null "> and enterprise_id = #{enterpriseId}</if>
<if test="modeOfPaymentId != null "> and mode_of_payment_id = #{modeOfPaymentId}</if>
<if test="price != null "> and price = #{price}</if>
</where>
</select>
<select id="selectPayOfById" parameterType="Long" resultMap="PayForResult">
<include refid="selectPayForVo"/>
where id = #{id}
</select>
<insert id="insertPayOf" parameterType="com.muyu.domain.PayOf" useGeneratedKeys="true" keyProperty="id">
insert into pay_for
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">enterprise_id,</if>
<if test="modeOfPaymentId != null">mode_of_payment_id,</if>
<if test="price != null">price,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">#{enterpriseId},</if>
<if test="modeOfPaymentId != null">#{modeOfPaymentId},</if>
<if test="price != null">#{price},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
</trim>
</insert>
<update id="updatePayOf" parameterType="com.muyu.domain.PayOf">
update pay_for
<trim prefix="SET" suffixOverrides=",">
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
<if test="modeOfPaymentId != null">mode_of_payment_id = #{modeOfPaymentId},</if>
<if test="price != null">price = #{price},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
</trim>
where id = #{id}
</update>
<delete id="deletePayOfById" parameterType="Long">
delete from pay_for where id = #{id}
</delete>
<delete id="deletePayOfByIds" parameterType="String">
delete from pay_for where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,78 @@
<?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.muyu.networking.mapper.TypeMapper">
<resultMap type="com.muyu.domain.Type" id="TypeResult">
<result property="id" column="id" />
<result property="typeName" column="type_name" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
</resultMap>
<sql id="selectTypeVo">
select id, type_name, remark, create_by, create_time, update_time, update_by from type
</sql>
<select id="selectTypeList" parameterType="com.muyu.domain.Type" resultMap="TypeResult">
<include refid="selectTypeVo"/>
<where>
<if test="typeName != null and typeName != ''"> and type_name like concat('%', #{typeName}, '%')</if>
</where>
</select>
<select id="selectTypeById" parameterType="Long" resultMap="TypeResult">
<include refid="selectTypeVo"/>
where id = #{id}
</select>
<insert id="insertType" parameterType="com.muyu.domain.Type">
insert into type
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="typeName != null">type_name,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="typeName != null">#{typeName},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
</trim>
</insert>
<update id="updateType" parameterType="com.muyu.domain.Type">
update type
<trim prefix="SET" suffixOverrides=",">
<if test="typeName != null">type_name = #{typeName},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTypeById" parameterType="Long">
delete from type where id = #{id}
</delete>
<delete id="deleteTypeByIds" parameterType="String">
delete from type where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>