From 6481d1b43644044bc96b074aa533d676051a0785 Mon Sep 17 00:00:00 2001 From: yss <17921@qq.com> Date: Tue, 15 Jun 2021 14:53:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/UserPasswordController.java | 39 +++++++++++++++++++ .../userpassword/dao/UserPasswordMapper.java | 13 +++++++ .../dao/mapper/UserPasswordMapper.xml | 17 ++++++++ .../userpassword/entity/UserPassword.java | 33 ++++++++++++++++ .../service/IUserPasswordService.java | 16 ++++++++ .../service/impl/UserPasswordServiceImpl.java | 17 ++++++++ 6 files changed, 135 insertions(+) create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/controller/UserPasswordController.java create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/dao/UserPasswordMapper.java create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/dao/mapper/UserPasswordMapper.xml create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/entity/UserPassword.java create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/IUserPasswordService.java create mode 100644 src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/impl/UserPasswordServiceImpl.java diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/controller/UserPasswordController.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/controller/UserPasswordController.java new file mode 100644 index 0000000..95a87e7 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/controller/UserPasswordController.java @@ -0,0 +1,39 @@ +package com.chinaunicom.mall.ebtp.extend.userpassword.controller; + + +import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse; +import com.chinaunicom.mall.ebtp.extend.userpassword.entity.UserPassword; +import com.chinaunicom.mall.ebtp.extend.userpassword.service.IUserPasswordService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +@RestController +@Api(tags = "") +@RequestMapping("/api/userpassword") +public class UserPasswordController{ + + @Resource + private IUserPasswordService iuserPasswordService; + + /** + * 查询数据 + * @return + */ + @ApiOperation("查询数据") + @GetMapping("/getPassword") + public BaseResponse getPassword(){ + + UserPassword userPassword = iuserPasswordService.list().get(0); + + return BaseResponse.success(userPassword); + } + + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/dao/UserPasswordMapper.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/dao/UserPasswordMapper.java new file mode 100644 index 0000000..f15ea6c --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/dao/UserPasswordMapper.java @@ -0,0 +1,13 @@ +package com.chinaunicom.mall.ebtp.extend.userpassword.dao; + + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.chinaunicom.mall.ebtp.extend.userpassword.entity.UserPassword; + +/** +* @author daixc +*/ +public interface UserPasswordMapper extends BaseMapper { + + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/dao/mapper/UserPasswordMapper.xml b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/dao/mapper/UserPasswordMapper.xml new file mode 100644 index 0000000..6551b85 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/dao/mapper/UserPasswordMapper.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + update user_password + set + delete_flag="deleted" + where ID=#{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/entity/UserPassword.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/entity/UserPassword.java new file mode 100644 index 0000000..2613439 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/entity/UserPassword.java @@ -0,0 +1,33 @@ +package com.chinaunicom.mall.ebtp.extend.userpassword.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + * 实体类 UserPassword + * + * @auto.generated + */ +@Data +@Accessors(chain = true) +@ApiModel +@EqualsAndHashCode(callSuper = false) +@TableName(value = "user_password", autoResultMap = true) +public class UserPassword implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + @ApiModelProperty(value = "") + private String password; + + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/IUserPasswordService.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/IUserPasswordService.java new file mode 100644 index 0000000..919ea73 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/IUserPasswordService.java @@ -0,0 +1,16 @@ +package com.chinaunicom.mall.ebtp.extend.userpassword.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import com.chinaunicom.mall.ebtp.extend.userpassword.entity.UserPassword; + +/** + * 对数据表 user_password 操作的 service + * @author Auto create + * + */ +public interface IUserPasswordService extends IService { + + + +} diff --git a/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/impl/UserPasswordServiceImpl.java b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/impl/UserPasswordServiceImpl.java new file mode 100644 index 0000000..752ab11 --- /dev/null +++ b/src/main/java/com/chinaunicom/mall/ebtp/extend/userpassword/service/impl/UserPasswordServiceImpl.java @@ -0,0 +1,17 @@ +package com.chinaunicom.mall.ebtp.extend.userpassword.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.chinaunicom.mall.ebtp.extend.userpassword.dao.UserPasswordMapper; +import com.chinaunicom.mall.ebtp.extend.userpassword.entity.UserPassword; +import com.chinaunicom.mall.ebtp.extend.userpassword.service.IUserPasswordService; +import org.springframework.stereotype.Service; +/** + * 对数据表 user_password 操作的 serviceImpl + * @author daixc + * + */ +@Service +public class UserPasswordServiceImpl extends ServiceImpl implements IUserPasswordService { + + +}