Commit ef89d788 by ilal Committed by chenzg

提交

parent e2a3f54b
package cn.timer.api.bean.qyzx;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author LAL 2020-11-17
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "qyzx_admin_colour")
@ApiModel("企业自定义颜色")
public class QyzxAdminColour extends Model<QyzxAdminColour> {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id id", example = "101")
private Integer id;
@ApiModelProperty(value = "导航栏背景色 ", example = "导航栏背景色")
private String navbackColor;
@ApiModelProperty(value = "右侧菜单栏背景色 ", example = "右侧菜单栏背景色")
private String menubackColor;
@ApiModelProperty(value = "企业组织代码 企业组织代码", example = "101")
private Integer orgCode;
@ApiModelProperty(value = "生成时间 生成时间", example = "101")
private Long addtime;
}
\ No newline at end of file
......@@ -98,5 +98,8 @@ public class QyzxEmpLogin extends Model<QyzxEmpLogin> {
@TableField(exist = false)
private List<MenuStructureDto> menstr;
@TableField(exist = false)
private QyzxAdminColour zdyys;
}
\ No newline at end of file
......@@ -46,6 +46,7 @@ import cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeRules;
import cn.timer.api.bean.kqmk.KqglAssoOvertimeRulesM;
import cn.timer.api.bean.qyxx.CmsContent;
import cn.timer.api.bean.qyzx.QyzxAdminColour;
import cn.timer.api.bean.qyzx.QyzxAdminMenu;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
import cn.timer.api.bean.qyzx.QyzxEmpLogin;
......@@ -841,6 +842,10 @@ public class LoginController {
}
qyzxEmpLogin1.setMenstr(mestrs);
QyzxAdminColour cdys = QyzxAdminColour.builder().build().selectOne(new QueryWrapper<QyzxAdminColour>().lambda().eq(QyzxAdminColour::getOrgCode, qyzxEmpLogin1.getOrgId()));
qyzxEmpLogin1.setZdyys(cdys);
// 可操作企业
// 需要更新最后一次登陆信息
......
......@@ -30,6 +30,7 @@ import cn.hutool.core.util.ObjectUtil;
import cn.timer.api.aspect.lang.annotation.Log;
import cn.timer.api.aspect.lang.enums.BusinessType;
import cn.timer.api.bean.admin.AdminMenuTemplate;
import cn.timer.api.bean.qyzx.QyzxAdminColour;
import cn.timer.api.bean.qyzx.QyzxAdminMenu;
import cn.timer.api.bean.qyzx.QyzxAttaFwjsb;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
......@@ -578,6 +579,27 @@ public class QyzxController {
return ResultUtil.data(qymu, "修改成功");
}
@PostMapping(value = "/corporatecolor")
@ApiOperation(value = "菜单自定义颜色", httpMethod = "POST", notes = "")
public Result<Object> corporatecolor(@CurrentUser UserBean userBean) {
QyzxAdminColour cdys = QyzxAdminColour.builder().build().selectOne(new QueryWrapper<QyzxAdminColour>().lambda().eq(QyzxAdminColour::getOrgCode, userBean.getOrgCode()));
return ResultUtil.data(cdys, "修改成功");
}
@PostMapping(value = "/customcolor")
@ApiOperation(value = "菜单自定义颜色", httpMethod = "POST", notes = "")
public Result<Object> customcolor(@CurrentUser UserBean userBean,@RequestBody QyzxAdminColour cdys) {
cdys.setOrgCode(userBean.getOrgCode());
cdys.setAddtime(new Date().getTime());
cdys.insertOrUpdate();
return ResultUtil.data(cdys, "修改成功");
}
/**
* 删除-操作日志
......
package cn.timer.api.dao.qyzx;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.qyzx.QyzxAdminColour;
/**
* 企业自定义颜色
* @author LAL 2020-11-17
*/
@Repository
public interface QyzxAdminColourMapper extends BaseMapper<QyzxAdminColour> {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.timer.api.dao.qyzx.QyzxAdminColourMapper">
<resultMap id="BaseResultMap" type="cn.timer.api.bean.qyzx.QyzxAdminColour" >
<id column="id" property="id" />
<result column="navback_color" property="navbackColor" />
<result column="menuback_color" property="menubackColor" />
<result column="org_code" property="orgCode" />
<result column="addtime" property="addtime" />
</resultMap>
<sql id="Base_Column_List">
id,
navback_color,
menuback_color,
org_code,
addtime
</sql>
<sql id="Base_Column_List_Alias">
id QyzxAdminColour_id,
navback_color QyzxAdminColour_navback_color,
menuback_color QyzxAdminColour_menuback_color,
org_code QyzxAdminColour_org_code,
addtime QyzxAdminColour_addtime
</sql>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.qyzx.QyzxAdminColour">
INSERT INTO qyzx_admin_colour
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != navbackColor'>
navback_color,
</if>
<if test ='null != menubackColor'>
menuback_color,
</if>
<if test ='null != orgCode'>
org_code,
</if>
<if test ='null != addtime'>
addtime
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != navbackColor'>
#{navbackColor},
</if>
<if test ='null != menubackColor'>
#{menubackColor},
</if>
<if test ='null != orgCode'>
#{orgCode},
</if>
<if test ='null != addtime'>
#{addtime}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM qyzx_admin_colour
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.qyzx.QyzxAdminColour">
UPDATE qyzx_admin_colour
<set>
<if test ='null != navbackColor'>navback_color = #{navbackColor},</if>
<if test ='null != menubackColor'>menuback_color = #{menubackColor},</if>
<if test ='null != orgCode'>org_code = #{orgCode},</if>
<if test ='null != addtime'>addtime = #{addtime}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM qyzx_admin_colour
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM qyzx_admin_colour
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM qyzx_admin_colour
</select>
-->
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment