Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Jc #3

Closed
wants to merge 3 commits into from
Closed

Jc #3

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package com.wizz.hospitalSell.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
* 微信小程序有关配置
* Created By Cx On 2018/8/1 13:32
*/
@Component
@Data
@ConfigurationProperties("wechat")
public class WeChatAccountConfig {

/**
* 小程序appId
*/
private String appid;

/**
* 小程序appSecret
*/
private String secret;

/**
* 小程序令牌
*/
private String token;

/**
* 加密密钥
*/
private String aesKey;

/**
* 数据格式
*/
private String msgDataFormat;

/**
* 微信模板ID
*/
private Map<String, String> templateId;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package com.wizzstudio.substitute.config;

public class WxMaConfiguration {
}
10 changes: 10 additions & 0 deletions src/main/java/com/wizzstudio/substitute/constants/StatusCode.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.wizzstudio.substitute.Constants;

public class StatusCode {
public static final int SYSTEM_BUSY = -1;
public static final int REQUEST_SUCCEED = 0;
public static final int INVALID_TOKEN = 40001;
public static final int INVALID_CERTIFICATE_TYPE = 40002;
public static final int INVALID_USER_ID = 40003;
public static final int INVALID_MSG_TYPE = 40008;
}
2 changes: 2 additions & 0 deletions src/main/java/com/wizzstudio/substitute/dao/UserDao.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@

@Repository
public interface UserDao extends JpaRepository<User, Integer> {
User findByOpenid(String id);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
package com.wizzstudio.substitute.dto;

import com.wizzstudio.substitute.enums.Gender;

import java.io.Serializable;

public class ApprenticeBasicInfo implements Serializable {

private String id;

private String userName;

private String avatar;

private String school;

private Gender gender;

public ApprenticeBasicInfo() {
}


public ApprenticeBasicInfo(String id, String userName, String avatar, String school, Gender gender) {
this.id = id;
this.userName = userName;
this.avatar = avatar;
this.school = school;
this.gender = gender;
}

public String getId() {
return id;
}

public void setId(String id) {
this.id = id;
}

public String getUserName() {
return userName;
}

public void setUserName(String userName) {
this.userName = userName;
}

public String getAvatar() {
return avatar;
}

public void setAvatar(String avatar) {
this.avatar = avatar;
}

public String getSchool() {
return school;
}

public void setSchool(String school) {
this.school = school;
}

public Gender getGender() {
return gender;
}

public void setGender(Gender gender) {
this.gender = gender;
}
}
63 changes: 63 additions & 0 deletions src/main/java/com/wizzstudio/substitute/dto/ModifyUserInfoDTO.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
package com.wizzstudio.substitute.dto;

import com.wizzstudio.substitute.enums.Gender;
import lombok.Data;

import java.io.Serializable;


public class ModifyUserInfoDTO implements Serializable {

private static final long serialVersionUID = -6191983979387003051L;
private String userName;
private String trueName;
private Integer phoneNumber;
private String school;
private Gender gender;


public ModifyUserInfoDTO() {
}



public String getUserName() {
return userName;
}

public void setUserName(String userName) {
this.userName = userName;
}

public String getTrueName() {
return trueName;
}

public void setTrueName(String trueName) {
this.trueName = trueName;
}

public Integer getPhoneNumber() {
return phoneNumber;
}

public void setPhoneNumber(Integer phoneNumber) {
this.phoneNumber = phoneNumber;
}

public String getSchool() {
return school;
}

public void setSchool(String school) {
this.school = school;
}

public Gender getGender() {
return gender;
}

public void setGender(Gender gender) {
this.gender = gender;
}
}
44 changes: 44 additions & 0 deletions src/main/java/com/wizzstudio/substitute/dto/ResultDTO.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package com.wizzstudio.substitute.dto;

import java.io.Serializable;

public class ResultDTO<T> implements Serializable {

private static final long serialVersionUID = -276259361015856308L;

//状态码
private Integer code;

//信息
private String msg;

//数据
private T data;

public ResultDTO() {
}

public Integer getCode() {
return code;
}

public void setCode(Integer code) {
this.code = code;
}

public String getMsg() {
return msg;
}

public void setMsg(String msg) {
this.msg = msg;
}

public T getData() {
return data;
}

public void setData(T data) {
this.data = data;
}
}
45 changes: 45 additions & 0 deletions src/main/java/com/wizzstudio/substitute/dto/WxInfo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package com.wizzstudio.substitute.dto;

import java.io.Serializable;

public class LoginDataDTO implements Serializable {

private String code;

private String encyptedData;

private String iv;

public LoginDataDTO() {
}

public LoginDataDTO(String code, String encyptedData, String iv) {
this.code = code;
this.encyptedData = encyptedData;
this.iv = iv;
}

public String getCode() {
return code;
}

public void setCode(String code) {
this.code = code;
}

public String getEncyptedData() {
return encyptedData;
}

public void setEncyptedData(String encyptedData) {
this.encyptedData = encyptedData;
}

public String getIv() {
return iv;
}

public void setIv(String iv) {
this.iv = iv;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ public enum IndentState {
* 执行中
*/
PERFORMING,
/**
* 货物已送达
*/
ARRIVED,
/**
*订单完成
*/
Expand Down
52 changes: 52 additions & 0 deletions src/main/java/com/wizzstudio/substitute/pojo/entity/Address.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package com.wizzstudio.substitute.pojo.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.io.Serializable;

@Entity
public class Address implements Serializable {

@Id
private Integer id;

/**
* 收货地址
*/
@Column
private String address;

/**
*常用收货地址对应的用户
*/
@Column
private Integer userId;

public Address() {
}

public Integer getId() {
return id;
}

public void setId(Integer id) {
this.id = id;
}

public String getAddress() {
return address;
}

public void setAddress(String address) {
this.address = address;
}

public Integer getUserId() {
return userId;
}

public void setUserId(Integer userId) {
this.userId = userId;
}
}
Loading