Browse Source

CYF

master
CYF 2 months ago
parent
commit
a7f7d9c3ac
16 changed files with 257 additions and 111 deletions
  1. +4
    -4
      CatmDogd-Mall-Front-test/src/api/model/AppletOutDate.js
  2. +4
    -4
      CatmDogd-Mall-Front-test/src/api/model/AppletPetType.js
  3. +29
    -9
      CatmDogd-Mall-Front-test/src/views/model/AppletOutDate/index.vue
  4. +29
    -9
      CatmDogd-Mall-Front-test/src/views/model/AppletPetType/index.vue
  5. +7
    -8
      ruoyi-catdog/src/main/java/com/ruoyi/model/controller/AppletOutDateController.java
  6. +6
    -6
      ruoyi-catdog/src/main/java/com/ruoyi/model/controller/AppletPetTypeController.java
  7. +31
    -1
      ruoyi-catdog/src/main/java/com/ruoyi/model/domain/AppletOutDate.java
  8. +30
    -0
      ruoyi-catdog/src/main/java/com/ruoyi/model/domain/AppletPetType.java
  9. +7
    -8
      ruoyi-catdog/src/main/java/com/ruoyi/model/mapper/AppletOutDateMapper.java
  10. +6
    -6
      ruoyi-catdog/src/main/java/com/ruoyi/model/mapper/AppletPetTypeMapper.java
  11. +7
    -8
      ruoyi-catdog/src/main/java/com/ruoyi/model/service/IAppletOutDateService.java
  12. +6
    -6
      ruoyi-catdog/src/main/java/com/ruoyi/model/service/IAppletPetTypeService.java
  13. +13
    -11
      ruoyi-catdog/src/main/java/com/ruoyi/model/service/impl/AppletOutDateServiceImpl.java
  14. +12
    -9
      ruoyi-catdog/src/main/java/com/ruoyi/model/service/impl/AppletPetTypeServiceImpl.java
  15. +33
    -11
      ruoyi-catdog/src/main/resources/mapper/model/AppletOutDateMapper.xml
  16. +33
    -11
      ruoyi-catdog/src/main/resources/mapper/model/AppletPetTypeMapper.xml

+ 4
- 4
CatmDogd-Mall-Front-test/src/api/model/AppletOutDate.js View File

@ -10,9 +10,9 @@ export function listAppletOutDate(query) {
}
// 查询不接单日期详细
export function getAppletOutDate(date) {
export function getAppletOutDate(id) {
return request({
url: '/model/AppletOutDate/' + date,
url: '/model/AppletOutDate/' + id,
method: 'get'
})
}
@ -36,9 +36,9 @@ export function updateAppletOutDate(data) {
}
// 删除不接单日期
export function delAppletOutDate(date) {
export function delAppletOutDate(id) {
return request({
url: '/model/AppletOutDate/' + date,
url: '/model/AppletOutDate/' + id,
method: 'delete'
})
}

+ 4
- 4
CatmDogd-Mall-Front-test/src/api/model/AppletPetType.js View File

@ -10,9 +10,9 @@ export function listAppletPetType(query) {
}
// 查询个人宠物类型详细
export function getAppletPetType(title) {
export function getAppletPetType(id) {
return request({
url: '/model/AppletPetType/' + title,
url: '/model/AppletPetType/' + id,
method: 'get'
})
}
@ -36,9 +36,9 @@ export function updateAppletPetType(data) {
}
// 删除个人宠物类型
export function delAppletPetType(title) {
export function delAppletPetType(id) {
return request({
url: '/model/AppletPetType/' + title,
url: '/model/AppletPetType/' + id,
method: 'delete'
})
}

+ 29
- 9
CatmDogd-Mall-Front-test/src/views/model/AppletOutDate/index.vue View File

@ -75,6 +75,7 @@
<el-table v-loading="loading" :data="AppletOutDateList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="唯一标识" align="center" prop="id" />
<el-table-column label="日期" align="center" prop="date" width="180" v-if="columns[0].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.date, '')}}</span>
@ -123,6 +124,9 @@
<el-form-item label="关联接单地址" prop="addressId">
<el-input v-model="form.addressId" placeholder="请输入关联接单地址" />
</el-form-item>
<el-form-item label="删除标识" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入删除标识" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -172,10 +176,14 @@ export default {
form: {},
//
rules: {
delFlag: [
{ required: true, message: "删除标识不能为空", trigger: "blur" }
],
},
columns: [
{ key: 0, label: "日期", visible: true },
{ key: 1, label: "关联接单地址", visible: true },
{ key: 1, label: "日期", visible: true },
{ key: 2, label: "关联接单地址", visible: true },
],
};
},
@ -200,10 +208,22 @@ export default {
//
reset() {
this.form = {
id: null,
date: null,
addressId: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
};
this.resetForm("form");
},
@ -219,7 +239,7 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.date)
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
@ -232,8 +252,8 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const date = row.date || this.ids
getAppletOutDate(date).then(response => {
const id = row.id || this.ids
getAppletOutDate(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改不接单日期";
@ -243,7 +263,7 @@ export default {
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.date != null) {
if (this.form.id != null) {
updateAppletOutDate(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
@ -261,9 +281,9 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
const dates = row.date || this.ids;
this.$modal.confirm('是否确认删除不接单日期编号为"' + dates + '"的数据项?').then(function() {
return delAppletOutDate(dates);
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除不接单日期编号为"' + ids + '"的数据项?').then(function() {
return delAppletOutDate(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");


+ 29
- 9
CatmDogd-Mall-Front-test/src/views/model/AppletPetType/index.vue View File

@ -65,6 +65,7 @@
<el-table v-loading="loading" :data="AppletPetTypeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="唯一标识" align="center" prop="id" />
<el-table-column label="标题" align="center" prop="title" v-if="columns[0].visible"/>
<el-table-column label="图片" align="center" prop="image" v-if="columns[1].visible"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@ -104,6 +105,9 @@
<el-form-item label="图片">
<imageUpload v-model="form.image"/>
</el-form-item>
<el-form-item label="删除标识" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入删除标识" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -157,10 +161,14 @@ export default {
{ required: true, message: "标题不能为空", trigger: "blur" }
],
delFlag: [
{ required: true, message: "删除标识不能为空", trigger: "blur" }
],
},
columns: [
{ key: 0, label: "标题", visible: true },
{ key: 1, label: "图片", visible: false },
{ key: 1, label: "标题", visible: true },
{ key: 2, label: "图片", visible: false },
],
};
},
@ -185,10 +193,22 @@ export default {
//
reset() {
this.form = {
id: null,
title: null,
image: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
};
this.resetForm("form");
},
@ -204,7 +224,7 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.title)
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
@ -217,8 +237,8 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const title = row.title || this.ids
getAppletPetType(title).then(response => {
const id = row.id || this.ids
getAppletPetType(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改个人宠物类型";
@ -228,7 +248,7 @@ export default {
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.title != null) {
if (this.form.id != null) {
updateAppletPetType(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
@ -246,9 +266,9 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
const titles = row.title || this.ids;
this.$modal.confirm('是否确认删除个人宠物类型编号为"' + titles + '"的数据项?').then(function() {
return delAppletPetType(titles);
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除个人宠物类型编号为"' + ids + '"的数据项?').then(function() {
return delAppletPetType(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");


+ 7
- 8
ruoyi-catdog/src/main/java/com/ruoyi/model/controller/AppletOutDateController.java View File

@ -1,7 +1,6 @@
package com.ruoyi.model.controller;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
@ -27,7 +26,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
* 不接单日期Controller
*
* @author ruoyi
* @date 2025-03-27
* @date 2025-03-28
*/
@RestController
@RequestMapping("/model/AppletOutDate")
@ -64,10 +63,10 @@ public class AppletOutDateController extends BaseController
* 获取不接单日期详细信息
*/
@PreAuthorize("@ss.hasPermi('model:AppletOutDate:query')")
@GetMapping(value = "/{date}")
public AjaxResult getInfo(@PathVariable("date") Date date)
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(appletOutDateService.selectAppletOutDateByDate(date));
return success(appletOutDateService.selectAppletOutDateById(id));
}
/**
@ -97,9 +96,9 @@ public class AppletOutDateController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('model:AppletOutDate:remove')")
@Log(title = "不接单日期", businessType = BusinessType.DELETE)
@DeleteMapping("/{dates}")
public AjaxResult remove(@PathVariable Date[] dates)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(appletOutDateService.deleteAppletOutDateByDates(dates));
return toAjax(appletOutDateService.deleteAppletOutDateByIds(ids));
}
}

+ 6
- 6
ruoyi-catdog/src/main/java/com/ruoyi/model/controller/AppletPetTypeController.java View File

@ -63,10 +63,10 @@ public class AppletPetTypeController extends BaseController
* 获取个人宠物类型详细信息
*/
@PreAuthorize("@ss.hasPermi('model:AppletPetType:query')")
@GetMapping(value = "/{title}")
public AjaxResult getInfo(@PathVariable("title") String title)
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(appletPetTypeService.selectAppletPetTypeByTitle(title));
return success(appletPetTypeService.selectAppletPetTypeById(id));
}
/**
@ -96,9 +96,9 @@ public class AppletPetTypeController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('model:AppletPetType:remove')")
@Log(title = "个人宠物类型", businessType = BusinessType.DELETE)
@DeleteMapping("/{titles}")
public AjaxResult remove(@PathVariable String[] titles)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(appletPetTypeService.deleteAppletPetTypeByTitles(titles));
return toAjax(appletPetTypeService.deleteAppletPetTypeByIds(ids));
}
}

+ 31
- 1
ruoyi-catdog/src/main/java/com/ruoyi/model/domain/AppletOutDate.java View File

@ -11,12 +11,15 @@ import com.ruoyi.common.core.domain.BaseEntity;
* 不接单日期对象 applet_out_date
*
* @author ruoyi
* @date 2025-03-27
* @date 2025-03-28
*/
public class AppletOutDate extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 唯一标识 */
private Long id;
/** 日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
@ -26,6 +29,18 @@ public class AppletOutDate extends BaseEntity
@Excel(name = "关联接单地址")
private Long addressId;
/** 删除标识 */
private Integer delFlag;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setDate(Date date)
{
this.date = date;
@ -44,12 +59,27 @@ public class AppletOutDate extends BaseEntity
{
return addressId;
}
public void setDelFlag(Integer delFlag)
{
this.delFlag = delFlag;
}
public Integer getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("date", getDate())
.append("addressId", getAddressId())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

+ 30
- 0
ruoyi-catdog/src/main/java/com/ruoyi/model/domain/AppletPetType.java View File

@ -15,6 +15,9 @@ public class AppletPetType extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 唯一标识 */
private Long id;
/** 标题 */
@Excel(name = "标题")
private String title;
@ -23,6 +26,18 @@ public class AppletPetType extends BaseEntity
@Excel(name = "图片")
private String image;
/** 删除标识 */
private Integer delFlag;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setTitle(String title)
{
this.title = title;
@ -41,12 +56,27 @@ public class AppletPetType extends BaseEntity
{
return image;
}
public void setDelFlag(Integer delFlag)
{
this.delFlag = delFlag;
}
public Integer getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("title", getTitle())
.append("image", getImage())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

+ 7
- 8
ruoyi-catdog/src/main/java/com/ruoyi/model/mapper/AppletOutDateMapper.java View File

@ -1,6 +1,5 @@
package com.ruoyi.model.mapper;
import java.util.Date;
import java.util.List;
import com.ruoyi.model.domain.AppletOutDate;
@ -8,17 +7,17 @@ import com.ruoyi.model.domain.AppletOutDate;
* 不接单日期Mapper接口
*
* @author ruoyi
* @date 2025-03-27
* @date 2025-03-28
*/
public interface AppletOutDateMapper
{
/**
* 查询不接单日期
*
* @param date 不接单日期主键
* @param id 不接单日期主键
* @return 不接单日期
*/
public AppletOutDate selectAppletOutDateByDate(Date date);
public AppletOutDate selectAppletOutDateById(Long id);
/**
* 查询不接单日期列表
@ -47,16 +46,16 @@ public interface AppletOutDateMapper
/**
* 删除不接单日期
*
* @param date 不接单日期主键
* @param id 不接单日期主键
* @return 结果
*/
public int deleteAppletOutDateByDate(Date date);
public int deleteAppletOutDateById(Long id);
/**
* 批量删除不接单日期
*
* @param dates 需要删除的数据主键集合
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteAppletOutDateByDates(Date[] dates);
public int deleteAppletOutDateByIds(Long[] ids);
}

+ 6
- 6
ruoyi-catdog/src/main/java/com/ruoyi/model/mapper/AppletPetTypeMapper.java View File

@ -14,10 +14,10 @@ public interface AppletPetTypeMapper
/**
* 查询个人宠物类型
*
* @param title 个人宠物类型主键
* @param id 个人宠物类型主键
* @return 个人宠物类型
*/
public AppletPetType selectAppletPetTypeByTitle(String title);
public AppletPetType selectAppletPetTypeById(Long id);
/**
* 查询个人宠物类型列表
@ -46,16 +46,16 @@ public interface AppletPetTypeMapper
/**
* 删除个人宠物类型
*
* @param title 个人宠物类型主键
* @param id 个人宠物类型主键
* @return 结果
*/
public int deleteAppletPetTypeByTitle(String title);
public int deleteAppletPetTypeById(Long id);
/**
* 批量删除个人宠物类型
*
* @param titles 需要删除的数据主键集合
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteAppletPetTypeByTitles(String[] titles);
public int deleteAppletPetTypeByIds(Long[] ids);
}

+ 7
- 8
ruoyi-catdog/src/main/java/com/ruoyi/model/service/IAppletOutDateService.java View File

@ -1,6 +1,5 @@
package com.ruoyi.model.service;
import java.util.Date;
import java.util.List;
import com.ruoyi.model.domain.AppletOutDate;
@ -8,17 +7,17 @@ import com.ruoyi.model.domain.AppletOutDate;
* 不接单日期Service接口
*
* @author ruoyi
* @date 2025-03-27
* @date 2025-03-28
*/
public interface IAppletOutDateService
{
/**
* 查询不接单日期
*
* @param date 不接单日期主键
* @param id 不接单日期主键
* @return 不接单日期
*/
public AppletOutDate selectAppletOutDateByDate(Date date);
public AppletOutDate selectAppletOutDateById(Long id);
/**
* 查询不接单日期列表
@ -47,16 +46,16 @@ public interface IAppletOutDateService
/**
* 批量删除不接单日期
*
* @param dates 需要删除的不接单日期主键集合
* @param ids 需要删除的不接单日期主键集合
* @return 结果
*/
public int deleteAppletOutDateByDates(Date[] dates);
public int deleteAppletOutDateByIds(Long[] ids);
/**
* 删除不接单日期信息
*
* @param date 不接单日期主键
* @param id 不接单日期主键
* @return 结果
*/
public int deleteAppletOutDateByDate(Date date);
public int deleteAppletOutDateById(Long id);
}

+ 6
- 6
ruoyi-catdog/src/main/java/com/ruoyi/model/service/IAppletPetTypeService.java View File

@ -14,10 +14,10 @@ public interface IAppletPetTypeService
/**
* 查询个人宠物类型
*
* @param title 个人宠物类型主键
* @param id 个人宠物类型主键
* @return 个人宠物类型
*/
public AppletPetType selectAppletPetTypeByTitle(String title);
public AppletPetType selectAppletPetTypeById(Long id);
/**
* 查询个人宠物类型列表
@ -46,16 +46,16 @@ public interface IAppletPetTypeService
/**
* 批量删除个人宠物类型
*
* @param titles 需要删除的个人宠物类型主键集合
* @param ids 需要删除的个人宠物类型主键集合
* @return 结果
*/
public int deleteAppletPetTypeByTitles(String[] titles);
public int deleteAppletPetTypeByIds(Long[] ids);
/**
* 删除个人宠物类型信息
*
* @param title 个人宠物类型主键
* @param id 个人宠物类型主键
* @return 结果
*/
public int deleteAppletPetTypeByTitle(String title);
public int deleteAppletPetTypeById(Long id);
}

+ 13
- 11
ruoyi-catdog/src/main/java/com/ruoyi/model/service/impl/AppletOutDateServiceImpl.java View File

@ -1,7 +1,7 @@
package com.ruoyi.model.service.impl;
import java.util.Date;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.model.mapper.AppletOutDateMapper;
@ -12,7 +12,7 @@ import com.ruoyi.model.service.IAppletOutDateService;
* 不接单日期Service业务层处理
*
* @author ruoyi
* @date 2025-03-27
* @date 2025-03-28
*/
@Service
public class AppletOutDateServiceImpl implements IAppletOutDateService
@ -23,13 +23,13 @@ public class AppletOutDateServiceImpl implements IAppletOutDateService
/**
* 查询不接单日期
*
* @param date 不接单日期主键
* @param id 不接单日期主键
* @return 不接单日期
*/
@Override
public AppletOutDate selectAppletOutDateByDate(Date date)
public AppletOutDate selectAppletOutDateById(Long id)
{
return appletOutDateMapper.selectAppletOutDateByDate(date);
return appletOutDateMapper.selectAppletOutDateById(id);
}
/**
@ -53,6 +53,7 @@ public class AppletOutDateServiceImpl implements IAppletOutDateService
@Override
public int insertAppletOutDate(AppletOutDate appletOutDate)
{
appletOutDate.setCreateTime(DateUtils.getNowDate());
return appletOutDateMapper.insertAppletOutDate(appletOutDate);
}
@ -65,30 +66,31 @@ public class AppletOutDateServiceImpl implements IAppletOutDateService
@Override
public int updateAppletOutDate(AppletOutDate appletOutDate)
{
appletOutDate.setUpdateTime(DateUtils.getNowDate());
return appletOutDateMapper.updateAppletOutDate(appletOutDate);
}
/**
* 批量删除不接单日期
*
* @param dates 需要删除的不接单日期主键
* @param ids 需要删除的不接单日期主键
* @return 结果
*/
@Override
public int deleteAppletOutDateByDates(Date[] dates)
public int deleteAppletOutDateByIds(Long[] ids)
{
return appletOutDateMapper.deleteAppletOutDateByDates(dates);
return appletOutDateMapper.deleteAppletOutDateByIds(ids);
}
/**
* 删除不接单日期信息
*
* @param date 不接单日期主键
* @param id 不接单日期主键
* @return 结果
*/
@Override
public int deleteAppletOutDateByDate(Date date)
public int deleteAppletOutDateById(Long id)
{
return appletOutDateMapper.deleteAppletOutDateByDate(date);
return appletOutDateMapper.deleteAppletOutDateById(id);
}
}

+ 12
- 9
ruoyi-catdog/src/main/java/com/ruoyi/model/service/impl/AppletPetTypeServiceImpl.java View File

@ -1,6 +1,7 @@
package com.ruoyi.model.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.model.mapper.AppletPetTypeMapper;
@ -22,13 +23,13 @@ public class AppletPetTypeServiceImpl implements IAppletPetTypeService
/**
* 查询个人宠物类型
*
* @param title 个人宠物类型主键
* @param id 个人宠物类型主键
* @return 个人宠物类型
*/
@Override
public AppletPetType selectAppletPetTypeByTitle(String title)
public AppletPetType selectAppletPetTypeById(Long id)
{
return appletPetTypeMapper.selectAppletPetTypeByTitle(title);
return appletPetTypeMapper.selectAppletPetTypeById(id);
}
/**
@ -52,6 +53,7 @@ public class AppletPetTypeServiceImpl implements IAppletPetTypeService
@Override
public int insertAppletPetType(AppletPetType appletPetType)
{
appletPetType.setCreateTime(DateUtils.getNowDate());
return appletPetTypeMapper.insertAppletPetType(appletPetType);
}
@ -64,30 +66,31 @@ public class AppletPetTypeServiceImpl implements IAppletPetTypeService
@Override
public int updateAppletPetType(AppletPetType appletPetType)
{
appletPetType.setUpdateTime(DateUtils.getNowDate());
return appletPetTypeMapper.updateAppletPetType(appletPetType);
}
/**
* 批量删除个人宠物类型
*
* @param titles 需要删除的个人宠物类型主键
* @param ids 需要删除的个人宠物类型主键
* @return 结果
*/
@Override
public int deleteAppletPetTypeByTitles(String[] titles)
public int deleteAppletPetTypeByIds(Long[] ids)
{
return appletPetTypeMapper.deleteAppletPetTypeByTitles(titles);
return appletPetTypeMapper.deleteAppletPetTypeByIds(ids);
}
/**
* 删除个人宠物类型信息
*
* @param title 个人宠物类型主键
* @param id 个人宠物类型主键
* @return 结果
*/
@Override
public int deleteAppletPetTypeByTitle(String title)
public int deleteAppletPetTypeById(Long id)
{
return appletPetTypeMapper.deleteAppletPetTypeByTitle(title);
return appletPetTypeMapper.deleteAppletPetTypeById(id);
}
}

+ 33
- 11
ruoyi-catdog/src/main/resources/mapper/model/AppletOutDateMapper.xml View File

@ -5,12 +5,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.model.mapper.AppletOutDateMapper">
<resultMap type="AppletOutDate" id="AppletOutDateResult">
<result property="id" column="id" />
<result property="date" column="date" />
<result property="addressId" column="address_id" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectAppletOutDateVo">
select date, address_id from applet_out_date
select id, date, address_id, del_flag, create_by, create_time, update_by, update_time from applet_out_date
</sql>
<select id="selectAppletOutDateList" parameterType="AppletOutDate" resultMap="AppletOutDateResult">
@ -21,39 +27,55 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="selectAppletOutDateByDate" parameterType="Date" resultMap="AppletOutDateResult">
<select id="selectAppletOutDateById" parameterType="Long" resultMap="AppletOutDateResult">
<include refid="selectAppletOutDateVo"/>
where date = #{date}
where id = #{id}
</select>
<insert id="insertAppletOutDate" parameterType="AppletOutDate">
<insert id="insertAppletOutDate" parameterType="AppletOutDate" useGeneratedKeys="true" keyProperty="id">
insert into applet_out_date
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="date != null">date,</if>
<if test="addressId != null">address_id,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="date != null">#{date},</if>
<if test="addressId != null">#{addressId},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateAppletOutDate" parameterType="AppletOutDate">
update applet_out_date
<trim prefix="SET" suffixOverrides=",">
<if test="date != null">date = #{date},</if>
<if test="addressId != null">address_id = #{addressId},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where date = #{date}
where id = #{id}
</update>
<delete id="deleteAppletOutDateByDate" parameterType="Date">
delete from applet_out_date where date = #{date}
<delete id="deleteAppletOutDateById" parameterType="Long">
delete from applet_out_date where id = #{id}
</delete>
<delete id="deleteAppletOutDateByDates" parameterType="String">
delete from applet_out_date where date in
<foreach item="date" collection="array" open="(" separator="," close=")">
#{date}
<delete id="deleteAppletOutDateByIds" parameterType="String">
delete from applet_out_date where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

+ 33
- 11
ruoyi-catdog/src/main/resources/mapper/model/AppletPetTypeMapper.xml View File

@ -5,12 +5,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.model.mapper.AppletPetTypeMapper">
<resultMap type="AppletPetType" id="AppletPetTypeResult">
<result property="id" column="id" />
<result property="title" column="title" />
<result property="image" column="image" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectAppletPetTypeVo">
select title, image from applet_pet_type
select id, title, image, del_flag, create_by, create_time, update_by, update_time from applet_pet_type
</sql>
<select id="selectAppletPetTypeList" parameterType="AppletPetType" resultMap="AppletPetTypeResult">
@ -21,39 +27,55 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="selectAppletPetTypeByTitle" parameterType="String" resultMap="AppletPetTypeResult">
<select id="selectAppletPetTypeById" parameterType="Long" resultMap="AppletPetTypeResult">
<include refid="selectAppletPetTypeVo"/>
where title = #{title}
where id = #{id}
</select>
<insert id="insertAppletPetType" parameterType="AppletPetType">
<insert id="insertAppletPetType" parameterType="AppletPetType" useGeneratedKeys="true" keyProperty="id">
insert into applet_pet_type
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="title != null and title != ''">title,</if>
<if test="image != null">image,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="title != null and title != ''">#{title},</if>
<if test="image != null">#{image},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateAppletPetType" parameterType="AppletPetType">
update applet_pet_type
<trim prefix="SET" suffixOverrides=",">
<if test="title != null and title != ''">title = #{title},</if>
<if test="image != null">image = #{image},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where title = #{title}
where id = #{id}
</update>
<delete id="deleteAppletPetTypeByTitle" parameterType="String">
delete from applet_pet_type where title = #{title}
<delete id="deleteAppletPetTypeById" parameterType="Long">
delete from applet_pet_type where id = #{id}
</delete>
<delete id="deleteAppletPetTypeByTitles" parameterType="String">
delete from applet_pet_type where title in
<foreach item="title" collection="array" open="(" separator="," close=")">
#{title}
<delete id="deleteAppletPetTypeByIds" parameterType="String">
delete from applet_pet_type where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

Loading…
Cancel
Save