1、增加商城功能
This commit is contained in:
@@ -64,7 +64,7 @@ public class StartedEventListener implements ApplicationListener<ContextRefreshe
|
|||||||
|
|
||||||
GamePlaywayRepository playwayRes = event.getApplicationContext().getBean(GamePlaywayRepository.class) ;
|
GamePlaywayRepository playwayRes = event.getApplicationContext().getBean(GamePlaywayRepository.class) ;
|
||||||
List<GamePlayway> gamePlaywayList = playwayRes.findAll() ;
|
List<GamePlayway> gamePlaywayList = playwayRes.findAll() ;
|
||||||
if(gamePlaywayList.size() > 0){
|
if(gamePlaywayList != null){
|
||||||
for(GamePlayway playway : gamePlaywayList){
|
for(GamePlayway playway : gamePlaywayList){
|
||||||
CacheHelper.getSystemCacheBean().put(playway.getId(), playway, playway.getOrgi());
|
CacheHelper.getSystemCacheBean().put(playway.getId(), playway, playway.getOrgi());
|
||||||
}
|
}
|
||||||
@@ -72,7 +72,7 @@ public class StartedEventListener implements ApplicationListener<ContextRefreshe
|
|||||||
|
|
||||||
GameRoomRepository gameRoomRes = event.getApplicationContext().getBean(GameRoomRepository.class) ;
|
GameRoomRepository gameRoomRes = event.getApplicationContext().getBean(GameRoomRepository.class) ;
|
||||||
List<GameRoom> gameRoomList = gameRoomRes.findAll() ;
|
List<GameRoom> gameRoomList = gameRoomRes.findAll() ;
|
||||||
if(gameRoomList.size() > 0){
|
if(gameRoomList!= null){
|
||||||
for(GameRoom gameRoom : gameRoomList){
|
for(GameRoom gameRoom : gameRoomList){
|
||||||
if(gameRoom.isCardroom()){
|
if(gameRoom.isCardroom()){
|
||||||
gameRoomRes.delete(gameRoom);//回收房卡房间资源
|
gameRoomRes.delete(gameRoom);//回收房卡房间资源
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.beimi.config.web;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.springframework.core.convert.converter.Converter;
|
||||||
|
|
||||||
|
public class StringToDateConverter implements Converter<String, Date> {
|
||||||
|
private static final String dateFormat = "yyyy-MM-dd HH:mm:ss";
|
||||||
|
private static final String shortDateFormat = "yyyy-MM-dd";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Date convert(String source) {
|
||||||
|
if (StringUtils.isBlank(source)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
source = source.trim();
|
||||||
|
try {
|
||||||
|
if (source.contains("-")) {
|
||||||
|
SimpleDateFormat formatter;
|
||||||
|
if (source.contains(":")) {
|
||||||
|
formatter = new SimpleDateFormat(dateFormat);
|
||||||
|
} else {
|
||||||
|
formatter = new SimpleDateFormat(shortDateFormat);
|
||||||
|
}
|
||||||
|
Date dtDate = formatter.parse(source);
|
||||||
|
return dtDate;
|
||||||
|
} else if (source.matches("^\\d+$")) {
|
||||||
|
Long lDate = new Long(source);
|
||||||
|
return new Date(lDate);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(String.format("parser %s to Date fail", source));
|
||||||
|
}
|
||||||
|
throw new RuntimeException(String.format("parser %s to Date fail", source));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
31
src/main/java/com/beimi/config/web/WebConfigBeans.java
Normal file
31
src/main/java/com/beimi/config/web/WebConfigBeans.java
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
package com.beimi.config.web;
|
||||||
|
|
||||||
|
import javax.annotation.PostConstruct;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.core.convert.support.GenericConversionService;
|
||||||
|
import org.springframework.web.bind.support.ConfigurableWebBindingInitializer;
|
||||||
|
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class WebConfigBeans {
|
||||||
|
@Autowired
|
||||||
|
private RequestMappingHandlerAdapter handlerAdapter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 增加字符串转日期的功能
|
||||||
|
*/
|
||||||
|
@PostConstruct
|
||||||
|
public void initEditableValidation() {
|
||||||
|
|
||||||
|
ConfigurableWebBindingInitializer initializer = (ConfigurableWebBindingInitializer) handlerAdapter
|
||||||
|
.getWebBindingInitializer();
|
||||||
|
if (initializer.getConversionService() != null) {
|
||||||
|
GenericConversionService genericConversionService = (GenericConversionService) initializer
|
||||||
|
.getConversionService();
|
||||||
|
genericConversionService.addConverter(new StringToDateConverter());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,6 +13,7 @@ public class BMDataContext {
|
|||||||
public static final String DEFAULT_TYPE = "default" ; //默认分类代码
|
public static final String DEFAULT_TYPE = "default" ; //默认分类代码
|
||||||
public static final String BEIMI_SYSTEM_DIC = "com.dic.system.template";
|
public static final String BEIMI_SYSTEM_DIC = "com.dic.system.template";
|
||||||
public static final String BEIMI_SYSTEM_GAME_TYPE_DIC = "com.dic.game.type";
|
public static final String BEIMI_SYSTEM_GAME_TYPE_DIC = "com.dic.game.type";
|
||||||
|
public static final String BEIMI_SHOP_WARES_TYPE_DIC = "com.dic.shop.warestype";
|
||||||
public static final String BEIMI_SYSTEM_GAME_SCENE_DIC = "com.dic.scene.item";
|
public static final String BEIMI_SYSTEM_GAME_SCENE_DIC = "com.dic.scene.item";
|
||||||
|
|
||||||
public static final String BEIMI_SYSTEM_GAME_CARDTYPE_DIC = "com.dic.game.dizhu.cardtype";
|
public static final String BEIMI_SYSTEM_GAME_CARDTYPE_DIC = "com.dic.game.dizhu.cardtype";
|
||||||
|
|||||||
@@ -2,20 +2,15 @@ package com.beimi.web.handler;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import com.beimi.util.Menu;
|
import com.beimi.util.Menu;
|
||||||
import com.beimi.web.service.repository.jpa.UserRepository;
|
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class ApplicationController extends Handler{
|
public class ApplicationController extends Handler{
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private UserRepository userRepository;
|
|
||||||
|
|
||||||
@RequestMapping("/")
|
@RequestMapping("/")
|
||||||
@Menu(type = "apps" , subtype = "index" , access = false)
|
@Menu(type = "apps" , subtype = "index" , access = false)
|
||||||
public ModelAndView admin(HttpServletRequest request) {
|
public ModelAndView admin(HttpServletRequest request) {
|
||||||
|
|||||||
@@ -106,6 +106,17 @@ public class GuestPlayerController extends Handler{
|
|||||||
playerResultData.setGametype(gameConfig.getGamemodel());
|
playerResultData.setGametype(gameConfig.getGamemodel());
|
||||||
playerResultData.setNoaiwaitime(gameConfig.getTimeout()); //无AI的时候 等待时长
|
playerResultData.setNoaiwaitime(gameConfig.getTimeout()); //无AI的时候 等待时长
|
||||||
playerResultData.setNoaimsg(gameConfig.getTimeoutmsg()); //无AI的时候,到达最大时长以后的 提示消息,提示完毕后,解散房间
|
playerResultData.setNoaimsg(gameConfig.getTimeoutmsg()); //无AI的时候,到达最大时长以后的 提示消息,提示完毕后,解散房间
|
||||||
|
|
||||||
|
playerResultData.setSubsidy(gameConfig.isSubsidy()); //是否启用了破产补助
|
||||||
|
playerResultData.setSubtimes(gameConfig.getSubtimes()); //每天破产补助的次数
|
||||||
|
playerResultData.setSubgolds(gameConfig.getSubgolds()); //每次破产补助的金额
|
||||||
|
|
||||||
|
playerResultData.setSubmsg(gameConfig.getSubmsg());
|
||||||
|
|
||||||
|
playerResultData.setRecmsg(gameConfig.getRecmsg());
|
||||||
|
|
||||||
|
playerResultData.setLefttimes(gameConfig.getSubtimes()); //需要从数据库中查询当天剩余次数
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 封装 游戏对象,发送到客户端
|
* 封装 游戏对象,发送到客户端
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ import com.beimi.web.service.repository.jpa.UserRepository;
|
|||||||
@Controller
|
@Controller
|
||||||
public class AppsController extends Handler{
|
public class AppsController extends Handler{
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private UserRepository userRes;
|
|
||||||
|
|
||||||
@RequestMapping({"/apps/content"})
|
@RequestMapping({"/apps/content"})
|
||||||
@Menu(type="apps", subtype="content")
|
@Menu(type="apps", subtype="content")
|
||||||
public ModelAndView content(ModelMap map , HttpServletRequest request){
|
public ModelAndView content(ModelMap map , HttpServletRequest request){
|
||||||
|
|||||||
@@ -0,0 +1,104 @@
|
|||||||
|
package com.beimi.web.handler.apps.business.platform;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
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.domain.PageRequest;
|
||||||
|
import org.springframework.data.domain.Sort;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import com.beimi.core.BMDataContext;
|
||||||
|
import com.beimi.util.Menu;
|
||||||
|
import com.beimi.util.cache.CacheHelper;
|
||||||
|
import com.beimi.web.handler.Handler;
|
||||||
|
import com.beimi.web.model.SysDic;
|
||||||
|
import com.beimi.web.model.Wares;
|
||||||
|
import com.beimi.web.service.repository.jpa.SkuRepository;
|
||||||
|
import com.beimi.web.service.repository.jpa.WaresRepository;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/apps/shop")
|
||||||
|
public class GameShopController extends Handler{
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WaresRepository waresRes ;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SkuRepository skuRes ;
|
||||||
|
|
||||||
|
@RequestMapping({"/wares"})
|
||||||
|
@Menu(type="shop", subtype="wares")
|
||||||
|
public ModelAndView account(ModelMap map , HttpServletRequest request , @Valid String type){
|
||||||
|
if(!StringUtils.isBlank(type)) {
|
||||||
|
SysDic dic = (SysDic) CacheHelper.getSystemCacheBean().getCacheObject(type, BMDataContext.SYSTEM_ORGI) ;
|
||||||
|
if(dic!=null) {
|
||||||
|
map.addAttribute("dic" , dic) ;
|
||||||
|
map.addAttribute("waresList" , waresRes.findByOrgiAndWarestype(super.getOrgi(request), dic.getId() , new PageRequest(super.getP(request), super.getPs(request), Sort.Direction.ASC, "inx"))) ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return request(super.createAppsTempletResponse("/apps/business/platform/shop/index"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/add")
|
||||||
|
@Menu(type="shop", subtype="wares")
|
||||||
|
public ModelAndView add(ModelMap map , HttpServletRequest request, @Valid String type) {
|
||||||
|
if(!StringUtils.isBlank(type)) {
|
||||||
|
Wares wares = new Wares();
|
||||||
|
wares.setWarestype(type);
|
||||||
|
map.addAttribute("wares" , wares) ;
|
||||||
|
map.addAttribute("type" , type) ;
|
||||||
|
}
|
||||||
|
return request(super.createRequestPageTempletResponse("/apps/business/platform/shop/wares/add"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/save")
|
||||||
|
@Menu(type="shop", subtype="wares")
|
||||||
|
public ModelAndView save(HttpServletRequest request ,@Valid Wares wares , @RequestParam(value = "imageurl", required = false) MultipartFile imageurl) {
|
||||||
|
wares.setOrgi(super.getOrgi(request));
|
||||||
|
wares.setCreater(super.getUser(request).getId());
|
||||||
|
wares.setCreatetime(new Date());
|
||||||
|
wares.setImageurl("");
|
||||||
|
waresRes.save(wares) ;
|
||||||
|
return request(super.createRequestPageTempletResponse("redirect:/apps/shop/wares.html?type="+wares.getWarestype()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping("/delete")
|
||||||
|
@Menu(type = "admin" , subtype = "role")
|
||||||
|
public ModelAndView userroledelete(HttpServletRequest request ,@Valid String id) {
|
||||||
|
Wares wares= waresRes.findByIdAndOrgi(id, super.getOrgi(request)) ;
|
||||||
|
if(wares!=null){
|
||||||
|
waresRes.delete(wares) ;
|
||||||
|
}
|
||||||
|
return request(super.createRequestPageTempletResponse("redirect:/apps/shop/wares.html?type="+wares.getWarestype()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/edit")
|
||||||
|
@Menu(type="shop", subtype="wares")
|
||||||
|
public ModelAndView edit(ModelMap map ,HttpServletRequest request , @Valid String id) {
|
||||||
|
map.addAttribute("wares", waresRes.findByIdAndOrgi(id, super.getOrgi(request))) ;
|
||||||
|
return request(super.createRequestPageTempletResponse("/apps/business/platform/shop/wares/edit")) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/update")
|
||||||
|
@Menu(type="shop", subtype="wares")
|
||||||
|
public ModelAndView update(HttpServletRequest request ,@Valid Wares wares) {
|
||||||
|
Wares temp = waresRes.findByIdAndOrgi(wares.getId(), super.getOrgi(request)) ;
|
||||||
|
if(temp != null){
|
||||||
|
temp.setName(wares.getName());
|
||||||
|
temp.setUpdatetime(new Date());
|
||||||
|
temp.setOrgi(super.getOrgi(request));
|
||||||
|
waresRes.save(wares) ;
|
||||||
|
}
|
||||||
|
return request(super.createRequestPageTempletResponse("redirect:/apps/shop/wares.html?type="+wares.getWarestype()));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -80,6 +80,8 @@ public class UserInterceptorHandler extends HandlerInterceptorAdapter {
|
|||||||
view.addObject("systemConfig", new SystemConfig()) ;
|
view.addObject("systemConfig", new SystemConfig()) ;
|
||||||
}
|
}
|
||||||
view.addObject("gameTypeList", BeiMiDic.getInstance().getDic(BMDataContext.BEIMI_SYSTEM_GAME_TYPE_DIC)) ;
|
view.addObject("gameTypeList", BeiMiDic.getInstance().getDic(BMDataContext.BEIMI_SYSTEM_GAME_TYPE_DIC)) ;
|
||||||
|
|
||||||
|
view.addObject("shopWaresTypeList", BeiMiDic.getInstance().getDic(BMDataContext.BEIMI_SHOP_WARES_TYPE_DIC)) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,12 @@ public class GameConfig implements java.io.Serializable{
|
|||||||
private boolean anysdkshare ; //启用 AnySDK分享
|
private boolean anysdkshare ; //启用 AnySDK分享
|
||||||
private boolean anysdklogin ; //启用 AnySDK登录验证
|
private boolean anysdklogin ; //启用 AnySDK登录验证
|
||||||
|
|
||||||
|
private boolean subsidy ; //启用破产补助
|
||||||
|
private int subtimes ; //破产补助次数
|
||||||
|
private int subgolds ; //破产补助金额
|
||||||
|
private String submsg ; //破产补助的提示消息
|
||||||
|
private String recmsg ; //金币不足的提示,和破产补助提示 同时判断,如果还有破产补助,就不会提示这个
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@Column(length = 32)
|
@Column(length = 32)
|
||||||
@GeneratedValue(generator = "system-uuid")
|
@GeneratedValue(generator = "system-uuid")
|
||||||
@@ -272,4 +278,34 @@ public class GameConfig implements java.io.Serializable{
|
|||||||
public void setAnysdklogin(boolean anysdklogin) {
|
public void setAnysdklogin(boolean anysdklogin) {
|
||||||
this.anysdklogin = anysdklogin;
|
this.anysdklogin = anysdklogin;
|
||||||
}
|
}
|
||||||
|
public boolean isSubsidy() {
|
||||||
|
return subsidy;
|
||||||
|
}
|
||||||
|
public void setSubsidy(boolean subsidy) {
|
||||||
|
this.subsidy = subsidy;
|
||||||
|
}
|
||||||
|
public int getSubtimes() {
|
||||||
|
return subtimes;
|
||||||
|
}
|
||||||
|
public void setSubtimes(int subtimes) {
|
||||||
|
this.subtimes = subtimes;
|
||||||
|
}
|
||||||
|
public int getSubgolds() {
|
||||||
|
return subgolds;
|
||||||
|
}
|
||||||
|
public void setSubgolds(int subgolds) {
|
||||||
|
this.subgolds = subgolds;
|
||||||
|
}
|
||||||
|
public String getSubmsg() {
|
||||||
|
return submsg;
|
||||||
|
}
|
||||||
|
public void setSubmsg(String submsg) {
|
||||||
|
this.submsg = submsg;
|
||||||
|
}
|
||||||
|
public String getRecmsg() {
|
||||||
|
return recmsg;
|
||||||
|
}
|
||||||
|
public void setRecmsg(String recmsg) {
|
||||||
|
this.recmsg = recmsg;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,14 @@ public class ResultData implements java.io.Serializable{
|
|||||||
private int noaiwaitime ; //没有AI接入的时候的最大等待时长
|
private int noaiwaitime ; //没有AI接入的时候的最大等待时长
|
||||||
private String noaimsg ; //没有AI接入的时候达到最大等待时长的 提示消息
|
private String noaimsg ; //没有AI接入的时候达到最大等待时长的 提示消息
|
||||||
|
|
||||||
|
private boolean subsidy ; //启用破产补助
|
||||||
|
private int subtimes ; //破产补助次数
|
||||||
|
private int subgolds ; //破产补助金额
|
||||||
|
private String submsg ; //破产补助提示消息
|
||||||
|
private String recmsg ; //金币不足进行充值的时候的提示
|
||||||
|
|
||||||
|
private int lefttimes ; //当天剩余补助次数
|
||||||
|
|
||||||
private Token token ;
|
private Token token ;
|
||||||
private List<BeiMiGame> games ; //游戏配置里选择的游戏类型
|
private List<BeiMiGame> games ; //游戏配置里选择的游戏类型
|
||||||
|
|
||||||
@@ -124,4 +132,52 @@ public class ResultData implements java.io.Serializable{
|
|||||||
public void setNoaimsg(String noaimsg) {
|
public void setNoaimsg(String noaimsg) {
|
||||||
this.noaimsg = noaimsg;
|
this.noaimsg = noaimsg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isSubsidy() {
|
||||||
|
return subsidy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSubsidy(boolean subsidy) {
|
||||||
|
this.subsidy = subsidy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSubtimes() {
|
||||||
|
return subtimes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSubtimes(int subtimes) {
|
||||||
|
this.subtimes = subtimes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSubgolds() {
|
||||||
|
return subgolds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSubgolds(int subgolds) {
|
||||||
|
this.subgolds = subgolds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getLefttimes() {
|
||||||
|
return lefttimes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLefttimes(int lefttimes) {
|
||||||
|
this.lefttimes = lefttimes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSubmsg() {
|
||||||
|
return submsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSubmsg(String submsg) {
|
||||||
|
this.submsg = submsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRecmsg() {
|
||||||
|
return recmsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRecmsg(String recmsg) {
|
||||||
|
this.recmsg = recmsg;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
154
src/main/java/com/beimi/web/model/Sku.java
Normal file
154
src/main/java/com/beimi/web/model/Sku.java
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
package com.beimi.web.model;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
import org.hibernate.annotations.GenericGenerator;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "bm_wares_sku")
|
||||||
|
@org.hibernate.annotations.Proxy(lazy = false)
|
||||||
|
public class Sku implements java.io.Serializable{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1115593425069549681L;
|
||||||
|
|
||||||
|
private String id ;
|
||||||
|
private String name ;
|
||||||
|
private String code ;
|
||||||
|
|
||||||
|
private int inx; //知识分类排序位置
|
||||||
|
|
||||||
|
private Date createtime ;
|
||||||
|
private String creater;
|
||||||
|
private String username ;
|
||||||
|
|
||||||
|
private String description ;//分类备注描述信息
|
||||||
|
|
||||||
|
private Date updatetime ;
|
||||||
|
private String waresid ; //商品ID
|
||||||
|
private String pmethod ; //购买方式
|
||||||
|
|
||||||
|
private String status ; //状态,启用,禁用
|
||||||
|
|
||||||
|
private boolean defaultsku ;//默认使用
|
||||||
|
|
||||||
|
private int price ; //价格
|
||||||
|
private int stock; //库存
|
||||||
|
private int sku; //SKU销量
|
||||||
|
private String orgi ;
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Column(length = 32)
|
||||||
|
@GeneratedValue(generator = "system-uuid")
|
||||||
|
@GenericGenerator(name = "system-uuid", strategy = "uuid")
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
public void setCode(String code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
public int getInx() {
|
||||||
|
return inx;
|
||||||
|
}
|
||||||
|
public void setInx(int inx) {
|
||||||
|
this.inx = inx;
|
||||||
|
}
|
||||||
|
public Date getCreatetime() {
|
||||||
|
return createtime;
|
||||||
|
}
|
||||||
|
public void setCreatetime(Date createtime) {
|
||||||
|
this.createtime = createtime;
|
||||||
|
}
|
||||||
|
public String getCreater() {
|
||||||
|
return creater;
|
||||||
|
}
|
||||||
|
public void setCreater(String creater) {
|
||||||
|
this.creater = creater;
|
||||||
|
}
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username;
|
||||||
|
}
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
public Date getUpdatetime() {
|
||||||
|
return updatetime;
|
||||||
|
}
|
||||||
|
public void setUpdatetime(Date updatetime) {
|
||||||
|
this.updatetime = updatetime;
|
||||||
|
}
|
||||||
|
public String getWaresid() {
|
||||||
|
return waresid;
|
||||||
|
}
|
||||||
|
public void setWaresid(String waresid) {
|
||||||
|
this.waresid = waresid;
|
||||||
|
}
|
||||||
|
public String getPmethod() {
|
||||||
|
return pmethod;
|
||||||
|
}
|
||||||
|
public void setPmethod(String pmethod) {
|
||||||
|
this.pmethod = pmethod;
|
||||||
|
}
|
||||||
|
public int getPrice() {
|
||||||
|
return price;
|
||||||
|
}
|
||||||
|
public void setPrice(int price) {
|
||||||
|
this.price = price;
|
||||||
|
}
|
||||||
|
public int getStock() {
|
||||||
|
return stock;
|
||||||
|
}
|
||||||
|
public void setStock(int stock) {
|
||||||
|
this.stock = stock;
|
||||||
|
}
|
||||||
|
public int getSku() {
|
||||||
|
return sku;
|
||||||
|
}
|
||||||
|
public void setSku(int sku) {
|
||||||
|
this.sku = sku;
|
||||||
|
}
|
||||||
|
public String getOrgi() {
|
||||||
|
return orgi;
|
||||||
|
}
|
||||||
|
public void setOrgi(String orgi) {
|
||||||
|
this.orgi = orgi;
|
||||||
|
}
|
||||||
|
public String getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
public void setStatus(String status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
public boolean isDefaultsku() {
|
||||||
|
return defaultsku;
|
||||||
|
}
|
||||||
|
public void setDefaultsku(boolean defaultsku) {
|
||||||
|
this.defaultsku = defaultsku;
|
||||||
|
}
|
||||||
|
}
|
||||||
210
src/main/java/com/beimi/web/model/Wares.java
Normal file
210
src/main/java/com/beimi/web/model/Wares.java
Normal file
@@ -0,0 +1,210 @@
|
|||||||
|
package com.beimi.web.model;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
import org.hibernate.annotations.GenericGenerator;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "bm_wares")
|
||||||
|
@org.hibernate.annotations.Proxy(lazy = false)
|
||||||
|
public class Wares implements java.io.Serializable{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1115593425069549681L;
|
||||||
|
|
||||||
|
private String id ;
|
||||||
|
private String name ;
|
||||||
|
private String code ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 之所以将 商品和SKU分开,是因为,处理金币、钻石、房卡以外的,某些有限量的商品需要有库存限制,例如兑换的商品,先到先得
|
||||||
|
* 通过SKU来控制库存,能够更好的管理商城里的商品销售,此外,根据租户自己选择销售的商品 , 例如:
|
||||||
|
* 几点到几点卖什 么、卖的东西轮流在切换;什么日子特别卖什么;每周的什么时候卖什么,当玩家满足某 个条件的时候,可以购买什么
|
||||||
|
* 再例如:玩家有超级贝卡的时候,可以8折的价格购买商城内的所有物品
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private int price ; //建议价格 , 由SKU定价和库存
|
||||||
|
private int stock ;
|
||||||
|
private String imageurl ;
|
||||||
|
private String warestype;
|
||||||
|
|
||||||
|
private String recomtype ;
|
||||||
|
|
||||||
|
private String pmethod ; //购买方式
|
||||||
|
private String shopid ; //店铺ID , 备用
|
||||||
|
private int spu ; //SPU销量
|
||||||
|
private String payment ; //支付方式
|
||||||
|
|
||||||
|
private int inx; //商品排序位置
|
||||||
|
|
||||||
|
private Date createtime ;
|
||||||
|
private String creater;
|
||||||
|
private String username ;
|
||||||
|
|
||||||
|
private Date starttime;
|
||||||
|
private Date endtime ;
|
||||||
|
|
||||||
|
|
||||||
|
private String description ;//商品备注描述信息
|
||||||
|
|
||||||
|
private Date updatetime ;
|
||||||
|
private String orgi ;
|
||||||
|
|
||||||
|
private String status ; //状态,启用,禁用
|
||||||
|
|
||||||
|
private boolean enablesku ; //是否启用SKU
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Column(length = 32)
|
||||||
|
@GeneratedValue(generator = "system-uuid")
|
||||||
|
@GenericGenerator(name = "system-uuid", strategy = "uuid")
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
public void setCode(String code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
public int getInx() {
|
||||||
|
return inx;
|
||||||
|
}
|
||||||
|
public void setInx(int inx) {
|
||||||
|
this.inx = inx;
|
||||||
|
}
|
||||||
|
public Date getCreatetime() {
|
||||||
|
return createtime;
|
||||||
|
}
|
||||||
|
public void setCreatetime(Date createtime) {
|
||||||
|
this.createtime = createtime;
|
||||||
|
}
|
||||||
|
public String getCreater() {
|
||||||
|
return creater;
|
||||||
|
}
|
||||||
|
public void setCreater(String creater) {
|
||||||
|
this.creater = creater;
|
||||||
|
}
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username;
|
||||||
|
}
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
public Date getUpdatetime() {
|
||||||
|
return updatetime;
|
||||||
|
}
|
||||||
|
public void setUpdatetime(Date updatetime) {
|
||||||
|
this.updatetime = updatetime;
|
||||||
|
}
|
||||||
|
public int getPrice() {
|
||||||
|
return price;
|
||||||
|
}
|
||||||
|
public void setPrice(int price) {
|
||||||
|
this.price = price;
|
||||||
|
}
|
||||||
|
public int getStock() {
|
||||||
|
return stock;
|
||||||
|
}
|
||||||
|
public void setStock(int stock) {
|
||||||
|
this.stock = stock;
|
||||||
|
}
|
||||||
|
public String getImageurl() {
|
||||||
|
return imageurl;
|
||||||
|
}
|
||||||
|
public void setImageurl(String imageurl) {
|
||||||
|
this.imageurl = imageurl;
|
||||||
|
}
|
||||||
|
public String getWarestype() {
|
||||||
|
return warestype;
|
||||||
|
}
|
||||||
|
public void setWarestype(String warestype) {
|
||||||
|
this.warestype = warestype;
|
||||||
|
}
|
||||||
|
public String getPmethod() {
|
||||||
|
return pmethod;
|
||||||
|
}
|
||||||
|
public void setPmethod(String pmethod) {
|
||||||
|
this.pmethod = pmethod;
|
||||||
|
}
|
||||||
|
public String getShopid() {
|
||||||
|
return shopid;
|
||||||
|
}
|
||||||
|
public void setShopid(String shopid) {
|
||||||
|
this.shopid = shopid;
|
||||||
|
}
|
||||||
|
public int getSpu() {
|
||||||
|
return spu;
|
||||||
|
}
|
||||||
|
public void setSpu(int spu) {
|
||||||
|
this.spu = spu;
|
||||||
|
}
|
||||||
|
public String getOrgi() {
|
||||||
|
return orgi;
|
||||||
|
}
|
||||||
|
public void setOrgi(String orgi) {
|
||||||
|
this.orgi = orgi;
|
||||||
|
}
|
||||||
|
public String getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
public void setStatus(String status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
public Date getStarttime() {
|
||||||
|
return starttime;
|
||||||
|
}
|
||||||
|
public void setStarttime(Date starttime) {
|
||||||
|
this.starttime = starttime;
|
||||||
|
}
|
||||||
|
public Date getEndtime() {
|
||||||
|
return endtime;
|
||||||
|
}
|
||||||
|
public void setEndtime(Date endtime) {
|
||||||
|
this.endtime = endtime;
|
||||||
|
}
|
||||||
|
public String getRecomtype() {
|
||||||
|
return recomtype;
|
||||||
|
}
|
||||||
|
public void setRecomtype(String recomtype) {
|
||||||
|
this.recomtype = recomtype;
|
||||||
|
}
|
||||||
|
public boolean isEnablesku() {
|
||||||
|
return enablesku;
|
||||||
|
}
|
||||||
|
public void setEnablesku(boolean enablesku) {
|
||||||
|
this.enablesku = enablesku;
|
||||||
|
}
|
||||||
|
public String getPayment() {
|
||||||
|
return payment;
|
||||||
|
}
|
||||||
|
public void setPayment(String payment) {
|
||||||
|
this.payment = payment;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
109
src/main/java/com/beimi/web/model/WaresType.java
Normal file
109
src/main/java/com/beimi/web/model/WaresType.java
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
package com.beimi.web.model;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
import org.hibernate.annotations.GenericGenerator;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "bm_wares_type")
|
||||||
|
@org.hibernate.annotations.Proxy(lazy = false)
|
||||||
|
public class WaresType implements java.io.Serializable{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 1115593425069549681L;
|
||||||
|
|
||||||
|
private String id ;
|
||||||
|
private String name ;
|
||||||
|
private String code ;
|
||||||
|
|
||||||
|
private int inx; //知识分类排序位置
|
||||||
|
|
||||||
|
private Date createtime ;
|
||||||
|
private String creater;
|
||||||
|
private String username ;
|
||||||
|
|
||||||
|
private String description ;//分类备注描述信息
|
||||||
|
|
||||||
|
private Date updatetime ;
|
||||||
|
private String parentid ; //父级ID
|
||||||
|
private String orgi ;
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Column(length = 32)
|
||||||
|
@GeneratedValue(generator = "system-uuid")
|
||||||
|
@GenericGenerator(name = "system-uuid", strategy = "uuid")
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
public void setCode(String code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
public int getInx() {
|
||||||
|
return inx;
|
||||||
|
}
|
||||||
|
public void setInx(int inx) {
|
||||||
|
this.inx = inx;
|
||||||
|
}
|
||||||
|
public Date getCreatetime() {
|
||||||
|
return createtime;
|
||||||
|
}
|
||||||
|
public void setCreatetime(Date createtime) {
|
||||||
|
this.createtime = createtime;
|
||||||
|
}
|
||||||
|
public String getCreater() {
|
||||||
|
return creater;
|
||||||
|
}
|
||||||
|
public void setCreater(String creater) {
|
||||||
|
this.creater = creater;
|
||||||
|
}
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username;
|
||||||
|
}
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
public Date getUpdatetime() {
|
||||||
|
return updatetime;
|
||||||
|
}
|
||||||
|
public void setUpdatetime(Date updatetime) {
|
||||||
|
this.updatetime = updatetime;
|
||||||
|
}
|
||||||
|
public String getParentid() {
|
||||||
|
return parentid;
|
||||||
|
}
|
||||||
|
public void setParentid(String parentid) {
|
||||||
|
this.parentid = parentid;
|
||||||
|
}
|
||||||
|
public String getOrgi() {
|
||||||
|
return orgi;
|
||||||
|
}
|
||||||
|
public void setOrgi(String orgi) {
|
||||||
|
this.orgi = orgi;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.beimi.web.service.repository.jpa;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import com.beimi.web.model.Sku;
|
||||||
|
|
||||||
|
public interface SkuRepository extends JpaRepository<Sku, String>{
|
||||||
|
|
||||||
|
public abstract Sku findByIdAndOrgi(String id, String orgi);
|
||||||
|
|
||||||
|
public abstract Page<Sku> findByOrgi(String orgi, Pageable page);
|
||||||
|
|
||||||
|
public abstract List<Sku> findByOrgi(String orgi);
|
||||||
|
|
||||||
|
public abstract List<Sku> findByOrgiAndWaresid(String orgi, String waresid);
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.beimi.web.service.repository.jpa;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import com.beimi.web.model.Wares;
|
||||||
|
|
||||||
|
public interface WaresRepository extends JpaRepository<Wares, String>{
|
||||||
|
|
||||||
|
public abstract Wares findByIdAndOrgi(String id, String orgi);
|
||||||
|
|
||||||
|
public abstract Page<Wares> findByOrgi(String orgi, Pageable page);
|
||||||
|
|
||||||
|
public abstract List<Wares> findByOrgi(String orgi);
|
||||||
|
|
||||||
|
public abstract List<Wares> findByOrgiAndWarestype(String orgi, String warestype);
|
||||||
|
|
||||||
|
|
||||||
|
public abstract Page<Wares> findByOrgiAndWarestype(String orgi, String warestype, Pageable page);
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.beimi.web.service.repository.jpa;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
|
import com.beimi.web.model.WaresType;
|
||||||
|
|
||||||
|
public interface WaresTypeRepository extends JpaRepository<WaresType, String>{
|
||||||
|
|
||||||
|
public abstract WaresType findByIdAndOrgi(String id, String orgi);
|
||||||
|
|
||||||
|
public abstract List<WaresType> findByOrgi(String orgi, String code);
|
||||||
|
}
|
||||||
@@ -2309,8 +2309,6 @@ select{
|
|||||||
height: 38px;
|
height: 38px;
|
||||||
line-height: 38px;
|
line-height: 38px;
|
||||||
line-height: 36px\9;
|
line-height: 36px\9;
|
||||||
border: 1px solid #f0f2f5;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
color:#666666;
|
color:#666666;
|
||||||
width:190px;
|
width:190px;
|
||||||
|
|||||||
@@ -170,6 +170,67 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="ukefu-webim-prop">
|
||||||
|
<div class="ukefu-webim-tl" style="clear:both;">7、启用破产补助功能</div>
|
||||||
|
<div class="box-item">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<p>玩家的金币用完以后的补助功能</p>
|
||||||
|
<p style="color:#888888;font-size:13px;margin-top:10px;">启用后设置每天补助的次数和每次补助的金币数量</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-4" style="text-align:right;">
|
||||||
|
<input type="checkbox" title="启用" name="subsidy" lay-filter="subsidy" value="1" <#if gameConfig?? && gameConfig.subsidy>checked="checked"</#if>>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row subsidy" style="margin-top:20px;<#if gameConfig?? && gameConfig.subsidy><#else>display:none;</#if>">
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<p>破产补助次数</p>
|
||||||
|
<p style="color:#888888;font-size:13px;margin-top:10px;">填写每个玩家每天可以进行破产补助的次数</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-4" style="text-align:right;">
|
||||||
|
<select name="subtimes">
|
||||||
|
<#list 1..10 as times>
|
||||||
|
<option value="${times}" <#if gameConfig.subtimes == times>selected="selected"</#if>>${times}次</option>
|
||||||
|
</#list>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row subsidy" style="margin-top:20px;<#if gameConfig?? && gameConfig.subsidy><#else>display:none;</#if>">
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<p>每次补助的金币数量</p>
|
||||||
|
<p style="color:#888888;font-size:13px;margin-top:10px;">填写每次破产补助的金币数量</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-4" style="text-align:right;">
|
||||||
|
<input type="text" name="subgolds" id="subgolds" value="${gameConfig.subgolds!''}" autocomplete="off" class="layui-input" lay-verify="number">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row subsidy" style="margin-top:20px;<#if gameConfig?? && gameConfig.subsidy><#else>display:none;</#if>">
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<p>破产补助的提示消息</p>
|
||||||
|
<p style="color:#888888;font-size:13px;margin-top:10px;">客户端弹出提示破产补助的提示消息</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-4" style="text-align:right;">
|
||||||
|
<input type="text" name="submsg" id="submsg" value="${gameConfig.submsg!''}" autocomplete="off" class="layui-input" maxlength="100">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ukefu-webim-prop">
|
||||||
|
<div class="ukefu-webim-tl" style="clear:both;">8、金币不足时进入充值的提示消息</div>
|
||||||
|
<div class="box-item">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<p>玩家金币不足的时候,点击进入游戏时的提示消息</p>
|
||||||
|
<p style="color:#888888;font-size:13px;margin-top:10px;">玩家如果还有破产补助次数,系统会优先提示进行破产补助</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-4" style="text-align:right;">
|
||||||
|
<input type="text" name="recmsg" maxlength="100" value="<#if gameConfig && gameConfig.recmsg??>${gameConfig.recmsg}<#else>金币不足,请充值。</#if>" autocomplete="off" class="layui-input">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -254,6 +315,13 @@
|
|||||||
}else{
|
}else{
|
||||||
$('.anysdk').hide();
|
$('.anysdk').hide();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
form.on("checkbox(subsidy)" , function(data){
|
||||||
|
if(data.elem.checked == true){
|
||||||
|
$('.subsidy').show();
|
||||||
|
}else{
|
||||||
|
$('.subsidy').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -35,6 +35,31 @@
|
|||||||
</dl>
|
</dl>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li class="layui-nav-item layui-nav-itemed">
|
||||||
|
<a class="layui-nav-title" href="javascript:;">游戏商城</a>
|
||||||
|
<dl class="layui-nav-child">
|
||||||
|
<#if shopWaresTypeList??>
|
||||||
|
<#list shopWaresTypeList as shopWaresType>
|
||||||
|
<dd <#if subtype?? && subtype == 'wares' && shopWaresType?? && shopWaresType.id == dic.id>class="layui-this"</#if>>
|
||||||
|
<a href="/apps/shop/wares.html?type=${shopWaresType.id!''}">${shopWaresType.name!''}</a>
|
||||||
|
</dd>
|
||||||
|
</#list>
|
||||||
|
</#if>
|
||||||
|
</dl>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="layui-nav-item layui-nav-itemed">
|
||||||
|
<a class="layui-nav-title" href="javascript:;">订单管理</a>
|
||||||
|
<dl class="layui-nav-child">
|
||||||
|
<dd <#if subtype?? && subtype == 'orders'>class="layui-this"</#if>>
|
||||||
|
<a href="/apps/shop/orders.html">订单管理</a>
|
||||||
|
</dd>
|
||||||
|
<dd <#if subtype?? && subtype == 'orderhis'>class="layui-this"</#if>>
|
||||||
|
<a href="/apps/shop/orderhis.html">购买记录</a>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="layui-nav-item layui-nav-itemed">
|
<li class="layui-nav-item layui-nav-itemed">
|
||||||
<a class="layui-nav-title" href="javascript:;">游戏信息</a>
|
<a class="layui-nav-title" href="javascript:;">游戏信息</a>
|
||||||
<dl class="layui-nav-child">
|
<dl class="layui-nav-child">
|
||||||
|
|||||||
@@ -0,0 +1,121 @@
|
|||||||
|
<div class="layui-layout layui-layout-content">
|
||||||
|
<div class="layui-side layui-beimi-left">
|
||||||
|
<div class="layui-side-scroll">
|
||||||
|
<#include "/apps/business/platform/include/left.html"/></div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<h1 class="site-h1" style="background-color:#FFFFFF;">
|
||||||
|
商品列表<#if waresList??>(${waresList.totalElements!''})</#if>
|
||||||
|
<span style="float:right;">
|
||||||
|
<div class="layui-btn-group">
|
||||||
|
<a href="/apps/shop/add.html?type=${dic.id!''}" title="添加新商品" data-toggle="ajax" data-width="950" data-height="600" class="layui-btn layui-btn-sm" >
|
||||||
|
<i class="layui-icon"></i>添加新商品</a>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
</h1>
|
||||||
|
<div class="row" style="padding:5px;">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<table class="layui-table" lay-skin="line">
|
||||||
|
<colgroup>
|
||||||
|
<col width="40%">
|
||||||
|
<col width="8%">
|
||||||
|
<col width="8%">
|
||||||
|
<col width="10%">
|
||||||
|
<col width="10%">
|
||||||
|
<col width="10%">
|
||||||
|
<col width="10%">
|
||||||
|
<col width="1%">
|
||||||
|
<col>
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>名称</th>
|
||||||
|
<th>分类</th>
|
||||||
|
<th>价格</th>
|
||||||
|
<th>支付方式</th>
|
||||||
|
<th>状态</th>
|
||||||
|
<th>序号</th>
|
||||||
|
<th>启用SKU</th>
|
||||||
|
<th style="white-space:nowrap;" nowrap="nowrap">操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<#if waresList?? && waresList.content??>
|
||||||
|
<#list waresList.content as wares>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a href="">
|
||||||
|
<i class="layui-icon headimg"></i>
|
||||||
|
<div style="margin-left:50px;margin-top:0px;">
|
||||||
|
${wares.name!''}
|
||||||
|
<#if wares.datastatus == true><i style="color:red;">(已删除)</i></#if>
|
||||||
|
</div>
|
||||||
|
<div title="有效时间" style="margin-left:50px;margin-top:0px;color:#cccccc;font-size:13px;">
|
||||||
|
<#if wares.starttime == null && wares.endtime == null>
|
||||||
|
永久有效
|
||||||
|
<#else>
|
||||||
|
${wares.starttime!''}~${wares.endtime!''}
|
||||||
|
</#if>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>${uKeFuDic[wares.warestype!''].name!''} </td>
|
||||||
|
<td>${wares.price!''}</td>
|
||||||
|
<td>${uKeFuDic[wares.payment!''].name!''} </td>
|
||||||
|
<td>
|
||||||
|
<#if wares.status?? && wares.status == "on">上架</#if>
|
||||||
|
<#if wares.status?? && wares.status == "off">下架</#if>
|
||||||
|
</td>
|
||||||
|
<td>${wares.inx!''}</td>
|
||||||
|
<td>
|
||||||
|
<#if wares.enablesku?? && wares.enablesku == true>
|
||||||
|
<i class="layui-icon" style="color:#19a55d;"></i>
|
||||||
|
</#if>
|
||||||
|
</td>
|
||||||
|
<td style="white-space:nowrap;" nowrap="nowrap">
|
||||||
|
<a href="/apps/shop/edit.html?id=${wares.id!''}" data-toggle="ajax" data-width="950" data-height="600" data-title="编辑用户信息">
|
||||||
|
<i class="layui-icon"></i>
|
||||||
|
编辑
|
||||||
|
</a>
|
||||||
|
<#if !(wares.warestype?? && wares.warestype == "0") && wares.datastatus != true >
|
||||||
|
<a href="/apps/shop/delete.html?id=${wares.id!''}" style="margin-left:10px;" data-toggle="tip" data-title="请确认是否删除记录?">
|
||||||
|
<i class="layui-icon" style="color:red;">ဆ</i>
|
||||||
|
删除
|
||||||
|
</a>
|
||||||
|
</#if>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</#list>
|
||||||
|
</#if>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row" style="padding:5px;">
|
||||||
|
<div class="col-lg-12" id="page" style="text-align:center;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
layui.use('laypage', function(){
|
||||||
|
var laypage = layui.laypage;
|
||||||
|
laypage.render({
|
||||||
|
elem: 'page'
|
||||||
|
,count: <#if waresList??>${waresList.totalElements}<#else>0</#if> //总记录
|
||||||
|
,limit: <#if waresList??>${waresList.size}<#else>0</#if> //总记录
|
||||||
|
,curr:<#if waresList??>${waresList.number+1}<#else>0</#if>
|
||||||
|
,groups: 5 //连续显示分页数
|
||||||
|
,jump:function(data , first){
|
||||||
|
if(!first){
|
||||||
|
location.href = "/apps/platform/online/gameroom.html?p="+data.curr ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,164 @@
|
|||||||
|
<#include "/public/macro.html">
|
||||||
|
<div class="uk-layui-form">
|
||||||
|
<form class="layui-form" action="/apps/shop/save.html" method="post" enctype="multipart/form-data">
|
||||||
|
<div class="layui-collapse">
|
||||||
|
<div class="layui-colla-item">
|
||||||
|
<h2 class="layui-colla-title">基本信息</h2>
|
||||||
|
<div class="layui-colla-content layui-show">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<label class="layui-form-label" id="cusname">名称:</label>
|
||||||
|
<div class="layui-input-inline" style="width:190px;">
|
||||||
|
<input type="text" name="name" required lay-verify="required" autocomplete="off"
|
||||||
|
class="layui-input">
|
||||||
|
<font color="red" style="position: absolute;right:-100px;top:0px;">*(必填项)</font>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-inline uckefu-inline">
|
||||||
|
<label class="layui-form-label" style="line-height: 35px;">类型:</label>
|
||||||
|
<div class="layui-input-inline" style="width:218px;margin-right:0px;padding-top:9px;">
|
||||||
|
<@select "com.dic.shop.warestype" "warestype" type!'' "lay-ignore required lay-verify='required' "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<label class="layui-form-label">支付方式:</label>
|
||||||
|
<div class="layui-input-inline" style="width:190px;">
|
||||||
|
<@select "com.dic.shop.payment" "payment" payment!'' "lay-ignore required lay-verify='required' "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline uckefu-inline">
|
||||||
|
<label class="layui-form-label" >推荐类型:</label>
|
||||||
|
<div class="layui-input-inline" style="width:218px;">
|
||||||
|
<@select "com.dic.shop.recomtyped" "recomtype" recomtype!'' "lay-ignore required lay-verify='required' "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<label class="layui-form-label">排序序号:</label>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<select name="inx">
|
||||||
|
<#list 1..100 as inx>
|
||||||
|
<option value="${inx}">${inx}</option>
|
||||||
|
</#list>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline uckefu-inline">
|
||||||
|
<label class="layui-form-label">价格:</label>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" name="price" required lay-verify="required" lay-verify="number" autocomplete="off" class="layui-input">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<label class="layui-form-label">状态:</label>
|
||||||
|
<div class="layui-input-inline" style="width:190px;">
|
||||||
|
<input type="radio" name="status" value="on" title="上架" checked>
|
||||||
|
<input type="radio" name="status" value="off" title="下架" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline uckefu-inline">
|
||||||
|
<label class="layui-form-label" >启用SKU:</label>
|
||||||
|
<div class="layui-input-inline" style="width:218px;">
|
||||||
|
<input type="radio" name="enablesku" value="0" title="禁用">
|
||||||
|
<input type="radio" name="enablesku" value="1" title="启用" checked>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-colla-item">
|
||||||
|
<h2 class="layui-colla-title">扩展信息</h2>
|
||||||
|
<div class="layui-colla-content layui-show">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<label class="layui-form-label">开始时间:</label>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" name="starttime" id="starttime" readOnly="readOnly" lay-verify="datetime" autocomplete="off"
|
||||||
|
class="layui-input">
|
||||||
|
<i class="layui-icon" style="position: absolute;right: 3px;top: 6px;font-size: 25px;"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline uckefu-inline">
|
||||||
|
<label class="layui-form-label">结束时间:</label>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" name="endtime" id="endtime" readOnly="readOnly" lay-verify="datetime" autocomplete="off"
|
||||||
|
class="layui-input">
|
||||||
|
<i class="layui-icon" style="position: absolute;right: 3px;top: 6px;font-size: 25px;"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<label class="layui-form-label">图片:</label>
|
||||||
|
<div class="layui-input-inline" style="width: 664px;">
|
||||||
|
<button type="button" class="layui-btn" id="imagurl">
|
||||||
|
<i class="layui-icon"></i>上传商品图片
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<label class="layui-form-label">说明:</label>
|
||||||
|
<div class="layui-input-inline" style="width: 664px;">
|
||||||
|
<textarea name="description" placeholder="请输入内容" class="layui-textarea" style="resize:none;min-height:70px;"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-button">
|
||||||
|
<div class="layui-button-block">
|
||||||
|
<button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
|
||||||
|
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
layui.use('form', function(){
|
||||||
|
var form = layui.form;
|
||||||
|
form.render(); //更新全部
|
||||||
|
});
|
||||||
|
layui.use('element', function(){
|
||||||
|
var element = layui.element;
|
||||||
|
});
|
||||||
|
layui.use('upload', function(){
|
||||||
|
var upload = layui.upload;
|
||||||
|
//执行实例
|
||||||
|
var uploadInst = upload.render({
|
||||||
|
elem: '#imagurl', //绑定元素
|
||||||
|
field:'imagurl',
|
||||||
|
auto: false
|
||||||
|
});
|
||||||
|
});
|
||||||
|
layui.use('laydate', function() {
|
||||||
|
var laydate = layui.laydate;
|
||||||
|
|
||||||
|
laydate.render({
|
||||||
|
elem: '#starttime',
|
||||||
|
theme: 'default',
|
||||||
|
type:"datetime" ,
|
||||||
|
show: false //直接显示
|
||||||
|
});
|
||||||
|
|
||||||
|
laydate.render({
|
||||||
|
elem: '#endtime',
|
||||||
|
theme: 'default',
|
||||||
|
type:"datetime" ,
|
||||||
|
show: false //直接显示
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,163 @@
|
|||||||
|
<#include "/public/macro.html">
|
||||||
|
<div class="uk-layui-form">
|
||||||
|
<form class="layui-form" action="/apps/shop/update.html" method="post" enctype="multipart/form-data">
|
||||||
|
<input type="hidden" name="id" value="${wares.id!''}">
|
||||||
|
<div class="layui-collapse">
|
||||||
|
<div class="layui-colla-item">
|
||||||
|
<h2 class="layui-colla-title">基本信息</h2>
|
||||||
|
<div class="layui-colla-content layui-show">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<label class="layui-form-label" id="cusname">名称:</label>
|
||||||
|
<div class="layui-input-inline" style="width:190px;">
|
||||||
|
<input type="text" name="name" required lay-verify="required" autocomplete="off"
|
||||||
|
class="layui-input" value="${wares.name!''}">
|
||||||
|
<font color="red" style="position: absolute;right:-100px;top:0px;">*(必填项)</font>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-inline uckefu-inline">
|
||||||
|
<label class="layui-form-label" style="line-height: 35px;">类型:</label>
|
||||||
|
<div class="layui-input-inline" style="width:218px;margin-right:0px;padding-top:9px;">
|
||||||
|
<@select "com.dic.shop.warestype" "warestype" wares.warestype!'' "lay-ignore required lay-verify='required' "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<label class="layui-form-label">支付方式:</label>
|
||||||
|
<div class="layui-input-inline" style="width:190px;">
|
||||||
|
<@select "com.dic.shop.payment" "payment" wares.payment!'' "lay-ignore required lay-verify='required' "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline uckefu-inline">
|
||||||
|
<label class="layui-form-label" >推荐类型:</label>
|
||||||
|
<div class="layui-input-inline" style="width:218px;">
|
||||||
|
<@select "com.dic.shop.recomtyped" "recomtype" wares.recomtype!'' "lay-ignore required lay-verify='required' "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<label class="layui-form-label">排序序号:</label>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<select name="inx">
|
||||||
|
<#list 1..100 as inx>
|
||||||
|
<option value="${inx}" <#if wares.inx == inx>selected="selected"</#if>>${inx}</option>
|
||||||
|
</#list>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline uckefu-inline">
|
||||||
|
<label class="layui-form-label">价格:</label>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" name="price" value="${wares.price!''}" lay-verify="number" autocomplete="off" class="layui-input">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<label class="layui-form-label">状态:</label>
|
||||||
|
<div class="layui-input-inline" style="width:190px;">
|
||||||
|
<input type="radio" name="status" value="on" title="上架" <#if wares.status?? && wares.status == "on">checked</#if>>
|
||||||
|
<input type="radio" name="status" value="off" title="下架" <#if wares.status?? && wares.status == "off">checked</#if>>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline uckefu-inline">
|
||||||
|
<label class="layui-form-label" >启用SKU:</label>
|
||||||
|
<div class="layui-input-inline" style="width:218px;">
|
||||||
|
<input type="radio" name="enablesku" value="0" title="禁用" <#if wares.status?? && wares.enablesku == true>checked</#if>>
|
||||||
|
<input type="radio" name="enablesku" value="1" title="启用" <#if wares.status?? && wares.enablesku == false>checked</#if>>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-colla-item">
|
||||||
|
<h2 class="layui-colla-title">扩展信息</h2>
|
||||||
|
<div class="layui-colla-content layui-show">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<label class="layui-form-label">开始时间:</label>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" name="starttime" id="starttime" readOnly="readOnly" lay-verify="date" autocomplete="off"
|
||||||
|
class="layui-input" value="${wares.starttime!''}">
|
||||||
|
<i class="layui-icon" style="position: absolute;right: 3px;top: 6px;font-size: 25px;"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline uckefu-inline">
|
||||||
|
<label class="layui-form-label">结束时间:</label>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" name="endtime" value="${wares.endtime!''}" id="endtime" readOnly="readOnly" lay-verify="date" autocomplete="off"
|
||||||
|
class="layui-input">
|
||||||
|
<i class="layui-icon" style="position: absolute;right: 3px;top: 6px;font-size: 25px;"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<label class="layui-form-label">图片:</label>
|
||||||
|
<div class="layui-input-inline" style="width: 664px;">
|
||||||
|
<button type="button" class="layui-btn" id="imagurl">
|
||||||
|
<i class="layui-icon"></i>上传商品图片
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<label class="layui-form-label">说明:</label>
|
||||||
|
<div class="layui-input-inline" style="width: 664px;">
|
||||||
|
<textarea name="description" placeholder="请输入内容" class="layui-textarea" style="resize:none;min-height:70px;">${wares.description!''}</textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-form-button">
|
||||||
|
<div class="layui-button-block">
|
||||||
|
<button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
|
||||||
|
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
layui.use('form', function(){
|
||||||
|
var form = layui.form;
|
||||||
|
form.render(); //更新全部
|
||||||
|
});
|
||||||
|
layui.use('element', function(){
|
||||||
|
var element = layui.element;
|
||||||
|
});
|
||||||
|
layui.use('upload', function(){
|
||||||
|
var upload = layui.upload;
|
||||||
|
//执行实例
|
||||||
|
var uploadInst = upload.render({
|
||||||
|
elem: '#imagurl', //绑定元素
|
||||||
|
field:'imagurl',
|
||||||
|
auto: false
|
||||||
|
});
|
||||||
|
});
|
||||||
|
layui.use('laydate', function() {
|
||||||
|
var laydate = layui.laydate;
|
||||||
|
|
||||||
|
laydate.render({
|
||||||
|
elem: '#starttime',
|
||||||
|
theme: 'default',
|
||||||
|
type:"datetime" ,
|
||||||
|
});
|
||||||
|
|
||||||
|
laydate.render({
|
||||||
|
elem: '#endtime',
|
||||||
|
theme: 'default',
|
||||||
|
type:"datetime" ,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
42
src/main/resources/templates/public/macro.html
Normal file
42
src/main/resources/templates/public/macro.html
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<#macro select code name value attr style>
|
||||||
|
<input type="hidden" name="${name!''}.text" id="${name!''}_text"/>
|
||||||
|
<select id="${(name!'')?replace('.' , '_')}" name="${name!''}" ${attr} <#if style?? && style !=''>style="${style}"</#if> onChange="$('#${name!''}_text').val($(this).find('option:selected').text())">
|
||||||
|
<option value="">请选择...</option>
|
||||||
|
<#list uKeFuDic[code] as macroSysDic>
|
||||||
|
<option value="<#if macroSysDic.discode>${macroSysDic.code}<#else>${macroSysDic.id}</#if>" <#if value?? && macroSysDic?? && (macroSysDic.id == value || macroSysDic.code == value)>selected="selected"</#if>>${macroSysDic.name!''}</option>
|
||||||
|
</#list>
|
||||||
|
</select>
|
||||||
|
</#macro>
|
||||||
|
|
||||||
|
<#macro select2 code name value attr style defaultname>
|
||||||
|
<select id="${(name!'')?replace('.' , '_')}" name="${name!''}" ${attr} <#if style?? && style !=''>style="${style}"</#if> onChange="$('#${name!''}_text').val($(this).find('option:selected').text())">
|
||||||
|
<option value="">${defaultname!'请选择...'}</option>
|
||||||
|
<#list uKeFuDic[code] as macroSysDic>
|
||||||
|
<option value="<#if macroSysDic.discode>${macroSysDic.code}<#else>${macroSysDic.id}</#if>" <#if value?? && macroSysDic?? && (macroSysDic.id == value || macroSysDic.code == value)>selected="selected"</#if>>${macroSysDic.name!''}</option>
|
||||||
|
</#list>
|
||||||
|
</select>
|
||||||
|
</#macro>
|
||||||
|
|
||||||
|
<#macro subselect macroSysDicList name value attr style>
|
||||||
|
<input type="hidden" name="${name!''}.text" id="${name!''}_text"/>
|
||||||
|
<select id="${(name!'')?replace('.' , '_')}" name="${name!''}" ${attr} style="${style}" onChange="$('#${name!''}_text').val($(this).find('option:selected').text())">
|
||||||
|
<option value="">请选择...</option>
|
||||||
|
<#if macroSysDicList??>
|
||||||
|
<#list macroSysDicList as macroSysDic>
|
||||||
|
<option value="<#if macroSysDic.discode>${macroSysDic.code}<#else>${macroSysDic.id}</#if>" <#if value?? && macroSysDic?? && (macroSysDic.id == value || macroSysDic.code == value)>selected="selected"</#if>>${macroSysDic.name!''}</option>
|
||||||
|
</#list>
|
||||||
|
</#if>
|
||||||
|
</select>
|
||||||
|
</#macro>
|
||||||
|
|
||||||
|
<#macro checkbox sysDicList name value style>
|
||||||
|
<#list sysDicList as macroSysDic>
|
||||||
|
<input type="radio" name="${name}" value="${macroSysDic.id!''}" title="${macroSysDic.name!''}"<#if macroSysDic.id == value>checked="checked"</#if>>
|
||||||
|
</#list>
|
||||||
|
</#macro>
|
||||||
|
|
||||||
|
<#macro checkbox sysDicList name value style>
|
||||||
|
<#list sysDicList as macroSysDic>
|
||||||
|
<input type="checkbox" name="${name}" value="${macroSysDic.id!''}" title="${macroSysDic.name!''}"<#if macroSysDic.id == value>checked="checked"</#if>>
|
||||||
|
</#list>
|
||||||
|
</#macro>
|
||||||
Reference in New Issue
Block a user