修改模板文件和增加表
This commit is contained in:
parent
0cec24d90b
commit
30f391c07c
17
pom.xml
17
pom.xml
|
|
@ -22,6 +22,7 @@
|
||||||
<mybatis.boot.version>1.3.2</mybatis.boot.version>
|
<mybatis.boot.version>1.3.2</mybatis.boot.version>
|
||||||
<druid.version>1.1.13</druid.version>
|
<druid.version>1.1.13</druid.version>
|
||||||
<bitwalker.version>1.19</bitwalker.version>
|
<bitwalker.version>1.19</bitwalker.version>
|
||||||
|
<mapper.version>2.1.5</mapper.version>
|
||||||
<kaptcha.version>2.3.2</kaptcha.version>
|
<kaptcha.version>2.3.2</kaptcha.version>
|
||||||
<swagger.version>2.7.0</swagger.version>
|
<swagger.version>2.7.0</swagger.version>
|
||||||
<pagehelper.boot.version>1.2.5</pagehelper.boot.version>
|
<pagehelper.boot.version>1.2.5</pagehelper.boot.version>
|
||||||
|
|
@ -32,6 +33,7 @@
|
||||||
<jsoup.version>1.11.3</jsoup.version>
|
<jsoup.version>1.11.3</jsoup.version>
|
||||||
<poi.version>3.17</poi.version>
|
<poi.version>3.17</poi.version>
|
||||||
<velocity.version>1.7</velocity.version>
|
<velocity.version>1.7</velocity.version>
|
||||||
|
<lombok.version>1.16.22</lombok.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- 依赖声明 -->
|
<!-- 依赖声明 -->
|
||||||
|
|
@ -96,6 +98,12 @@
|
||||||
<version>${bitwalker.version}</version>
|
<version>${bitwalker.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>tk.mybatis</groupId>
|
||||||
|
<artifactId>mapper-spring-boot-starter</artifactId>
|
||||||
|
<version>${mapper.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- pagehelper 分页插件 -->
|
<!-- pagehelper 分页插件 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.pagehelper</groupId>
|
<groupId>com.github.pagehelper</groupId>
|
||||||
|
|
@ -201,6 +209,14 @@
|
||||||
<version>${ruoyi.version}</version>
|
<version>${ruoyi.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
<version>${lombok.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
|
|
@ -218,7 +234,6 @@
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package com;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: Enzo
|
||||||
|
* @Date: 2019/3/27 11:23
|
||||||
|
*/
|
||||||
|
public class Hello {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
System.out.println(System.getProperty("user.timezone"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
package com.ruoyi;
|
package com.ruoyi;
|
||||||
|
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||||
|
import tk.mybatis.spring.annotation.MapperScan;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启动程序
|
* 启动程序
|
||||||
|
|
@ -18,15 +18,6 @@ public class RuoYiApplication
|
||||||
{
|
{
|
||||||
// System.setProperty("spring.devtools.restart.enabled", "false");
|
// System.setProperty("spring.devtools.restart.enabled", "false");
|
||||||
SpringApplication.run(RuoYiApplication.class, args);
|
SpringApplication.run(RuoYiApplication.class, args);
|
||||||
System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" +
|
|
||||||
" .-------. ____ __ \n" +
|
|
||||||
" | _ _ \\ \\ \\ / / \n" +
|
|
||||||
" | ( ' ) | \\ _. / ' \n" +
|
|
||||||
" |(_ o _) / _( )_ .' \n" +
|
|
||||||
" | (_,_).' __ ___(_ o _)' \n" +
|
|
||||||
" | |\\ \\ | || |(_,_)' \n" +
|
|
||||||
" | | \\ `' /| `-' / \n" +
|
|
||||||
" | | \\ / \\ / \n" +
|
|
||||||
" ''-' `'-' `-..-' ");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,127 @@
|
||||||
|
package com.ruoyi.web.controller.store;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
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 com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.store.domain.VGood;
|
||||||
|
import com.ruoyi.store.service.IVGoodService;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品管理 信息操作处理
|
||||||
|
*
|
||||||
|
* @author Enzo
|
||||||
|
* @date 2019-03-25
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/store/vGood")
|
||||||
|
public class VGoodController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "store/vGood";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IVGoodService vGoodService;
|
||||||
|
|
||||||
|
@RequiresPermissions("store:vGood:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String vGood()
|
||||||
|
{
|
||||||
|
return prefix + "/vGood";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商品管理列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("store:vGood:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(VGood vGood)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<VGood> list = vGoodService.selectVGoodList(vGood);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出商品管理列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("store:vGood:export")
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(VGood vGood)
|
||||||
|
{
|
||||||
|
List<VGood> list = vGoodService.selectVGoodList(vGood);
|
||||||
|
ExcelUtil<VGood> util = new ExcelUtil<VGood>(VGood.class);
|
||||||
|
return util.exportExcel(list, "vGood");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增商品管理
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存商品管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("store:vGood:add")
|
||||||
|
@Log(title = "商品管理", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(VGood vGood)
|
||||||
|
{
|
||||||
|
return toAjax(vGoodService.insertVGood(vGood));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改商品管理
|
||||||
|
*/
|
||||||
|
@GetMapping("/edit/{goodId}")
|
||||||
|
public String edit(@PathVariable("goodId") Long goodId, ModelMap mmap)
|
||||||
|
{
|
||||||
|
VGood vGood = vGoodService.selectVGoodById(goodId);
|
||||||
|
mmap.put("vGood", vGood);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存商品管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("store:vGood:edit")
|
||||||
|
@Log(title = "商品管理", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(VGood vGood)
|
||||||
|
{
|
||||||
|
return toAjax(vGoodService.updateVGood(vGood));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除商品管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("store:vGood:remove")
|
||||||
|
@Log(title = "商品管理", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(vGoodService.deleteVGoodByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,127 @@
|
||||||
|
package com.ruoyi.web.controller.store;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
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 com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.store.domain.VGoodItem;
|
||||||
|
import com.ruoyi.store.service.IVGoodItemService;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品分类 信息操作处理
|
||||||
|
*
|
||||||
|
* @author Enzo
|
||||||
|
* @date 2019-03-25
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/store/vGoodItem")
|
||||||
|
public class VGoodItemController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "store/vGoodItem";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IVGoodItemService vGoodItemService;
|
||||||
|
|
||||||
|
@RequiresPermissions("store:vGoodItem:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String vGoodItem()
|
||||||
|
{
|
||||||
|
return prefix + "/vGoodItem";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商品分类列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("store:vGoodItem:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(VGoodItem vGoodItem)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<VGoodItem> list = vGoodItemService.selectVGoodItemList(vGoodItem);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出商品分类列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("store:vGoodItem:export")
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(VGoodItem vGoodItem)
|
||||||
|
{
|
||||||
|
List<VGoodItem> list = vGoodItemService.selectVGoodItemList(vGoodItem);
|
||||||
|
ExcelUtil<VGoodItem> util = new ExcelUtil<VGoodItem>(VGoodItem.class);
|
||||||
|
return util.exportExcel(list, "vGoodItem");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增商品分类
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存商品分类
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("store:vGoodItem:add")
|
||||||
|
@Log(title = "商品分类", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(VGoodItem vGoodItem)
|
||||||
|
{
|
||||||
|
return toAjax(vGoodItemService.insertVGoodItem(vGoodItem));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改商品分类
|
||||||
|
*/
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
VGoodItem vGoodItem = vGoodItemService.selectVGoodItemById(id);
|
||||||
|
mmap.put("vGoodItem", vGoodItem);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存商品分类
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("store:vGoodItem:edit")
|
||||||
|
@Log(title = "商品分类", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(VGoodItem vGoodItem)
|
||||||
|
{
|
||||||
|
return toAjax(vGoodItemService.updateVGoodItem(vGoodItem));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除商品分类
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("store:vGoodItem:remove")
|
||||||
|
@Log(title = "商品分类", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(vGoodItemService.deleteVGoodItemByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,127 @@
|
||||||
|
package com.ruoyi.web.controller.store;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
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 com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.store.domain.VStore;
|
||||||
|
import com.ruoyi.store.service.IVStoreService;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店管理 信息操作处理
|
||||||
|
*
|
||||||
|
* @author Enzo
|
||||||
|
* @date 2019-03-25
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/store/vStore")
|
||||||
|
public class VStoreController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "store/vStore";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IVStoreService vStoreService;
|
||||||
|
|
||||||
|
@RequiresPermissions("store:vStore:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String vStore()
|
||||||
|
{
|
||||||
|
return prefix + "/vStore";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询门店管理列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("store:vStore:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(VStore vStore)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<VStore> list = vStoreService.selectVStoreList(vStore);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出门店管理列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("store:vStore:export")
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(VStore vStore)
|
||||||
|
{
|
||||||
|
List<VStore> list = vStoreService.selectVStoreList(vStore);
|
||||||
|
ExcelUtil<VStore> util = new ExcelUtil<VStore>(VStore.class);
|
||||||
|
return util.exportExcel(list, "vStore");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增门店管理
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存门店管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("store:vStore:add")
|
||||||
|
@Log(title = "门店管理", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(VStore vStore)
|
||||||
|
{
|
||||||
|
return toAjax(vStoreService.insertVStore(vStore));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改门店管理
|
||||||
|
*/
|
||||||
|
@GetMapping("/edit/{storeId}")
|
||||||
|
public String edit(@PathVariable("storeId") Long storeId, ModelMap mmap)
|
||||||
|
{
|
||||||
|
VStore vStore = vStoreService.selectVStoreById(storeId);
|
||||||
|
mmap.put("vStore", vStore);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存门店管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("store:vStore:edit")
|
||||||
|
@Log(title = "门店管理", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(VStore vStore)
|
||||||
|
{
|
||||||
|
return toAjax(vStoreService.updateVStore(vStore));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除门店管理
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("store:vStore:remove")
|
||||||
|
@Log(title = "门店管理", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(vStoreService.deleteVStoreByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -8,7 +8,7 @@ spring:
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
password: password
|
password: PAYcsroot@0402
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,10 @@ ruoyi:
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
server:
|
server:
|
||||||
# 服务端口
|
# 服务端口
|
||||||
port: 80
|
port: 8081
|
||||||
servlet:
|
servlet:
|
||||||
# 项目contextPath
|
# 项目contextPath
|
||||||
context-path: /
|
context-path: /ry
|
||||||
tomcat:
|
tomcat:
|
||||||
# tomcat的URI编码
|
# tomcat的URI编码
|
||||||
uri-encoding: UTF-8
|
uri-encoding: UTF-8
|
||||||
|
|
@ -47,6 +47,7 @@ spring:
|
||||||
encoding: utf-8
|
encoding: utf-8
|
||||||
# 禁用缓存
|
# 禁用缓存
|
||||||
cache: false
|
cache: false
|
||||||
|
check-template-location: true
|
||||||
# 资源信息
|
# 资源信息
|
||||||
messages:
|
messages:
|
||||||
# 国际化资源文件路径
|
# 国际化资源文件路径
|
||||||
|
|
@ -93,7 +94,7 @@ shiro:
|
||||||
# 首页地址
|
# 首页地址
|
||||||
indexUrl: /index
|
indexUrl: /index
|
||||||
# 验证码开关
|
# 验证码开关
|
||||||
captchaEnabled: true
|
captchaEnabled: false
|
||||||
# 验证码类型 math 数组计算 char 字符
|
# 验证码类型 math 数组计算 char 字符
|
||||||
captchaType: math
|
captchaType: math
|
||||||
cookie:
|
cookie:
|
||||||
|
|
@ -121,3 +122,10 @@ xss:
|
||||||
excludes: /system/notice/*
|
excludes: /system/notice/*
|
||||||
# 匹配链接
|
# 匹配链接
|
||||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||||
|
|
||||||
|
# 通用mapper 配置
|
||||||
|
mapper:
|
||||||
|
mappers:
|
||||||
|
- tk.mybatis.mapper.common.Mapper
|
||||||
|
not-empty: true
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,107 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<head th:include="include :: header"></head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-vGood-add">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">商品名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="goodName" name="goodName" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">商品价格:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="goodPrice" name="goodPrice" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">单位:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="goodNuit" name="goodNuit" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">商品图片:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="goodPic" name="goodPic" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">状态:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="goodStatus" class="form-control m-b" th:with="type=${@dict.getType('v_good_status')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">商品简介:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="goodDesc" name="goodDesc" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">创建时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="goodCtime" name="goodCtime" class="form-control time-input" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">分类ID:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="goodItemId" name="goodItemId" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店ID:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="goodStoreId" name="goodStoreId" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">删除状态:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="delState" class="form-control m-b" th:with="type=${@dict.getType('v_good_delstate')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">详细描述:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="detailDescribe" name="detailDescribe" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">推荐:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="recommend" class="form-control m-b" th:with="type=${@dict.getType('v_good_recommend')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div th:include="include::footer"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var prefix = ctx + "store/vGood"
|
||||||
|
$("#form-vGood-add").validate({
|
||||||
|
rules:{
|
||||||
|
xxxx:{
|
||||||
|
required:true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-vGood-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,109 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<head th:include="include :: header"></head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-vGood-edit" th:object="${vGood}">
|
||||||
|
|
||||||
|
<input id="goodId" name="goodId" th:field="*{goodId}" type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">商品名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="goodName" name="goodName" th:field="*{goodName}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">商品价格:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="goodPrice" name="goodPrice" th:field="*{goodPrice}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">单位:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="goodNuit" name="goodNuit" th:field="*{goodNuit}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">商品图片:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="goodPic" name="goodPic" th:field="*{goodPic}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">状态:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="goodStatus" class="form-control m-b" th:with="type=${@dict.getType('v_good_status')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{goodStatus}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">商品简介:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="goodDesc" name="goodDesc" th:field="*{goodDesc}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">创建时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="goodCtime" name="goodCtime" th:field="*{goodCtime}" class="form-control time-input" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">分类ID:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="goodItemId" name="goodItemId" th:field="*{goodItemId}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店ID:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="goodStoreId" name="goodStoreId" th:field="*{goodStoreId}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">删除状态:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="delState" class="form-control m-b" th:with="type=${@dict.getType('v_good_delstate')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{delState}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">详细描述:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="detailDescribe" name="detailDescribe" th:field="*{detailDescribe}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">推荐:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="recommend" class="form-control m-b" th:with="type=${@dict.getType('v_good_recommend')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{recommend}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div th:include="include::footer"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var prefix = ctx + "store/vGood";
|
||||||
|
$("#form-vGood-edit").validate({
|
||||||
|
rules:{
|
||||||
|
xxxx:{
|
||||||
|
required:true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-vGood-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,207 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<head th:include="include :: header"></head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="formId">
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
商品名称:<input type="text" name="goodName"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
商品价格:<input type="text" name="goodPrice"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
单位:<input type="text" name="goodNuit"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
商品图片:<input type="text" name="goodPic"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
状态:<select name="goodStatus" th:with="type=${@dict.getType('v_good_status')}">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
商品简介:<input type="text" name="goodDesc"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="select-time">
|
||||||
|
<label>创建时间: </label>
|
||||||
|
<input type="text" class="time-input" id="startGoodCtime" placeholder="开始" name="params[beginGoodCtime]"/>
|
||||||
|
<span>-</span>
|
||||||
|
<input type="text" class="time-input" id="endGoodCtime" placeholder="结束" name="params[endGoodCtime]"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
分类ID:<input type="text" name="goodItemId"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
门店ID:<input type="text" name="goodStoreId"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
删除状态:<select name="delState" th:with="type=${@dict.getType('v_good_delstate')}">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
详细描述:<input type="text" name="detailDescribe"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
推荐:<select name="recommend" th:with="type=${@dict.getType('v_good_recommend')}">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="store:vGood:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="store:vGood:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="store:vGood:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="store:vGood:export">
|
||||||
|
<i class="fa fa-download"></i> 导出
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div th:include="include :: footer"></div>
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var editFlag = [[${@permission.hasPermi('store:vGood:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('store:vGood:remove')}]];
|
||||||
|
var prefix = ctx + "store/vGood";
|
||||||
|
var v_good_status_datas = [[${@dict.getType('v_good_status')}]];
|
||||||
|
var v_good_delstate_datas = [[${@dict.getType('v_good_delstate')}]];
|
||||||
|
var datas = [[${@dict.getType('v_good_recommend')}]];
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "商品管理",
|
||||||
|
showExport: true,
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'goodId',
|
||||||
|
title : '主键',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'goodName',
|
||||||
|
title : '商品名称',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'goodPrice',
|
||||||
|
title : '商品价格',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'goodNuit',
|
||||||
|
title : '单位',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'goodPic',
|
||||||
|
title : '商品图片',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'goodStatus',
|
||||||
|
title : '状态',
|
||||||
|
sortable: true,
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return $.table.selectDictLabel(v_good_status_datas, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'goodDesc',
|
||||||
|
title : '商品简介',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'goodCtime',
|
||||||
|
title : '创建时间',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'goodItemId',
|
||||||
|
title : '分类ID',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'goodStoreId',
|
||||||
|
title : '门店ID',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'delState',
|
||||||
|
title : '删除状态',
|
||||||
|
sortable: true,
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return $.table.selectDictLabel(v_good_delstate_datas, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'detailDescribe',
|
||||||
|
title : '详细描述',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'recommend',
|
||||||
|
title : '推荐',
|
||||||
|
sortable: true,
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return $.table.selectDictLabel(datas, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.goodId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.goodId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<head th:include="include :: header"></head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-vGoodItem-add">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">类别名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="itemName" name="itemName" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">分类描述:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="itemDesc" name="itemDesc" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">创建时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="ctime" name="ctime" class="form-control time-input" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店ID:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="mStoreid" name="mStoreid" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">排序:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="sore" name="sore" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div th:include="include::footer"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var prefix = ctx + "store/vGoodItem"
|
||||||
|
$("#form-vGoodItem-add").validate({
|
||||||
|
rules:{
|
||||||
|
xxxx:{
|
||||||
|
required:true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-vGoodItem-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<head th:include="include :: header"></head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-vGoodItem-edit" th:object="${vGoodItem}">
|
||||||
|
|
||||||
|
<input id="id" name="id" th:field="*{id}" type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">类别名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="itemName" name="itemName" th:field="*{itemName}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">分类描述:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="itemDesc" name="itemDesc" th:field="*{itemDesc}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">创建时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="ctime" name="ctime" th:field="*{ctime}" class="form-control time-input" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店ID:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="mStoreid" name="mStoreid" th:field="*{mStoreid}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">排序:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="sore" name="sore" th:field="*{sore}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div th:include="include::footer"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var prefix = ctx + "store/vGoodItem";
|
||||||
|
$("#form-vGoodItem-edit").validate({
|
||||||
|
rules:{
|
||||||
|
xxxx:{
|
||||||
|
required:true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-vGoodItem-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,126 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<head th:include="include :: header"></head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="formId">
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
类别名称:<input type="text" name="itemName"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
分类描述:<input type="text" name="itemDesc"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="select-time">
|
||||||
|
<label>创建时间: </label>
|
||||||
|
<input type="text" class="time-input" id="startCtime" placeholder="开始" name="params[beginCtime]"/>
|
||||||
|
<span>-</span>
|
||||||
|
<input type="text" class="time-input" id="endCtime" placeholder="结束" name="params[endCtime]"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
门店ID:<input type="text" name="mStoreid"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
排序:<input type="text" name="sore"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="store:vGoodItem:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="store:vGoodItem:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="store:vGoodItem:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="store:vGoodItem:export">
|
||||||
|
<i class="fa fa-download"></i> 导出
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div th:include="include :: footer"></div>
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var editFlag = [[${@permission.hasPermi('store:vGoodItem:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('store:vGoodItem:remove')}]];
|
||||||
|
var prefix = ctx + "store/vGoodItem";
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "商品分类",
|
||||||
|
showExport: true,
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'id',
|
||||||
|
title : '主键ID',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'itemName',
|
||||||
|
title : '类别名称',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'itemDesc',
|
||||||
|
title : '分类描述',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'ctime',
|
||||||
|
title : '创建时间',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'mStoreid',
|
||||||
|
title : '门店ID',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'sore',
|
||||||
|
title : '排序',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<head th:include="include :: header"></head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-vQrcode-add">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店ID:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="storeId" name="storeId" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">编码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="qrCode" name="qrCode" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">二维码地址:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="qrPath" name="qrPath" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">二维码名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="qrName" name="qrName" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">创建时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="ctime" name="ctime" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div th:include="include::footer"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var prefix = ctx + "store/vQrcode"
|
||||||
|
$("#form-vQrcode-add").validate({
|
||||||
|
rules:{
|
||||||
|
xxxx:{
|
||||||
|
required:true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-vQrcode-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<head th:include="include :: header"></head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-vQrcode-edit" th:object="${vQrcode}">
|
||||||
|
|
||||||
|
<input id="id" name="id" th:field="*{id}" type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店ID:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="storeId" name="storeId" th:field="*{storeId}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">编码:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="qrCode" name="qrCode" th:field="*{qrCode}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">二维码地址:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="qrPath" name="qrPath" th:field="*{qrPath}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">二维码名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="qrName" name="qrName" th:field="*{qrName}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">创建时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="ctime" name="ctime" th:value="*{#dates.format(ctime,'yyyy-MM-dd HH:mm:ss')}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div th:include="include::footer"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var prefix = ctx + "store/vQrcode";
|
||||||
|
$("#form-vQrcode-edit").validate({
|
||||||
|
rules:{
|
||||||
|
xxxx:{
|
||||||
|
required:true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-vQrcode-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,126 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<head th:include="include :: header"></head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="formId">
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
门店ID:<input type="text" name="storeId"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
编码:<input type="text" name="qrCode"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
二维码地址:<input type="text" name="qrPath"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
二维码名称:<input type="text" name="qrName"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="select-time">
|
||||||
|
<label>创建时间: </label>
|
||||||
|
<input type="text" class="time-input" id="startCtime" placeholder="开始" name="params[beginCtime]"/>
|
||||||
|
<span>-</span>
|
||||||
|
<input type="text" class="time-input" id="endCtime" placeholder="结束" name="params[endCtime]"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="store:vQrcode:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="store:vQrcode:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="store:vQrcode:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="store:vQrcode:export">
|
||||||
|
<i class="fa fa-download"></i> 导出
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div th:include="include :: footer"></div>
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var editFlag = [[${@permission.hasPermi('store:vQrcode:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('store:vQrcode:remove')}]];
|
||||||
|
var prefix = ctx + "store/vQrcode";
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "二维码",
|
||||||
|
showExport: true,
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'id',
|
||||||
|
title : 'id',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'storeId',
|
||||||
|
title : '门店ID',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'qrCode',
|
||||||
|
title : '编码',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'qrPath',
|
||||||
|
title : '二维码地址',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'qrName',
|
||||||
|
title : '二维码名称',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'ctime',
|
||||||
|
title : '创建时间',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,91 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<head th:include="include :: header"></head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-vStore-add">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店编号:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="storeCode" name="storeCode" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="storeName" name="storeName" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店联系人:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="storePeople" name="storePeople" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店 联系电话:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="storeTel" name="storeTel" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">注册的邮箱:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="storeEmail" name="storeEmail" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店LOGO:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="storeLogo" name="storeLogo" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店地址:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="storeAddress" name="storeAddress" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店状态:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="storeStatus" class="form-control m-b" th:with="type=${@dict.getType('v_store_status')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">创建时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="ctime" name="ctime" class="form-control time-input" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店到期时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="stime" name="stime" class="form-control time-input" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div th:include="include::footer"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var prefix = ctx + "store/vStore"
|
||||||
|
$("#form-vStore-add").validate({
|
||||||
|
rules:{
|
||||||
|
xxxx:{
|
||||||
|
required:true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/add", $('#form-vStore-add').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,93 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<head th:include="include :: header"></head>
|
||||||
|
<body class="white-bg">
|
||||||
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
|
<form class="form-horizontal m" id="form-vStore-edit" th:object="${vStore}">
|
||||||
|
|
||||||
|
<input id="storeId" name="storeId" th:field="*{storeId}" type="hidden">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店编号:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="storeCode" name="storeCode" th:field="*{storeCode}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店名称:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="storeName" name="storeName" th:field="*{storeName}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店联系人:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="storePeople" name="storePeople" th:field="*{storePeople}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店 联系电话:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="storeTel" name="storeTel" th:field="*{storeTel}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">注册的邮箱:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="storeEmail" name="storeEmail" th:field="*{storeEmail}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店LOGO:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="storeLogo" name="storeLogo" th:field="*{storeLogo}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店地址:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="storeAddress" name="storeAddress" th:field="*{storeAddress}" class="form-control" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店状态:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<select name="storeStatus" class="form-control m-b" th:with="type=${@dict.getType('v_store_status')}">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{storeStatus}"></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">创建时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="ctime" name="ctime" th:field="*{ctime}" class="form-control time-input" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">门店到期时间:</label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input id="stime" name="stime" th:field="*{stime}" class="form-control time-input" type="text">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div th:include="include::footer"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var prefix = ctx + "store/vStore";
|
||||||
|
$("#form-vStore-edit").validate({
|
||||||
|
rules:{
|
||||||
|
xxxx:{
|
||||||
|
required:true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
focusCleanup: true
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitHandler() {
|
||||||
|
if ($.validate.form()) {
|
||||||
|
$.operate.save(prefix + "/edit", $('#form-vStore-edit').serialize());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,179 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<head th:include="include :: header"></head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="formId">
|
||||||
|
<div class="select-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
门店编号:<input type="text" name="storeCode"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
门店名称:<input type="text" name="storeName"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
门店联系人:<input type="text" name="storePeople"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
门店 联系电话:<input type="text" name="storeTel"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
注册的邮箱:<input type="text" name="storeEmail"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
门店LOGO:<input type="text" name="storeLogo"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
门店地址:<input type="text" name="storeAddress"/>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
门店状态:<select name="storeStatus" th:with="type=${@dict.getType('v_store_status')}">
|
||||||
|
<option value="">所有</option>
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li class="select-time">
|
||||||
|
<label>创建时间: </label>
|
||||||
|
<input type="text" class="time-input" id="startCtime" placeholder="开始" name="params[beginCtime]"/>
|
||||||
|
<span>-</span>
|
||||||
|
<input type="text" class="time-input" id="endCtime" placeholder="结束" name="params[endCtime]"/>
|
||||||
|
</li>
|
||||||
|
<li class="select-time">
|
||||||
|
<label>门店到期时间: </label>
|
||||||
|
<input type="text" class="time-input" id="startStime" placeholder="开始" name="params[beginStime]"/>
|
||||||
|
<span>-</span>
|
||||||
|
<input type="text" class="time-input" id="endStime" placeholder="结束" name="params[endStime]"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
|
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="store:vStore:add">
|
||||||
|
<i class="fa fa-plus"></i> 添加
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="store:vStore:edit">
|
||||||
|
<i class="fa fa-edit"></i> 修改
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="store:vStore:remove">
|
||||||
|
<i class="fa fa-remove"></i> 删除
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="store:vStore:export">
|
||||||
|
<i class="fa fa-download"></i> 导出
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div th:include="include :: footer"></div>
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var editFlag = [[${@permission.hasPermi('store:vStore:edit')}]];
|
||||||
|
var removeFlag = [[${@permission.hasPermi('store:vStore:remove')}]];
|
||||||
|
var prefix = ctx + "store/vStore";
|
||||||
|
var datas = [[${@dict.getType('v_store_status')}]];
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
createUrl: prefix + "/add",
|
||||||
|
updateUrl: prefix + "/edit/{id}",
|
||||||
|
removeUrl: prefix + "/remove",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
modalName: "门店管理",
|
||||||
|
showExport: true,
|
||||||
|
columns: [{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'storeId',
|
||||||
|
title : 'ID',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'storeCode',
|
||||||
|
title : '门店编号',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'storeName',
|
||||||
|
title : '门店名称',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'storePeople',
|
||||||
|
title : '门店联系人',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'storeTel',
|
||||||
|
title : '门店 联系电话',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'storeEmail',
|
||||||
|
title : '注册的邮箱',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'storeLogo',
|
||||||
|
title : '门店LOGO',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'storeAddress',
|
||||||
|
title : '门店地址',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'storeStatus',
|
||||||
|
title : '门店状态',
|
||||||
|
sortable: true,
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
return $.table.selectDictLabel(datas, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'ctime',
|
||||||
|
title : '创建时间',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field : 'stime',
|
||||||
|
title : '门店到期时间',
|
||||||
|
sortable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.storeId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||||
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.storeId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -135,10 +135,15 @@
|
||||||
field: 'userName',
|
field: 'userName',
|
||||||
title: '用户名称'
|
title: '用户名称'
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
field: 'dept.deptName',
|
field: 'dept.deptName',
|
||||||
title: '部门'
|
title: '部门'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: '性别',
|
||||||
|
title: '用户名称'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'email',
|
field: 'email',
|
||||||
title: '邮箱',
|
title: '邮箱',
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,17 @@
|
||||||
<artifactId>javax.servlet-api</artifactId>
|
<artifactId>javax.servlet-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>tk.mybatis</groupId>
|
||||||
|
<artifactId>mapper-spring-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
@ -6,6 +6,8 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import javax.persistence.Transient;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Entity基类
|
* Entity基类
|
||||||
*
|
*
|
||||||
|
|
@ -16,23 +18,29 @@ public class BaseEntity implements Serializable
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 搜索值 */
|
/** 搜索值 */
|
||||||
|
@Transient
|
||||||
private String searchValue;
|
private String searchValue;
|
||||||
|
|
||||||
/** 创建者 */
|
/** 创建者 */
|
||||||
|
@Transient
|
||||||
private String createBy;
|
private String createBy;
|
||||||
|
|
||||||
/** 创建时间 */
|
/** 创建时间 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Transient
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
/** 更新者 */
|
/** 更新者 */
|
||||||
|
@Transient
|
||||||
private String updateBy;
|
private String updateBy;
|
||||||
|
|
||||||
/** 更新时间 */
|
/** 更新时间 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@Transient
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
/** 备注 */
|
/** 备注 */
|
||||||
|
@Transient
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
/** 请求参数 */
|
/** 请求参数 */
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.ruoyi.common.core.page;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: Enzo
|
||||||
|
* @Date: 2019/3/25 14:48
|
||||||
|
*/
|
||||||
|
public class ExampleUtils {
|
||||||
|
|
||||||
|
public static void andEqualTo(Example.Criteria criteria, String filed, Object value) {
|
||||||
|
if (null != value && StringUtils.isNotBlank(value.toString())) {
|
||||||
|
criteria.andEqualTo(filed, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void andBetweenDateToDate(Example.Criteria criteria, String filed, Object fromDate, Object endDate) {
|
||||||
|
if (null != fromDate && StringUtils.isNotBlank(fromDate.toString())
|
||||||
|
&& null != endDate && StringUtils.isNotBlank(endDate.toString())) {
|
||||||
|
|
||||||
|
fromDate = fromDate.toString().contains(":") ? fromDate : fromDate + " 00:00:00";
|
||||||
|
endDate = endDate.toString().contains(":") ? endDate : endDate + " 23:59:59";
|
||||||
|
|
||||||
|
criteria.andBetween(filed, fromDate, endDate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void inField(Example.Criteria criteria, String filed, List<String> values) {
|
||||||
|
criteria.andIn(filed, values);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void andLikeTo(Example.Criteria criteria, String field, String value) {
|
||||||
|
if (null != value && StringUtils.isNotBlank(value.toString())) {
|
||||||
|
criteria.andLike(field, String.format("%%%s%%", value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,6 +5,8 @@ import java.math.BigInteger;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
|
||||||
|
|
@ -366,6 +368,18 @@ public class Convert
|
||||||
return toStrArray(",", str);
|
return toStrArray(",", str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 转换为String数组<br>
|
||||||
|
*
|
||||||
|
* @param str 被转换的值
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public static List toList(String str)
|
||||||
|
{
|
||||||
|
return Arrays.asList(toStrArray(",", str));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 转换为String数组<br>
|
* 转换为String数组<br>
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -12,40 +12,39 @@ import com.ruoyi.common.utils.http.HttpUtils;
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public class AddressUtils
|
public class AddressUtils {
|
||||||
{
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(AddressUtils.class);
|
private static final Logger log = LoggerFactory.getLogger(AddressUtils.class);
|
||||||
|
|
||||||
public static final String IP_URL = "http://ip.taobao.com/service/getIpInfo.php";
|
public static final String IP_URL = "https://api.map.baidu.com/location/ip";
|
||||||
|
public static final String ak = "hNGEz4KKVtRLkM1zrUKDjGRv";
|
||||||
|
|
||||||
public static String getRealAddressByIP(String ip)
|
public static String getRealAddressByIP(String ip) {
|
||||||
{
|
|
||||||
String address = "XX XX";
|
String address = "XX XX";
|
||||||
|
|
||||||
// 内网不查询
|
// 内网不查询
|
||||||
if (IpUtils.internalIp(ip))
|
if (IpUtils.internalIp(ip)) {
|
||||||
{
|
|
||||||
return "内网IP";
|
return "内网IP";
|
||||||
}
|
}
|
||||||
if (Global.isAddressEnabled())
|
if (Global.isAddressEnabled()) {
|
||||||
{
|
|
||||||
String rspStr = HttpUtils.sendPost(IP_URL, "ip=" + ip);
|
if (ip.contains("," )) {
|
||||||
if (StringUtils.isEmpty(rspStr))
|
ip = ip.split("," )[0];
|
||||||
{
|
}
|
||||||
|
String rspStr = HttpUtils.sendPost(IP_URL, "ip=" + ip + "&ak=" + ak);
|
||||||
|
if (StringUtils.isEmpty(rspStr)) {
|
||||||
log.error("获取地理位置异常 {}", ip);
|
log.error("获取地理位置异常 {}", ip);
|
||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
JSONObject obj;
|
JSONObject obj;
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
obj = JSON.unmarshal(rspStr, JSONObject.class);
|
obj = JSON.unmarshal(rspStr, JSONObject.class);
|
||||||
JSONObject data = obj.getObj("data");
|
log.info("地址位置接口返回信息:{}", rspStr);
|
||||||
String region = data.getStr("region");
|
// JSONObject data = obj.getObj("data");
|
||||||
String city = data.getStr("city");
|
address = obj.getStr("address" );
|
||||||
address = region + " " + city;
|
// String region = data.getStr("region");
|
||||||
}
|
// String city = data.getStr("city");
|
||||||
catch (Exception e)
|
// address = region + " " + city;
|
||||||
{
|
} catch (Exception e) {
|
||||||
log.error("获取地理位置异常 {}", ip);
|
log.error("获取地理位置异常 {}", ip);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,48 +9,38 @@ import javax.servlet.http.HttpServletRequest;
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public class IpUtils
|
public class IpUtils {
|
||||||
{
|
public static String getIpAddr(HttpServletRequest request) {
|
||||||
public static String getIpAddr(HttpServletRequest request)
|
if (request == null) {
|
||||||
{
|
|
||||||
if (request == null)
|
|
||||||
{
|
|
||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
String ip = request.getHeader("x-forwarded-for");
|
String ip = request.getHeader("x-forwarded-for" );
|
||||||
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
|
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
|
||||||
{
|
ip = request.getHeader("Proxy-Client-IP" );
|
||||||
ip = request.getHeader("Proxy-Client-IP");
|
|
||||||
}
|
}
|
||||||
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
|
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
|
||||||
{
|
ip = request.getHeader("X-Forwarded-For" );
|
||||||
ip = request.getHeader("X-Forwarded-For");
|
|
||||||
}
|
}
|
||||||
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
|
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
|
||||||
{
|
ip = request.getHeader("WL-Proxy-Client-IP" );
|
||||||
ip = request.getHeader("WL-Proxy-Client-IP");
|
|
||||||
}
|
}
|
||||||
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
|
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
|
||||||
{
|
ip = request.getHeader("X-Real-IP" );
|
||||||
ip = request.getHeader("X-Real-IP");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip))
|
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
|
||||||
{
|
|
||||||
ip = request.getRemoteAddr();
|
ip = request.getRemoteAddr();
|
||||||
}
|
}
|
||||||
|
|
||||||
return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip;
|
return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean internalIp(String ip)
|
public static boolean internalIp(String ip) {
|
||||||
{
|
|
||||||
byte[] addr = textToNumericFormatV4(ip);
|
byte[] addr = textToNumericFormatV4(ip);
|
||||||
return internalIp(addr) || "127.0.0.1".equals(ip);
|
return internalIp(addr) || "127.0.0.1".equals(ip);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean internalIp(byte[] addr)
|
private static boolean internalIp(byte[] addr) {
|
||||||
{
|
|
||||||
final byte b0 = addr[0];
|
final byte b0 = addr[0];
|
||||||
final byte b1 = addr[1];
|
final byte b1 = addr[1];
|
||||||
// 10.x.x.x/8
|
// 10.x.x.x/8
|
||||||
|
|
@ -62,18 +52,15 @@ public class IpUtils
|
||||||
// 192.168.x.x/16
|
// 192.168.x.x/16
|
||||||
final byte SECTION_5 = (byte) 0xC0;
|
final byte SECTION_5 = (byte) 0xC0;
|
||||||
final byte SECTION_6 = (byte) 0xA8;
|
final byte SECTION_6 = (byte) 0xA8;
|
||||||
switch (b0)
|
switch (b0) {
|
||||||
{
|
|
||||||
case SECTION_1:
|
case SECTION_1:
|
||||||
return true;
|
return true;
|
||||||
case SECTION_2:
|
case SECTION_2:
|
||||||
if (b1 >= SECTION_3 && b1 <= SECTION_4)
|
if (b1 >= SECTION_3 && b1 <= SECTION_4) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case SECTION_5:
|
case SECTION_5:
|
||||||
switch (b1)
|
switch (b1) {
|
||||||
{
|
|
||||||
case SECTION_6:
|
case SECTION_6:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -88,21 +75,20 @@ public class IpUtils
|
||||||
* @param text IPv4地址
|
* @param text IPv4地址
|
||||||
* @return byte 字节
|
* @return byte 字节
|
||||||
*/
|
*/
|
||||||
public static byte[] textToNumericFormatV4(String text)
|
public static byte[] textToNumericFormatV4(String text) {
|
||||||
{
|
if (text.length() == 0) {
|
||||||
if (text.length() == 0)
|
|
||||||
{
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
if (text.contains("," )) {
|
||||||
|
text = text.split("," )[0];
|
||||||
|
}
|
||||||
|
|
||||||
byte[] bytes = new byte[4];
|
byte[] bytes = new byte[4];
|
||||||
String[] elements = text.split("\\.", -1);
|
String[] elements = text.split("\\.", -1);
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
long l;
|
long l;
|
||||||
int i;
|
int i;
|
||||||
switch (elements.length)
|
switch (elements.length) {
|
||||||
{
|
|
||||||
case 1:
|
case 1:
|
||||||
l = Long.parseLong(elements[0]);
|
l = Long.parseLong(elements[0]);
|
||||||
if ((l < 0L) || (l > 4294967295L))
|
if ((l < 0L) || (l > 4294967295L))
|
||||||
|
|
@ -125,8 +111,7 @@ public class IpUtils
|
||||||
bytes[3] = (byte) (int) (l & 0xFF);
|
bytes[3] = (byte) (int) (l & 0xFF);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
for (i = 0; i < 2; ++i)
|
for (i = 0; i < 2; ++i) {
|
||||||
{
|
|
||||||
l = Integer.parseInt(elements[i]);
|
l = Integer.parseInt(elements[i]);
|
||||||
if ((l < 0L) || (l > 255L))
|
if ((l < 0L) || (l > 255L))
|
||||||
return null;
|
return null;
|
||||||
|
|
@ -139,8 +124,7 @@ public class IpUtils
|
||||||
bytes[3] = (byte) (int) (l & 0xFF);
|
bytes[3] = (byte) (int) (l & 0xFF);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
for (i = 0; i < 4; ++i)
|
for (i = 0; i < 4; ++i) {
|
||||||
{
|
|
||||||
l = Integer.parseInt(elements[i]);
|
l = Integer.parseInt(elements[i]);
|
||||||
if ((l < 0L) || (l > 255L))
|
if ((l < 0L) || (l > 255L))
|
||||||
return null;
|
return null;
|
||||||
|
|
@ -150,34 +134,24 @@ public class IpUtils
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
} catch (NumberFormatException e) {
|
||||||
catch (NumberFormatException e)
|
|
||||||
{
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getHostIp()
|
public static String getHostIp() {
|
||||||
{
|
try {
|
||||||
try
|
|
||||||
{
|
|
||||||
return InetAddress.getLocalHost().getHostAddress();
|
return InetAddress.getLocalHost().getHostAddress();
|
||||||
}
|
} catch (UnknownHostException e) {
|
||||||
catch (UnknownHostException e)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
return "127.0.0.1";
|
return "127.0.0.1";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getHostName()
|
public static String getHostName() {
|
||||||
{
|
try {
|
||||||
try
|
|
||||||
{
|
|
||||||
return InetAddress.getLocalHost().getHostName();
|
return InetAddress.getLocalHost().getHostName();
|
||||||
}
|
} catch (UnknownHostException e) {
|
||||||
catch (UnknownHostException e)
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
return "未知";
|
return "未知";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.ruoyi.generator.controller;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -27,8 +28,7 @@ import com.ruoyi.generator.service.IGenService;
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/tool/gen")
|
@RequestMapping("/tool/gen")
|
||||||
public class GenController extends BaseController
|
public class GenController extends BaseController {
|
||||||
{
|
|
||||||
private String prefix = "tool/gen";
|
private String prefix = "tool/gen";
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
@ -36,16 +36,14 @@ public class GenController extends BaseController
|
||||||
|
|
||||||
@RequiresPermissions("tool:gen:view")
|
@RequiresPermissions("tool:gen:view")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
public String gen()
|
public String gen() {
|
||||||
{
|
|
||||||
return prefix + "/gen";
|
return prefix + "/gen";
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresPermissions("tool:gen:list")
|
@RequiresPermissions("tool:gen:list")
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public TableDataInfo list(TableInfo tableInfo)
|
public TableDataInfo list(TableInfo tableInfo) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
List<TableInfo> list = genService.selectTableList(tableInfo);
|
List<TableInfo> list = genService.selectTableList(tableInfo);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
|
@ -57,11 +55,10 @@ public class GenController extends BaseController
|
||||||
@RequiresPermissions("tool:gen:code")
|
@RequiresPermissions("tool:gen:code")
|
||||||
@Log(title = "代码生成", businessType = BusinessType.GENCODE)
|
@Log(title = "代码生成", businessType = BusinessType.GENCODE)
|
||||||
@GetMapping("/genCode/{tableName}")
|
@GetMapping("/genCode/{tableName}")
|
||||||
public void genCode(HttpServletResponse response, @PathVariable("tableName") String tableName) throws IOException
|
public void genCode(HttpServletResponse response, @PathVariable("tableName") String tableName) throws IOException {
|
||||||
{
|
|
||||||
byte[] data = genService.generatorCode(tableName);
|
byte[] data = genService.generatorCode(tableName);
|
||||||
response.reset();
|
response.reset();
|
||||||
response.setHeader("Content-Disposition", "attachment; filename=\"ruoyi.zip\"");
|
response.setHeader("Content-Disposition", "attachment; filename=\"" + tableName + ".zip\"");
|
||||||
response.addHeader("Content-Length", "" + data.length);
|
response.addHeader("Content-Length", "" + data.length);
|
||||||
response.setContentType("application/octet-stream; charset=UTF-8");
|
response.setContentType("application/octet-stream; charset=UTF-8");
|
||||||
|
|
||||||
|
|
@ -75,8 +72,7 @@ public class GenController extends BaseController
|
||||||
@Log(title = "代码生成", businessType = BusinessType.GENCODE)
|
@Log(title = "代码生成", businessType = BusinessType.GENCODE)
|
||||||
@GetMapping("/batchGenCode")
|
@GetMapping("/batchGenCode")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public void batchGenCode(HttpServletResponse response, String tables) throws IOException
|
public void batchGenCode(HttpServletResponse response, String tables) throws IOException {
|
||||||
{
|
|
||||||
String[] tableNames = Convert.toStrArray(tables);
|
String[] tableNames = Convert.toStrArray(tables);
|
||||||
byte[] data = genService.generatorCode(tableNames);
|
byte[] data = genService.generatorCode(tableNames);
|
||||||
response.reset();
|
response.reset();
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,11 @@ public class ColumnInfo
|
||||||
/** 执行计划(包含了与索引相关的一些细节信息) */
|
/** 执行计划(包含了与索引相关的一些细节信息) */
|
||||||
private String extra;
|
private String extra;
|
||||||
|
|
||||||
|
/** 当PRI值时为这个字段为主键 */
|
||||||
|
private String columnKey;
|
||||||
|
|
||||||
|
private boolean iskey;
|
||||||
|
|
||||||
public String getColumnName()
|
public String getColumnName()
|
||||||
{
|
{
|
||||||
return columnName;
|
return columnName;
|
||||||
|
|
@ -122,4 +127,21 @@ public class ColumnInfo
|
||||||
{
|
{
|
||||||
this.configInfo = configInfo;
|
this.configInfo = configInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getColumnKey() {
|
||||||
|
return columnKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColumnKey(String columnKey) {
|
||||||
|
this.columnKey = columnKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isIskey() {
|
||||||
|
if("PRI".equals(this.getColumnKey())){
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,8 @@ public class TableInfo extends BaseEntity
|
||||||
/** 类名(第一个字母小写) */
|
/** 类名(第一个字母小写) */
|
||||||
private String classname;
|
private String classname;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String getTableName()
|
public String getTableName()
|
||||||
{
|
{
|
||||||
return tableName;
|
return tableName;
|
||||||
|
|
@ -100,4 +102,6 @@ public class TableInfo extends BaseEntity
|
||||||
{
|
{
|
||||||
this.primaryKey = primaryKey;
|
this.primaryKey = primaryKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
# 代码生成
|
# 代码生成
|
||||||
gen:
|
gen:
|
||||||
# 作者
|
# 作者
|
||||||
author: ruoyi
|
author: Enzo
|
||||||
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
||||||
packageName: com.ruoyi.system
|
packageName: com.ruoyi.store
|
||||||
# 自动去除表前缀,默认是true
|
# 自动去除表前缀,默认是true
|
||||||
autoRemovePre: true
|
autoRemovePre: true
|
||||||
# 表前缀(类名不会包含表前缀)
|
# 表前缀(类名不会包含表前缀)
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="tableComment" column="table_comment" />
|
<result property="tableComment" column="table_comment" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap type="ColumnInfo" id="ColumnInfoResult">
|
<resultMap type="ColumnInfo" id="ColumnInfoResult">
|
||||||
<id property="columnName" column="column_name" />
|
<id property="columnName" column="column_name" />
|
||||||
<result property="dataType" column="data_type" />
|
<result property="dataType" column="data_type" />
|
||||||
<result property="columnComment" column="column_comment" />
|
<result property="columnComment" column="column_comment" />
|
||||||
|
<result property="columnKey" column="column_key" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectGenVo">
|
<sql id="selectGenVo">
|
||||||
|
|
@ -45,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectTableColumnsByName" parameterType="String" resultMap="ColumnInfoResult">
|
<select id="selectTableColumnsByName" parameterType="String" resultMap="ColumnInfoResult">
|
||||||
select column_name, data_type, column_comment, extra from information_schema.columns
|
select column_name, data_type, column_comment, extra,column_key from information_schema.columns
|
||||||
where table_name = #{tableName} and table_schema = (select database()) order by ordinal_position
|
where table_name = #{tableName} and table_schema = (select database()) order by ordinal_position
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,21 @@
|
||||||
<body class="white-bg">
|
<body class="white-bg">
|
||||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
<form class="form-horizontal m" id="form-${classname}-edit" th:object="${${classname}}">
|
<form class="form-horizontal m" id="form-${classname}-edit" th:object="${${classname}}">
|
||||||
<input id="${primaryKey.attrname}" name="${primaryKey.attrname}" th:field="*{${primaryKey.attrname}}" type="hidden">
|
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
|
#if($column.iskey)
|
||||||
|
<input id="${column.attrname}" name="${column.attrname}" th:field="*{${column.attrname}}" type="hidden">
|
||||||
|
#end
|
||||||
#if($column.columnName != $primaryKey.columnName)
|
#if($column.columnName != $primaryKey.columnName)
|
||||||
#if(!${column.configInfo})
|
#if(!${column.configInfo})
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label">${column.columnComment}:</label>
|
<label class="col-sm-3 control-label">${column.columnComment}:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
|
#if(${column.attrType} == "Date")
|
||||||
|
<input id="${column.attrname}" name="${column.attrname}" th:value="*{${#dates.format(column.attrname,'yyyy-MM-dd HH:mm:ss')}}" class="form-control" type="text">
|
||||||
|
#else
|
||||||
<input id="${column.attrname}" name="${column.attrname}" th:field="*{${column.attrname}}" class="form-control" type="text">
|
<input id="${column.attrname}" name="${column.attrname}" th:field="*{${column.attrname}}" class="form-control" type="text">
|
||||||
|
#end
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@
|
||||||
var prefix = ctx + "${moduleName}/${classname}";
|
var prefix = ctx + "${moduleName}/${classname}";
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#if(${column.configInfo} && ${column.configInfo.type} == 'dict')
|
#if(${column.configInfo} && ${column.configInfo.type} == 'dict')
|
||||||
var datas = [[${@dict.getType('${column.configInfo.value}')}]];
|
var ${column.attrname}_datas = [[${@dict.getType('${column.configInfo.value}')}]];
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
|
@ -89,7 +89,7 @@
|
||||||
checkbox: true
|
checkbox: true
|
||||||
},
|
},
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
#if($column.columnName == $primaryKey.columnName)
|
#if($column.iskey)
|
||||||
{
|
{
|
||||||
field : '${column.attrname}',
|
field : '${column.attrname}',
|
||||||
title : '${column.columnComment}',
|
title : '${column.columnComment}',
|
||||||
|
|
@ -102,7 +102,7 @@
|
||||||
title : '${column.columnComment}',
|
title : '${column.columnComment}',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
formatter: function(value, row, index) {
|
formatter: function(value, row, index) {
|
||||||
return $.table.selectDictLabel(datas, value);
|
return $.table.selectDictLabel(${column.attrname}_datas, value);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -3,21 +3,25 @@ package ${package}.mapper;
|
||||||
import ${package}.domain.${className};
|
import ${package}.domain.${className};
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${tableComment} 数据层
|
* ${tableComment} 数据层
|
||||||
*
|
*
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${datetime}
|
* @date ${datetime}
|
||||||
*/
|
*/
|
||||||
public interface ${className}Mapper
|
@Repository
|
||||||
|
public interface ${className}Mapper extends Mapper<${className}>
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询${tableComment}信息
|
* 查询${tableComment}信息
|
||||||
*
|
*
|
||||||
* @param ${primaryKey.attrname} ${tableComment}ID
|
* @param ${primaryKey.attrname} ${tableComment}
|
||||||
* @return ${tableComment}信息
|
* @return ${tableComment}信息
|
||||||
*/
|
*/
|
||||||
public ${className} select${className}ById(${primaryKey.attrType} ${primaryKey.attrname});
|
${className} select${className}ById(${primaryKey.attrType} ${primaryKey.attrname});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询${tableComment}列表
|
* 查询${tableComment}列表
|
||||||
|
|
@ -25,7 +29,7 @@ public interface ${className}Mapper
|
||||||
* @param ${classname} ${tableComment}信息
|
* @param ${classname} ${tableComment}信息
|
||||||
* @return ${tableComment}集合
|
* @return ${tableComment}集合
|
||||||
*/
|
*/
|
||||||
public List<${className}> select${className}List(${className} ${classname});
|
List<${className}> select${className}List(${className} ${classname});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增${tableComment}
|
* 新增${tableComment}
|
||||||
|
|
@ -33,7 +37,7 @@ public interface ${className}Mapper
|
||||||
* @param ${classname} ${tableComment}信息
|
* @param ${classname} ${tableComment}信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int insert${className}(${className} ${classname});
|
int insert${className}(${className} ${classname});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改${tableComment}
|
* 修改${tableComment}
|
||||||
|
|
@ -41,7 +45,7 @@ public interface ${className}Mapper
|
||||||
* @param ${classname} ${tableComment}信息
|
* @param ${classname} ${tableComment}信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int update${className}(${className} ${classname});
|
int update${className}(${className} ${classname});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除${tableComment}
|
* 删除${tableComment}
|
||||||
|
|
@ -49,7 +53,7 @@ public interface ${className}Mapper
|
||||||
* @param ${primaryKey.attrname} ${tableComment}ID
|
* @param ${primaryKey.attrname} ${tableComment}ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int delete${className}ById(${primaryKey.attrType} ${primaryKey.attrname});
|
int delete${className}ById(${primaryKey.attrType} ${primaryKey.attrname});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除${tableComment}
|
* 批量删除${tableComment}
|
||||||
|
|
@ -57,6 +61,6 @@ public interface ${className}Mapper
|
||||||
* @param ${primaryKey.attrname}s 需要删除的数据ID
|
* @param ${primaryKey.attrname}s 需要删除的数据ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int delete${className}ByIds(String[] ${primaryKey.attrname}s);
|
int delete${className}ByIds(String[] ${primaryKey.attrname}s);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -17,7 +17,7 @@ public interface I${className}Service
|
||||||
* @param ${primaryKey.attrname} ${tableComment}ID
|
* @param ${primaryKey.attrname} ${tableComment}ID
|
||||||
* @return ${tableComment}信息
|
* @return ${tableComment}信息
|
||||||
*/
|
*/
|
||||||
public ${className} select${className}ById(${primaryKey.attrType} ${primaryKey.attrname});
|
${className} select${className}ById(${primaryKey.attrType} ${primaryKey.attrname});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询${tableComment}列表
|
* 查询${tableComment}列表
|
||||||
|
|
@ -25,7 +25,7 @@ public interface I${className}Service
|
||||||
* @param ${classname} ${tableComment}信息
|
* @param ${classname} ${tableComment}信息
|
||||||
* @return ${tableComment}集合
|
* @return ${tableComment}集合
|
||||||
*/
|
*/
|
||||||
public List<${className}> select${className}List(${className} ${classname});
|
List<${className}> select${className}List(${className} ${classname});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增${tableComment}
|
* 新增${tableComment}
|
||||||
|
|
@ -33,7 +33,7 @@ public interface I${className}Service
|
||||||
* @param ${classname} ${tableComment}信息
|
* @param ${classname} ${tableComment}信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int insert${className}(${className} ${classname});
|
int insert${className}(${className} ${classname});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改${tableComment}
|
* 修改${tableComment}
|
||||||
|
|
@ -41,7 +41,7 @@ public interface I${className}Service
|
||||||
* @param ${classname} ${tableComment}信息
|
* @param ${classname} ${tableComment}信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int update${className}(${className} ${classname});
|
int update${className}(${className} ${classname});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除${tableComment}信息
|
* 删除${tableComment}信息
|
||||||
|
|
@ -49,6 +49,12 @@ public interface I${className}Service
|
||||||
* @param ids 需要删除的数据ID
|
* @param ids 需要删除的数据ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int delete${className}ByIds(String ids);
|
int delete${className}ByIds(String ids);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除${tableComment} 单条信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int delete${className}ById(${primaryKey.attrType} ${primaryKey.attrname});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,15 @@
|
||||||
package ${package}.service.impl;
|
package ${package}.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.page.ExampleUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import ${package}.mapper.${className}Mapper;
|
import ${package}.mapper.${className}Mapper;
|
||||||
import ${package}.domain.${className};
|
import ${package}.domain.${className};
|
||||||
import ${package}.service.I${className}Service;
|
import ${package}.service.I${className}Service;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${tableComment} 服务层实现
|
* ${tableComment} 服务层实现
|
||||||
|
|
@ -29,7 +32,7 @@ public class ${className}ServiceImpl implements I${className}Service
|
||||||
@Override
|
@Override
|
||||||
public ${className} select${className}ById(${primaryKey.attrType} ${primaryKey.attrname})
|
public ${className} select${className}ById(${primaryKey.attrType} ${primaryKey.attrname})
|
||||||
{
|
{
|
||||||
return ${classname}Mapper.select${className}ById(${primaryKey.attrname});
|
return ${classname}Mapper.selectByPrimaryKey(${primaryKey.attrname});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -41,7 +44,18 @@ public class ${className}ServiceImpl implements I${className}Service
|
||||||
@Override
|
@Override
|
||||||
public List<${className}> select${className}List(${className} ${classname})
|
public List<${className}> select${className}List(${className} ${classname})
|
||||||
{
|
{
|
||||||
return ${classname}Mapper.select${className}List(${classname});
|
Example example = new Example(${className}.class);
|
||||||
|
Example.Criteria criteria = example.createCriteria();
|
||||||
|
|
||||||
|
#foreach ($column in $columns)
|
||||||
|
#if(${column.attrType} != "Date")
|
||||||
|
ExampleUtils.andEqualTo(criteria, "${column.attrname}", ${classname}.get${column.attrName}());
|
||||||
|
#elseif(${column.attrType} == "Date")
|
||||||
|
ExampleUtils.andBetweenDateToDate(criteria, "${column.attrname}", ${classname}.getParams().get("begin${column.attrName}"),${classname}.getParams().get("end${column.attrName}"));
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
|
||||||
|
return ${classname}Mapper.selectByExample(example);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -53,7 +67,7 @@ public class ${className}ServiceImpl implements I${className}Service
|
||||||
@Override
|
@Override
|
||||||
public int insert${className}(${className} ${classname})
|
public int insert${className}(${className} ${classname})
|
||||||
{
|
{
|
||||||
return ${classname}Mapper.insert${className}(${classname});
|
return ${classname}Mapper.insertSelective(${classname});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -65,7 +79,7 @@ public class ${className}ServiceImpl implements I${className}Service
|
||||||
@Override
|
@Override
|
||||||
public int update${className}(${className} ${classname})
|
public int update${className}(${className} ${classname})
|
||||||
{
|
{
|
||||||
return ${classname}Mapper.update${className}(${classname});
|
return ${classname}Mapper.updateByPrimaryKeySelective(${classname});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -77,7 +91,21 @@ public class ${className}ServiceImpl implements I${className}Service
|
||||||
@Override
|
@Override
|
||||||
public int delete${className}ByIds(String ids)
|
public int delete${className}ByIds(String ids)
|
||||||
{
|
{
|
||||||
return ${classname}Mapper.delete${className}ByIds(Convert.toStrArray(ids));
|
Example example = new Example(${className}.class);
|
||||||
|
Example.Criteria criteria = example.createCriteria();
|
||||||
|
criteria.andIn("${primaryKey.attrname}",Convert.toList(ids));
|
||||||
|
return ${classname}Mapper.deleteByExample(example);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除${tableComment} 单条信息
|
||||||
|
* @param ${primaryKey.attrname} 删除的主键ID
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int delete${className}ById(${primaryKey.attrType} ${primaryKey.attrname}){
|
||||||
|
return ${classname}Mapper.deleteByPrimaryKey(${primaryKey.attrname});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,13 @@
|
||||||
package ${package}.domain;
|
package ${package}.domain;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
#foreach ($column in $columns)
|
#foreach ($column in $columns)
|
||||||
#if($column.attrType == 'Date')
|
#if($column.attrType == 'Date')
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
@ -16,32 +21,24 @@ import java.util.Date;
|
||||||
* @author ${author}
|
* @author ${author}
|
||||||
* @date ${datetime}
|
* @date ${datetime}
|
||||||
*/
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
@Table(name = "${tableName}")
|
||||||
public class ${className} extends BaseEntity
|
public class ${className} extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
#foreach ($column in $columns)
|
#foreach ($column in $columns)
|
||||||
/** $column.columnComment */
|
|
||||||
|
/**字段描述 $column.columnComment */
|
||||||
|
#if($column.iskey)
|
||||||
|
@Id
|
||||||
|
#end
|
||||||
|
@Column(name = "$column.columnName")
|
||||||
private $column.attrType $column.attrname;
|
private $column.attrType $column.attrname;
|
||||||
#end
|
#end
|
||||||
|
|
||||||
#foreach ($column in $columns)
|
|
||||||
public void set${column.attrName}($column.attrType $column.attrname)
|
|
||||||
{
|
|
||||||
this.$column.attrname = $column.attrname;
|
|
||||||
}
|
|
||||||
|
|
||||||
public $column.attrType get${column.attrName}()
|
|
||||||
{
|
|
||||||
return $column.attrname;
|
|
||||||
}
|
|
||||||
#end
|
|
||||||
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
#foreach ($column in $columns)
|
|
||||||
.append("${column.attrname}", get${column.attrName}())
|
|
||||||
#end
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,8 @@
|
||||||
<artifactId>ruoyi-common</artifactId>
|
<artifactId>ruoyi-common</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.ruoyi.store.domain;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品分类表 v_good_item
|
||||||
|
*
|
||||||
|
* @author Enzo
|
||||||
|
* @date 2019-03-25
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
@Table(name = "v_good_item")
|
||||||
|
public class VGoodItem extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**字段描述 主键ID */
|
||||||
|
@Id
|
||||||
|
@Column(name = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**字段描述 类别名称 */
|
||||||
|
@Column(name = "item_name")
|
||||||
|
private String itemName;
|
||||||
|
|
||||||
|
/**字段描述 分类描述 */
|
||||||
|
@Column(name = "item_desc")
|
||||||
|
private String itemDesc;
|
||||||
|
|
||||||
|
/**字段描述 创建时间 */
|
||||||
|
@Column(name = "ctime")
|
||||||
|
private Date ctime;
|
||||||
|
|
||||||
|
/**字段描述 门店ID */
|
||||||
|
@Column(name = "m_storeid")
|
||||||
|
private Long mStoreid;
|
||||||
|
|
||||||
|
/**字段描述 排序 */
|
||||||
|
@Column(name = "sore")
|
||||||
|
private Integer sore;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,75 @@
|
||||||
|
package com.ruoyi.store.domain;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店管理表 v_store
|
||||||
|
*
|
||||||
|
* @author Enzo
|
||||||
|
* @date 2019-03-25
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
@Table(name = "v_store")
|
||||||
|
public class VStore extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**字段描述 ID */
|
||||||
|
@Id
|
||||||
|
@Column(name = "store_id")
|
||||||
|
private Long storeId;
|
||||||
|
|
||||||
|
/**字段描述 门店编号 */
|
||||||
|
@Column(name = "store_code")
|
||||||
|
private String storeCode;
|
||||||
|
|
||||||
|
/**字段描述 门店名称 */
|
||||||
|
@Column(name = "store_name")
|
||||||
|
private String storeName;
|
||||||
|
|
||||||
|
/**字段描述 门店联系人 */
|
||||||
|
@Column(name = "store_people")
|
||||||
|
private String storePeople;
|
||||||
|
|
||||||
|
/**字段描述 门店 联系电话 */
|
||||||
|
@Column(name = "store_tel")
|
||||||
|
private String storeTel;
|
||||||
|
|
||||||
|
/**字段描述 注册的邮箱 */
|
||||||
|
@Column(name = "store_email")
|
||||||
|
private String storeEmail;
|
||||||
|
|
||||||
|
/**字段描述 门店LOGO */
|
||||||
|
@Column(name = "store_logo")
|
||||||
|
private String storeLogo;
|
||||||
|
|
||||||
|
/**字段描述 门店地址 */
|
||||||
|
@Column(name = "store_address")
|
||||||
|
private String storeAddress;
|
||||||
|
|
||||||
|
/**字段描述 门店状态 */
|
||||||
|
@Column(name = "store_status")
|
||||||
|
private Integer storeStatus;
|
||||||
|
|
||||||
|
/**字段描述 创建时间 */
|
||||||
|
@Column(name = "ctime")
|
||||||
|
private Date ctime;
|
||||||
|
|
||||||
|
/**字段描述 门店到期时间 */
|
||||||
|
@Column(name = "stime")
|
||||||
|
private Date stime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
package com.ruoyi.store.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.store.domain.VGoodItem;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品分类 数据层
|
||||||
|
*
|
||||||
|
* @author Enzo
|
||||||
|
* @date 2019-03-25
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface VGoodItemMapper extends Mapper<VGoodItem>
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询商品分类信息
|
||||||
|
*
|
||||||
|
* @param id 商品分类
|
||||||
|
* @return 商品分类信息
|
||||||
|
*/
|
||||||
|
VGoodItem selectVGoodItemById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商品分类列表
|
||||||
|
*
|
||||||
|
* @param vGoodItem 商品分类信息
|
||||||
|
* @return 商品分类集合
|
||||||
|
*/
|
||||||
|
List<VGoodItem> selectVGoodItemList(VGoodItem vGoodItem);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增商品分类
|
||||||
|
*
|
||||||
|
* @param vGoodItem 商品分类信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertVGoodItem(VGoodItem vGoodItem);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改商品分类
|
||||||
|
*
|
||||||
|
* @param vGoodItem 商品分类信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateVGoodItem(VGoodItem vGoodItem);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除商品分类
|
||||||
|
*
|
||||||
|
* @param id 商品分类ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteVGoodItemById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除商品分类
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteVGoodItemByIds(String[] ids);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
package com.ruoyi.store.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.store.domain.VStore;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店管理 数据层
|
||||||
|
*
|
||||||
|
* @author Enzo
|
||||||
|
* @date 2019-03-25
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface VStoreMapper extends Mapper<VStore>
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询门店管理信息
|
||||||
|
*
|
||||||
|
* @param storeId 门店管理
|
||||||
|
* @return 门店管理信息
|
||||||
|
*/
|
||||||
|
VStore selectVStoreById(Long storeId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询门店管理列表
|
||||||
|
*
|
||||||
|
* @param vStore 门店管理信息
|
||||||
|
* @return 门店管理集合
|
||||||
|
*/
|
||||||
|
List<VStore> selectVStoreList(VStore vStore);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增门店管理
|
||||||
|
*
|
||||||
|
* @param vStore 门店管理信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertVStore(VStore vStore);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改门店管理
|
||||||
|
*
|
||||||
|
* @param vStore 门店管理信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateVStore(VStore vStore);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除门店管理
|
||||||
|
*
|
||||||
|
* @param storeId 门店管理ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteVStoreById(Long storeId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除门店管理
|
||||||
|
*
|
||||||
|
* @param storeIds 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteVStoreByIds(String[] storeIds);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
package com.ruoyi.store.service;
|
||||||
|
|
||||||
|
import com.ruoyi.store.domain.VGoodItem;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品分类 服务层
|
||||||
|
*
|
||||||
|
* @author Enzo
|
||||||
|
* @date 2019-03-25
|
||||||
|
*/
|
||||||
|
public interface IVGoodItemService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询商品分类信息
|
||||||
|
*
|
||||||
|
* @param id 商品分类ID
|
||||||
|
* @return 商品分类信息
|
||||||
|
*/
|
||||||
|
VGoodItem selectVGoodItemById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商品分类列表
|
||||||
|
*
|
||||||
|
* @param vGoodItem 商品分类信息
|
||||||
|
* @return 商品分类集合
|
||||||
|
*/
|
||||||
|
List<VGoodItem> selectVGoodItemList(VGoodItem vGoodItem);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增商品分类
|
||||||
|
*
|
||||||
|
* @param vGoodItem 商品分类信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertVGoodItem(VGoodItem vGoodItem);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改商品分类
|
||||||
|
*
|
||||||
|
* @param vGoodItem 商品分类信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateVGoodItem(VGoodItem vGoodItem);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除商品分类信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteVGoodItemByIds(String ids);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除商品分类 单条信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int deleteVGoodItemById(Long id);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
package com.ruoyi.store.service;
|
||||||
|
|
||||||
|
import com.ruoyi.store.domain.VStore;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店管理 服务层
|
||||||
|
*
|
||||||
|
* @author Enzo
|
||||||
|
* @date 2019-03-25
|
||||||
|
*/
|
||||||
|
public interface IVStoreService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询门店管理信息
|
||||||
|
*
|
||||||
|
* @param storeId 门店管理ID
|
||||||
|
* @return 门店管理信息
|
||||||
|
*/
|
||||||
|
VStore selectVStoreById(Long storeId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询门店管理列表
|
||||||
|
*
|
||||||
|
* @param vStore 门店管理信息
|
||||||
|
* @return 门店管理集合
|
||||||
|
*/
|
||||||
|
List<VStore> selectVStoreList(VStore vStore);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增门店管理
|
||||||
|
*
|
||||||
|
* @param vStore 门店管理信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertVStore(VStore vStore);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改门店管理
|
||||||
|
*
|
||||||
|
* @param vStore 门店管理信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateVStore(VStore vStore);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除门店管理信息
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteVStoreByIds(String ids);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除门店管理 单条信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int deleteVStoreById(Long storeId);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,110 @@
|
||||||
|
package com.ruoyi.store.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.page.ExampleUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.store.mapper.VGoodItemMapper;
|
||||||
|
import com.ruoyi.store.domain.VGoodItem;
|
||||||
|
import com.ruoyi.store.service.IVGoodItemService;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品分类 服务层实现
|
||||||
|
*
|
||||||
|
* @author Enzo
|
||||||
|
* @date 2019-03-25
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class VGoodItemServiceImpl implements IVGoodItemService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private VGoodItemMapper vGoodItemMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商品分类信息
|
||||||
|
*
|
||||||
|
* @param id 商品分类ID
|
||||||
|
* @return 商品分类信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public VGoodItem selectVGoodItemById(Long id)
|
||||||
|
{
|
||||||
|
return vGoodItemMapper.selectByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商品分类列表
|
||||||
|
*
|
||||||
|
* @param vGoodItem 商品分类信息
|
||||||
|
* @return 商品分类集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<VGoodItem> selectVGoodItemList(VGoodItem vGoodItem)
|
||||||
|
{
|
||||||
|
Example example = new Example(VGoodItem.class);
|
||||||
|
Example.Criteria criteria = example.createCriteria();
|
||||||
|
|
||||||
|
ExampleUtils.andEqualTo(criteria, "id", vGoodItem.getId());
|
||||||
|
ExampleUtils.andEqualTo(criteria, "itemName", vGoodItem.getItemName());
|
||||||
|
ExampleUtils.andEqualTo(criteria, "itemDesc", vGoodItem.getItemDesc());
|
||||||
|
ExampleUtils.andBetweenDateToDate(criteria, "ctime", vGoodItem.getParams().get("beginCtime"),vGoodItem.getParams().get("endCtime"));
|
||||||
|
ExampleUtils.andEqualTo(criteria, "mStoreid", vGoodItem.getMStoreid());
|
||||||
|
ExampleUtils.andEqualTo(criteria, "sore", vGoodItem.getSore());
|
||||||
|
|
||||||
|
return vGoodItemMapper.selectByExample(example);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增商品分类
|
||||||
|
*
|
||||||
|
* @param vGoodItem 商品分类信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertVGoodItem(VGoodItem vGoodItem)
|
||||||
|
{
|
||||||
|
return vGoodItemMapper.insertSelective(vGoodItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改商品分类
|
||||||
|
*
|
||||||
|
* @param vGoodItem 商品分类信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateVGoodItem(VGoodItem vGoodItem)
|
||||||
|
{
|
||||||
|
return vGoodItemMapper.updateByPrimaryKeySelective(vGoodItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除商品分类对象
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteVGoodItemByIds(String ids)
|
||||||
|
{
|
||||||
|
Example example = new Example(VGoodItem.class);
|
||||||
|
Example.Criteria criteria = example.createCriteria();
|
||||||
|
criteria.andIn("id",Convert.toList(ids));
|
||||||
|
return vGoodItemMapper.deleteByExample(example);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除商品分类 单条信息
|
||||||
|
* @param id 删除的主键ID
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteVGoodItemById(Long id){
|
||||||
|
return vGoodItemMapper.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,115 @@
|
||||||
|
package com.ruoyi.store.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.page.ExampleUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.store.mapper.VStoreMapper;
|
||||||
|
import com.ruoyi.store.domain.VStore;
|
||||||
|
import com.ruoyi.store.service.IVStoreService;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店管理 服务层实现
|
||||||
|
*
|
||||||
|
* @author Enzo
|
||||||
|
* @date 2019-03-25
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class VStoreServiceImpl implements IVStoreService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private VStoreMapper vStoreMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询门店管理信息
|
||||||
|
*
|
||||||
|
* @param storeId 门店管理ID
|
||||||
|
* @return 门店管理信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public VStore selectVStoreById(Long storeId)
|
||||||
|
{
|
||||||
|
return vStoreMapper.selectByPrimaryKey(storeId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询门店管理列表
|
||||||
|
*
|
||||||
|
* @param vStore 门店管理信息
|
||||||
|
* @return 门店管理集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<VStore> selectVStoreList(VStore vStore)
|
||||||
|
{
|
||||||
|
Example example = new Example(VStore.class);
|
||||||
|
Example.Criteria criteria = example.createCriteria();
|
||||||
|
|
||||||
|
ExampleUtils.andEqualTo(criteria, "storeId", vStore.getStoreId());
|
||||||
|
ExampleUtils.andEqualTo(criteria, "storeCode", vStore.getStoreCode());
|
||||||
|
ExampleUtils.andEqualTo(criteria, "storeName", vStore.getStoreName());
|
||||||
|
ExampleUtils.andEqualTo(criteria, "storePeople", vStore.getStorePeople());
|
||||||
|
ExampleUtils.andEqualTo(criteria, "storeTel", vStore.getStoreTel());
|
||||||
|
ExampleUtils.andEqualTo(criteria, "storeEmail", vStore.getStoreEmail());
|
||||||
|
ExampleUtils.andEqualTo(criteria, "storeLogo", vStore.getStoreLogo());
|
||||||
|
ExampleUtils.andEqualTo(criteria, "storeAddress", vStore.getStoreAddress());
|
||||||
|
ExampleUtils.andEqualTo(criteria, "storeStatus", vStore.getStoreStatus());
|
||||||
|
ExampleUtils.andBetweenDateToDate(criteria, "ctime", vStore.getParams().get("beginCtime"),vStore.getParams().get("endCtime"));
|
||||||
|
ExampleUtils.andBetweenDateToDate(criteria, "stime", vStore.getParams().get("beginStime"),vStore.getParams().get("endStime"));
|
||||||
|
|
||||||
|
return vStoreMapper.selectByExample(example);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增门店管理
|
||||||
|
*
|
||||||
|
* @param vStore 门店管理信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertVStore(VStore vStore)
|
||||||
|
{
|
||||||
|
return vStoreMapper.insertSelective(vStore);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改门店管理
|
||||||
|
*
|
||||||
|
* @param vStore 门店管理信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateVStore(VStore vStore)
|
||||||
|
{
|
||||||
|
return vStoreMapper.updateByPrimaryKeySelective(vStore);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除门店管理对象
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteVStoreByIds(String ids)
|
||||||
|
{
|
||||||
|
Example example = new Example(VStore.class);
|
||||||
|
Example.Criteria criteria = example.createCriteria();
|
||||||
|
criteria.andIn("storeId",Convert.toList(ids));
|
||||||
|
return vStoreMapper.deleteByExample(example);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除门店管理 单条信息
|
||||||
|
* @param storeId 删除的主键ID
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteVStoreById(Long storeId){
|
||||||
|
return vStoreMapper.deleteByPrimaryKey(storeId);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.ruoyi.system.domain;
|
package com.ruoyi.system.domain;
|
||||||
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
@ -9,6 +10,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class SysDept extends BaseEntity
|
public class SysDept extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class SysDictType extends BaseEntity
|
public class SysDictType extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.ruoyi.system.mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ruoyi.system.domain.SysConfig;
|
import com.ruoyi.system.domain.SysConfig;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 参数配置 数据层
|
* 参数配置 数据层
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue