From d188743f49db18fc76eb171d671dea251057e620 Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Tue, 17 Jun 2025 17:20:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/lingtao/net/bean/SysUser.java | 275 ++++++----- .../lingtao/net/service/ProductService.java | 108 ++++- .../lingtao/net/service/SysUserService.java | 451 +++++++++--------- src/main/webapp/views/main.jsp | 6 +- src/main/webapp/views/product/landa.jsp | 320 +++++++++++++ src/main/webapp/views/product/metal.jsp | 5 + src/main/webapp/views/product/pet.jsp | 317 ++++++++++++ .../webapp/views/product/specialCard2.jsp | 37 +- 8 files changed, 1132 insertions(+), 387 deletions(-) create mode 100644 src/main/webapp/views/product/landa.jsp create mode 100644 src/main/webapp/views/product/pet.jsp diff --git a/src/main/java/lingtao/net/bean/SysUser.java b/src/main/java/lingtao/net/bean/SysUser.java index 1d55371..42e4ffa 100644 --- a/src/main/java/lingtao/net/bean/SysUser.java +++ b/src/main/java/lingtao/net/bean/SysUser.java @@ -6,203 +6,202 @@ import lombok.Data; /** * 用户 - * - * @author Administrator * + * @author Administrator */ @Data public class SysUser { - private Integer userId; + private Integer userId; - public Integer getUserId() { - return userId; - } + public Integer getUserId() { + return userId; + } - public void setUserId(Integer userId) { - this.userId = userId; - } + public void setUserId(Integer userId) { + this.userId = userId; + } - public String getRealname() { - return realname; - } + public String getRealname() { + return realname; + } - public void setRealname(String realname) { - this.realname = realname; - } + public void setRealname(String realname) { + this.realname = realname; + } - public String getUsername() { - return username; - } + public String getUsername() { + return username; + } - public void setUsername(String username) { - this.username = username; - } + public void setUsername(String username) { + this.username = username; + } - public String getPassword() { - return password; - } + public String getPassword() { + return password; + } - public void setPassword(String password) { - this.password = password; - } + public void setPassword(String password) { + this.password = password; + } - public String getUserStatus() { - return userStatus; - } + public String getUserStatus() { + return userStatus; + } - public void setUserStatus(String userStatus) { - this.userStatus = userStatus; - } + public void setUserStatus(String userStatus) { + this.userStatus = userStatus; + } - public String getRole() { - return role; - } + public String getRole() { + return role; + } - public void setRole(String role) { - this.role = role; - } + public void setRole(String role) { + this.role = role; + } - public String getSysStatus() { - return sysStatus; - } + public String getSysStatus() { + return sysStatus; + } - public void setSysStatus(String sysStatus) { - this.sysStatus = sysStatus; - } + public void setSysStatus(String sysStatus) { + this.sysStatus = sysStatus; + } - public String getReadLogStatus() { - return readLogStatus; - } + public String getReadLogStatus() { + return readLogStatus; + } - public void setReadLogStatus(String readLogStatus) { - this.readLogStatus = readLogStatus; - } + public void setReadLogStatus(String readLogStatus) { + this.readLogStatus = readLogStatus; + } - public String getCreateBy() { - return createBy; - } + public String getCreateBy() { + return createBy; + } - public void setCreateBy(String createBy) { - this.createBy = createBy; - } + public void setCreateBy(String createBy) { + this.createBy = createBy; + } - public Date getCreateDate() { - return createDate; - } + public Date getCreateDate() { + return createDate; + } - public void setCreateDate(Date createDate) { - this.createDate = createDate; - } + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } - public String getUpdateBy() { - return updateBy; - } + public String getUpdateBy() { + return updateBy; + } - public void setUpdateBy(String updateBy) { - this.updateBy = updateBy; - } + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } - public Date getUpdateDate() { - return updateDate; - } + public Date getUpdateDate() { + return updateDate; + } - public void setUpdateDate(Date updateDate) { - this.updateDate = updateDate; - } + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } - public String getBirthDay() { - return birthDay; - } + public String getBirthDay() { + return birthDay; + } - public void setBirthDay(String birthDay) { - this.birthDay = birthDay; - } + public void setBirthDay(String birthDay) { + this.birthDay = birthDay; + } - public String getBirthType() { - return birthType; - } + public String getBirthType() { + return birthType; + } - public void setBirthType(String birthType) { - this.birthType = birthType; - } + public void setBirthType(String birthType) { + this.birthType = birthType; + } - public Integer getIsBirthDay() { - return isBirthDay; - } + public Integer getIsBirthDay() { + return isBirthDay; + } - public void setIsBirthDay(Integer isBirthDay) { - this.isBirthDay = isBirthDay; - } + public void setIsBirthDay(Integer isBirthDay) { + this.isBirthDay = isBirthDay; + } - public String getEntryDate() { - return entryDate; - } + public String getEntryDate() { + return entryDate; + } - public void setEntryDate(String entryDate) { - this.entryDate = entryDate; - } + public void setEntryDate(String entryDate) { + this.entryDate = entryDate; + } - public String getNeedIp() { - return needIp; - } + public String getNeedIp() { + return needIp; + } - public void setNeedIp(String needIp) { - this.needIp = needIp; - } + public void setNeedIp(String needIp) { + this.needIp = needIp; + } - public String getRoleSearch() { - return roleSearch; - } + public String getRoleSearch() { + return roleSearch; + } - public void setRoleSearch(String roleSearch) { - this.roleSearch = roleSearch; - } + public void setRoleSearch(String roleSearch) { + this.roleSearch = roleSearch; + } - public String[] getRoleArr() { - return roleArr; - } + public String[] getRoleArr() { + return roleArr; + } - public void setRoleArr(String[] roleArr) { - this.roleArr = roleArr; - } + public void setRoleArr(String[] roleArr) { + this.roleArr = roleArr; + } - private String realname; + private String realname; - private String username; + private String username; - private String password; + private String password; - private String userStatus; + private String userStatus; - private String role; + private String role; - private String sysStatus; + private String sysStatus; - private String readLogStatus; + private String readLogStatus; - private String createBy; + private String createBy; - private Date createDate; + private Date createDate; - private String updateBy; + private String updateBy; - private Date updateDate; + private Date updateDate; - private String birthDay; + private String birthDay; - private String birthType; + private String birthType; - private Integer isBirthDay; + private Integer isBirthDay; - private String entryDate; + private String entryDate; - // 是否需要判断IP 0:否 1:是 - private String needIp; + // 是否需要判断IP 0:否 1:是 + private String needIp; - // 根据角色查找用户 - private String roleSearch; + // 根据角色查找用户 + private String roleSearch; - // 用户所拥有角色数组 - private String[] roleArr; + // 用户所拥有角色数组 + private String[] roleArr; } \ No newline at end of file diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index afb629c..37b31bd 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -4658,31 +4658,103 @@ public class ProductService { double[] areas = {1, 4, 6, 9, 12, 16, 20, 25, 36, 45, 48.6, 54, 60, 72, 81}; area = length * width; - for (int i = 0; i < count_list.length; i++) { - int count_item = count_list[i]; - if (priceList.size() > 2) { - break; - } - if (count > count_item) { - continue; - } - int count_index = Arrays.binarySearch(count_list, count_item); - price = 0; - if (count_index >= 0) { - price = new PriceUtils().TablePrice(area, prices[count_index], areas); - } - Product product = new Product(); - product.setCount(count_item); - product.setPrice(Math.ceil(price * number)); - priceList.add(product); + return getAreaCenterPrice(count_list, count, area, prices, areas, number); + case "透卡": + prices = new int[][]{ + {136, 163, 177, 190, 197, 227, 257, 303, 333, 407, 430}, + {193, 250, 277, 300, 313, 373, 433, 530, 587, 733, 780}, + {250, 337, 373, 410, 430, 520, 613, 757, 840, 1063, 1133}, + {307, 423, 473, 523, 547, 670, 790, 983, 1097, 1390, 1483}, + {333, 463, 520, 573, 603, 737, 873, 1090, 1210, 1540, 1643}, + {490, 697, 783, 873, 917, 1133, 1350, 1693, 1890, 2417, 2580}, + {533, 760, 857, 953, 1003, 1237, 1477, 1853, 2067, 2643, 2823}, + {990, 1440, 1633, 1830, 1927, 2397, 2873, 3627, 4057, 5207, 5567}, + {2007, 2943, 3347, 3747, 3950, 4927, 5910, 7473, 8367, 10743, 11490}, + {3013, 4413, 5013, 5613, 5913, 7373, 8847, 11180, 12513, 14077, 16007}, + }; + count_list = new int[]{100, 200, 300, 400, 500, 800, 1000, 2000, 5000, 10000}; + areas = new double[]{22.5, 35.1, 40.5, 45.9, 48.6, 67.75, 75, 96, 108, 140, 150}; + area = length * width; + return getAreaCenterPrice(count_list, count, area, prices, areas, number); + case "澜达海报": + //铜版纸200g (售价) + prices = new int[][]{ + {90, 90, 90, 90, 90, 94, 94, 94, 94}, + {100, 100, 100, 100, 100, 187, 187, 187, 187}, + {140, 140, 140, 140, 140, 280, 280, 280, 280}, + {187, 187, 187, 187, 187, 374, 374, 374, 374}, + {234, 234, 234, 234, 234, 467, 467, 467, 467}, + {467, 467, 467, 467, 467, 934, 934, 934, 934}, + {934, 934, 934, 934, 934, 1867, 1867, 1867, 1867}, + {2334, 2334, 2334, 2334, 2334, 4667, 4667, 4667, 4667}, + {4667, 4667, 4667, 4667, 4667, 9334, 9334, 9334, 9334}, + {9334, 9334, 9334, 9334, 9334, 18667, 18667, 18667, 18667}, + {23334, 23334, 23334, 23334, 23334, 46667, 46667, 46667, 46667}, + }; + if ("2".equals(dto.getKind())) { + prices = new int[][]{ + {90, 90, 90, 90, 90, 107, 107, 107, 107}, + {100, 107, 107, 107, 107, 213, 213, 213, 213}, + {120, 160, 160, 160, 160, 320, 320, 320, 320}, + {150, 213, 213, 213, 213, 427, 427, 427, 427}, + {139, 267, 267, 267, 267, 533, 533, 533, 533}, + {267, 533, 533, 533, 533, 1067, 1067, 1067, 1067}, + {533, 1067, 1067, 1067, 1067, 2133, 2133, 2133, 2133}, + {1333, 2667, 2667, 2667, 2667, 5333, 5333, 5333, 5333}, + {2667, 5333, 5333, 5333, 5333, 10667, 10667, 10667, 10667}, + {5333, 10667, 10667, 10667, 10667, 21333, 21333, 21333, 21333}, + {13333, 26667, 26667, 26667, 26667, 53333, 53333, 53333, 53333}, + }; } - return priceList; + if ("3".equals(dto.getKind())) { + prices = new int[][]{ + {90, 90, 90, 90, 90, 150, 150, 150, 150}, + {100, 140, 140, 150, 150, 300, 300, 300, 300}, + {110, 207, 207, 223, 223, 447, 447, 447, 447}, + {140, 277, 277, 300, 300, 597, 597, 597, 597}, + {180, 347, 347, 373, 373, 747, 747, 747, 747}, + {347, 693, 693, 747, 747, 1493, 1493, 1493, 1493}, + {693, 1387, 1387, 1493, 1493, 2987, 2987, 2987, 2987}, + {1733, 3467, 3467, 3733, 3733, 7467, 7467, 7467, 7467}, + {3467, 6933, 6933, 7467, 7467, 14933, 14933, 14933, 14933}, + {6933, 13867, 13867, 14933, 14933, 29867, 29867, 29867, 29867}, + {17333, 34667, 34667, 37333, 37333, 74667, 74667, 74667, 74667}, + }; + } + count_list = new int[]{10, 20, 30, 40, 50, 100, 200, 500, 1000, 2000, 5000}; + areas = new double[]{1197, 1716, 2394, 2596, 3430, 3467.1, 4788, 5192, 6860}; + area = length * width; + + return getAreaCenterPrice(count_list, count, area, prices, areas, number); default: break; } return null; } + private List getAreaCenterPrice(int[] count_list, int count, double area, int[][] prices, double[] areas, int number) { + List priceList = new ArrayList<>(); + for (int i = 0; i < count_list.length; i++) { + int count_item = count_list[i]; + if (priceList.size() > 2) { + break; + } + if (count > count_item) { + continue; + } + int count_index = Arrays.binarySearch(count_list, count_item); + double price = 0; + if (count_index >= 0) { + price = new PriceUtils().TablePrice(area, prices[count_index], areas); + } + Product product = new Product(); + product.setCount(count_item); + product.setPrice(Math.ceil(price * number)); + priceList.add(product); + } + return priceList; + } + private List lessSticker(Product dto, String kind, Integer number, Double width, Double length, int count, List stickersList, String role) { double price = 0.0; diff --git a/src/main/java/lingtao/net/service/SysUserService.java b/src/main/java/lingtao/net/service/SysUserService.java index 7844c7a..287cdee 100644 --- a/src/main/java/lingtao/net/service/SysUserService.java +++ b/src/main/java/lingtao/net/service/SysUserService.java @@ -18,252 +18,253 @@ import lingtao.net.util.MD5Util; @Service public class SysUserService { - @Autowired - private SysUserMapper userMapper; + @Autowired + private SysUserMapper userMapper; - // 注册 - public Msg register(SysUser user) { - user.setPassword(new MD5Util().md5(user.getPassword(), "lingtao")); - user.setCreateDate(new Date()); - // 注册的用户都是未激活状态 - user.setUserStatus("0"); - // 注册的用户都是系统功能隐藏状态 - user.setSysStatus("0"); - // 注册的用户不需要判断IP - user.setNeedIp("1"); - String roleId = user.getRole(); - if (StringUtils.isEmpty(roleId)) - return null; - // 给用户赋予角色 - user.setRole("999," + roleId); - // user.setRole("999"); - // Integer[] ids = {999}; - int count = userMapper.insertSelective(user); - // 根据角色的id把角色的权限给用户 - Integer[] ids = { 999, Integer.valueOf(roleId) }; - // 新增用户后会自动回补id - Integer userId = user.getUserId(); - userMapper.addUserRoles(userId, ids); - if (count < 0) { - return Msg.fail(); - } - return Msg.success(); - } + // 注册 + public Msg register(SysUser user) { + user.setPassword(new MD5Util().md5(user.getPassword(), "lingtao")); + user.setCreateDate(new Date()); + // 注册的用户都是未激活状态 + user.setUserStatus("0"); + // 注册的用户都是系统功能隐藏状态 + user.setSysStatus("0"); + // 注册的用户不需要判断IP + user.setNeedIp("1"); + String roleId = user.getRole(); + if (StringUtils.isEmpty(roleId)) + return null; + // 给用户赋予角色 + user.setRole("999," + roleId); + // user.setRole("999"); + // Integer[] ids = {999}; + int count = userMapper.insertSelective(user); + // 根据角色的id把角色的权限给用户 + Integer[] ids = {999, Integer.valueOf(roleId)}; + // 新增用户后会自动回补id + Integer userId = user.getUserId(); + userMapper.addUserRoles(userId, ids); + if (count < 0) { + return Msg.fail(); + } + return Msg.success(); + } - public List getUsers(SysUser user) { - // 用户所拥有的角色 - String[] roleArr = user.getRole().split(","); - // 转成list,拿掉‘组长’身份 - List list = new ArrayList(Arrays.asList(roleArr)); - // 判断是否拥有超管身份标识 - boolean isSuper = false; - for (int i = 0; i < roleArr.length; i++) { - // 有‘超级管理员’身份,状态改为true - if ("1".equals(roleArr[i])) { - isSuper = true; - break; - } + public List getUsers(SysUser user) { + // 用户所拥有的角色 + String[] roleArr = user.getRole().split(","); + // 转成list,拿掉‘组长’身份 + List list = new ArrayList(Arrays.asList(roleArr)); + // 判断是否拥有超管身份标识 + boolean isSuper = false; + for (int i = 0; i < roleArr.length; i++) { + // 有‘超级管理员’身份,状态改为true + if ("1".equals(roleArr[i])) { + isSuper = true; + break; + } - // 如果有【店长/考试审核员/客服/组长/IP管理员/操作日志/不填旺旺】身份,去掉。不带去查询 - if ("666".equals(roleArr[i]) || "888".equals(roleArr[i]) || "999".equals(roleArr[i]) - || "1011".equals(roleArr[i]) || "1015".equals(roleArr[i]) || "1042".equals(roleArr[i]) - || "1049".equals(roleArr[i])) { - list.remove(roleArr[i]); - } - } - // 将list转为String[] 数组 - roleArr = list.toArray(new String[list.size()]); + // 如果有【店长/考试审核员/客服/组长/IP管理员/操作日志/不填旺旺】身份,去掉。不带去查询 + if ("666".equals(roleArr[i]) || "888".equals(roleArr[i]) || "999".equals(roleArr[i]) + || "1011".equals(roleArr[i]) || "1015".equals(roleArr[i]) || "1042".equals(roleArr[i]) + || "1049".equals(roleArr[i])) { + list.remove(roleArr[i]); + } + } + // 将list转为String[] 数组 + roleArr = list.toArray(new String[list.size()]); - // 如果没有‘超级管理员’身份,只能看到负责的部门的用户;如果有可以看到所有用户 - if (!isSuper) { - // 如果是通过‘用户角色’查询 - if (StringUtils.isNotEmpty(user.getRoleSearch())) { - // 清除自己拥有的角色,防止查询出所有的部门数据 - roleArr = null; - } - // 如果有多个 - if (user.getRole().contains(",")) { - user.setRoleArr(roleArr); - } else {// 只有一个角色 - user.setRoleSearch(user.getRole()); - } - } + // 如果没有‘超级管理员’身份,只能看到负责的部门的用户;如果有可以看到所有用户 + if (!isSuper) { + // 如果是通过‘用户角色’查询 + if (StringUtils.isNotEmpty(user.getRoleSearch())) { + // 清除自己拥有的角色,防止查询出所有的部门数据 + roleArr = null; + } + // 如果有多个 + if (user.getRole().contains(",")) { + user.setRoleArr(roleArr); + } else {// 只有一个角色 + user.setRoleSearch(user.getRole()); + } + } - return userMapper.getUsers(user); - } + return userMapper.getUsers(user); + } - // 检查用户名是否存在 - public Msg checkUsername(String username) { - SysUser user = userMapper.getUserByUsername(username); - if (user != null) { - return Msg.fail(); - } - return Msg.success(); - } + // 检查用户名是否存在 + public Msg checkUsername(String username) { + SysUser user = userMapper.getUserByUsername(username); + if (user != null) { + return Msg.fail(); + } + return Msg.success(); + } - // 新增 - public Msg addUser(SysUser user) { - user.setPassword(new MD5Util().md5(user.getPassword(), "lingtao")); - user.setCreateDate(new Date()); - try { - userMapper.insertSelective(user); - return Msg.success(); - } catch (Exception e) { - return Msg.fail(); - } - } + // 新增 + public Msg addUser(SysUser user) { + user.setPassword(new MD5Util().md5(user.getPassword(), "lingtao")); + user.setCreateDate(new Date()); + user.setSysStatus("2"); + try { + userMapper.insertSelective(user); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } - // 修改 - public Msg updateUserById(SysUser user) { - if (!"********".equals(user.getPassword())) { // 如果改过密码 - user.setPassword(new MD5Util().md5(user.getPassword(), "lingtao")); - } else { - user.setPassword(null); - } - // 如果有【店长】身份,更改的角色前面添加【客服】 - SysUser user2 = (SysUser) SecurityUtils.getSubject().getPrincipal(); - boolean flag = false; - String[] role = user2.getRole().split(","); - for (int i = 0; i < role.length; i++) { - if ("666".equals(role[i])) { - flag = true; - break; - } - } - if (flag) { - user.setRole("999," + user.getRole()); - } - user.setUpdateDate(new Date()); - try { - userMapper.updateByPrimaryKeySelective(user); - return Msg.success(); - } catch (Exception e) { - return Msg.fail(); - } - } + // 修改 + public Msg updateUserById(SysUser user) { + if (!"********".equals(user.getPassword())) { // 如果改过密码 + user.setPassword(new MD5Util().md5(user.getPassword(), "lingtao")); + } else { + user.setPassword(null); + } + // 如果有【店长】身份,更改的角色前面添加【客服】 + SysUser user2 = (SysUser) SecurityUtils.getSubject().getPrincipal(); + boolean flag = false; + String[] role = user2.getRole().split(","); + for (int i = 0; i < role.length; i++) { + if ("666".equals(role[i])) { + flag = true; + break; + } + } + if (flag) { + user.setRole("999," + user.getRole()); + } + user.setUpdateDate(new Date()); + try { + userMapper.updateByPrimaryKeySelective(user); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } - // 删除用户 - public Msg deleteUserById(Integer userId) { - try { - userMapper.deleteByPrimaryKey(userId); - return Msg.success(); - } catch (Exception e) { - return Msg.fail("主外键关联,删除失败!"); - } - } + // 删除用户 + public Msg deleteUserById(Integer userId) { + try { + userMapper.deleteByPrimaryKey(userId); + return Msg.success(); + } catch (Exception e) { + return Msg.fail("主外键关联,删除失败!"); + } + } - // 改变用户状态 - public Msg changeUserStatus(Integer userId) { - try { - userMapper.changeUserStatus(userId); - return Msg.success(); - } catch (Exception e) { - return Msg.fail(); - } - } + // 改变用户状态 + public Msg changeUserStatus(Integer userId) { + try { + userMapper.changeUserStatus(userId); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } - public void addUserRoles(Integer userId, Integer[] ids) { - userMapper.addUserRoles(userId, ids); - } + public void addUserRoles(Integer userId, Integer[] ids) { + userMapper.addUserRoles(userId, ids); + } - public void deleteUserRoles(Integer userId) { - userMapper.deleteUserRoles(userId); - } + public void deleteUserRoles(Integer userId) { + userMapper.deleteUserRoles(userId); + } - public Msg updatePassword(SysUser user) { - user.setPassword(new MD5Util().md5(user.getPassword(), "lingtao")); - int i = userMapper.updateByPrimaryKeySelective(user); - if (i > 0) { - return Msg.success(); - } - return Msg.fail(); - } + public Msg updatePassword(SysUser user) { + user.setPassword(new MD5Util().md5(user.getPassword(), "lingtao")); + int i = userMapper.updateByPrimaryKeySelective(user); + if (i > 0) { + return Msg.success(); + } + return Msg.fail(); + } - public Msg addBirthDay(SysUser user) { - SysUser sysUser = (SysUser) SecurityUtils.getSubject().getPrincipal(); - user.setUserId(sysUser.getUserId()); - user.setIsBirthDay(0); - int i = userMapper.updateByPrimaryKeySelective(user); - if (i > 0) { - return Msg.success(); - } - return Msg.fail(); - } + public Msg addBirthDay(SysUser user) { + SysUser sysUser = (SysUser) SecurityUtils.getSubject().getPrincipal(); + user.setUserId(sysUser.getUserId()); + user.setIsBirthDay(0); + int i = userMapper.updateByPrimaryKeySelective(user); + if (i > 0) { + return Msg.success(); + } + return Msg.fail(); + } - // 改变用户生日状态 - public Msg changeIsBirthDay(Integer userId) { - try { - userMapper.changeIsBirthDay(userId); - return Msg.success(); - } catch (Exception e) { - return Msg.fail(); - } - } + // 改变用户生日状态 + public Msg changeIsBirthDay(Integer userId) { + try { + userMapper.changeIsBirthDay(userId); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } - public Msg changeNeedIp() { - try { - userMapper.changeNeedIp(); - return Msg.success(); - } catch (Exception e) { - return Msg.fail(); - } - } + public Msg changeNeedIp() { + try { + userMapper.changeNeedIp(); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } - // 改变用户系统状态(管理员调整) - public Msg changeSysStatus(Integer userId) { - try { - userMapper.changeSysStatus(userId); - return Msg.success(); - } catch (Exception e) { - return Msg.fail(); - } - } + // 改变用户系统状态(管理员调整) + public Msg changeSysStatus(Integer userId) { + try { + userMapper.changeSysStatus(userId); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } - // 改变用户系统状态(看完视频) - public Msg videoOverToChangeSysStatus(Integer userId) { - try { - userMapper.videoOverToChangeSysStatus(userId); - return Msg.success(); - } catch (Exception e) { - return Msg.fail(); - } - } + // 改变用户系统状态(看完视频) + public Msg videoOverToChangeSysStatus(Integer userId) { + try { + userMapper.videoOverToChangeSysStatus(userId); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } - // 改变用户系统状态(答题通过) - public Msg examOverToChangeSysStatus(Integer userId) { - try { - userMapper.examOverToChangeSysStatus(userId); - return Msg.success(); - } catch (Exception e) { - return Msg.fail(); - } - } + // 改变用户系统状态(答题通过) + public Msg examOverToChangeSysStatus(Integer userId) { + try { + userMapper.examOverToChangeSysStatus(userId); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } - // 改变阅读更新日志状态 - public Msg changeReadLogStatus(Integer userId) { - try { - userMapper.changeReadLogStatus(userId); - return Msg.success(); - } catch (Exception e) { - return Msg.fail(); - } - } + // 改变阅读更新日志状态 + public Msg changeReadLogStatus(Integer userId) { + try { + userMapper.changeReadLogStatus(userId); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } - public SysUser getUserInfo(Integer userId) { - try { - return userMapper.getUserInfo(userId); - } catch (Exception e) { - return null; - } - } + public SysUser getUserInfo(Integer userId) { + try { + return userMapper.getUserInfo(userId); + } catch (Exception e) { + return null; + } + } - /** - * 客服数据 -- 根据搜索的店铺获取人员 - * - * @return - */ - public List getRealnamesByShopname(String shopname) { - return userMapper.getRealnamesByShopname(shopname); - } + /** + * 客服数据 -- 根据搜索的店铺获取人员 + * + * @return + */ + public List getRealnamesByShopname(String shopname) { + return userMapper.getRealnamesByShopname(shopname); + } } diff --git a/src/main/webapp/views/main.jsp b/src/main/webapp/views/main.jsp index add3474..8fd4dcd 100644 --- a/src/main/webapp/views/main.jsp +++ b/src/main/webapp/views/main.jsp @@ -355,6 +355,9 @@ left: 650px; top: 250px; } + .swiper-slide{ + text-align: center; + } + \ No newline at end of file diff --git a/src/main/webapp/views/product/metal.jsp b/src/main/webapp/views/product/metal.jsp index 2e969d1..3ca3032 100644 --- a/src/main/webapp/views/product/metal.jsp +++ b/src/main/webapp/views/product/metal.jsp @@ -183,6 +183,11 @@ + + + + + diff --git a/src/main/webapp/views/product/pet.jsp b/src/main/webapp/views/product/pet.jsp new file mode 100644 index 0000000..47361af --- /dev/null +++ b/src/main/webapp/views/product/pet.jsp @@ -0,0 +1,317 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + +
+
+

透卡

+
+
+ +

+ 材质 +

+
+ +
+

+ 尺寸(CM/厘米) 输入格式: 长 * 宽 +

+
+ +
+ +

+ 数量(个) +

+
+ +
+

+ 款数 +

+
+ +
+

+ 客户旺旺 +

+
+ +
+

+ 工艺 +

+
+
+ 印面: + +
+
+ 常见工艺: + + +
+
+ 裁切工艺: + + + +
+
+
+
+ + +
+

计算结果- + +

+
+ + <%@include file="../acountExpressFee.jsp" %> +
+
+
+
+
+
+
+ +
+
+ +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/specialCard2.jsp b/src/main/webapp/views/product/specialCard2.jsp index ec89bfb..167310d 100644 --- a/src/main/webapp/views/product/specialCard2.jsp +++ b/src/main/webapp/views/product/specialCard2.jsp @@ -479,6 +479,13 @@ }); return false; } + if (craft_list.indexOf("打码") > -1 && craft_list.indexOf("异形模切") > -1) { + $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox"); + $(data.elem).prop("checked", false); + layer.msg("打码 - 异形模切不能同时选择", {offset: ['300px', '300px']}, function () { + }); + return false; + } if (craft_list.indexOf("击凸") > -1 || craft_list.indexOf("压凹") > -1) { $("#color_type").show(); $("#color_type").find("select").attr("disabled", false); @@ -513,6 +520,13 @@ } } ); + if (craft_list.indexOf("打码") > -1 && craft_list.indexOf("异形模切") > -1) { + $(data.elem).next().attr("class", "layui-unselect layui-form-checkbox"); + $(data.elem).prop("checked", false); + layer.msg("打码 - 异形模切不能同时选择", {offset: ['300px', '300px']}, function () { + }); + return false; + } $("#dakong").removeAttr('disabled'); $("#craft_mo").removeAttr('disabled'); $(".newCraft").children().removeAttr('disabled'); @@ -651,22 +665,37 @@ } } var arr = [] + let ma_num = $("select[name='maxian'] option:selected").val(); + let is_dama = false; $("input:checkbox[name='craft']:checked").each(function (i) { if (!$(this).is(':disabled')) { if ($(this).val() != "双面覆哑膜") { if ($(this).val() == "单面烫金" || $(this).val() == "双面烫金") { let tangColor = $("#tang_type select[name='craft'] option:selected").val(); arr.push($(this).val() + tangColor); - } - else if ($(this).val() == "打码") { - let ma_num = $("select[name='maxian'] option:selected").val(); + } else if ($(this).val() == "打码") { + is_dama = true; arr.push($(this).val() + ma_num + "个"); - }else { + } else { arr.push($(this).val()); } } } }); + if (is_dama) { + if ((size.split("*")[0] < 9 || size.split("*")[1] < 5.4) && (size.split("*")[0] < 5.4 || size.split("*")[1] < 9)) { + layer.msg("打码尺寸不能小于9*5.4 cm", {offset: ['300px', '300px']}, function () { + }); + return false; + } + if (ma_num > 1) { + if ((size.split("*")[0] < 13 || size.split("*")[1] < 4.5) && (size.split("*")[0] < 4.5 || size.split("*")[1] < 13)) { + layer.msg("打码尺寸小于13*4.5 cm不能打多个码", {offset: ['300px', '300px']}, function () { + }); + return false; + } + } + } if (kindValueSelect == '素芸') { let color = $("select[name='craft']:not(:disabled) option:selected").val() if (color) {