admin 管理员组

文章数量: 887021


2024年1月5日发(作者:web界面开发工程师)

  ckage ;import ield;import ogic;import ame;import n;import ;import ;@Data@TableName(value ="user")public class User extends BaseEntity {@Versionprivate Integer version;private String username;private String nickname;private String password;private String email;private String phone;private Integer age;private Integer gender;private Integer status;@TableField(value = "last_login_time")private Date lastLoginTime;@TableLogic(value = "0", delval = "1")private Integer del;}   1 package ; 2

3 import pper; 4 import ; 5

6 /** 7 * @desc: 8 * @author:caifan 9 * @date:2020/3/1510 */11 public interface UserMapper extends BaseMapper {12 }ckage ;import ;import rvice;import red;import ype;

import tBody;import tMapping;import tMethod;import ntroller;import ;@RestController@RequestMapping("/rest/user")public class UserRest {@Autowiredprivate UserService userService;@RequestMapping(value = "/save1", method = , produces = ATION_JSON_UTF8_VALUE)public void save1(@RequestBody User user) { if (null == ateTime()) { ateTime(new Date()); } er1(user);}@RequestMapping(value = "/save2", method = , produces = ATION_JSON_UTF8_VALUE)public void save2(@RequestBody User user) { if (null == ateTime()) { ateTime(new Date()); } er2(user);}}   1 package e; 2

3 import ; 4 import ; 5 import pper; 6 import e; 7 import ctional; 8

9 import ce;10

11 @Service12 @Transactional13 @DS("ds1")14 public class UserService {15 @Resource16 private UserMapper userMapper;17

18 public void saveUser1(User user) {19 (user);20 }21

22 public User findById(Long id) {23 return ById(id);24 }25

26 @DS("ds2")27 public void saveUser2(User user) {28 (user);29 }30

31 } 1 package ;


本文标签: 界面 开发 作者