Commit af56b30d by 涂亚平

第一次上线

1 parent 2272b530
Showing with 434 additions and 60 deletions
2024-08-20 14:48:32,117 [schedulerFactoryBean_QuartzSchedulerThread] ERROR org.springframework.scheduling.quartz.LocalDataSourceJobStore:2867 - Error retrieving job, setting trigger state to ERROR.
org.quartz.JobPersistenceException: Couldn't retrieve job because a required class was not found: com.subsidy.job.ProjectSalaryNotificationJob
at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1393)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2864)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$41.execute(JobStoreSupport.java:2805)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$41.execute(JobStoreSupport.java:2803)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3864)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2802)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:287)
Caused by: java.lang.ClassNotFoundException: com.subsidy.job.ProjectSalaryNotificationJob
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:275)
at org.springframework.scheduling.quartz.ResourceLoaderClassLoadHelper.loadClass(ResourceLoaderClassLoadHelper.java:81)
at org.springframework.scheduling.quartz.ResourceLoaderClassLoadHelper.loadClass(ResourceLoaderClassLoadHelper.java:86)
at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectJobDetail(StdJDBCDelegate.java:852)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1390)
... 6 common frames omitted
2024-08-20 14:50:40,086 [schedulerFactoryBean_QuartzSchedulerThread] ERROR org.springframework.scheduling.quartz.LocalDataSourceJobStore:2867 - Error retrieving job, setting trigger state to ERROR.
org.quartz.JobPersistenceException: Couldn't retrieve job because a required class was not found: com.subsidy.job.ProjectSalaryNotificationJob
at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1393)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2864)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$41.execute(JobStoreSupport.java:2805)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$41.execute(JobStoreSupport.java:2803)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3864)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2802)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:287)
Caused by: java.lang.ClassNotFoundException: com.subsidy.job.ProjectSalaryNotificationJob
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:275)
at org.springframework.scheduling.quartz.ResourceLoaderClassLoadHelper.loadClass(ResourceLoaderClassLoadHelper.java:81)
at org.springframework.scheduling.quartz.ResourceLoaderClassLoadHelper.loadClass(ResourceLoaderClassLoadHelper.java:86)
at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectJobDetail(StdJDBCDelegate.java:852)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveJob(JobStoreSupport.java:1390)
... 6 common frames omitted
......@@ -275,7 +275,7 @@
</dependencies>
<build>
<finalName>subsidy-interShip</finalName>
<finalName>subsidy-talent</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
......
......@@ -14,9 +14,9 @@ public class WechatConfig {
private String appSecret;
//private String msgUrl;
private String msgUrl;
//
//private String templateId;
private String templateId;
//
//private String agentId;
......
......@@ -8,15 +8,15 @@ import io.swagger.annotations.Api;
/**
* <p>
* 管理员-项目映射表 前端控制器
* 前端控制器
* </p>
*
* @author Tuyp
* @since 2024-07-18
* @since 2024-08-09
*/
@RestController
@Api(tags = "管理员-项目映射表")
@RequestMapping("/administer-project-mapping-do")
public class AdministerProjectMappingController {
@Api(tags = "")
@RequestMapping("/access-token-do")
public class AccessTokenController {
}
......@@ -39,8 +39,14 @@ public class ProjectController {
return ResponseData.generateCreatedResponse(0,projectService.sendSms(memberDO));
}
@PostMapping("sendNewSms")
@ApiOperation("发送验证码 telephone ")
public ResponseVO sendNewSms(@RequestBody MemberDO memberDO){
return ResponseData.generateCreatedResponse(0,projectService.sendNewSms(memberDO));
}
@PostMapping("login")
@ApiOperation("登录 telephone verifyCode")
@ApiOperation("登录 telephone verifyCode openId")
public ResponseVO login(@RequestBody VerifyCodeDTO verifyCodeDTO){
return ResponseData.generateCreatedResponse(0,projectService.login(verifyCodeDTO));
}
......@@ -82,16 +88,22 @@ public class ProjectController {
}
@PostMapping("salaryListSum")
@ApiOperation("工资单--笔数+总计 memberId 人才id projectId 项目id ")
@ApiOperation("工资单--笔数+总计 memberId 人才id projectMappingId 项目id ")
public ResponseVO salaryListSum(@RequestBody SalaryListSumDTO salaryListSumDTO){
return ResponseData.generateCreatedResponse(0,projectService.salaryListSum(salaryListSumDTO));
}
@PostMapping("salaryList")
@ApiOperation("工资单明细 memberId 人才id projectId 项目id pageSize pageNum ")
@ApiOperation("工资单明细 memberId 人才id projectMappingId 项目映射id pageSize pageNum ")
public ResponseVO salaryList(@RequestBody SalaryListSumDTO salaryListSumDTO){
return ResponseData.generateCreatedResponse(0,projectService.salaryList(salaryListSumDTO));
}
@PostMapping("updateUserInfo")
@ApiOperation("变更身份证/银行卡信息 id userName payrollAccount idCard bank")
public ResponseVO updateUserInfo(@RequestBody MemberDO memberDO){
projectService.updateUserInfo(memberDO);
return ResponseData.generateCreatedResponse(0);
}
}
package com.subsidy.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.common.configure.RestTemplateConfig;
import com.subsidy.common.configure.WechatConfig;
import com.subsidy.dto.wechat.SignVO;
import com.subsidy.mapper.AccessTokenMapper;
import com.subsidy.mapper.MemberMapper;
import com.subsidy.model.AccessTokenDO;
import com.subsidy.model.MemberDO;
import com.subsidy.util.ConstantUtils;
import com.subsidy.util.JwtUtil;
import com.subsidy.util.Localstorage;
import com.subsidy.util.SecretUtils;
import com.subsidy.vo.administer.UserRoleVO;
import com.subsidy.vo.wechat.AccessToken;
import com.subsidy.vo.wechat.AuthenRequestVO;
import com.subsidy.vo.wechat.AuthenTokenVO;
import com.subsidy.vo.wechat.JsSdkVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.List;
@RestController
@RequestMapping("/wechat")
@Api(tags = "微信授权")
public class WechatController {
@Autowired
private RestTemplateConfig restTemplateConfig;
@Autowired
private WechatConfig wechatConfig;
@Autowired
private AccessTokenMapper accessTokenMapper;
@Autowired
private MemberMapper memberMapper;
@PostMapping("/getJsapiTicket")
@ApiOperation("通过token请求获得jsapi_ticket {url}")
public ResponseVO getJsapiTicket(@RequestBody SignVO signVO) {
List<AccessTokenDO> accessTokens = accessTokenMapper.selectList(null);
String accessToken = "";
if (accessTokens.size() == 0) {
String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + wechatConfig.getAppId() + "&secret=" + wechatConfig.getAppSecret();
ResponseEntity<AccessToken> response = restTemplateConfig.restTemplate()
.exchange(url, HttpMethod.GET, null, AccessToken.class);
accessToken = response.getBody().getAccess_token();
AccessTokenDO accessToken1 = new AccessTokenDO();
accessToken1.setAccessToken(accessToken);
accessTokenMapper.insert(accessToken1);
} else {
AccessTokenDO accessToken1 = accessTokens.get(0);
long diff = ChronoUnit.SECONDS.between(accessToken1.getCreateDate(), LocalDateTime.now());
if (diff >= 2 * 60 * 60 * 1000 - 5 * 1000) {
String url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + wechatConfig.getAppId() + "&secret=" + wechatConfig.getAppSecret();
ResponseEntity<AccessToken> response = restTemplateConfig.restTemplate()
.exchange(url, HttpMethod.GET, null, AccessToken.class);
accessToken = response.getBody().getAccess_token();
// AccessToken accessToken2= new AccessToken();
accessToken1.setAccessToken(accessToken);
accessTokenMapper.updateById(accessToken1);
} else {
accessToken = accessToken1.getAccessToken();
}
}
signVO.setAccess_token(accessToken);
String url1 = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=" + accessToken + "&type=jsapi";
ResponseEntity<JsSdkVO> response1 = restTemplateConfig.restTemplate()
.exchange(url1, HttpMethod.GET, null, JsSdkVO.class);
String ticket = response1.getBody().getTicket();
signVO.setJsapi_ticket(ticket);
signVO.setNoncestr("1rtgtafNdHhxADMD");
signVO.setTimestamp(String.valueOf(System.currentTimeMillis()));
String signStr = "jsapi_ticket=" + signVO.getJsapi_ticket() + "&noncestr=" + signVO.getNoncestr() + "&timestamp=" + signVO.getTimestamp()
+ "&url=" + signVO.getUrl();
signVO.setSign(SecretUtils.getSHAString(signStr));
return ResponseData.generateCreatedResponse(0, signVO);
}
@PostMapping("/webAuthen")
@ApiOperation("网页授权 通过code换取身份信息 {code phone 手机号}")
public ResponseVO webAuthen(@RequestBody AuthenRequestVO authenRequestVO) {
String url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=" + wechatConfig.getAppId() + "&secret=" +
wechatConfig.getAppSecret() + "&code=" + authenRequestVO.getCode() + "&grant_type=authorization_code";
ResponseEntity<AuthenTokenVO> response = restTemplateConfig.restTemplate()
.exchange(url, HttpMethod.GET, null, AuthenTokenVO.class);
AuthenTokenVO authenTokenVO = response.getBody();
//通过openId从库里查询
MemberDO memberDO = memberMapper.selectOne(new QueryWrapper<MemberDO>()
.lambda()
.eq(MemberDO::getOpenId, authenTokenVO.getOpenid()));
if (null == memberDO) {
UserRoleVO userRoleVO = new UserRoleVO();
String url1 = "https://api.weixin.qq.com/sns/userinfo?access_token=" + authenTokenVO.getAccess_token() + "&openid=" + authenTokenVO.getOpenid() + "&lang=zh_CN";
ResponseEntity<AuthenTokenVO> response1 = restTemplateConfig.restTemplate()
.exchange(url1, HttpMethod.GET, null, AuthenTokenVO.class);
userRoleVO.setOpenId(response1.getBody().getOpenid());
userRoleVO.setOpenIdFlag(false);
return ResponseData.generateCreatedResponse(0, userRoleVO);
} else {
//该openId已存在,查出该用户的角色信息
UserRoleVO userRoleVO = new UserRoleVO();
String token = JwtUtil.generateToken(memberDO.getId(), ConstantUtils.MOBILE_TERMINATE);
Localstorage.setUser(memberDO);
userRoleVO.setToken(token);
BeanUtils.copyProperties(memberDO, userRoleVO);
userRoleVO.setOpenIdFlag(true);
userRoleVO.setOpenId(authenRequestVO.getOpenId());
return ResponseData.generateCreatedResponse(0, userRoleVO);
}
}
public static void main(String[] args) throws Exception {
LocalDateTime now1 = LocalDateTime.now();
Thread.sleep(2560);
LocalDateTime now2 = LocalDateTime.now();
System.out.println(ChronoUnit.SECONDS.between(now1, now2));
}
}
......@@ -8,4 +8,6 @@ public class VerifyCodeDTO {
private String telephone;
private String verifyCode;
private String openId;
}
......@@ -7,7 +7,7 @@ public class SalaryListSumDTO {
private Long memberId;
private Long projectId;
private Long projectMappingId;
private Integer pageSize;
......
package com.subsidy.dto.wechat;
import lombok.Data;
@Data
public class SignVO {
private String access_token;
private String noncestr;
private String jsapi_ticket;
private String timestamp;
private String url;
private String sign;
private String code;
}
package com.subsidy.mapper;
import com.subsidy.model.AdministerProjectMappingDO;
import com.subsidy.model.AccessTokenDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* <p>
* 管理员-项目映射表 Mapper 接口
* Mapper 接口
* </p>
*
* @author Tuyp
* @since 2024-07-18
* @since 2024-08-09
*/
@Repository
public interface AdministerProjectMappingMapper extends BaseMapper<AdministerProjectMappingDO> {
public interface AccessTokenMapper extends BaseMapper<AccessTokenDO> {
}
......@@ -18,7 +18,7 @@ import org.springframework.stereotype.Repository;
@Repository
public interface ProjectSalaryHistoryMapper extends BaseMapper<ProjectSalaryHistoryDO> {
SalaryListSumVO salaryCount(Long project, Long memberId);
SalaryListSumVO salaryCount(Long projectId, Long memberId);
IPage<SalaryListVO> salaryList(IPage page, Long projectId, Long memberId);
......
......@@ -9,25 +9,23 @@ import lombok.EqualsAndHashCode;
/**
* <p>
* 管理员-项目映射表
*
* </p>
*
* @author Tuyp
* @since 2024-07-18
* @since 2024-08-09
*/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("administer_project_mapping")
public class AdministerProjectMappingDO extends BaseModel {
@TableName("access_token")
public class AccessTokenDO extends BaseModel {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
private Long administerId;
private Integer id;
private Long projectId;
private String accessToken;
}
......@@ -41,6 +41,11 @@ public class ProjectMemberMappingDO extends BaseModel {
private String jobName;
/**
* 工资
*/
private String salary;
/**
* 排序
*/
private Integer orderNo;
......
......@@ -33,7 +33,7 @@ public class ProjectSalaryHistoryDO extends BaseModel {
/**
* 项目id
*/
private Long projectId;
private Long projectMappingId;
/**
* 工资
......@@ -46,6 +46,16 @@ public class ProjectSalaryHistoryDO extends BaseModel {
private String salaryMark;
/**
* 发放时间
*/
private String salaryDate;
/**
* 几月工资
*/
private String salaryMonth;
/**
* 开户行
*/
private String bank;
......@@ -55,5 +65,10 @@ public class ProjectSalaryHistoryDO extends BaseModel {
*/
private String payrollAccount;
/**
* 提交状态 1已提交 - 0未提交
*/
private Integer commitStatus;
}
package com.subsidy.service;
import com.subsidy.model.AdministerProjectMappingDO;
import com.subsidy.model.AccessTokenDO;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 管理员-项目映射表 服务类
* 服务类
* </p>
*
* @author Tuyp
* @since 2024-07-18
* @since 2024-08-09
*/
public interface AdministerProjectMappingService extends IService<AdministerProjectMappingDO> {
public interface AccessTokenService extends IService<AccessTokenDO> {
}
......@@ -24,6 +24,8 @@ public interface ProjectService extends IService<ProjectDO> {
String sendSms(MemberDO memberDO);
String sendNewSms(MemberDO memberDO);
UserRoleVO login(VerifyCodeDTO verifyCodeDTO);
CurrentProjectVO currentProject(MemberDO memberDO);
......@@ -42,4 +44,6 @@ public interface ProjectService extends IService<ProjectDO> {
IPage<SalaryListVO> salaryList(SalaryListSumDTO salaryListSumDTO);
void updateUserInfo(MemberDO memberDO);
}
package com.subsidy.service.impl;
import com.subsidy.model.AdministerProjectMappingDO;
import com.subsidy.mapper.AdministerProjectMappingMapper;
import com.subsidy.service.AdministerProjectMappingService;
import com.subsidy.model.AccessTokenDO;
import com.subsidy.mapper.AccessTokenMapper;
import com.subsidy.service.AccessTokenService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 管理员-项目映射表 服务实现类
* 服务实现类
* </p>
*
* @author Tuyp
* @since 2024-07-18
* @since 2024-08-09
*/
@Service
public class AdministerProjectMappingServiceImpl extends ServiceImpl<AdministerProjectMappingMapper, AdministerProjectMappingDO> implements AdministerProjectMappingService {
public class AccessTokenServiceImpl extends ServiceImpl<AccessTokenMapper, AccessTokenDO> implements AccessTokenService {
}
......@@ -74,6 +74,32 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, ProjectDO> im
return ConstantUtils.SUCCESS_SEND_OUT;
}
public String sendNewSms(MemberDO memberDO) {
int count = memberMapper.selectCount(new QueryWrapper<MemberDO>()
.lambda()
.eq(MemberDO::getTelephone, memberDO.getTelephone())
.eq(MemberDO::getMemberType, 3));
if (count > 0) {
throw new HttpException(10027);
}
String code = RandomUtil.getRandomCode(6);
smsUtils.send(memberDO.getTelephone(), code);
smsVerifyCodeMapper.delete(new QueryWrapper<SmsVerifyCodeDO>()
.lambda()
.eq(SmsVerifyCodeDO::getTelephone, memberDO.getTelephone()));
SmsVerifyCodeDO smsCodeDO = new SmsVerifyCodeDO();
smsCodeDO.setVerifyCode(code);
smsCodeDO.setTelephone(memberDO.getTelephone());
smsVerifyCodeMapper.insert(smsCodeDO);
return ConstantUtils.SUCCESS_SEND_OUT;
}
public UserRoleVO login(VerifyCodeDTO verifyCodeDTO) {
UserRoleVO userRoleVO = new UserRoleVO();
......@@ -100,6 +126,11 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, ProjectDO> im
userRoleVO.setToken(token);
BeanUtils.copyProperties(memberDO, userRoleVO);
if (null != verifyCodeDTO.getOpenId()){
memberDO.setOpenId(verifyCodeDTO.getOpenId());
memberMapper.updateById(memberDO);
}
return userRoleVO;
}
......@@ -111,6 +142,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, ProjectDO> im
return projectMemberMappingMapper.historyProjects(memberDO.getId());
}
public String verify(VerifyCodeDTO verifyCodeDTO) {
SmsVerifyCodeDO smsCodeDO = smsVerifyCodeMapper.selectOne(new QueryWrapper<SmsVerifyCodeDO>()
......@@ -163,13 +196,20 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, ProjectDO> im
}
public SalaryListSumVO salaryListSum(SalaryListSumDTO salaryListSumDTO) {
return projectSalaryHistoryMapper.salaryCount(salaryListSumDTO.getProjectId(), salaryListSumDTO.getMemberId());
return projectSalaryHistoryMapper.salaryCount(salaryListSumDTO.getProjectMappingId(), salaryListSumDTO.getMemberId());
}
public IPage<SalaryListVO> salaryList(SalaryListSumDTO salaryListSumDTO) {
Page page = new Page(salaryListSumDTO.getPageNum(), salaryListSumDTO.getPageSize());
return projectSalaryHistoryMapper.salaryList(page, salaryListSumDTO.getProjectId(), salaryListSumDTO.getMemberId());
return projectSalaryHistoryMapper.salaryList(page, salaryListSumDTO.getProjectMappingId(), salaryListSumDTO.getMemberId());
}
public void updateUserInfo(MemberDO memberDO) {
MemberDO memberDO1 = memberMapper.selectById(memberDO.getId());
BeanUtils.copyProperties(memberDO,memberDO1);
memberMapper.updateById(memberDO);
}
}
......@@ -52,7 +52,7 @@ public class SMSUtils {
//必填:短信签名-可在短信控制台中找到
request.setSignName("有课互联");
//必填:短信模板-可在短信控制台中找到
request.setTemplateCode("SMS_190945394");
request.setTemplateCode("SMS_229640297");
//可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为
request.setTemplateParam("{\"code\":\""+ code +"\"}");
......
......@@ -33,4 +33,10 @@ public class UserRoleVO {
private String superviseName;
private Boolean checkStatus;
private String openId;
private Boolean openIdFlag;
}
......@@ -13,7 +13,7 @@ public class SalaryListVO {
private String salaryMark;
private String createDate;
private String salaryDate;
private String payrollAccount;
......
package com.subsidy.vo.wechat;
import lombok.Data;
@Data
public class AccessToken {
private String access_token;
private String expires_in;
}
package com.subsidy.vo.wechat;
import lombok.Data;
@Data
public class AuthenRequestVO {
private String code;
// private String phone;
private String openId;
}
package com.subsidy.vo.wechat;
import lombok.Data;
@Data
public class AuthenTokenVO {
private String access_token;
private String openid;
private String nickname;
private String sex;
private String province;
private String city;
private String country;
private String headimgurl;
private Object privilege;
private String unionid;
}
package com.subsidy.vo.wechat;
import lombok.Data;
@Data
public class JsSdkVO {
private String errcode;
private String errmsg;
private String ticket;
private String expires_in;
}
# 本地环境配置
spring.server.port=23507
spring.server.port=23501
# 数据源配置
#spring.datasource.url=jdbc:mysql://116.62.57.92:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
......
# 生产环境配置
spring.server.port=23507
spring.server.port=23501
# 数据源配置
spring.datasource.url=jdbc:mysql://rm-uf69w46mo6agw0ahao.mysql.rds.aliyuncs.com:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
......
# 环境配置 顶岗实习
spring.profiles.active=dev
spring.profiles.active=prod
#和CPU数
spring.server.acceptorThreadCount=600
spring.server.minSpareThreads=100
......@@ -68,11 +68,11 @@ spring.quartz.overwrite-existing-jobs=false
#spring.redis.host=r-uf6m4cpkjrgpzywjm3pd.redis.rds.aliyuncs.com
#spring.redis.port=6379
#spring.redis.password=r-uf6m4cpkjrgpzywjm3:Ykhl@208
wechat=
#pro
appId=wx5e1ecb9c9bd33451
appSecret=4f5e1abb6fb4f68f5273820b6295ec6b
#微信公众号
wechat.appId=wx9e107b8f68c91a0c
wechat.appSecret= d772631f098ef7b597293c22899671e0
wechat.msgUrl= t.youkehulian.cn
wechat.templateId= _zNcTG7euWQbsvK8f0gMjTcNaXx3gBsDautnmuaLURA
#保利威视
polyv.userId=b8f2d3bfdc
polyv.appId=g3lrxnzd75
......
<?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.subsidy.mapper.AdministerProjectMappingMapper">
<mapper namespace="com.subsidy.mapper.AccessTokenMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.subsidy.model.AdministerProjectMappingDO">
<resultMap id="BaseResultMap" type="com.subsidy.model.AccessTokenDO">
<id column="id" property="id" />
<result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" />
<result column="delete_date" property="deleteDate" />
<result column="administer_id" property="administerId" />
<result column="project_id" property="projectId" />
<result column="access_token" property="accessToken" />
</resultMap>
<!-- 通用查询结果列 -->
......@@ -17,7 +16,7 @@
create_date,
update_date,
delete_date,
id, administer_id, project_id
id, access_token
</sql>
</mapper>
......@@ -18,6 +18,8 @@
AND t3.delete_date IS NULL
and t.member_id = #{memberId}
and t.status = 1
order by t.create_date desc
limit 1
</select>
<select id="historyProjects" parameterType="long" resultType="com.subsidy.vo.labor.HistoryProjectsVO">
......@@ -25,7 +27,7 @@
t.id,
t3.company_name,
t.job_name,
t2.start_date,
t.create_date start_date,
t2.salary_date,
t4.labor_service_name
FROM
......@@ -34,8 +36,8 @@
LEFT JOIN company_dict t3 ON t2.company_id = t3.id
LEFT JOIN labor_service_dict t4 ON t2.labor_service_id = t4.id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
t.delete_date is null
and t2.delete_date IS NULL
AND t3.delete_date IS NULL
AND t4.delete_date IS NULL
AND t.member_id = #{memberId}
......
......@@ -5,13 +5,14 @@
<select id="salaryCount" resultType="com.subsidy.vo.labor.SalaryListSumVO">
SELECT
count( 1 ) cnt,
sum( t.salary ) AS salary
round(sum( t.salary ),2) AS salary
FROM
project_salary_history t
WHERE
t.delete_date IS NULL
AND t.project_id = #{projectId}
AND t.project_mapping_id = #{projectId}
AND t.member_id = #{memberId}
and t.commit_status = 1
</select>
<select id="salaryList" resultType="com.subsidy.vo.labor.SalaryListVO">
......@@ -20,14 +21,15 @@
t.bank,
t.salary,
t.salary_mark,
t.create_date,
t.salary_date,
t.payroll_account
FROM
project_salary_history t
WHERE
t.delete_date IS NULL
AND t.project_id = #{projectId}
AND t.project_mapping_id = #{projectId}
AND t.member_id = #{memberId}
and t.commit_status = 1
ORDER BY
t.create_date DESC
</select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!