Ejemplo n.º 1
0
 def myupdate(self,survey_id, s_seq, st_mobile, answer, in_date, in_user_id, up_date, up_user_id):
     sql = mybatis_mapper2sql.get_child_statement(self.mapper, "update")        
     MyLog().getLogger().debug(sql)
     self.cs.execute(sql, (answer, up_user_id, survey_id, s_seq, st_mobile))
     self.conn.commit()
     cnt = self.cs.rowcount
     return cnt
Ejemplo n.º 2
0
 def mydelete(self, survey_id):
     sql = mybatis_mapper2sql.get_child_statement(self.mapper, "delete")
     MyLog().getLogger().debug(sql)
     self.cs.execute(sql, (survey_id, ))
     self.conn.commit()
     cnt = self.cs.rowcount
     return cnt
Ejemplo n.º 3
0
 def myselect_graph(self,survey_id):
     sql = mybatis_mapper2sql.get_child_statement(self.mapper, "select_graph")
     MyLog().getLogger().debug(sql)
     rs = self.cs.execute(sql, (survey_id,))
     list = []
     for r in rs:
         list.append({'survey_id':r[0],'s_seq':r[1],'question':r[2],'a1':r[3],'a2':r[4],'a3':r[5],'a4':r[6],'c1':r[7],'c2':r[8],'c3':r[9],'c4':r[10]})
     return list
Ejemplo n.º 4
0
 def myselect(self):
     sql = mybatis_mapper2sql.get_child_statement(self.mapper, "select")
     MyLog().getLogger().debug(sql)
     rs = self.cs.execute(sql)
     list = []
     for record in rs:
         list.append({'survey_id':record[0],'s_seq':record[1],'st_mobile':record[2],'answer':record[3], 'in_date':record[4],'in_user_id':record[5],'up_date':record[6],'up_user_id':record[7]})
     return list
Ejemplo n.º 5
0
 def myupdate(self, survey_id, s_seq, question, a1, a2, a3, a4, in_date,
              in_user_id, up_date, up_user_id):
     sql = mybatis_mapper2sql.get_child_statement(self.mapper, "update")
     MyLog().getLogger().debug(sql)
     self.cs.execute(
         sql, (question, a1, a2, a3, a4, up_user_id, survey_id, s_seq))
     self.conn.commit()
     cnt = self.cs.rowcount
     return cnt
Ejemplo n.º 6
0
 def myupdate(self, user_id, pwd, user_name, mobile, email, birth, in_date,
              in_user_id, up_date, up_user_id):
     sql = mybatis_mapper2sql.get_child_statement(self.mapper, "update")
     MyLog().getLogger().debug(sql)
     self.cs.execute(
         sql, (pwd, user_name, mobile, email, birth, up_user_id, user_id))
     self.conn.commit()
     cnt = self.cs.rowcount
     return cnt
Ejemplo n.º 7
0
 def myinsert(self, survey_id, st_mobile, complete_yn, in_date, in_user_id,
              up_date, up_user_id):
     sql = mybatis_mapper2sql.get_child_statement(self.mapper, "insert")
     MyLog().getLogger().debug(sql)
     self.cs.execute(
         sql, (survey_id, st_mobile, complete_yn, in_user_id, up_user_id))
     self.conn.commit()
     cnt = self.cs.rowcount
     return cnt
Ejemplo n.º 8
0
 def myupdate(self, survey_id, title, content, interview_cnt, deadline,
              in_date, in_user_id, up_date, up_user_id):
     sql = mybatis_mapper2sql.get_child_statement(self.mapper, "update")
     MyLog().getLogger().debug(sql)
     self.cs.execute(
         sql,
         (title, content, interview_cnt, deadline, up_user_id, survey_id))
     self.conn.commit()
     cnt = self.cs.rowcount
     return cnt
Ejemplo n.º 9
0
 def myselect(self, in_user_id):
     sql = mybatis_mapper2sql.get_child_statement(self.mapper, "select")
     MyLog().getLogger().debug(sql)
     rs = self.cs.execute(sql, (in_user_id, ))
     list = []
     for record in rs:
         list.append({
             'survey_id': record[0],
             'title': record[1],
             'content': record[2],
             'interview_cnt': record[3],
             'deadline': record[4],
             'in_date': record[5],
             'in_user_id': record[6],
             'up_date': record[7],
             'up_user_id': record[8]
         })
     return list
Ejemplo n.º 10
0
 def myselect(self):
     sql = mybatis_mapper2sql.get_child_statement(self.mapper, "select")
     MyLog().getLogger().debug(sql)
     rs = self.cs.execute(sql)
     list = []
     for record in rs:
         list.append({
             'user_id': record[0],
             'pwd': record[1],
             'user_name': record[2],
             'mobile': record[3],
             'email': record[4],
             'birth': record[5],
             'in_date': record[6],
             'in_user_id': record[7],
             'up_date': record[8],
             'up_user_id': record[9]
         })
     return list
Ejemplo n.º 11
0
 def myselect(self, survey_id):
     sql = mybatis_mapper2sql.get_child_statement(self.mapper, "select")
     MyLog().getLogger().debug(sql)
     rs = self.cs.execute(sql, (survey_id, ))
     list = []
     for record in rs:
         list.append({
             'survey_id': record[0],
             's_seq': record[1],
             'question': record[2],
             'a1': record[3],
             'a2': record[4],
             'a3': record[5],
             'a4': record[6],
             'in_date': record[7],
             'in_user_id': record[8],
             'up_date': record[9],
             'up_user_id': record[10],
             'in_user_id': record[11]
         })
     return list