diff --git a/src/main/java/com/xcesys/extras/framework/core/controller/BaseCrudController.java b/src/main/java/com/xcesys/extras/framework/core/controller/BaseCrudController.java index dff2eca..3aca3e8 100644 --- a/src/main/java/com/xcesys/extras/framework/core/controller/BaseCrudController.java +++ b/src/main/java/com/xcesys/extras/framework/core/controller/BaseCrudController.java @@ -1,235 +1,234 @@ -package com.xcesys.extras.framework.core.controller; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - -import javax.servlet.http.HttpServletRequest; -import javax.validation.Valid; - -import org.springframework.ui.Model; -import org.springframework.util.Assert; -import org.springframework.validation.BindingResult; -import org.springframework.validation.ObjectError; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.servlet.mvc.support.RedirectAttributes; - -import com.xcesys.extras.framework.core.model.IEditable; - -import lombok.extern.slf4j.Slf4j; - -@Slf4j -public abstract class BaseCrudController extends BaseSearchController { - private static final String METHOD_ADD = "Adding"; - private static final String METHOD_EDIT = "editing"; - private static final String METHOD_VIEW = "Viewing"; - - @GetMapping(value = { "add" }) - public String add(Model model) { - setMethod(model, METHOD_ADD); - setAdding(model, true); - model.addAttribute("m", newModel()); - return view(getSuffix() + "_form"); - } - - @GetMapping(value = "del/{id}") - public String del(ID id, Model model, RedirectAttributes redirectAttributes) { - if (id != null) { - T m = getCrudService().findById(id); - if (m != null && m instanceof IEditable && !((IEditable) m).isEditable()) { - addWarnMessage(model, "该数据为系统固定不可编辑,请选择其他操作!"); - return "redirect:" + getRequestMapping() + "/"; - } - - getCrudService().delete(m); - addSuccessMessage(redirectAttributes, "删除数据成功"); - } - return "redirect:" + getRequestMapping() + "/"; - } - - @PostMapping(value = "del") - public String del(ID[] ids, Model model, RedirectAttributes redirectAttributes) { - if (ids != null && ids.length > 0) { - for (ID id : ids) { - getCrudService().delete(id); - } - addSuccessMessage(redirectAttributes, "删除数据成功"); - } - return "redirect:" + getRequestMapping() + "/"; - } - - // @GetMapping(value = "del/{id}") - // public String del(Model model, @ModelAttribute("m") T m, - // RedirectAttributes redirectAttributes) { - // if (m != null) { - // getCrudService().delete(m); - // addSuccessMessage(redirectAttributes, "删除数据成功"); - // } - // return "redirect:" + getViewPrefix() + "/"; - // } - - /** - * 编辑 - * - * @param model - * ViewModel - * @return - */ - @GetMapping(value = { "edit/{id}" }) - public String edit(@ModelAttribute("m") T m, Model model) { - if (m instanceof IEditable && !((IEditable) m).isEditable()) { - addWarnMessage(model, "该数据为系统固定不可编辑,请选择其他操作!"); - return "redirect:" + getRequestMapping() + "/"; - } - setMethod(model, METHOD_EDIT); - setEditing(model, true); - model.addAttribute("m", m); - return view(getSuffix() + "_form"); - } - - /** - * 设置id为ids参数关联的数据为启用状态,已经启用的不受影响。 - * - * @return - */ - @ResponseBody - @GetMapping(value = "enable") - public int enable(boolean enabled, ID[] ids) { - if (ids != null && ids.length > 0) { - return getCrudService().enable(enabled, ids); - } - return -1; - } - - @ModelAttribute("m") - public T get(Model model, @PathVariable(name = "id", required = false) T m) { - modelAttribute(model, m); - return m == null ? newModel() : m; - } - - /** - * 返回功能后缀字符串 - * - * @return - */ - protected String getSuffix() { - return ""; - } - - /** - * 共享的验证规则 验证失败返回true - * - * @param m - * @param result - * @return - */ - protected boolean hasError(T m, BindingResult result) { - Assert.notNull(m, "Model attribute cannot be null!"); - return result.hasErrors(); - } - - @GetMapping(value = { "", "/" }) - public String list(Model model) { - return view(getSuffix() + "_list"); - } - - protected void modelAttribute(Model model, T m) { - - } - - /** - * 创建新的model实例,重写可添加初始值等初始化工作。 - * - * @return model实例 - */ - protected abstract T newModel(); - - protected void preSave(T m, HttpServletRequest request) { - } - - @PostMapping(value = { "save", "save/{id}" }) - public String save(Model model, @Valid @ModelAttribute("m") T m, BindingResult result, HttpServletRequest request, - RedirectAttributes redirectAttributes) { - // 验证错误,则保持在编辑界面 - if (hasError(m, result)) { - List errors = result.getAllErrors(); - List msgs = new ArrayList(); - for (ObjectError err : errors) { - msgs.add(err.getDefaultMessage()); - } - super.addErrorMessage(model, msgs.toArray(new String[] {})); - return edit(m, model); - } - try { - preSave(m, request); - saveModel(m, request, redirectAttributes); - } catch (Exception e) { - log.error("Error while saving data.", e); - addErrorMessage(model, e.getLocalizedMessage()); - // TODO: Fixed page change logic - return view(getSuffix() + "_form"); - } - return "redirect:" + getRequestMapping() + "/"; - } - - /** - * save方法验证通过后,调用的直接保存模型记录方法。 - * - * @param m - * @param request - * @param redirectAttributes - */ - protected void saveModel(T m, HttpServletRequest request, RedirectAttributes redirectAttributes) { - getCrudService().save(m); - addSuccessMessage(redirectAttributes, "数据保存成功!"); - } - - /** - * 设置Controller当前映射下为新增状态。 - * - * @param model - * UI Model - * @param adding - * true表示正在新增状态,false为非新增状态。 - */ - protected void setAdding(Model model, boolean adding) { - model.addAttribute("adding", adding); - } - - /** - * 设置Controller当前映射下为编辑状态。 - * - * @param model - * UI Model - * @param adding - * true表示正在编辑状态,false为非编辑状态。 - */ - protected void setEditing(Model model, boolean editing) { - model.addAttribute("editing", editing); - } - - /** - * 设置Controller当前映射下为查看状态。 - * - * @param model - * UI Model - * @param adding - * true表示正在查看状态,false为非查看状态。 - */ - protected void setViewing(Model model, boolean viewing) { - model.addAttribute("viewing", viewing); - - } - - @GetMapping(value = "view") - public String view(Model model) { - setMethod(model, METHOD_VIEW); - setViewing(model, true); - return view(getSuffix() + "_form"); - } - +package com.xcesys.extras.framework.core.controller; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.validation.Valid; + +import org.springframework.ui.Model; +import org.springframework.util.Assert; +import org.springframework.validation.BindingResult; +import org.springframework.validation.ObjectError; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.mvc.support.RedirectAttributes; + +import com.xcesys.extras.framework.core.model.IEditable; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +public abstract class BaseCrudController extends BaseSearchController { + protected static final String METHOD_ADD = "Adding"; + protected static final String METHOD_EDIT = "editing"; + protected static final String METHOD_VIEW = "Viewing"; + + @GetMapping(value = { "add" }) + public String add(Model model) { + setMethod(model, METHOD_ADD); + setAdding(model, true); + model.addAttribute("m", newModel()); + return view(getSuffix() + "_form"); + } + + @GetMapping(value = "del/{id}") + public String del(ID id, Model model, RedirectAttributes redirectAttributes) { + if (id != null) { + T m = getCrudService().findById(id); + if (m != null && m instanceof IEditable && !((IEditable) m).isEditable()) { + addWarnMessage(model, "该数据为系统固定不可编辑,请选择其他操作!"); + return "redirect:" + getRequestMapping() + "/"; + } + getCrudService().delete(m); + addSuccessMessage(redirectAttributes, "删除数据成功"); + } + return "redirect:" + getRequestMapping() + "/"; + } + + @PostMapping(value = "del") + public String del(ID[] ids, Model model, RedirectAttributes redirectAttributes, HttpServletRequest request) { + if (ids != null && ids.length > 0) { + for (ID id : ids) { + getCrudService().delete(id); + } + addSuccessMessage(redirectAttributes, "删除数据成功"); + } + return "redirect:" + getRequestMapping() + "/"; + } + + // @GetMapping(value = "del/{id}") + // public String del(Model model, @ModelAttribute("m") T m, + // RedirectAttributes redirectAttributes) { + // if (m != null) { + // getCrudService().delete(m); + // addSuccessMessage(redirectAttributes, "删除数据成功"); + // } + // return "redirect:" + getViewPrefix() + "/"; + // } + + /** + * 编辑 + * + * @param model + * ViewModel + * @return + */ + @GetMapping(value = { "edit/{id}" }) + public String edit(@ModelAttribute("m") T m, Model model, RedirectAttributes redirectAttributes) { + if (m instanceof IEditable && !((IEditable) m).isEditable()) { + addWarnMessage(redirectAttributes, "该数据为系统固定不可编辑,请选择其他操作!"); + return "redirect:" + getRequestMapping() + "/"; + } + setMethod(model, METHOD_EDIT); + setEditing(model, true); + model.addAttribute("m", m); + return view(getSuffix() + "_form"); + } + + /** + * 设置id为ids参数关联的数据为启用状态,已经启用的不受影响。 + * + * @return + */ + @ResponseBody + @GetMapping(value = "enable") + public int enable(boolean enabled, ID[] ids) { + if (ids != null && ids.length > 0) { + return getCrudService().enable(enabled, ids); + } + return -1; + } + + @ModelAttribute("m") + public T get(Model model, @PathVariable(name = "id", required = false) T m) { + modelAttribute(model, m); + return m == null ? newModel() : m; + } + + /** + * 返回功能后缀字符串 + * + * @return + */ + protected String getSuffix() { + return ""; + } + + /** + * 共享的验证规则 验证失败返回true + * + * @param m + * @param result + * @return + */ + protected boolean hasError(T m, BindingResult result) { + Assert.notNull(m, "Model attribute cannot be null!"); + return result.hasErrors(); + } + + @GetMapping(value = { "", "/" }) + public String list(Model model) { + return view(getSuffix() + "_list"); + } + + protected void modelAttribute(Model model, T m) { + + } + + /** + * 创建新的model实例,重写可添加初始值等初始化工作。 + * + * @return model实例 + */ + protected abstract T newModel(); + + protected void preSave(T m, HttpServletRequest request) { + } + + @PostMapping(value = { "save", "save/{id}" }) + public String save(Model model, @Valid @ModelAttribute("m") T m, BindingResult result, HttpServletRequest request, + RedirectAttributes redirectAttributes) { + // 验证错误,则保持在编辑界面 + if (hasError(m, result)) { + List errors = result.getAllErrors(); + List msgs = new ArrayList(); + for (ObjectError err : errors) { + msgs.add(err.getDefaultMessage()); + } + super.addErrorMessage(model, msgs.toArray(new String[] {})); + return edit(m, model, redirectAttributes); + } + try { + preSave(m, request); + saveModel(m, request, redirectAttributes); + } catch (Exception e) { + log.error("Error while saving data.", e); + addErrorMessage(model, e.getLocalizedMessage()); + // TODO: Fixed page change logic + return view(getSuffix() + "_form"); + } + return "redirect:" + getRequestMapping() + "/"; + } + + /** + * save方法验证通过后,调用的直接保存模型记录方法。 + * + * @param m + * @param request + * @param redirectAttributes + */ + protected void saveModel(T m, HttpServletRequest request, RedirectAttributes redirectAttributes) { + m = getCrudService().save(m); + addSuccessMessage(redirectAttributes, "数据保存成功!"); + } + + /** + * 设置Controller当前映射下为新增状态。 + * + * @param model + * UI Model + * @param adding + * true表示正在新增状态,false为非新增状态。 + */ + protected void setAdding(Model model, boolean adding) { + model.addAttribute("adding", adding); + } + + /** + * 设置Controller当前映射下为编辑状态。 + * + * @param model + * UI Model + * @param adding + * true表示正在编辑状态,false为非编辑状态。 + */ + protected void setEditing(Model model, boolean editing) { + model.addAttribute("editing", editing); + } + + /** + * 设置Controller当前映射下为查看状态。 + * + * @param model + * UI Model + * @param adding + * true表示正在查看状态,false为非查看状态。 + */ + protected void setViewing(Model model, boolean viewing) { + model.addAttribute("viewing", viewing); + + } + + @GetMapping(value = "view") + public String view(Model model) { + setMethod(model, METHOD_VIEW); + setViewing(model, true); + return view(getSuffix() + "_form"); + } + } \ No newline at end of file diff --git a/src/main/java/com/xcesys/extras/framework/entity/Dict.java b/src/main/java/com/xcesys/extras/framework/entity/Dict.java index be62b0b..51a5b65 100644 --- a/src/main/java/com/xcesys/extras/framework/entity/Dict.java +++ b/src/main/java/com/xcesys/extras/framework/entity/Dict.java @@ -7,7 +7,9 @@ import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicUpdate; +import org.springframework.data.jpa.datatables.mapping.DataTablesOutput; +import com.fasterxml.jackson.annotation.JsonView; import com.xcesys.extras.framework.core.model.IdAuditableEntity; import lombok.Getter; @@ -23,16 +25,20 @@ @NoArgsConstructor @Getter @Setter -public class Dict extends IdAuditableEntity implements java.io.Serializable { +public class Dict extends IdAuditableEntity { private static final long serialVersionUID = -8572522105499245114L; - private String description; - private Long id; - private String name; - private Integer seq; + @JsonView(DataTablesOutput.View.class) @ManyToOne(fetch = FetchType.LAZY) @JoinColumn private DictType type; + @JsonView(DataTablesOutput.View.class) + private String name; + @JsonView(DataTablesOutput.View.class) private String value; + @JsonView(DataTablesOutput.View.class) + private Integer sort; + @JsonView(DataTablesOutput.View.class) + private String description; } diff --git a/src/main/java/com/xcesys/extras/framework/entity/DictType.java b/src/main/java/com/xcesys/extras/framework/entity/DictType.java index 2ee00ce..530966f 100644 --- a/src/main/java/com/xcesys/extras/framework/entity/DictType.java +++ b/src/main/java/com/xcesys/extras/framework/entity/DictType.java @@ -12,7 +12,10 @@ import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicUpdate; +import org.springframework.data.jpa.datatables.mapping.DataTablesOutput; +import com.fasterxml.jackson.annotation.JsonView; +import com.xcesys.extras.framework.core.model.IEditable; import com.xcesys.extras.framework.core.model.IdAuditableEntity; import lombok.Getter; @@ -26,14 +29,19 @@ @DynamicUpdate @Getter @Setter -public class DictType extends IdAuditableEntity { - - private static final long serialVersionUID = -4470144171936304544L; +public class DictType extends IdAuditableEntity implements IEditable{ + private static final long serialVersionUID = -2334286394502372010L; + @JsonView(DataTablesOutput.View.class) + private String name; + @JsonView(DataTablesOutput.View.class) private String description; - private Integer length; + @JsonView(DataTablesOutput.View.class) + private int length = 1; + @JsonView(DataTablesOutput.View.class) @OneToMany(fetch = FetchType.LAZY) @JoinColumn private Set dicts = new HashSet(0); - private Boolean editable; + @JsonView(DataTablesOutput.View.class) + private boolean editable = true; } diff --git a/src/main/java/com/xcesys/extras/framework/entity/User.java b/src/main/java/com/xcesys/extras/framework/entity/User.java index 2315ae5..ce11950 100644 --- a/src/main/java/com/xcesys/extras/framework/entity/User.java +++ b/src/main/java/com/xcesys/extras/framework/entity/User.java @@ -1,88 +1,87 @@ -package com.xcesys.extras.framework.entity; - -import static javax.persistence.FetchType.EAGER; - -import java.util.Collection; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.Locale; -import java.util.Set; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.JoinColumn; -import javax.persistence.JoinTable; -import javax.persistence.ManyToMany; -import javax.persistence.OneToMany; - -import org.hibernate.annotations.DynamicInsert; -import org.hibernate.annotations.DynamicUpdate; -import org.springframework.data.jpa.datatables.mapping.DataTablesOutput; -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.core.authority.SimpleGrantedAuthority; -import org.springframework.security.core.userdetails.UserDetails; - -import com.fasterxml.jackson.annotation.JsonView; -import com.xcesys.extras.framework.core.model.IEditable; -import com.xcesys.extras.framework.core.model.IdAuditableEntity; - -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.NonNull; -import lombok.RequiredArgsConstructor; -import lombok.Setter; - -@Entity -@DynamicInsert -@DynamicUpdate -@NoArgsConstructor -@RequiredArgsConstructor -@Getter -@Setter -public class User extends IdAuditableEntity implements UserDetails, IEditable { - private static final long serialVersionUID = -6943871074854331138L; - @JsonView(DataTablesOutput.View.class) - private boolean accountNonExpired = true; - @JsonView(DataTablesOutput.View.class) - private boolean accountNonLocked = true; - @JsonView(DataTablesOutput.View.class) - private boolean admin = false; - @JsonView(DataTablesOutput.View.class) - private boolean credentialsNonExpired = true; - @JsonView(DataTablesOutput.View.class) - private boolean editable = true; - @JsonView(DataTablesOutput.View.class) - private String email; - @JsonView(DataTablesOutput.View.class) - private boolean enabled = true; - @JsonView(DataTablesOutput.View.class) - private String fullname; - @JsonView(DataTablesOutput.View.class) - private String mobile; - @NonNull - @JsonView(DataTablesOutput.View.class) - private String password; - @JsonView(DataTablesOutput.View.class) - @OneToMany(fetch = EAGER) - private Set preferenceValues = new HashSet(); - - @JsonView(DataTablesOutput.View.class) - @ManyToMany(fetch = EAGER) - @JoinTable(name = "user_roles", joinColumns = { - @JoinColumn(name = "users_id", nullable = false, updatable = false) }, inverseJoinColumns = { - @JoinColumn(name = "roles_id", nullable = false, updatable = false) }) - private Set roles = new HashSet(); - @Column(unique = true) - @NonNull - @JsonView(DataTablesOutput.View.class) - private String username; - - @Override - public Collection getAuthorities() { - Set grantedAuthorities = new LinkedHashSet<>(); - for (Role role : getRoles()) { - grantedAuthorities.add(new SimpleGrantedAuthority(role.getName())); - } - return grantedAuthorities; - } -} +package com.xcesys.extras.framework.entity; + +import static javax.persistence.FetchType.EAGER; + +import java.util.Collection; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.Set; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.JoinColumn; +import javax.persistence.JoinTable; +import javax.persistence.ManyToMany; +import javax.persistence.OneToMany; + +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; +import org.springframework.data.jpa.datatables.mapping.DataTablesOutput; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.userdetails.UserDetails; + +import com.fasterxml.jackson.annotation.JsonView; +import com.xcesys.extras.framework.core.model.IEditable; +import com.xcesys.extras.framework.core.model.IdAuditableEntity; + +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.NonNull; +import lombok.RequiredArgsConstructor; +import lombok.Setter; + +@Entity +@DynamicInsert +@DynamicUpdate +@NoArgsConstructor +@RequiredArgsConstructor +@Getter +@Setter +public class User extends IdAuditableEntity implements UserDetails, IEditable { + private static final long serialVersionUID = -6943871074854331138L; + @JsonView(DataTablesOutput.View.class) + private boolean accountNonExpired = true; + @JsonView(DataTablesOutput.View.class) + private boolean accountNonLocked = true; + @JsonView(DataTablesOutput.View.class) + private boolean admin = false; + @JsonView(DataTablesOutput.View.class) + private boolean credentialsNonExpired = true; + @JsonView(DataTablesOutput.View.class) + private boolean editable = true; + @JsonView(DataTablesOutput.View.class) + private String email; + @JsonView(DataTablesOutput.View.class) + private boolean enabled = true; + @JsonView(DataTablesOutput.View.class) + private String fullname; + @JsonView(DataTablesOutput.View.class) + private String mobile; + @NonNull + @JsonView(DataTablesOutput.View.class) + private String password; + @JsonView(DataTablesOutput.View.class) + @OneToMany(fetch = EAGER) + private Set preferenceValues = new HashSet(); + + @JsonView(DataTablesOutput.View.class) + @ManyToMany(fetch = EAGER) + @JoinTable(name = "user_roles", joinColumns = { + @JoinColumn(name = "users_id", nullable = false, updatable = false) }, inverseJoinColumns = { + @JoinColumn(name = "roles_id", nullable = false, updatable = false) }) + private Set roles = new HashSet(); + @Column(unique = true) + @NonNull + @JsonView(DataTablesOutput.View.class) + private String username; + + @Override + public Collection getAuthorities() { + Set grantedAuthorities = new LinkedHashSet<>(); + for (Role role : getRoles()) { + grantedAuthorities.add(new SimpleGrantedAuthority(role.getName())); + } + return grantedAuthorities; + } +} diff --git a/src/main/java/com/xcesys/extras/framework/repository/DictRepository.java b/src/main/java/com/xcesys/extras/framework/repository/DictRepository.java new file mode 100644 index 0000000..50f7345 --- /dev/null +++ b/src/main/java/com/xcesys/extras/framework/repository/DictRepository.java @@ -0,0 +1,13 @@ +package com.xcesys.extras.framework.repository; + +import com.xcesys.extras.framework.core.repository.IBaseRepository; +import com.xcesys.extras.framework.entity.Dict; + +public interface DictRepository extends IBaseRepository { + + Dict findByName(String name); + + int countByTypeIdAndName(Long typeId, String name); + + Iterable findByTypeId(Long id); +} diff --git a/src/main/java/com/xcesys/extras/framework/repository/DictTypeRepository.java b/src/main/java/com/xcesys/extras/framework/repository/DictTypeRepository.java new file mode 100644 index 0000000..33b5131 --- /dev/null +++ b/src/main/java/com/xcesys/extras/framework/repository/DictTypeRepository.java @@ -0,0 +1,11 @@ +package com.xcesys.extras.framework.repository; + +import com.xcesys.extras.framework.core.repository.IBaseRepository; +import com.xcesys.extras.framework.entity.DictType; + +public interface DictTypeRepository extends IBaseRepository { + + DictType findByName(String name); + + int countByName(String name); +} diff --git a/src/main/java/com/xcesys/extras/framework/service/DictService.java b/src/main/java/com/xcesys/extras/framework/service/DictService.java new file mode 100644 index 0000000..74a1a05 --- /dev/null +++ b/src/main/java/com/xcesys/extras/framework/service/DictService.java @@ -0,0 +1,36 @@ +package com.xcesys.extras.framework.service; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.xcesys.extras.framework.core.repository.IBaseRepository; +import com.xcesys.extras.framework.core.service.impl.BaseCrudService; +import com.xcesys.extras.framework.entity.Dict; +import com.xcesys.extras.framework.repository.DictRepository; + +@Service +@Transactional +public class DictService extends BaseCrudService { + @Autowired + private DictRepository reposity; + + public Dict findByName(String Dictname) { + return reposity.findByName(Dictname); + } + + @Override + public IBaseRepository getRepository() { + return reposity; + } + + public int countByTypeIdAndName(Long typeId, String name) { + return reposity.countByTypeIdAndName(typeId, name); + } + + public Iterable findByTypeId(@Param("typeId") Long typeId) { + return reposity.findByTypeId(typeId); + } + +} diff --git a/src/main/java/com/xcesys/extras/framework/service/DictTypeService.java b/src/main/java/com/xcesys/extras/framework/service/DictTypeService.java new file mode 100644 index 0000000..28aea50 --- /dev/null +++ b/src/main/java/com/xcesys/extras/framework/service/DictTypeService.java @@ -0,0 +1,31 @@ +package com.xcesys.extras.framework.service; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.xcesys.extras.framework.core.repository.IBaseRepository; +import com.xcesys.extras.framework.core.service.impl.BaseCrudService; +import com.xcesys.extras.framework.entity.DictType; +import com.xcesys.extras.framework.repository.DictTypeRepository; + +@Service +@Transactional +public class DictTypeService extends BaseCrudService { + @Autowired + private DictTypeRepository reposity; + + public DictType findByName(String DictTypename) { + return reposity.findByName(DictTypename); + } + + @Override + public IBaseRepository getRepository() { + return reposity; + } + + public int countByName(String name) { + return reposity.countByName(name); + } + +} diff --git a/src/main/java/com/xcesys/extras/framework/service/RoleService.java b/src/main/java/com/xcesys/extras/framework/service/RoleService.java index 9a50827..ce1bf8e 100644 --- a/src/main/java/com/xcesys/extras/framework/service/RoleService.java +++ b/src/main/java/com/xcesys/extras/framework/service/RoleService.java @@ -9,33 +9,26 @@ import com.xcesys.extras.framework.entity.Role; import com.xcesys.extras.framework.repository.RoleRepository; -import lombok.extern.slf4j.Slf4j; - @Service @Transactional -@Slf4j public class RoleService extends BaseCrudService { @Autowired - private RoleRepository roleRepository; - - public int countByname(String username) { - return roleRepository.countByName(username); - } + private RoleRepository repository; public Role findByName(String Rolename) { - return roleRepository.findByName(Rolename); + return repository.findByName(Rolename); } @Override public IBaseRepository getRepository() { - return roleRepository; + return repository; } public int countByName(String name) { - return roleRepository.countByName(name); + return repository.countByName(name); } public Role usersInRole(Long id) { - return roleRepository.findUsersById(id); + return repository.findUsersById(id); } } diff --git a/src/main/java/com/xcesys/extras/framework/service/SettingService.java b/src/main/java/com/xcesys/extras/framework/service/SettingService.java index 5a0c046..278a328 100644 --- a/src/main/java/com/xcesys/extras/framework/service/SettingService.java +++ b/src/main/java/com/xcesys/extras/framework/service/SettingService.java @@ -9,33 +9,26 @@ import com.xcesys.extras.framework.entity.Setting; import com.xcesys.extras.framework.repository.SettingRepository; -import lombok.extern.slf4j.Slf4j; - @Service @Transactional -@Slf4j public class SettingService extends BaseCrudService { @Autowired - private SettingRepository settingRepository; - - public int countByname(String username) { - return settingRepository.countByName(username); - } + private SettingRepository repository; public Setting findByName(String name) { - return settingRepository.findByName(name); + return repository.findByName(name); } @Override public IBaseRepository getRepository() { - return settingRepository; + return repository; } public int countByName(String name) { - return settingRepository.countByName(name); + return repository.countByName(name); } public Setting usersInSetting(Long id) { - return settingRepository.findUsersById(id); + return repository.findUsersById(id); } } diff --git a/src/main/java/com/xcesys/extras/framework/service/UserService.java b/src/main/java/com/xcesys/extras/framework/service/UserService.java index 37f558e..1742edb 100644 --- a/src/main/java/com/xcesys/extras/framework/service/UserService.java +++ b/src/main/java/com/xcesys/extras/framework/service/UserService.java @@ -10,11 +10,8 @@ import com.xcesys.extras.framework.entity.User; import com.xcesys.extras.framework.repository.UserRepository; -import lombok.extern.slf4j.Slf4j; - @Service @Transactional -@Slf4j public class UserService extends BaseCrudService { @Autowired(required = false) private PasswordEncoder passwordEncoder; diff --git a/src/main/java/com/xcesys/extras/framework/web/controller/system/DictController.java b/src/main/java/com/xcesys/extras/framework/web/controller/system/DictController.java new file mode 100644 index 0000000..4d97e41 --- /dev/null +++ b/src/main/java/com/xcesys/extras/framework/web/controller/system/DictController.java @@ -0,0 +1,115 @@ +package com.xcesys.extras.framework.web.controller.system; + +import javax.servlet.http.HttpServletRequest; +import javax.validation.Valid; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.jpa.datatables.mapping.DataTablesInput; +import org.springframework.data.jpa.datatables.mapping.DataTablesOutput; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.mvc.support.RedirectAttributes; + +import com.fasterxml.jackson.annotation.JsonView; +import com.xcesys.extras.framework.core.controller.BaseCrudController; +import com.xcesys.extras.framework.core.service.ICrudService; +import com.xcesys.extras.framework.core.util.ConvertUtils; +import com.xcesys.extras.framework.entity.Dict; +import com.xcesys.extras.framework.service.DictService; +import com.xcesys.extras.framework.service.DictTypeService; + +@Controller +@RequestMapping("/system/dict") +public class DictController extends BaseCrudController { + @Autowired + private DictService service; + + @Autowired + private DictTypeService typeService; + + @GetMapping(value = { "add/{typeId}" }) + public String add(@PathVariable("typeId") Long typeId, Model model) { + setMethod(model, METHOD_ADD); + setAdding(model, true); + Dict dict = newModel(); + model.addAttribute("typeId", typeId); + model.addAttribute("m", dict); + return view(getSuffix() + "_form"); + } + + @ResponseBody + @JsonView(DataTablesOutput.View.class) + @GetMapping(value = "/datatable") + public DataTablesOutput datatable(@Valid DataTablesInput input) { + return service.findAll(input); + } + + @Override + @PostMapping(value = "del") + public String del(Long[] ids, Model model, RedirectAttributes redirectAttributes, HttpServletRequest request) { + String ret = super.del(ids, model, redirectAttributes, request); + return ret + request.getParameter("typeId"); + } + + @Override + @GetMapping(value = { "edit/{id}" }) + public String edit(@ModelAttribute("m") Dict m, Model model, RedirectAttributes redirectAttributes) { + String result = super.edit(m, model, redirectAttributes); + model.addAttribute("typeId", m.getType() == null ? "" : m.getType().getId()); + return result; + } + + @Override + protected ICrudService getCrudService() { + return service; + } + + @Override + protected String getSuffix() { + return "dict"; + } + + @GetMapping(value = { "/{typeId}" }) + public String list(@PathVariable("typeId") Long typeId, Model model) { + model.addAttribute("list", service.findByTypeId(typeId)); + model.addAttribute("typeId", typeId); + return view(getSuffix() + "_list"); + } + + protected Dict newModel() { + Dict dict = new Dict(); + return dict; + } + + @Override + protected void preSave(Dict m, HttpServletRequest request) { + String typeId = request.getParameter("typeId"); + if (typeId != null) { + m.setType(typeService.findById(ConvertUtils.convertObjectToLong(typeId))); + } + } + + @Override + @PostMapping(value = { "save", "save/{id}" }) + public String save(Model model, Dict m, BindingResult result, HttpServletRequest request, + RedirectAttributes redirectAttributes) { + super.save(model, m, result, request, redirectAttributes); + return "redirect:" + getRequestMapping() + "/" + m.getType().getId(); + } + + @GetMapping(value = "unique/{typeId}") + @ResponseBody + public boolean unique(@PathVariable("typeId") Long typeId, String name, String oldName) { + if (!StringUtils.isBlank(oldName) && oldName.trim().equals(name)) + return true; + return service.countByTypeIdAndName(typeId, name) <= 0; + } +} diff --git a/src/main/java/com/xcesys/extras/framework/web/controller/system/DictTypeController.java b/src/main/java/com/xcesys/extras/framework/web/controller/system/DictTypeController.java new file mode 100644 index 0000000..b7ccdd4 --- /dev/null +++ b/src/main/java/com/xcesys/extras/framework/web/controller/system/DictTypeController.java @@ -0,0 +1,55 @@ +package com.xcesys.extras.framework.web.controller.system; + +import javax.validation.Valid; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.jpa.datatables.mapping.DataTablesInput; +import org.springframework.data.jpa.datatables.mapping.DataTablesOutput; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import com.fasterxml.jackson.annotation.JsonView; +import com.xcesys.extras.framework.core.controller.BaseCrudController; +import com.xcesys.extras.framework.core.service.ICrudService; +import com.xcesys.extras.framework.entity.DictType; +import com.xcesys.extras.framework.service.DictTypeService; + +@Controller +@RequestMapping("/system/dicttype") +public class DictTypeController extends BaseCrudController { + @Autowired + private DictTypeService service; + + @ResponseBody + @JsonView(DataTablesOutput.View.class) + @GetMapping(value = "/datatable") + public DataTablesOutput datatable(@Valid DataTablesInput input) { + return service.findAll(input); + } + + @Override + protected ICrudService getCrudService() { + return service; + } + + @Override + protected String getSuffix() { + return "dicttype"; + } + + protected DictType newModel() { + DictType dicttype = new DictType(); + return dicttype; + } + + @GetMapping(value = "unique") + @ResponseBody + public boolean unique(String name, String oldName) { + if (!StringUtils.isBlank(oldName) && oldName.trim().equals(name)) + return true; + return service.countByName(name) <= 0; + } +} diff --git a/src/main/java/com/xcesys/extras/framework/web/controller/system/RoleController.java b/src/main/java/com/xcesys/extras/framework/web/controller/system/RoleController.java index ae6897f..ae9b7de 100644 --- a/src/main/java/com/xcesys/extras/framework/web/controller/system/RoleController.java +++ b/src/main/java/com/xcesys/extras/framework/web/controller/system/RoleController.java @@ -21,18 +21,18 @@ @RequestMapping("/system/role") public class RoleController extends BaseCrudController { @Autowired - private RoleService roleService; + private RoleService service; @ResponseBody @JsonView(DataTablesOutput.View.class) @GetMapping(value = "/datatable") public DataTablesOutput datatable(@Valid DataTablesInput input) { - return roleService.findAll(input); + return service.findAll(input); } @Override protected ICrudService getCrudService() { - return roleService; + return service; } @Override @@ -50,6 +50,6 @@ protected Role newModel() { public boolean unique(String name, String oldName) { if (!StringUtils.isBlank(oldName) && oldName.trim().equals(name)) return true; - return roleService.countByName(name) <= 0; + return service.countByName(name) <= 0; } } diff --git a/src/main/java/com/xcesys/extras/framework/web/controller/system/SettingController.java b/src/main/java/com/xcesys/extras/framework/web/controller/system/SettingController.java index c9b07b7..593d840 100644 --- a/src/main/java/com/xcesys/extras/framework/web/controller/system/SettingController.java +++ b/src/main/java/com/xcesys/extras/framework/web/controller/system/SettingController.java @@ -21,18 +21,18 @@ @RequestMapping("/system/setting") public class SettingController extends BaseCrudController { @Autowired - private SettingService settingService; + private SettingService service; @ResponseBody @JsonView(DataTablesOutput.View.class) @GetMapping(value = "/datatable") public DataTablesOutput datatable(@Valid DataTablesInput input) { - return settingService.findAll(input); + return service.findAll(input); } @Override protected ICrudService getCrudService() { - return settingService; + return service; } @Override @@ -50,6 +50,6 @@ protected Setting newModel() { public boolean unique(String name, String oldName) { if (!StringUtils.isBlank(oldName) && oldName.trim().equals(name)) return true; - return settingService.countByName(name) <= 0; + return service.countByName(name) <= 0; } } diff --git a/src/main/java/com/xcesys/extras/framework/web/controller/system/UserController.java b/src/main/java/com/xcesys/extras/framework/web/controller/system/UserController.java index 0fa7583..763a5bf 100644 --- a/src/main/java/com/xcesys/extras/framework/web/controller/system/UserController.java +++ b/src/main/java/com/xcesys/extras/framework/web/controller/system/UserController.java @@ -27,13 +27,13 @@ public class UserController extends BaseCrudController { @Autowired(required = false) PasswordEncoder passwordEncoder = NoOpPasswordEncoder.getInstance(); @Autowired - UserService userService; + UserService service; @Autowired RoleService roleService; @Override protected ICrudService getCrudService() { - return userService; + return service; } @Override @@ -68,7 +68,7 @@ protected void preSave(User m, HttpServletRequest request) { @GetMapping(value = "resetpwd") public int resetpwd(Long[] ids) { if (ids != null && ids.length > 0) { - return userService.resetpwd(ids); + return service.resetpwd(ids); } return -1; } @@ -78,6 +78,6 @@ public int resetpwd(Long[] ids) { public boolean unique(String username, String oldUsername) { if (!StringUtils.isBlank(oldUsername) && oldUsername.trim().equals(username)) return true; - return userService.countByUsername(username) <= 0; + return service.countByUsername(username) <= 0; } } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 254ef74..dc78fd2 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,52 +1,52 @@ -application.name=Spring Boot Starter -application.version=0.0.1 -application.theme=/static/themes/lte -spring.application.name=spring-boot-starter -spring.application.environment=localhost - -#spring.profiles.active=localhost - -spring.messages.basename=messages,com/xcesys/extras/**/*.properties - -spring.datasource.url=jdbc:mysql://localhost:3306/test -spring.datasource.username=test -spring.datasource.password=test -spring.datasource.driver-class-name=com.mysql.jdbc.Driver - -#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL57InnoDBDialect -spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect -spring.jpa.properties.hibernate.hbm2ddl.auto=update -spring.jpa.show-sql=true - -######################################################## -### Spring MVC -######################################################## -#spring.mvc.view.prefix:/WEB-INF/views/ -#spring.mvc.view.suffix:.jsp -spring.mvc.static-path-pattern=/static/** -spring.resources.static-locations=/resources/ - -######################################################## -###Spring Security -######################################################## -security.basic.enabled: false - -######################################################## -###THYMELEAF (ThymeleafAutoConfiguration) -######################################################## -spring.thymeleaf.cache=false -spring.thymeleaf.prefix=/WEB-INF/templates/ -#spring.thymeleaf.suffix=.html -#spring.thymeleaf.mode=HTML5 -#spring.thymeleaf.encoding=UTF-8 -#spring.thymeleaf.content-type=text/html -# set to false for hot refresh - -# Date format string or a fully-qualified date format class name. For instance `yyyy-MM-dd HH:mm:ss`. -spring.jackson.date-format=yyyy-MM-dd HH:mm:ss -# Joda date time format string. If not configured, "date-format" will be used as a fallback if it is configured with a format string. -spring.jackson.joda-date-time-format=yyyy-MM-dd HH:mm:ss - -logging.level.org.springframework.security: INFO -logging.level.org.springframework.boot.actuate.audit.listener.AuditListener: DEBUG - +application.name=Spring Boot Starter +application.version=0.0.1 +application.theme=/static/themes/lte +spring.application.name=spring-boot-starter +spring.application.environment=localhost + +#spring.profiles.active=localhost + +spring.messages.basename=messages,com/xcesys/extras/system/messages + +spring.datasource.url=jdbc:mysql://localhost:3306/test +spring.datasource.username=test +spring.datasource.password=test +spring.datasource.driver-class-name=com.mysql.jdbc.Driver + +#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL57InnoDBDialect +spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect +spring.jpa.properties.hibernate.hbm2ddl.auto=update +spring.jpa.show-sql=true + +######################################################## +### Spring MVC +######################################################## +#spring.mvc.view.prefix:/WEB-INF/views/ +#spring.mvc.view.suffix:.jsp +spring.mvc.static-path-pattern=/static/** +spring.resources.static-locations=/resources/ + +######################################################## +###Spring Security +######################################################## +security.basic.enabled: false + +######################################################## +###THYMELEAF (ThymeleafAutoConfiguration) +######################################################## +spring.thymeleaf.cache=false +spring.thymeleaf.prefix=/WEB-INF/templates/ +#spring.thymeleaf.suffix=.html +#spring.thymeleaf.mode=HTML5 +#spring.thymeleaf.encoding=UTF-8 +#spring.thymeleaf.content-type=text/html +# set to false for hot refresh + +# Date format string or a fully-qualified date format class name. For instance `yyyy-MM-dd HH:mm:ss`. +spring.jackson.date-format=yyyy-MM-dd HH:mm:ss +# Joda date time format string. If not configured, "date-format" will be used as a fallback if it is configured with a format string. +spring.jackson.joda-date-time-format=yyyy-MM-dd HH:mm:ss + +logging.level.org.springframework.security: INFO +logging.level.org.springframework.boot.actuate.audit.listener.AuditListener: DEBUG + diff --git a/src/main/resources/com/xcesys/extras/system/messages.properties b/src/main/resources/com/xcesys/extras/system/messages.properties new file mode 100644 index 0000000..66910df --- /dev/null +++ b/src/main/resources/com/xcesys/extras/system/messages.properties @@ -0,0 +1 @@ +users.list.page.title=List of Users \ No newline at end of file diff --git a/src/main/resources/com/xcesys/extras/system/messages_zh_CN.properties b/src/main/resources/com/xcesys/extras/system/messages_zh_CN.properties new file mode 100644 index 0000000..efd6896 --- /dev/null +++ b/src/main/resources/com/xcesys/extras/system/messages_zh_CN.properties @@ -0,0 +1 @@ +user.list.page.title=\u7528\u6236\u5217\u8868 \ No newline at end of file diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties index 0561dfa..e69de29 100644 --- a/src/main/resources/messages.properties +++ b/src/main/resources/messages.properties @@ -1 +0,0 @@ -page.title=List of Users \ No newline at end of file diff --git a/src/main/resources/messages_zh_CN.properties b/src/main/resources/messages_zh_CN.properties index 19eef66..e69de29 100644 --- a/src/main/resources/messages_zh_CN.properties +++ b/src/main/resources/messages_zh_CN.properties @@ -1 +0,0 @@ -page.title=\u7528\u6236\u5217\u8868 \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/templates/fragments/sidebar.html b/src/main/webapp/WEB-INF/templates/fragments/sidebar.html index 0dc6ac7..d43dba3 100644 --- a/src/main/webapp/WEB-INF/templates/fragments/sidebar.html +++ b/src/main/webapp/WEB-INF/templates/fragments/sidebar.html @@ -94,6 +94,9 @@
  • 参数
  • +
  • 字典 +
  • 用户
  • diff --git a/src/main/webapp/WEB-INF/templates/layouts/layout.html b/src/main/webapp/WEB-INF/templates/layouts/layout.html index 3e8d6fa..7138846 100644 --- a/src/main/webapp/WEB-INF/templates/layouts/layout.html +++ b/src/main/webapp/WEB-INF/templates/layouts/layout.html @@ -157,6 +157,8 @@ toastr.error(error); if (success) toastr.success(success); + if (warning) + toastr.warning(warning); $('input').iCheck({ checkboxClass : 'icheckbox_square-blue', radioClass : 'iradio_square-blue', diff --git a/src/main/webapp/WEB-INF/templates/pages/system/dict/dict_form.html b/src/main/webapp/WEB-INF/templates/pages/system/dict/dict_form.html new file mode 100644 index 0000000..72e1d4b --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/pages/system/dict/dict_form.html @@ -0,0 +1,99 @@ + + + + + 编辑系统字典 + + + + + + + +
    +
    +
    +

    编辑系统字典

    +
    +
    +
    +
    + + + +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    + 返回 + + +
    +
    +
    +
    +
    +
    +
    + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/templates/pages/system/dict/dict_list.html b/src/main/webapp/WEB-INF/templates/pages/system/dict/dict_list.html new file mode 100644 index 0000000..8dacc77 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/pages/system/dict/dict_list.html @@ -0,0 +1,96 @@ + + + + +字典值 + + + + + + + + +
    +
    +
    +

    字典值列表

    +
    + +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + +
    名称排序描述更新时间操作
    +
    + + +
    +
    +
    +
    +
    +
    + +
    + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/templates/pages/system/dicttype/dicttype_form.html b/src/main/webapp/WEB-INF/templates/pages/system/dicttype/dicttype_form.html new file mode 100644 index 0000000..53d0855 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/pages/system/dicttype/dicttype_form.html @@ -0,0 +1,92 @@ + + + + + 编辑系统字典类型 + + + + + + + +
    +
    +
    +

    编辑系统字典类型

    +
    +
    +
    +
    + +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    + 返回 + + +
    +
    +
    +
    +
    +
    +
    + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/templates/pages/system/dicttype/dicttype_list.html b/src/main/webapp/WEB-INF/templates/pages/system/dicttype/dicttype_list.html new file mode 100644 index 0000000..3697540 --- /dev/null +++ b/src/main/webapp/WEB-INF/templates/pages/system/dicttype/dicttype_list.html @@ -0,0 +1,154 @@ + + + + + 字典类型 + + + + + + + + +
    +
    +
    +

    字典类型

    +
    + + +
    +
    +
    + +
    +
    +
    + +
    + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/templates/pages/system/role/role_list.html b/src/main/webapp/WEB-INF/templates/pages/system/role/role_list.html index 283c4e2..36737cf 100644 --- a/src/main/webapp/WEB-INF/templates/pages/system/role/role_list.html +++ b/src/main/webapp/WEB-INF/templates/pages/system/role/role_list.html @@ -11,7 +11,7 @@ - +
    @@ -31,7 +31,7 @@

    系统角色

    全选 角色名 描述 - 更新时间 + 更新时间 操作 可编辑 diff --git a/src/main/webapp/WEB-INF/templates/pages/system/setting/setting_list.html b/src/main/webapp/WEB-INF/templates/pages/system/setting/setting_list.html index 8df9fd7..002be38 100644 --- a/src/main/webapp/WEB-INF/templates/pages/system/setting/setting_list.html +++ b/src/main/webapp/WEB-INF/templates/pages/system/setting/setting_list.html @@ -32,7 +32,7 @@

    系统参数

    名称 值 描述 - 更新时间 + 更新时间 操作 diff --git a/src/main/webapp/WEB-INF/templates/pages/system/user/user_list.html b/src/main/webapp/WEB-INF/templates/pages/system/user/user_list.html index 771651c..afd1574 100644 --- a/src/main/webapp/WEB-INF/templates/pages/system/user/user_list.html +++ b/src/main/webapp/WEB-INF/templates/pages/system/user/user_list.html @@ -1,60 +1,60 @@ - - - - - 系统用户 - - - - - - - - -
    -
    -
    -

    系统用户

    -
    - - -
    -
    -
    - -
    -
    -
    - -
    - - - - - + + + + + 系统用户 + + + + + + + + +
    +
    +
    +

    系统用户

    +
    + + +
    +
    +
    + +
    +
    +
    + +
    + + + + + \ No newline at end of file