修改诺干问题

This commit is contained in:
gaomusan 2025-03-18 14:07:19 +08:00
parent b7ae6f47fb
commit 446dd75191
216 changed files with 948 additions and 0 deletions

View File

@ -0,0 +1,18 @@
package com.cj.jiaqingjiayi.mapper;
import com.cj.jiaqingjiayi.model.domain.Recruitment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @author 高木
* @description 针对表recruitment(美甲师招聘信息表)的数据库操作Mapper
* @createDate 2025-03-12 18:51:44
* @Entity com.cj.jiaqingjiayi.model.domain.RecruitmentController
*/
public interface RecruitmentMapper extends BaseMapper<Recruitment> {
}

View File

@ -0,0 +1,61 @@
package com.cj.jiaqingjiayi.model.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 美甲师招聘信息表
* @TableName recruitment
*/
@TableName(value ="recruitment")
@Data
public class Recruitment implements Serializable {
/**
* 主键id
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* 商家id关联business表
*/
private Long businessId;
/**
* 门店名称
*/
private String businessName;
/**
* 对美甲师的要求
*/
private String requirements;
/**
* 美甲师薪资示例: 5k-10k/
*/
private String salary;
/**
* 招聘美甲师数量
*/
private Integer quantity;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,25 @@
package com.cj.jiaqingjiayi.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cj.jiaqingjiayi.model.domain.Recruitment;
import com.cj.jiaqingjiayi.model.request.recruitment.RecruitmentAddRequest;
import com.cj.jiaqingjiayi.model.request.recruitment.RecruitmentUpdateRequest;
import java.util.List;
/**
* @author 高木
* @description 针对表recruitment(美甲师招聘信息表)的数据库操作Service
* @createDate 2025-03-12 18:51:44
*/
public interface RecruitmentService extends IService<Recruitment> {
Long addRecruitment(RecruitmentAddRequest addRequest);
boolean deleteRecruitment(Long id);
List<Recruitment> selectRecruitment(Long businessId);
boolean updateRecruitment(RecruitmentUpdateRequest updateRequest);
}

View File

@ -0,0 +1,77 @@
package com.cj.jiaqingjiayi.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cj.jiaqingjiayi.common.ErrorCode;
import com.cj.jiaqingjiayi.exception.ThrowUtils;
import com.cj.jiaqingjiayi.model.domain.Business;
import com.cj.jiaqingjiayi.model.domain.Recruitment;
import com.cj.jiaqingjiayi.model.request.recruitment.RecruitmentAddRequest;
import com.cj.jiaqingjiayi.model.request.recruitment.RecruitmentUpdateRequest;
import com.cj.jiaqingjiayi.service.BusinessService;
import com.cj.jiaqingjiayi.service.RecruitmentService;
import com.cj.jiaqingjiayi.mapper.RecruitmentMapper;
import com.cj.jiaqingjiayi.utils.BeanCopyUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
* @author 高木
* @description 针对表recruitment(美甲师招聘信息表)的数据库操作Service实现
* @createDate 2025-03-12 18:51:44
*/
@Service
public class RecruitmentServiceImpl extends ServiceImpl<RecruitmentMapper, Recruitment>
implements RecruitmentService{
@Resource
private BusinessService businessService;
@Transactional(rollbackFor = Exception.class)
@Override
public Long addRecruitment(RecruitmentAddRequest addRequest) {
Recruitment recruitment = new Recruitment();
BeanUtils.copyProperties(addRequest,recruitment);
QueryWrapper<Business> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("businessName", addRequest.getBusinessName());
Business business = businessService.getOne(queryWrapper);
recruitment.setBusinessId(business.getId());
boolean save = this.save(recruitment);
ThrowUtils.throwIf(!save, ErrorCode.OPERATION_ERROR, "发布失败");
return recruitment.getId();
}
@Transactional(rollbackFor = Exception.class)
@Override
public boolean deleteRecruitment(Long id) {
return this.removeById(id);
}
@Override
public List<Recruitment> selectRecruitment(Long businessId) {
QueryWrapper<Recruitment> QueryWrapper = new QueryWrapper<>();
QueryWrapper.eq("businessId", businessId);
return this.list(QueryWrapper);
}
@Override
public boolean updateRecruitment(RecruitmentUpdateRequest updateRequest) {
Recruitment recruitment = new Recruitment();
BeanCopyUtils.copyPropertiesIgnoreEmpty(updateRequest, recruitment);
return this.updateById(recruitment);
}
}

View File

@ -0,0 +1,23 @@
<?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.cj.jiaqingjiayi.mapper.RecruitmentMapper">
<resultMap id="BaseResultMap" type="com.cj.jiaqingjiayi.model.domain.Recruitment">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="businessId" column="businessId" jdbcType="BIGINT"/>
<result property="businessName" column="businessName" jdbcType="VARCHAR"/>
<result property="requirements" column="requirements" jdbcType="VARCHAR"/>
<result property="salary" column="salary" jdbcType="VARCHAR"/>
<result property="quantity" column="quantity" jdbcType="INTEGER"/>
<result property="createTime" column="createTime" jdbcType="TIMESTAMP"/>
<result property="updateTime" column="updateTime" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id,businessId,businessName,
requirements,salary,quantity,
createTime,updateTime
</sql>
</mapper>

View File

@ -0,0 +1,52 @@
spring:
application:
name: jiaqingjiayi
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://154.8.193.216/jqjy
username: jqjy
password: 123456
# url: jdbc:mysql://localhost:3306/jqjy
# username: root
# password: 123456
mvc:
pathmatch:
matching-strategy: ant_path_matcher
profiles:
active: dev
knife4j:
enable: true
server:
port: 8080
servlet:
context-path: /api
session:
timeout: 86400s
mybatis-plus:
configuration:
map-underscore-to-camel-case: false
global-config:
db-config:
logic-delete-field: isDelete
logic-delete-value: 1
logic-not-delete-value: 0
aliyun:
oss:
file:
endpoint: xxxx
keyid: xxxx
keysecret: xxxx
bucketname: xxxx
alipay:
#支付宝开放平台
appId: 2021004144652242
alipayPublicKey: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsP/3AQ6DbZbQhFafYUdRS8F6jSXJzYfF3N14L48Jo+xlGp1FW8uq2bu8izP9qcuFxui2CzuQflo0BM+XmSmRt6KkmyGSvGmCdf4gC/doTT7xtMaQu72Mvezr69VC0Lp5iJeLVHzV5/BMFdgfGee5HnAUU5bn4Ytlqw14kCxgeLitZltvHtirq7vVCXlWyikbdtmV0HgmzaWbrC+jVyb/nk9oH8PpV5juJmhwEuiReEdKPKMdPoeJK3sZ9dHsOx+Bm3LkEY075fPvpHDtJFaLi/k7fFY+0oQxsX92qRL9kViOAhMonvFFKZFK06vxuPUtuZelGrzGttiOjVJRRGIiaQIDAQAB"
appPrivateKey: "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCrh54evp6VX68kLvmWybc945JbHaJDRJf6bDSKNwQfCkvEZxfOwYTGXu7XfZq2G/qmFJ6Xp9KxV0yYrxPwjXwPMU4E78/ZaMZ44iSTSq+qvMJMBR7PJOX1MkW7EFfhUPmb+5S0KQurjMQadY4b2VxeHwVxTRPKAdsm0tnfgN8/pO7TfpyGOWX5dRSIruQ3c+MFmJOy0cSZZ4tGlidqZDS9v4YJpmw3u5dX4BvGKtNMPaAnxSpLCDp1fd/vh6ROl71QkLFR+3mNQcwvDOGNJ2Rq78bgfkIVp0BBMySk5Mfv6kunh0QMaxK8wi+Y9swv7Iiyy7U2/zrBvA+1i3e5ctH9AgMBAAECggEBAJSiNrTjbp13RVewUNyFvIAnc4n62sE5bgw0uS5PUAXpsQ/mWW3yqLAQURxvnaFSC1bgpTA630qGoDvp8fhPUYIEslt6xnvY26qiIxly7Vegqyiegzzx90YKIvxexBfdR/4O+aNHsfIcT02yMcsWBYEVlmzAYnZ4N0OkD+EpVcpaIBv2HwGsJnczz41GQVl9GX2DOL8j8+eSWhZM0Jq3d1ksgcfUHH1TT12XCbEE3fKJEMKKlrjVPrtTb+v9m6t0okOgjW+z+IR0zY1HBR92yC+0/CP4FfkbGBhKNxsmbyU4ilTmKINHMy40bqGqrEYo+LBzhEKBT82eMbg9cJbL68ECgYEA37dP5hWEfuTWAoAwduI6OW8kTwxNddIigzTV3qlqEeo21K6RQOOTeYKXrpMmYG65MU5J3xF7AYyhb3rMpega++22Qybxlrme88hqe0s/DeSToG2mw1zYLkkHb5+oT05fCOlLmFGPeLRBfJTxjM6wPNX/1NvGOEVC9DekXuauWZECgYEAxEhmSne07LD6J2sYqsbmOb0zdOpCNT0a+7SomZwiMpVFcsxFvZhYJlcLwyR2m3deLphxwQBPbyxe8TtOZST7P7APpoeI4c0t6PL44vG3eUh+GHFVyf1dbLwMGa9gQ0JFRwBH5iDD2hfnTNfmcNUYzBRHZQK60FFlPCd566hOG60CgYBNVNJbmEiKjJOlnaYjEiRKQi7s3DXSambfr93V7/3oX2vArO8s3P3XXNsNz3POlbeSYZuLbkF00aXkITCokMjzGMKOB+Iu1c8qObcFE4eiR8b4B69DjM51gWz+mtPVRiP3sp0c8+SCNt0EMYAlyjSFcvvSGn40aUyxmqJI47iU4QKBgFYStaCkO9eriBcvFKMXE7BwMpdrftsfz6xfPawW1rw9zzWXNGH+43D0rPjHDagBQXDHcuLCwxKqb3vzmN4ryG3WRBavyqvSMPa9Tb0faGisDHelg4xPKd/b2qaMzHbSIdUP33egGKKT5t9AshH6sKQVpHU8LDXb67vkR8e6h34FAoGAf21Aea9/+3FavddWC/5j0fvESN2U58X0xf4R/FZLa5QsT/iCAo4QqaeYZvF6csWR6lu0zJB88gA+4s6G6xP1JERL3LbE2pHjDe0eNOIsWSzsINICQQ2s3Gm5mh75+/8dfAsRiAPi9nS7FJ74Tcryb4+txeZKiBZgLnEFeRLOB3U="
notifyUrl: http://39.101.78.35:1107/api/Alipay/notifyUrl

Some files were not shown because too many files have changed in this diff Show More