平台密码
This commit is contained in:
@ -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<UserPassword> getPassword(){
|
||||||
|
|
||||||
|
UserPassword userPassword = iuserPasswordService.list().get(0);
|
||||||
|
|
||||||
|
return BaseResponse.success(userPassword);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -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<UserPassword> {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
<?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.chinaunicom.mall.ebtp.extend.userpassword.dao.UserPasswordMapper">
|
||||||
|
<resultMap id="BaseResultMap"
|
||||||
|
type="com.chinaunicom.mall.ebtp.extend.userpassword.entity.UserPassword">
|
||||||
|
<result column="password" jdbcType="VARCHAR" property="password"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!--逻辑删除方法 此方法为代码生成器生成 不允许修改 如有特殊需求 请自行新建SQL语句-->
|
||||||
|
<update id="deleteOff" parameterType="java.lang.Long">
|
||||||
|
update user_password
|
||||||
|
set
|
||||||
|
delete_flag="deleted"
|
||||||
|
where ID=#{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -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<UserPassword> {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -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<UserPasswordMapper, UserPassword> implements IUserPasswordService {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user